gazebo-yarp-plugins
Gazebo Plugins exposing YARP interfaces.
|
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:
Furthermore, in gazebo-yarp-plugins
there are several plugins that do not mimic any interface or capability present in real robots, but are nevertheless useful for simulating complex scenarios.
Functionality | Plugin Name | Plugin Type | Gazebo Plugin class | YARP Device class (if any) |
---|---|---|---|---|
Control Board (encoder readings, motor control, ...) | gazebo_yarp_controlboard | Model | gazebo::GazeboYarpControlBoard | yarp::dev::GazeboYarpControlBoardDriver |
6-Axis Force Torque sensor | gazebo_yarp_forcetorque | Sensor | gazebo::GazeboYarpForceTorque | yarp::dev::GazeboYarpForceTorqueDriver |
Inertial Measurement Unit | gazebo_yarp_imu | Sensor | gazebo::GazeboYarpIMU | yarp::dev::GazeboYarpIMUDriver |
Camera | gazebo_yarp_camera | Sensor | gazebo::GazeboYarpCamera | yarp::dev::GazeboYarpCameraDriver |
Depth Camera | gazebo_yarp_depthCamera | Sensor | gazebo::GazeboYarpDepthCamera | yarp::dev::GazeboYarpDepthCameraDriver |
Fake Control Board (the same interface of the Control Board, but over non-existing joints) | gazebo_yarp_fakecontrolboard | Model | gazebo::GazeboYarpFakeControlBoard | yarp::dev::GazeboYarpFakeControlBoardDriver |
Lidar Sensor | gazebo_yarp_lasersensor | Sensor | gazebo::GazeboYarpLaserSensor | yarp::dev::GazeboYarpLaserSensorDriver |
Coupled Joint Encoders | gazebo_yarp_maissensor | Model | gazebo::GazeboYarpMaisSensor | yarp::dev::GazeboYarpMaisSensorDriver |
Stereo Cameras | gazebo_yarp_multicamera | Sensor | gazebo::GazeboYarpMultiCamera | yarp::dev::GazeboYarpMultiCameraDriver |
Contact Load Cell Array | gazebo_contactloadcellarray | Model | gazebo::GazeboYarpContactLoadCellArray | yarp::dev::GazeboYarpContactLoadCellArrayDriver |
Functionality | Plugin Name | Plugin Type | Gazebo Plugin class | YARP Device class (if any) |
---|---|---|---|---|
Clock synchronization | gazebo_yarp_clock | System | gazebo::GazeboYarpClock | |
Apply external force/torque via YARP facilities | gazebo_yarp_externalwrench | Model | gazebo::ApplyExternalWrench | |
Display the Center of Mass of a model | gazebo_yarp_showmodelcom | Model | gazebo::ShowModelCoM | |
Project an image stream on a simulated surface | gazebo_yarp_videotexture | Visual | gazebo::VideoTexture | |
Expose a YARP RPC interface to create/manipulate objects programatically. | gazebo_yarp_worldinterface | Model | gazebo::WorldInterface | |
Publish the absolute pose of the root link of a model. | gazebo_yarp_modelposepublisher | Model | gazebo::GazeboYarpModelPosePublisher | |
Expose a YARP RPC interface to attach/detach links of the models spawned to the links of the robot using a fixed joint. | gazebo_yarp_rpc_linkattacher | Model | gazebo::GazeboYarpLinkAttacher | |
Exposes the absolute pose, velocity and acceleration of a desired link through YARP analog server device | gazebo_basestate | Model | gazebo::GazeboYarpBaseState | yarp::dev::GazeboYarpBaseStateDriver |
Changes the value of the property of a specific plugin attached to the model (if not present, the configuration is created) | gazebo_yarp_configurationoverride | Model | gazebo::GazeboYarpConfigurationOverride |
In Gazebo, the simulated models are described using the [SDF (simulation description format)]((http://gazebosim.org/sdf.html), an XML-based file format. Depending on the Gazebo Plugin Type, the way of loading or adding a plugin to a model changes, and the complete documentation is available at http://gazebosim.org/tutorials?cat=write_plugin .
For model plugins such as the gazebo_yarp_controlboard
, a plugin can be loaded by adding a <plugin>
SDF tag as a child of the <model>
SDF tag that describes the model.
Most Model and Sensor plugins present in gazebo-yarp-plugins
read their configuration from the file referenced in the yarpConfigurationFile
tag. The location of the file is defined by using a Gazebo URI, while the file is a .ini YARP configuration file. Alternatively, parameters can be passed directly in the sdf
with the Bottle
format using the yarpConfigurationString
tag (e.g. <yarpConfigurationString>(name /iCub/linkattacher/rpc:i)</yarpConfigurationString>
). When using yarpConfigurationString
, it is important to remember that:
yarpConfigurationString
can be defined for each plugin.<yarpConfigurationFile>
and <yarpConfigurationString>
can coexist, but if a parameter is defined in both the value in <yarpConfigurationString>
will always be used.For specific information consumed by each plugin, please refer to the doxygen documentation of the specific plugin class.
System plugins instead need to be loaded at the beginning of the simulation, and hence they are passed as command line arguments when launching gazebo
(or gzserver
). For using the YARP clock plugin, for example:
A collection of example model showcasing the capabilities of the gazebo-yarp-plugins
are available in the tutorial/model
subfolder of this repository. To spawn this models in Gazebo, add the tutorial/model
directory to the GAZEBO_MODEL_PATH
enviromental variable, or load it from the Gazebo GUI.