2 from sys import argv, exit
4 from geometry_msgs.msg import Pose
5 from obstacle_msgs.msg import ParkingSlot
8 from iamcar.srv import Park
10 def park_cli(init=None, goal=None, slot=None):
17 rospy.wait_for_service("Park")
19 park_f = rospy.ServiceProxy("Park", Park)
20 res = park_f(init, goal, slot)
22 except rospy.ServiceException as e:
23 print("Service failed: {}".format(e))
25 if __name__ == "__main__":
30 init.orientation.x = 0
31 init.orientation.y = 0
32 init.orientation.z = 0
33 init.orientation.w = 1
38 goal.orientation.x = 0
39 goal.orientation.y = 0
40 goal.orientation.z = 0
41 goal.orientation.w = 1
43 print("path len: {}".format(len(park_cli(init, goal, slot))))
44 #print("path: {}".format(park_cli(init, goal, slot)))