A reinforcement learning framework for legged robot locomotion, built on top of mjlab with MuJoCo as the physics backend. Mjlab combines Isaac Lab's proven API with GPU-accelerated MuJoCo Warp physics to deliver lightweight, modular abstractions for RL robotics research and sim-to-real deployment. Currently supporting the VinRobotics M3.1.
- Python 3.8+
- CUDA 12.x (recommended for GPU-accelerated simulation)
pip install mjlab==1.4.0 mujoco==3.8.1 mujoco-warp==3.8.1 warp-lang==1.13.0pip install -e .To list all registered tasks at runtime:
python scripts/list_envs.pyNote
For more details, refer to the mjlab documentation.
The basic workflow is Train -> Play. Run the following command to train a velocity tracking policy:
python scripts/train.py VR-M3-1-12DOF-Flat --env.scene.num-envs=4096Multi-GPU training: scale to multiple GPUs using --gpu-ids:
python scripts/train.py VR-M3-1-12DOF-Flat \
--gpu-ids '[0, 1]' \
--env.scene.num-envs=4096Training results are stored at: logs/rsl_rl/<experiment_name>/<date_time>/model_<iteration>.pt
| Task ID | Robot | Terrain |
|---|---|---|
VR-M3-1-Flat |
VR M3.1 (full body) | Flat |
VR-M3-1-Rough |
VR M3.1 (full body) | Rough |
VR-M3-1-12DOF-Flat |
VR M3.1 (lower body, 12 DOF) | Flat |
VR-M3-1-12DOF-Rough |
VR M3.1 (lower body, 12 DOF) | Rough |
| Flag | Description |
|---|---|
--env.scene |
Simulation scene config (num_envs, dt, ground type, gravity, disturbances) |
--env.observations |
Observation space config (joint state, IMU, commands) |
--env.rewards |
Reward terms for policy optimization |
--env.commands |
Task commands (e.g., velocity ranges) |
--env.terminations |
Episode termination conditions |
--agent.seed |
Random seed for reproducibility |
--agent.resume |
Resume from the last saved checkpoint |
--agent.policy |
Policy network architecture configuration |
--agent.algorithm |
RL algorithm config (PPO, hyperparameters, etc.) |
To visualize policy behavior in MuJoCo:
python scripts/play.py VR-M3-1-12DOF-Flat \
--checkpoint_file=logs/rsl_rl/vr_m3_1_12dof_velocity/2026-xx-xx_xx-xx-xx/model_xx.ptNote
During training, policy.onnx and policy.onnx.data are also exported alongside each checkpoint for downstream deployment.
Exported policies (policy.onnx / policy.onnx.data) are consumed by
vinrobotics_mjlab_deploy
for sim-to-sim deployment on the VinRobotics M3.1.
Work in progress and planned directions (🚧 in progress · ⬜ planned · ✅ done):
Locomotion Tasks
- ✅ Velocity tracking
- 🚧 Loaded locomotion
- ⬜ …and more
Licensed under the Apache License, Version 2.0.
- unitree_rl_mjlab - reference implementation for legged robot RL training with mjlab
- mjlab - training and execution framework
- rsl_rl - reinforcement learning algorithm implementation
- mujoco_warp - GPU-accelerated rendering and simulation interface
- mujoco - high-fidelity rigid-body physics engine

