Skip to content

Viewers

SPIDER supports multiple viewer backends for visualization during retargeting. This guide covers setting up and using different viewers, including remote development workflows.

Available Viewers

SPIDER supports the following viewer configurations:

ViewerDescriptionUse Case
mujocoNative MuJoCo viewerFast local visualization
rerunRerun.io viewerRemote development, rich logging
viserViser web viewerLightweight remote visualization

To enable both, try mujoco-rerun or mujoco-viser viewer.

Viser Viewer

Viser provides a lightweight web-based viewer for 3D scenes.

Local Usage

bash
uv run examples/run_mjwp.py viewer=viser

This will:

  1. Start a Viser server
  2. Log simulation data in real-time
  3. Print a URL to open in your browser

WARNING

If you run headless (no X display), you may need to set a display before launching:

bash
export DISPLAY=:1
# or
export MUJOCO_GL=egl

INFO

If you see an import error, install the dependency:

bash
pip install viser

Rerun Viewer

Rerun provides a powerful logging and visualization system with time-travel capabilities, perfect for remote development.

Local Usage

bash
uv run examples/run_mjwp.py viewer=rerun

This will:

  1. Automatically spawn a Rerun viewer
  2. Log simulation data in real-time
  3. Display 3D visualization and metrics

Remote Development

For headless servers, use Rerun's web viewer:

Step 1: Start Rerun Server

On your remote server:

bash
# Start Rerun web server
uv run rerun --serve-web --port 9876

# Or use rerun datapoints for more features
uv run rerun datapoints --serve-web --port 9876

Step 2: Run SPIDER

In another terminal on the remote server:

bash
uv run examples/run_mjwp.py viewer=rerun

Step 3: Connect from Local Machine

Open your local browser to:

http://your-server:9876

Or connect via the Rerun client:

bash
# On local machine
rerun --connect rerun+http://your-server:9876/proxy

WARNING

Make sure port 9876 is accessible through your firewall. You may need to configure SSH port forwarding:

bash
ssh -L 9876:localhost:9876 user@remote-server

Logged Data

SPIDER logs the following data to Rerun:

  • 3D scene visualization (robot and objects)
  • Joint positions and velocities
  • Optimization metrics (improvement, reward)
  • Contact forces and positions
  • Trace trajectories