$\color{white}\colorbox{FE9227}{Making significant progress and broadening expertise!}$
$$▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░░░░░░░░ 71.5%
Gazebo plugins give your URDF models greater functionality and can tie in ROS messages and service calls for sensor output and motor input. Using Gazebo plugins, it's possible to add wheel odometry, steering control, SLAM sensors, or visual renderings.
Whenever possible, using Gazebo plugins to control the movement of a robot is preferred as it better integrates into the simulation environment.
Model plugins can provide access to physics emulations for your robot. This pulls from the physics::Model
API. The ModelPlugin
is inserted in the URDF inside the <robot>
element. It is wrapped with the <gazebo>
pill to indicate information passed to Gazebo. For example, for the diffdrive
plugin.
<robot>
... robot description ...
<gazebo>
<plugin name="differential_drive_controller" filename="libgazebo_ros_diff_drive.so">
... plugin parameters ...
</plugin>
</gazebo>
... robot description ...
</robot>
Upon loading the robot model within Gazebo, the diffdrive_plugin
code will be given a reference to the model itself, allowing it to manipulate it.
The libgazebo_ros_diff_drive.so
plugin is only one example of model plugins that can be passed into your robot simulation. A full list of these model plugins, compatible with ROS 2, with a link to information containing an example code template, descriptions of description tags, and package information is shown below: