_custom_mujoco_viewer

A custom viewer for mujoco with additional features.

Module Contents

Classes

CustomMujocoViewerMode

Enumerate different viewer modes for the CustomMujocoViewer.

CustomMujocoViewer

Custom Viewer Object that allows for additional keyboard inputs.

class CustomMujocoViewerMode(*args, **kwds)

Bases: enum.Enum

Inheritance diagram of mujoco_simulator.viewers._custom_mujoco_viewer.CustomMujocoViewerMode

Enumerate different viewer modes for the CustomMujocoViewer.

  • CLASSIC mode gives an informative interface for regular simulations.

  • MANUAL mode gives a cut down interface, specific for targeting robot movement manually.

CLASSIC = 'classic'
MANUAL = 'manual'
class CustomMujocoViewer(model: mujoco.MjModel, data: mujoco.MjData, *, backend: mujoco_simulator._render_backend.RenderBackend, width: int | None = None, height: int | None = None, start_paused: bool = False, render_every_frame: bool = False, hide_menus: bool = False, mode: CustomMujocoViewerMode = CustomMujocoViewerMode.CLASSIC, **_: Any)

Bases: revolve2.simulation.simulator.Viewer

Inheritance diagram of mujoco_simulator.viewers._custom_mujoco_viewer.CustomMujocoViewer

Custom Viewer Object that allows for additional keyboard inputs.

property context: mujoco.MjrContext

Get the context.

Returns:

The context.

property view_port: mujoco.MjrRect

Get the view_port.

Returns:

The viewport.

property can_record: bool

Return True.

Returns:

True.

current_viewport_size() tuple[int, int]

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

Returns:

the viewport size

render() int | None

Render the scene.

Returns:

A cycle position if applicable.

close_viewer() None

Close the viewer.