Gazebo | Ignition | Community
Ask Your Question
3

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

Comments

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
3

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

Comments

you can also create a contact sensor as described in this tutorial: http://gazebosim.org/wiki/Tutorials/1.5/sensors/contact

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

http://www.gazebosim.org/tutorials?tut=contact_sensor&cat=sensors 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

Stats

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

Seen: 5,136 times

Last updated: Apr 05 '13