nanover.omni.omni module

class nanover.omni.omni.InternalRunner(omni: OmniRunner, simulation: Simulation, app_server: NanoverImdApplication)

Bases: object

handle_signals()
property play_step_interval
run()
class nanover.omni.omni.OmniRunner(app_server: NanoverImdApplication)

Bases: object

Provides a NanoVer server that supports switching between multiple simulations.

add_simulation(simulation: Simulation)

Add a simulation to list of available simulations to switch between. :param simulation: The simulation to add

property app_server

The NanoVer application server used by this runner.

close()

Stop simulations and shut down server.

property is_paused
Returns:

True if the current simulation is paused, False otherwise.

list()

Get the list of available simulations.

load(index: int)

Switch to the simulation at a given index. :param index: Index of simulation to switch to :return:

next()

Switch to the next simulation in the list of available simulations, looping after the last.

pause()

Pause the currently-active simulation.

play()

Unpause the currently-active simulation.

print_basic_info_and_wait()

Print out basic runner info to the terminal and await keyboard interrupt.

reset()

Reset the currently-active simulation to its initial state.

property runner
set_simulation_selections(simulation: Simulation, *selections: RenderingSelection)
property simulation

The currently selected simulation.

step()

Step to the next frame in the currently-active simulation.

classmethod with_basic_server(*simulations: Simulation, name: str | None = None, address: str | None = None, port: int | None = None)

Construct this using a basic NanoVer server and an optional list of initial simulations.

Parameters:
  • simulations – List of starting simulations to make available

  • name – Optional server name to broadcast

  • address – Optional server address to use

  • port – Optional server port to use

class nanover.omni.omni.Simulation(*args, **kwargs)

Bases: Protocol

advance_by_one_step()
advance_by_seconds(dt: float)
load()
name: str
reset(app_server: NanoverImdApplication)