Go to the documentation of this file.00001
00002
00003 import roslib; roslib.load_manifest('srs_decision_making')
00004 import rospy
00005 import sys
00006
00007
00008 import actionlib
00009
00010
00011
00012 import srs_decision_making.msg as xmsg
00013
00014 def DM_client(target_pos):
00015
00016
00017 client = actionlib.SimpleActionClient('srs_decision_making_actions', xmsg.ExecutionAction)
00018
00019
00020
00021 client.wait_for_server()
00022
00023
00024 _goal=xmsg.ExecutionGoal()
00025 _goal.action="move"
00026 _goal.parameter=target_pos
00027 _goal.priority=0
00028
00029 client.send_goal(_goal)
00030
00031
00032 client.wait_for_result()
00033
00034
00035 return client.get_result()
00036
00037 if __name__ == '__main__':
00038 try:
00039
00040
00041 target_pos = sys.argv[1]
00042 print "moving to", target_pos
00043 rospy.init_node('dm_client2')
00044 result = DM_client(target_pos)
00045 rospy.loginfo('result %s',result)
00046
00047 except rospy.ROSInterruptException:
00048 print "program interrupted before completion"