Skip to content

simulo.Simulation

Represents the simulation runtime and temporal context.

Simulation exists to answer one question: how does simulation time advance?

Responsibilities:

  • Defines the simulation timestep (dt) and substepping
  • Advances physics deterministically
  • Coordinates sensor updates
  • Manages random seeds and reproducibility
  • Controls device placement (CPU/GPU)
  • Owns the simulation lifecycle (reset, close)

Invariant: The Simulation controls time, not content.

You rarely construct simulo.Simulation yourself — the runtime injects one into a Scenario (as self.simulation) or Task. Real usage, from the shipped scene app’s on_start — framing the viewer’s camera once:

self.simulation.viewer.set_camera(eye=(6.0, 0.0, 4.0), look_at=(0.0, 0.0, 2.0))
simulo.Simulation(
dt: float = 0.01,
device: Union[str, 'torch.device'] = 'cuda',
render_dt: Optional[float] = None,
seed: int = 0,
backend: Optional[Any] = None,
scene: Optional['Scene'] = None,
)
Simulation.reset() -> None

Reset the simulation.

Simulation.step(paused: bool = False) -> None

Advance simulation by one timestep.

Automatically flushes pending commands from robots and actuators before stepping physics. Users only need to call set_commands() or set_joint_state(); write_to_sim() is no longer needed.

Args:

  • paused — If True, only render without advancing physics
Simulation.close() -> None

Close the simulation and cleanup resources.

Simulation.current_time: float

property

Get current simulation time in seconds.

Returns:

Current time

Simulation.step_count: int

property

Get number of simulation steps executed.

Returns:

Step count

Simulation.viewer: Viewer

property

Get the viewer interface.

Returns:

Viewer instance