00001
00002 import roslib
00003 roslib.load_manifest('pr2_position_scripts')
00004
00005 import rospy
00006 import actionlib
00007 from trajectory_msgs.msg import *
00008
00009
00010
00011 torso_pub= rospy.Publisher('torso_controller/command', JointTrajectory)
00012 rospy.init_node('torso_up')
00013
00014 while not rospy.is_shutdown():
00015 traj = JointTrajectory()
00016 traj.header.stamp = rospy.get_rostime()
00017 traj.joint_names.append("torso_lift_joint");
00018 traj.points.append(JointTrajectoryPoint())
00019 traj.points[0].positions.append(0.0)
00020 traj.points[0].velocities.append(0.1)
00021 traj.points[0].time_from_start = rospy.Duration(0.25)
00022 torso_pub.publish(traj)
00023 rospy.sleep(rospy.Duration.from_sec(0.2))
00024