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

How to add a torque sensor to a 4-wheeled robot?

asked 2011-12-13 08:47:40 -0600

jimmycuff gravatar image

updated 2011-12-14 01:56:00 -0600

Can someone point me in the right direction as to how to add torque sensors (or get torque feedback) to each wheel of a robot?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2011-12-14 08:39:34 -0600

DimitriProsser gravatar image

updated 2011-12-16 02:34:08 -0600

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:




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.

edit flag offensive delete link more


I'm not sure I follow. I don't see anything about joint_state_blw_->position_ or commanded_effor_ in the file. It looks like the drive controller for the erratic robot that takes in a Twist and converts it to velocity. Could you expand on your post or point me to the specific function calls?
jimmycuff gravatar image jimmycuff  ( 2011-12-14 08:58:02 -0600 )edit
Totally my bad. I pasted the wrong link. It should be better now. Sorry about that.
DimitriProsser gravatar image DimitriProsser  ( 2011-12-14 09:15:04 -0600 )edit
Is there any other way without inheriting from pr2_controller_interface? I'm actually starting with the first link you sent:
jimmycuff gravatar image jimmycuff  ( 2011-12-16 01:47:09 -0600 )edit
I feel like there should be a more straightforward way... a simple function call to get joint commanded effort from within this file.
jimmycuff gravatar image jimmycuff  ( 2011-12-16 01:48:06 -0600 )edit

Question Tools


Asked: 2011-12-13 08:47:40 -0600

Seen: 414 times

Last updated: Dec 16 '11