Gazebo uses a distributed architecture with separate libraries for physics simulation, rendering, user interface, communication, and sensor generation. Additionally, gazebo provides two executable programs for running simulations:
gzserver for simulating the physics, rendering, and sensors
gzclient that provides a graphical interface to
visualize and interact with the simulation
The client and server communicate using the gazebo communication library.
The communication library currently uses the open source
Google Protobuf for the message serialization
boost::ASIO for the transport mechanism.
It supports the publish/subscribe communication paradigm.
For example, a simulated world publishes body pose updates,
and sensor generation and GUI will consume these messages to produce output.
This mechanism allows for introspection of a running simulation, and provides a convenient mechanism to control aspects of Gazebo.
This is essentially a topic name server. It provides name lookup, and topic management. A single master can handle multiple physics simulations, sensor generators, and GUIs.
This library is used by almost all subsequent libraries. It acts as the communication and transport mechanism for Gazebo. It currently supports only publish/subscribe, but it is possible to use RPC with minimal effort.
The physics library provides a simple and generic interface to fundamental simulation components, including rigid bodies, collision shapes, and joints for representing articulation constraints. This interface has been integrated with four open-source physics engines:
A model described in the Simulation Description Format (SDF) using XML can be loaded by each of these physics engines. This provides access to different algorithm implementations and simulation features.
The rendering library uses OGRE to provide a simple interface for rendering 3D scenes to both the GUI and sensor libraries. It includes lighting, textures, and sky simulation. It is possible to write plugins for the rendering engine.
The sensor generation library implements all the various types of sensors, listens to world state updates from a physics simulator and produces output specified by the instantiated sensors.
The GUI library uses Qt to create graphical widgets for users to interact with the simulation. The user may control the flow of time by pausing or changing time step size via GUI widgets. The user may also modify the scene by adding, modifying, or removing models. Additionally there are some tools for visualizing and logging simulated sensor data.
The physics, sensor, and rendering libraries support plugins. These plugins provide users with access to the respective libraries without using the communication system.