_native_mujoco_viewer

The native rendering viewer for mujoco.

Module Contents

Classes

NativeMujocoViewer

Native Viewer Object.

class NativeMujocoViewer(model: mujoco.MjModel, data: mujoco.MjData, *, key_callback: Callable[[int], None] | None = None, **_: Any)

Bases: revolve2.simulation.simulator.Viewer

Inheritance diagram of mujoco_simulator.viewers._native_mujoco_viewer.NativeMujocoViewer

Native Viewer Object.

property context: mujoco.MjrContext

Get the context.

Returns:

The context.

abstract property view_port: mujoco.MjrRect

Get the view port.

Raises:

NotImplementedError – As it is not implemented.

property can_record: bool

Return False.

Returns:

False.

render() int | None

Render the scene.

Returns:

A cycle position if applicable.

close_viewer() None

Close the viewer.

abstract current_viewport_size() tuple[int, int]

Grabs the current viewport size (and updates the cached values).

Raises:

NotImplementedError – As it is not implemented.