0
$\begingroup$

Gazebo Answers logo

as title thanks a lot


Originally posted by lugd1229 on Gazebo Answers with karma: 75 on 2012-11-18

Post score: 3


Original comments

Comment by skhan on 2013-04-05:
No one is here to answer it =(

$\endgroup$

1 Answer 1

0
$\begingroup$

Gazebo Answers logo

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.


Originally posted by hsu with karma: 1873 on 2013-04-05

This answer was ACCEPTED on the original site

Post score: 3


Original comments

Comment by iche033 on 2013-04-05:
you can also create a contact sensor as described in this tutorial: http://gazebosim.org/wiki/Tutorials/1.5/sensors/contact

Comment by skhan on 2013-04-09:
Thanks guys =)

Comment by Lucas Walter on 2014-11-13:
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.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.