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

Give this file a look. It is a good example of how to get a joint's commanded effort (aka torque).

Just note, instead of:

joint_state_blw_->position_;

Use:

joint_state_blw_->commanded_effor_;

Give this file a look. It is a good example of how to get a joint's commanded effort (aka torque).

Just note, instead of:

joint_state_blw_->position_;

Use:

joint_state_blw_->commanded_effor_;

Give this file a look. It is a good example of how to get a joint's commanded effort (aka torque).

Just note, instead of:

joint_state_blw_->position_;

Use:

joint_state_blw_->commanded_effor_;
joint_state_blw_->commanded_effort_;

EDIT: The reason that I suggested using the pr2_controller_interface is that it's what provides a ROS API to Gazebo. By default, ROS has no access to Gazebo joint information. It's the pr2_controllers that allow us to obtain information and publish messages to Gazebo. By adding such a controller to your robot, you're able to monitor the joints in real time (with respect to Gazebo).

You could always try subscribing to /joint_states instead, but I don't know if that will provide the information that you require.