Gazebo | Ignition | Community
Ask Your Question

how to insert a force or torque sensor to gazebo model?

asked 2012-11-18 20:09:57 -0500

lugd1229 gravatar image

as title thanks a lot

edit retag flag offensive close merge delete


No one is here to answer it =(

skhan gravatar imageskhan ( 2013-04-05 04:49:43 -0500 )edit

1 Answer

Sort by » oldest newest most voted

answered 2013-04-05 08:42:17 -0500

hsu gravatar image

Hi Skhan, sorry for the late reply, one way to do this is to create a model plugin, for example, see this tutorial on how to create a model plugin. In the plugin update loop, you can get the force torque information from one of the joints in the model by calling:

    physics::JointWrench wrench = this->model->GetJoint("...your model joint name...")->GetForceTorque(0u);

On the SDF side, in your model, you must set <provide_feedback> to true for this to work.

edit flag offensive delete link more


you can also create a contact sensor as described in this tutorial:

iche033 gravatar imageiche033 ( 2013-04-05 23:12:38 -0500 )edit

Thanks guys =)

skhan gravatar imageskhan ( 2013-04-09 07:03:29 -0500 )edit
1 is the new link to the sensor contact tutorial, the above wiki link is dead now.

Lucas Walter gravatar imageLucas Walter ( 2014-11-13 10:46:28 -0500 )edit

Question Tools


Asked: 2012-11-18 20:09:57 -0500

Seen: 5,113 times

Last updated: Apr 05 '13