how to insert a force or torque sensor to gazebo model?
as title thanks a lot
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.
you can also create a contact sensor as described in this tutorial: http://gazebosim.org/wiki/Tutorials/1.5/sensors/contact
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.
Asked: 2012-11-18 20:09:57 -0500
Seen: 5,136 times
Last updated: Apr 05 '13
problem with including a model
where is <uri>model://camera</uri> ?
How to get model properties in a sensor plugin?
Attaching A Sensor To An Animated Actor
6-wheeled wheelchair model in gazebo
Object falls off through ground plane instead of resting on it, when spawned in Gazebo
Reload sdf using gz does not update model
GpuRaySensor.hh missing in 1.3?
No one is here to answer it =(