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:
| Viewer | Description | Use Case |
|---|---|---|
mujoco | Native MuJoCo viewer | Fast local visualization |
rerun | Rerun.io viewer | Remote development, rich logging |
viser | Viser web viewer | Lightweight 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
uv run examples/run_mjwp.py viewer=viserThis will:
- Start a Viser server
- Log simulation data in real-time
- 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:
export DISPLAY=:1
# or
export MUJOCO_GL=eglINFO
If you see an import error, install the dependency:
pip install viserRerun Viewer
Rerun provides a powerful logging and visualization system with time-travel capabilities, perfect for remote development.
Local Usage
uv run examples/run_mjwp.py viewer=rerunThis will:
- Automatically spawn a Rerun viewer
- Log simulation data in real-time
- Display 3D visualization and metrics
Remote Development
For headless servers, use Rerun's web viewer:
Step 1: Start Rerun Server
On your remote server:
# 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 9876Step 2: Run SPIDER
In another terminal on the remote server:
uv run examples/run_mjwp.py viewer=rerunStep 3: Connect from Local Machine
Open your local browser to:
http://your-server:9876Or connect via the Rerun client:
# On local machine
rerun --connect rerun+http://your-server:9876/proxyWARNING
Make sure port 9876 is accessible through your firewall. You may need to configure SSH port forwarding:
ssh -L 9876:localhost:9876 user@remote-serverLogged 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