ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

In the callback

current_position = data.current_pos

should do the trick. Also note, that this:

rospy.Subscriber("/joint6_controller/state", current_pos, callback)

should be this:

rospy.Subscriber("/joint6_controller/state", JointState, callback)

The dynamixel controller Joint State message documentation is here. If you want to access any other member, just call "data.<member name="">".

Hope this helps.

In the callback

current_position = data.current_pos

should do the trick. Also note, that this:

rospy.Subscriber("/joint6_controller/state", current_pos, callback)

should be this:

rospy.Subscriber("/joint6_controller/state", JointState, callback)

The dynamixel controller Joint State message documentation is here. If you want to access any other member, just call "data.<member name="">"."data.[member name goes here]".

Hope this helps.