torso_down.py
Go to the documentation of this file.
1 #! /usr/bin/python
2 import roslib
3 roslib.load_manifest('pr2_position_scripts')
4 
5 import rospy
6 import actionlib
7 from trajectory_msgs.msg import *
8 
9 
10 
11 torso_pub= rospy.Publisher('torso_controller/command', JointTrajectory)
12 rospy.init_node('torso_up')
13 
14 while not rospy.is_shutdown():
15  traj = JointTrajectory()
16  traj.header.stamp = rospy.get_rostime()
17  traj.joint_names.append("torso_lift_joint");
18  traj.points.append(JointTrajectoryPoint())
19  traj.points[0].positions.append(0.0)
20  traj.points[0].velocities.append(0.1)
21  traj.points[0].time_from_start = rospy.Duration(0.25)
22  torso_pub.publish(traj)
23  rospy.sleep(rospy.Duration.from_sec(0.2))
24 


pr2_position_scripts
Author(s): Tony Pratkanis
autogenerated on Thu Jun 6 2019 19:18:45