Skip to content

Joint Pose Design and Code Walk Through

rethink-cgindel edited this page Jan 28, 2013 · 1 revision

Interface:

from sensor_msgs.msg import JointState from sensor_msgs.msg import Joy from baxter_msgs.msg import JointCommandMode from baxter_msgs.msg import JointPositions

Are we using this? self.pubGoto = rospy.Publisher('/robot/limb/' + arm + '/accessory/gripper/command_goto', Float32)

This is our control interface and sensing i/f self.pubLeftMode = rospy.Publisher('/robot/limb/left/joint_command_mode', JointCommandMode) self.pubRightMode = rospy.Publisher('/robot/limb/right/joint_command_mode', JointCommandMode) self.pubLeft = rospy.Publisher('/robot/limb/left/command_joint_angles', JointPositions) self.pubRight = rospy.Publisher('/robot/limb/right/command_joint_angles', JointPositions)

This needs to move to use /robot/joint_states since dan is cleaning this stuff up.

self.subLeft = rospy.Subscriber('/robot/limb/left/joint_states', JointState, self.leftJointState)
self.subRight = rospy.Subscriber('/robot/limb/right/joint_states', JointState, self.rightJointState)

def setPositionMode(self): """ Set Baxter's joint command mode to Position Control publishes the desire to put the robot in position control mode """ msg = JointCommandMode() msg.mode = JointCommandMode.POSITION self.pubLeftMode.publish(msg) self.pubRightMode.publish(msg)

Clone this wiki locally