MicroDuck RL: From Simulation to the Real Robot — Part 11 of 14
Every command used in this series, collected on one page. Bookmark this one.
cd microduck_rl
uv run list-envs # List all available tasks.
# Training
uv run train Mjlab-Velocity-Flat-MicroDuck --env.scene.num-envs 4096 \
--agent.logger tensorboard # Full training run
uv run train <TASK> --env.scene.num-envs 64 --agent.max-iterations 5 # Smoke test; run after changing the configuration
uv run train <TASK> --agent.load-checkpoint model_2000.pt --agent.resume True # Resume training
# Visualization
uv run play <TASK> --checkpoint-file <path> --viewer viser # 3D viewer on port 8080
uv run play <TASK> --checkpoint-file <path> --video True # Record video
uv run tensorboard --logdir logs/rsl_rl/velocity --port 6006 # Training curves on port 6006
# Deployment
uv run scripts/export.py <TASK> ... # Export ONNX with the normalizer embedded; always use this script
uv run scripts/infer_policy.py --walking out.onnx # CPU-based simulation dress rehearsal
# Regression tests
uv run --with pytest pytest tests/
Recommended order of operations:
list-envs → smoke test → full training in the background → inspect with play → export when satisfied → rehearse with infer_policy → deploy to the physical robot.