upkie 9.0.0
Open-source wheeled biped robots
Loading...
Searching...
No Matches

◆ simulate()

void simulate ( unsigned  nb_substeps)

Alternative to run where the actuation interface is cycled a fixed number of times, and communication cycles are not frequency-regulated.

Parameters
[in]nb_substepsNumber of actuation cycles per action.

Thus function assumes the agent alternates acting and observing. Simulation steps are triggered at startup (to construct the initial observation) and at each action request.

Note
As its name suggests, do not use this function on a real robot.

Note that there is currently a delay of three substeps between observation and simulation. That is, the internal simulation state is always three substeps ahead compared to the values written to the observation dictionary when cycling the actuation. This decision is discussed in https://github.com/orgs/upkie/discussions/238#discussioncomment-8984290