Gazebo Gazebo

API Reference

3.15.2
System Class Reference

Base class for a System. More...

#include <ignition/gazebo/System.hh>

Public Member Functions

 System ()
 Constructor. More...
 
virtual ~System ()
 Destructor. More...
 

Detailed Description

Base class for a System.

A System operates on Entities that have certain Components. A System will only operate on an Entity if it has all of the required Components.

Systems are executed in three phases, with each phase for a given step corresponding to the entities at time UpdateInfo::simTime:

  • PreUpdate
    • Has read-write access to world entities and components.
    • This is where systems say what they'd like to happen at time UpdateInfo::simTime.
    • Can be used to modify state before physics runs, for example for applying control signals or performing network syncronization.
  • Update
    • Has read-write access to world entities and components.
    • Used for physics simulation step (i.e., simulates what happens at time UpdateInfo::simTime).
  • PostUpdate
    • Has read-only access to world entities and components.
    • Captures everything that happened at time UpdateInfo::simTime.
    • Used to read out results at the end of a simulation step to be used for sensor or controller updates.

It's important to note that UpdateInfo::simTime does not refer to the current time, but the time reached after the PreUpdate and Update calls have finished. So, if any of the *Update functions are called with simulation paused, time does not advance, which means the time reached after PreUpdate and Update is the same as the starting time. This explains why UpdateInfo::simTime is initially 0 if simulation is started paused, while UpdateInfo::simTime is initially UpdateInfo::dt if simulation is started un-paused.

Constructor & Destructor Documentation

◆ System()

System ( )

Constructor.

◆ ~System()

virtual ~System ( )
virtual

Destructor.


The documentation for this class was generated from the following file: