tuck_arm.py
Go to the documentation of this file.
00001 #!/usr/bin/env python
00002 
00003 import rospy
00004 import actionlib
00005 from play_motion_msgs.msg import PlayMotionAction, PlayMotionGoal
00006 from sensor_msgs.msg import JointState
00007 
00008 if __name__ == "__main__":
00009   rospy.init_node("tuck_arm")
00010   rospy.loginfo("Waiting for play_motion...")
00011   client = actionlib.SimpleActionClient("/play_motion", PlayMotionAction)
00012   client.wait_for_server()
00013   rospy.loginfo("...connected.")
00014 
00015   rospy.wait_for_message("/joint_states", JointState)
00016   rospy.sleep(3.0)
00017 
00018   rospy.loginfo("Tuck arm...")
00019   goal = PlayMotionGoal()
00020   goal.motion_name = 'home'
00021   goal.skip_planning = True
00022 
00023   client.send_goal(goal)
00024   client.wait_for_result(rospy.Duration(10.0))
00025   rospy.loginfo("Arm tucked.")


tiago_gazebo
Author(s): Bence Magyar , Sammy Pfeiffer , Jordi Pages
autogenerated on Thu Sep 22 2016 03:45:20