studio_plugins
¶
MAX_OVERLAY_GEOMS
module-attribute
¶
MAX_OVERLAY_GEOMS: int = _browser_geom_cap()
How many extra geoms the browser viewer draws. Anything past it is dropped. Unlimited when this mujoco build has no browser viewer.
MojoStepControl
¶
MojoStepControl(controls: ViewerControls)
Bases: SimPlugin
Stands in for Studio's step control and history plugins, neither of which can be used: they would step the physics themselves, and Mojo's runtime does that.
It passes what the viewer's buttons ask for to Reloaded's controller, and shows the controller's pause and speed on the viewer's widgets, so Studio and the terminal agree. It consumes the viewer's reset and reload requests, because the built in handlers would replace or reset the model that the runtime is stepping.
Source code in src/mujoco_mojo/utils/layers/reloaded/backends/studio_plugins.py
MojoOverlaySnapshot
dataclass
¶
MojoOverlaySnapshot(
arrows: tuple[ArrowConfig, ...] = (),
lines: tuple[LineConfig, ...] = (),
)
Bases: Snapshot
The arrows and lines Mojo's runtime wants drawn over the model, on their way from the simulation thread to the viewer.
MojoOverlay
¶
Bases: ViewerPlugin
Draws Mojo's force arrows, lines, and traces. The viewer thread owns the viewer's extra geoms, so they are made here, from the latest MojoOverlaySnapshot.
Source code in src/mujoco_mojo/utils/layers/reloaded/backends/studio_plugins.py
refresh
¶
refresh(extra_geoms: list[MjvGeom], model: MjModel) -> None
Brings the geoms this plugin put in extra_geoms up to date with the latest overlay, leaving any other plugin's geoms where they are. Does nothing when the overlay has not changed since.
Source code in src/mujoco_mojo/utils/layers/reloaded/backends/studio_plugins.py
studio_speed
¶
The speed to show on Studio's slider for a Reloaded speed.
Studio's slider runs from 0.1 to 100 percent of real time, so anything faster than real time shows as 100 and manual stepping, which has no speed of its own, does too.
Source code in src/mujoco_mojo/utils/layers/reloaded/backends/studio_plugins.py
mojo_speed
¶
The Reloaded speed, a multiple of real time, for a Studio slider reading in percent.