intrinsic.solutions.simulation.Simulation
![]() View source on GitHub |
Provides commands to interact with a running simulation.
intrinsic.solutions.simulation.Simulation(
simulation_service: intrinsic.solutions.simulation.SimulationServiceStub,
object_world_service: intrinsic.solutions.simulation.ObjectWorldServiceStub
)
Args | |
|---|---|
The gRPC stub to be used for communication with the simulation service. | |
The gRPC stub to be used for communication with the object world service. | |
Methods
connect
View source
@classmethodconnect( grpc_channel: grpc.Channel ) -> 'Simulation'
Create a Simulation instance using the given gRPC address.
| Args | |
|---|---|
| Address of the simulation gRPC service to use. |
| Returns | |
|---|---|
A newly created Simulation instance. |
get_realtime_factor
View source
get_realtime_factor() -> float
Gets the simulation realtime factor.
If a simulation is actively running, returns the ratio of simulation to real time, i.e. the time elapsed in the sim world within a unit timespan on the real clock.
| Returns | |
|---|---|
float Realtime factor |
reset
View source
reset() -> None
Resets the simulation world to its initial state.
Also makes sure that all affected components such as ICON are in a working state.
