Evaluate and visualize#
Check a policy or a clip by eye: the reference next to the robot, tracking errors, and where adaptive sampling starts episodes.
Tool |
Best for |
|---|---|
Studio Play (WBC Studio) |
A policy on up to 64 envs at once, reference ghosts, live reward terms, pushes, terrain; any checkpoint, also mid-training |
Studio Data (WBC Studio) |
Clips before and after conversion, with quality checks and curves |
|
One task in viser: reference alignment, error colouring, the sampling panel, a frame scrubber with Start here |
|
Exported NPZ clips in viser, no policy (source clips: the Studio) |
|
Saved sampling state, offline |
The rest of this page covers the viser viewers of the command-line tools (code:
src/wbc_mjlab/viewer/, hooked into MotionCommand in env/mdp/commands.py).
Play viewer#
For WBC tracking tasks, wbc-mjlab-play selects WbcViserPlayViewer
(viewer/viser_play.py) instead of mjlab’s default ViserPlayViewer.
Each frame it calls MotionCommand.update_viewer_gui so the sidebar stays in sync
with the selected parallel env: clip name, frame, RSI mode/strategy, and bin heatmaps.
uv run wbc-mjlab-play --task <TaskId> --dataset samples --viewer viser
Native MuJoCo viewer (--viewer native) is also available when a display is present;
Viser is the default when headless.
Reference visualization#
MotionCommand debug vis supports two modes (MotionCommandCfg.viz.mode):
Mode |
What you see |
|---|---|
|
Semi-transparent duplicate mesh at the reference root + joint pose |
|
Per-keybody coordinate frames: desired (reference) vs current (robot) |
Align xy/yaw to reference (Viser checkbox, default off) switches the reference
display to anchor-relative poses (body_pos_relative_w /
body_quat_relative_w): horizontal translation and yaw match the robot anchor so
ghost/frames overlay in a common frame. Turn off to show world-frame reference motion.
Color bodies by tracking error tints keybody markers green → red using
viewer/motion_vis.error_to_rgba (combined pos + rot error).
When playback is paused, the motion-command panel exposes a Frame scrubber and Start Here button to reset the selected env(s) to a reference frame — useful for probing hard RSI bins without retraining.
RSI visualization#
The Adaptive sampling (RSI) folder in the Viser sidebar shows per-clip bin strips
(rendered by viewer/motion_vis.format_rsi_panel_html):
Row |
Meaning |
|---|---|
Failure |
EMA failure level per bin (green = easy, red = hard) |
Sample p |
Renormalized sampling weight within the active clip |
Visits |
How often each bin was used as an episode start |
Assist β |
Assistive wrench gain from bin failure (when enabled) |
The white border marks the bin for the current playback frame. Colors are scaled relative within the clip so short and long motions remain readable.
Failure signal label reflects RsiCfg.strategy (e.g. reward-aligned
similarity_ema vs binary_failure) — see RSI configuration.
During training, presets with persist_failure_levels=True write
params/rsi_bin_stats.npz; play can load these so bins reflect trained curriculum
state. Plot offline:
uv run wbc-mjlab-plot-rsi-bins logs/rsl_rl/<experiment>/<run>/params/rsi_bin_stats.npz
Motion NPZ preview#
wbc-mjlab-data-vis (scripts/vis_data.py) uses mjlab’s MjlabViserScene with
a timeline GUI to scrub exported NPZ clips (wbc-mjlab-data-to-npz) — same Viser stack,
no policy. Source clips play in the Studio’s Data.
Module map#
Module |
Role |
|---|---|
|
|
|
HTML panels, RSI color scales, tracking-error RGBA |
|
Ghost/frames debug vis, Viser GUI (align, color, scrubber, RSI panel) |
|
Standalone NPZ playback in Viser |
|
Matplotlib RSI export |
See also
Motion command · RSI configuration — what the panels show
Export and deploy — from a checkpoint you trust to the robot