Skip to content

Using Gazebo

Robots, Models, and Worlds

Robots, worlds, and assets in Gazebo are encoded in the SDFormat, which is syntactically equivalent to XML. See this tutorial on how to setup a basic robot with SDF.

Key points
  • All worlds and assets are models in SDFormat, save them with the .sdf extension
  • Every model is a group of <link></link> tags that are connected together by <joint></joint> tags.
  • Connect links by specifying them with <parent> and <child> tags within the joints.

Plugins

You can use plugin to make a roboti move. A plugin is a shared library that is inserted in the simultion's declaration (in SDF) via the <plugin></plugin> tag. Plugins are fundamentally how you control the simulation and it's assets. See [here] for a primer on the attributes available to the plugin tag.

Once you specify the topic of publish using the gz topic command, you can move the vehicle.

Plugins are powerful tool for simulation that let the user potentially interact with the simulation via keys.

Case Study: Wave Mechanics Simulation

The asv_wave_sim project provides the code and plugins to simulation waves in Gazebo. The documentation for the project is sufficient to get started, but in the process of getting the first simulation setup, there were a number of hurdle resolve. This case study will guide you through those steps, and in the process, illuminate concepts required to fully leverage Gazebo as a simulation platform.

  1. Install colcon, if you've never heard of this tool before, read about it here.
  2. You need to make sure you have abseil installed either globally or for the project.
  3. Gazebo can only find your models and resources if you have the environment variables set correctly, refer to the Finding resources page for where you should look for assets and how to search for them with relevant environment variables.