unilab.visualization.debug_primitives¶
Interactive-viewer injection for unisim.backend.base.DebugPrimitive.
The offline record pipeline renders debug overlays inside unisim’s render
workers. Interactive MuJoCo viewers instead own a live viewer.user_scn
(mjvScene), so this module converts the same typed primitives into user-scene
geoms for that path. It is UniLab-owned until unisim exposes a public
interactive-path helper (single env, already-loaded model, caller-owned
mjvScene); see ADR-0008 and unilabsim/wuji_unilab#21.
Functions
|
Inject debug primitives into a caller-owned mjvScene ( |
|
Return the unit wxyz quaternion rotating the +z axis onto |
|
Build an arrow primitive spanning |
- unilab.visualization.debug_primitives.append_debug_primitives_to_scene(scene, primitives, *, mesh_ids=None)[source]¶
Inject debug primitives into a caller-owned mjvScene (
viewer.user_scn).mesh_idsresolvesghost_geommesh assets to mesh ids in the loaded viewer model; a ghost primitive without a resolvable mesh raisesValueError.textprimitives are a documented no-op (mjvScene has no text channel), matching the offline renderer. Returns the number of geoms appended; injection stops atscene.maxgeom.