MuJoCo Sim Stack + Visualization Workflow
Enable fast, visual, and reproducible MuJoCo development on the lab workstation (Linux + monitor), while keeping the codebase cluster-ready for future large-scale rollouts and training.
Primary Goal
Lab-first iteration speed with full cluster compatibility. Interactive debugging on the workstation, headless rendering for batch operations, and a smoke test suite that catches regressions early.
Prerequisites from Phase 0.1
This phase builds on: Cluster access + SLURM job templates, CUDA/cuDNN/PyTorch pinned stack + containerization, DeepSpeed ZeRO-1 multi-GPU training smoke tests, W&B/MLflow tracking conventions, and Repo structure + CI/CD + config-first execution.
Setup Tasks
Six tasks that establish the simulation foundation for all Phase 1 robotics work
MuJoCo Runtime Installation
Install MuJoCo (Python bindings) and validate basic simulation stepping on the lab PC in a pinned, reproducible environment.
All Phase 1 work depends on a stable simulator. If MuJoCo import/rendering is flaky, you will lose days later debugging "not the robot, not the environment—just the stack".
- Select the canonical MuJoCo Python binding and pin versions
- Ensure system-level prerequisites are present on the lab PC (OpenGL libs, etc.)
- Confirm import works and a minimal MJCF loads
- Validate deterministic stepping at a fixed timestep for N steps
- Record environment metadata: OS, GPU driver, Python version, deps hash, git commit
A minimal MuJoCo scene loads and steps reliably on the lab PC with no runtime errors. Setup is reproducible from docs in < 60 minutes.
Interactive Viewer Workflow
Enable an interactive viewer workflow on the lab PC to debug robot asset loading (Alex MJCF/meshes), coordinate frames, contacts, and camera placement.
For contact-rich manipulation, visual debugging is the fastest path to correctness (frames, penetration, collisions, camera alignment). This is your "speed loop".
- Validate windowed rendering works (viewer opens reliably)
- Create a standard "viewer launch" entrypoint (consistent args + config)
- Define a debug checklist: verify gravity/ground plane, joint axes, collision geoms vs visual meshes, contact points/forces
- Confirm that viewer usage does not pollute training/runtime codepaths (separation of debug vs headless)
You can open a MuJoCo scene and visually inspect motion/contacts for 2–5 minutes without crashes.
Headless Offscreen Rendering
Make sure offscreen rendering works without a GUI so you can generate videos for debugging and later run the same pipeline headlessly on the cluster.
Phase 1 requires multi-view logging. Offscreen rendering is non-negotiable for scale and for unattended regression tests.
- Select and validate the headless rendering backend strategy (GPU-offscreen preferred)
- Run an offscreen render smoke test that produces: RGB frames (required), depth frames (strongly recommended), segmentation/instance IDs (recommended)
- Export a short video artifact (e.g., 5–10 seconds) + sample images
- Verify strict synchronization primitives exist: same sim step -> same rendered frame index (alignment contract)
- Store artifacts with Phase 0.1 run naming conventions
A headless run produces a short MP4 (or equivalent) + sample frames reliably on the lab PC.
Sim Smoke Tests Suite
Add a minimal smoke test suite for simulation that is fast and repeatable.
This protects you from subtle regressions when you change assets, contacts, or rendering. It also signals engineering discipline.
- Create 3 standardized tests: Step test (N steps with stable dt, no NaNs, no explosions), Render test (produce RGB + depth deterministically), I/O test (writes logs/artifacts to correct directory layout)
- Define pass/fail metrics: max penetration threshold, no unstable energy blow-ups, render returns correct shapes and non-empty frames
- Integrate with Phase 0.1 conventions: log seed + config snapshot, attach artifacts to W&B/MLflow if standard
One command runs all smoke tests and generates artifacts + logs with consistent naming.
Asset Pathing & Loader Contract
Lock a strict contract for how assets (MJCF + meshes + textures) are stored and referenced, so loading the Alex model is predictable.
The most common failure mode in robotics sim work is "broken mesh paths / wrong scaling / inconsistent frames". A loader contract prevents repeated friction.
- Define a canonical asset directory layout (and keep it stable)
- Enforce relative paths inside MJCF (no machine-specific absolutes)
- Add an "asset linter" that checks: missing files, invalid references, suspicious scaling factors
- Create a minimal "asset load test" that loads: floor + light + one test body, then the Alex MJCF (in Phase 1.1)
Assets are loadable via a single entrypoint with zero missing-path errors.
Cluster Compatibility Smoke
Confirm the cluster can run the exact same headless simulation path for future scaling, without making the cluster the primary debug environment.
You want lab-first iteration speed, but you also need confidence that scaling later won't break due to rendering backend or missing system deps.
- Reuse Phase 0.1 job templates / container strategy (no new infra)
- Run one short SLURM job that: steps sim headlessly, renders a short clip, writes artifacts to the cluster filesystem using your standard layout
- Decide ThinLinc usage policy: Default is no GUI on cluster (headless artifacts); Fallback is ThinLinc only if a visual bug cannot be diagnosed from saved videos/frames
A cluster job produces the same type of artifacts as the lab PC headless test (video/frames + logs).
Phase Completion Criteria
Phase 0.2 is complete when:
Interactive Viewer
Lab PC supports interactive viewer for fast debugging.
Headless Rendering
Lab PC supports headless offscreen rendering and exports artifacts reliably.
Smoke Test Suite
Push-button sim smoke test suite exists and aligns with Phase 0.1 reproducibility standards.
Asset Contract
Asset paths and loader contract are defined (ready to load IHMC Alex in Phase 1.1).
Cluster Compatibility
Cluster can run a headless sim smoke job (render + save) using existing Phase 0.1 infrastructure.
2-3 days