31 PKG =
"pr2_mechanism_controllers" 33 import roslib; roslib.load_manifest(PKG)
38 from time
import sleep
41 from geometry_msgs.msg
import PointStamped, Point
42 from sensor_msgs.msg
import JointState
46 head_angles = rospy.Publisher(
'head_controller/command', JointState)
47 rospy.init_node(
'head_commander', anonymous=
True)
50 js.name = [
'head_pan_joint',
'head_tilt_joint'];
51 js.position = [pan,tilt];
52 head_angles.publish(js)
57 head_angles = rospy.Publisher(
'head_controller/point_head', PointStamped)
58 rospy.init_node(
'head_commander', anonymous=
True)
60 head_angles.publish(PointStamped(rospy.Header(
None, rospy.get_rostime(), frame), Point(x, y, z)))
65 return "%s [pan tilt] or [x,y,z,frame]"%sys.argv[0]
67 if __name__ ==
"__main__":
72 elif len(sys.argv) ==3:
74 elif len(sys.argv) ==5:
def point_head_client(pan, tilt)
def point_head_cart_client(x, y, z, frame)