unilab.visualization.viser_scene¶
MuJoCo-to-viser scene adapter for interactive web-based 3D visualization.
This module renders MuJoCo scenes via a viser web server, providing browser-based
interactive 3D viewing without requiring a local display or GLFW. It is gated
behind the viser optional-dependency group and is not imported by default.
Usage (from scripts/play_viser.py):
from unilab.visualization.viser_scene import MujocoViserScene, VISER_AVAILABLE
Functions
|
Select a stable subset of env indices spread across the full batch. |
Classes
Bridges a |
- unilab.visualization.viser_scene.build_visible_env_indices(num_envs, visible_envs)[source]¶
Select a stable subset of env indices spread across the full batch.
- class unilab.visualization.viser_scene.MujocoViserScene[source]¶
Bases:
objectBridges a
mujoco.MjModelto aviser.ViserServerscene graph.Call
build()once to populate the scene with geometry handles, then callupdate()each frame to sync body transforms fromMjData.- Parameters:
- __init__(server, model, *, name_prefix='/mujoco', position_offset=(0.0, 0.0, 0.0), render_plane=True)[source]¶