-
Notifications
You must be signed in to change notification settings - Fork 49
Design
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 extend the functionalities of the 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 the official documentation for both Gazebo plugins and Yarp Device Drivers.
The gazebo-yarp-plugins consists of:
- gazebo plugins that instantiate yarp device drivers
- yarp device drivers that wrap gazebo functionalities 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 |
In Gazebo, the simulated models are described using the SDF (simulation description format), an XML-based file format that can be easily produced 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 CoMan's 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 control boards: https://github.com/EnricoMingo/iit-coman-ros-pkg/blob/master/coman_gazebo/sdf/conf/coman_gazebo_torso.ini