Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

VinRobotics RL MjLab

License: Apache 2.0 Built on mjlab

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.

MuJoCo - Mjlab
MuJoCo - Sim2Sim

Installation

Prerequisites

  • 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.0

From source

pip install -e .

To list all registered tasks at runtime:

python scripts/list_envs.py

Note

For more details, refer to the mjlab documentation.

Training

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=4096

Multi-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=4096

Training results are stored at: logs/rsl_rl/<experiment_name>/<date_time>/model_<iteration>.pt

Available Tasks

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

Parameters

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.)

Simulation Validation

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.pt

Note

During training, policy.onnx and policy.onnx.data are also exported alongside each checkpoint for downstream deployment.

Deployment

Exported policies (policy.onnx / policy.onnx.data) are consumed by vinrobotics_mjlab_deploy for sim-to-sim deployment on the VinRobotics M3.1.

Roadmap

Work in progress and planned directions (🚧 in progress · ⬜ planned · ✅ done):

Locomotion Tasks

  • ✅ Velocity tracking
  • 🚧 Loaded locomotion
  • ⬜ …and more

Contributors / Maintainers

License

Licensed under the Apache License, Version 2.0.

Acknowledgements

  • 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

About

VinRobotics RL training pipeline for high-loaded humanoids.

Topics

Resources

Security policy

Stars

44 stars

Watchers

3 watching

Forks

Releases

Packages

Contributors

Languages