ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
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.
2 | No.2 Revision |
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.