Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007 import rospy
00008 import sys
00009 import actionlib
00010
00011 from naoqi_bridge_msgs.msg import BodyPoseAction, BodyPoseGoal
00012
00013 if __name__ == '__main__':
00014 if len(sys.argv) != 2:
00015 sys.exit('\nUSAGE: %s pose_name\n\n' % sys.argv[0])
00016
00017 rospy.init_node('execute_pose')
00018
00019 poseClient = actionlib.SimpleActionClient("body_pose", BodyPoseAction)
00020 if not poseClient.wait_for_server(rospy.Duration(3.0)):
00021 rospy.logfatal("Could not connect to required \"body_pose\" action server, is the pose_manager node running?");
00022 rospy.signal_shutdown();
00023
00024 goal = BodyPoseGoal
00025 goal.pose_name = str(sys.argv[1])
00026 rospy.loginfo("Calling pose_manager for pose %s...", goal.pose_name)
00027
00028
00029 poseClient.send_goal_and_wait(goal, rospy.Duration(5.0))
00030
00031 exit(0)