An entity component system (ECS) represents a simulated world as entities, attaches composable data components to them, and lets systems process that data. In Gazebo, an entity may be a model, sensor, actuator, or light; components hold properties such as pose, geometry, mass, and color. section 5.4
A robotics ECS divides simulation responsibilities into:
- Entities: unique identifiers for simulated objects. section 5.4
- Components: data describing entities, including names, poses, geometry, mass, and color. section 5.4
- Systems: plugin algorithms that read components and write effects or updated state back to entities. section 5.4
- Entity Component Managers: stores that server and GUI plugins use to access their respective ECS state. section 5.4
Gazebo simulation step
A simulation loop runs each system before physics, updates the physics engine, then runs systems afterward. Systems communicate by changing components rather than embedding every robot assumption in the simulator. section 5.4
Figure 5.10 The Gazebo simulator has a modular architecture built around an Entity Component System (ECS), separating the headless simulation server from the graphical client while synchronizing entities, components, and plugin systems through the Gazebo transport layer. [7]
Use the architecture diagram to trace the modular separation between Gazebo’s headless server, GUI client, plugins, ECS managers, and transport layer. section 5.4
while True:
for system in systems:
system.pre_update(ecm)
physics_engine.update(ecm)
for system in systems:
system.post_update(ecm)
sim_time += time_step
Use the pseudocode to inspect the ECS simulation loop from system updates through physics integration and advancing simulation time. section 5.4

