cambrian.renderer.overlays

Defines utilities for overlays in the Mujoco viewer.

Classes

MjCambrianCursor

This class is used to define a cursor for the overlay.

MjCambrianViewerOverlay

This class is used to add an overlay to the viewer.

MjCambrianTextViewerOverlay

This class is used to add text to the viewer.

MjCambrianImageViewerOverlay

This class is used to add an image to the viewer.

MjCambrianSiteViewerOverlay

This class is used to add a site to the viewer.

Module Contents

class MjCambrianCursor[source]

This class is used to define a cursor for the overlay.

class MjCambrianViewerOverlay(obj, cursor=None)[source]

This class is used to add an overlay to the viewer.

Note

This is applied only to the passed scene, so other scenes (i.e. ones for the eyes) will not be affected.

draw_before_render(scene)[source]

Called before rendering the scene.

draw_after_render(mjr_context, viewport)[source]

Called after rendering the scene.

class MjCambrianTextViewerOverlay(obj, cursor=None)[source]

Bases: MjCambrianViewerOverlay

This class is used to add text to the viewer.

draw_after_render(mjr_context, viewport)[source]

Called after rendering the scene.

class MjCambrianImageViewerOverlay(obj, cursor=None)[source]

Bases: MjCambrianViewerOverlay

This class is used to add an image to the viewer.

draw_after_render(mjr_context, viewport)[source]

Called after rendering the scene.

class MjCambrianSiteViewerOverlay(pos, rgba, size, geom_kwargs=dict(emission=0.25))[source]

Bases: MjCambrianViewerOverlay

This class is used to add a site to the viewer.

Todo

Make this an image overlay where the pos is converted to pixel coordinates.

draw_before_render(scene)[source]

Called before rendering the scene.