gazebo-yarp-plugins
Gazebo Plugins exposing YARP interfaces.
|
This directory contains the example of a model using the gazebo_yarp_forcetorque
plugin.
For more information on simulation of Force/Torque sensors in Gazebo Classic, see https://classic.gazebosim.org/tutorials?tut=force_torque_sensor&cat=sensors.
To run this example, first of all run yarpserver
in a terminal, then make sure to have added gazebo-yarp-plugins/tutorial/model
directory to GAZEBO_MODEL_PATH
as documented in the "Example models" section of the doc/embed_plugins.md
documentation and then run the world.
Then:
If the simulation starts correctly, you should see a model composed by a cylinder and a box. The FT sensor measures the force exchanged between the cylinder and the box. To check if the YARP plugin works as expected, open a new terminal and type:
To list all the YARP ports open. You should see the port /forcetorque/measures:o
, that is the one opened by the plugin.
You can then read the measures from the the /forcetorque/measures:o
with the command:
As output you should see:
There is a parenthesis with six numbers, the first three are force and the last three are torques. In this case, it is possible to see that the force measure make sense as the weight of the link is 10 Kg, and the acceleration of gravity is 9.8, so the measure norm on the Z axis is correctly approximately 9.8*10 = 98.0 .