torso_up.py
Go to the documentation of this file.
00001 #! /usr/bin/python
00002 import roslib
00003 roslib.load_manifest('pr2_position_scripts')
00004 
00005 import rospy
00006 import actionlib
00007 from pr2_controllers_msgs.msg import SingleJointPositionAction, SingleJointPosi\
00008 tionGoal
00009 
00010 rospy.init_node('torso_up')
00011 torso_action_client = actionlib.SimpleActionClient('torso_controller/position_j\
00012 oint_action', SingleJointPositionAction);
00013 rospy.loginfo("torso_up: waiting for torso action server")
00014 torso_action_client.wait_for_server()
00015 rospy.loginfo("torso_up: torso action server found")
00016 goal = SingleJointPositionGoal()
00017 goal.position = 0.295
00018 rospy.loginfo("torso_up: sending command to lift torso")
00019 torso_action_client.send_goal(goal)
00020 torso_action_client.wait_for_result(rospy.Duration(30))
00021 


pr2_position_scripts
Author(s): Tony Pratkanis
autogenerated on Thu Nov 28 2013 11:38:14