Skip to content
Silvio Traversaro edited this page Mar 19, 2014 · 5 revisions

gazebo_yarp_plugins structure

To understand the structure of gazebo_yarp_plugins, it is useful to understand what Gazebo plugins and Yarp device drivers are.

In a nutshell, Gazebo plugins are C++ classes that extends the functionalities of Gazebo simulator, while Yarp device drivers are classes used in Yarp for abstracting the functionality of devices used in robots.

For additional information it is possible to access official documentation both for Gazebo plugins and for Yarp Device Drivers.

The gazebo_yarp_plugins is made of:

  • gazebo plugins that instantiate yarp device drivers
  • yarp device drivers that wrap gazebo functionality inside the yarp device interfaces

The plugins/devices currently implemented are:

Functionality Gazebo Plugin class Yarp Device class
Control Board (encoder readings, motor control, ...) GazeboYarpControBoard GazeboYarpControBoardDriver
6-axis Force Torque sensor GazeboYarpForceTorque GazeboYarpForceTorqueDriver
Inertial Measurement Unit GazeboYarpIMU GazeboYarpIMUDriver

Using the plugins in Gazebo Models

In Gazebo, the simulated models are described using the SDF (simulation description format), an XML based file format that can be produced easily from URDF files (the description format used in the ROS project). The plugins are included in the simulated model using the "plugin" tag, by specifying the name of the plugin shared object. Configuration of the plugin is provided trough the child element of the "plugin" tag, as in this example for the controlboard of the coman torso:

 <plugin name="coman_torso_controlboard" filename="libgazebo_yarp_controlboard.so">
    <yarpConfigurationFile>model://coman_urdf/conf/coman_gazebo_torso.ini</yarpConfigurationFile>
 </plugin>

The coman_gazebo_torso.ini is a yarp configuration file that mimics the structure of the configuration file for the real controlboards: https://github.com/EnricoMingo/iit-coman-ros-pkg/blob/master/coman_gazebo/sdf/conf/coman_gazebo_torso.ini

Clone this wiki locally