32 roslib.load_manifest(
'robot_mechanism_controllers')
36 rospy.init_node(
'posture_publisher', disable_signals=
True, anonymous=
True)
38 controller = rospy.myargv()[1]
39 posture = rospy.myargv()[2]
42 pub_posture = rospy.Publisher(
"/%s/command_posture" % controller, Float64MultiArray)
45 'mantis': [0, 1, 0, -1, 3.14, -1, 3.14],
46 'elbowupr': [-0.79,0,-1.6, 9999, 9999, 9999, 9999],
47 'elbowupl': [0.79,0,1.6 , 9999, 9999, 9999, 9999],
48 'old_elbowupr': [-0.79,0,-1.6, -0.79,3.14, -0.79,5.49],
49 'old_elbowupl': [0.79,0,1.6, -0.79,3.14, -0.79,5.49],
50 'elbowdownr': [-0.028262077316910873, 1.2946342642324222, -0.25785640577652386, -1.5498884526859626, -31.278913849571776, -1.0527644894829107, -1.8127318367654268],
51 'elbowdownl': [-0.0088195719039858515, 1.2834828245284853, 0.20338442004843196, -1.5565279256852611, -0.096340012666916802, -1.0235018652439782, 1.7990893054129216]
54 while not rospy.is_shutdown():
55 m = Float64MultiArray(data = postures[posture])
56 pub_posture.publish(m)