_open_gl_vision

Module Contents

Classes

OpenGLVision

A class to enable vision / camera sensors using OpenGl.

class OpenGLVision(model: mujoco.MjModel, camera: mujoco_simulator._abstraction_to_mujoco_mapping.CameraSensorMujoco, headless: bool, open_gl_lib: mujoco_simulator._render_backend.RenderBackend, max_geometries: int = 10000)

A class to enable vision / camera sensors using OpenGl.

This Class is based on an implementation of Kevin Godin-Dubois <k.j.m.godin-dubois@vu.nl>. Thank you very much for this big contribution!

process(model: mujoco.MjModel, data: mujoco.MjData) numpy.typing.NDArray[numpy.uint8]

Process the current state of the simulation and render it.

Parameters:
  • model – The mujoco model.

  • data – The mujoco data.

Returns:

The rendered image (RGB format).

static get_context(open_gl_lib: mujoco_simulator._render_backend.RenderBackend) Any

Get the context to be used.

Parameters:

open_gl_lib – The render backend to use.

Returns:

The context type.

Raises:

ValueError – If the backend for OpenGL is not known.