Skip to content
MotphysPublic

About

A general-purpose machine learning architecture designed for robot training

Resources

Code of conduct

Contributing

Security policy

Stars

153 stars

Watchers

2 watching

Forks

Latest commit

 

History

49 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Language: English | 简体中文

MotrixLab

GitHub License Python Version Release Docs

Train robot policies in simulation, then deploy them to real hardware.

Microduck robots walking in MotrixRender after training with MotrixLab

Microduck locomotion policies trained with MotrixLab, rendered in MotrixRender — watch the HD video.

📖 Documentation: 简体中文 | English

Contents

What is MotrixLab?

MotrixLab is an open-source reinforcement learning framework for robot training, built on the high-performance MotrixSim physics engine. Define an environment once, train it with thousands of parallel environment instances using SKRL, RSL-RL, or the built-in FastSAC, and deploy the resulting policy to MuJoCo, native MotrixSim, or Unitree hardware — all through a single command-line interface.

MotrixLab architecture: define an environment once, train it with SKRL, RSL-RL or FastSAC on thousands of parallel MotrixSim environments running on NVIDIA CUDA or AMD ROCm GPUs, then deploy the same policy artifact to MuJoCo or Unitree hardware

Key Features

  • Unified Interface: Provides a concise and unified reinforcement learning training and evaluation interface
  • Multi-framework Support: Supports SKRL (JAX/PyTorch), RSLRL (PyTorch), and the built-in FastSAC implementation
  • Rich Environments: Includes various robot simulation environments such as basic control, locomotion, and manipulation tasks
  • Sim-to-Real Deployment: The same policy code deploys via the deploy CLI — simulation deployment to MuJoCo or native MotrixSim, hardware deployment to Unitree Go2
  • High-precision, High-performance Simulation: Built on MotrixSim, a high-precision, high-performance physics engine
  • Visual Training: Supports real-time rendering and training process visualization

🚀 Quick Start

Prerequisites

Requirement Notes
Python 3.10.x The workspace pins ==3.10.*
uv Python project and dependency manager — installation guide
Git LFS Robot meshes, motion data, and videos are tracked by LFS
OS Linux x86_64 or Windows x86_64; the JAX training backend is Linux-only
GPU NVIDIA (CUDA) or AMD (ROCm) — the matching wheels are selected automatically by sh install.sh

1. Clone the repository

git clone https://github.com/Motphys/MotrixLab
cd MotrixLab
git lfs pull

2. Install dependencies

Linux:

sh install.sh

Windows (PowerShell):

.\install.ps1
# if blocked by the execution policy:
powershell -ExecutionPolicy Bypass -File install.ps1

This auto-detects your GPU vendor (NVIDIA → CUDA, AMD → ROCm) and installs the runtime workspace packages with the matching PyTorch wheels, required SKRL Torch, and built-in FastSAC. Use --gpu cuda|rocm to override detection; --rslrl adds RSL-RL, while --skrl-jax adds the optional Linux-only SKRL JAX backend. --skrl-torch remains accepted as a compatibility flag because SKRL Torch is already required. Flags combine; see sh install.sh --help.

3. Train your first policy

Activate the installed environment (Windows PowerShell: .venv\Scripts\Activate.ps1):

source .venv/bin/activate
python scripts/train.py task=microduck-walk-flat/motrix.fastsac play=true

While training, the built-in dashboard shows live run progress, episode statistics, throughput, rewards, and system health:

MotrixLab training dashboard for the microduck-walk-flat fastsac task

Training runs thousands of parallel environment instances; when it finishes, the trained policy is loaded and played in the viewer automatically. Checkpoints and TensorBoard logs are saved under runs/microduck-walk-flat/; watch the curves with:

tensorboard --logdir runs/microduck-walk-flat

Training finishes in minutes: mean return and episode length typically converge after about 4,000 iterations:

TensorBoard curves of a microduck-walk-flat training run: mean return and episode length converge after about 4,000 iterations

4. Replay the trained policy

Replay the latest trained policy without retraining (for example, after stopping training early with Ctrl+C):

python scripts/play.py env=microduck-walk-flat

A trained microduck policy replayed in the viewer:

microduck-walk.mp4

🌍 Task Environments

MotrixLab ships 50+ built-in simulation environments spanning basic control, quadruped and humanoid locomotion, whole-body motion tracking, and manipulation. The main categories:

Preview Category Example environments
go2-walk-rough Quadruped velocity tracking go2-walk-flat · go2-walk-rough · go1-walk-rough · anymalc-walk-flat
g1-walk-flat Humanoid velocity tracking g1-walk-flat · k1-walk-rough · dex-evt-walk-flat · microduck-walk-flat
g1-wbt-dance Whole-body tracking (WBT) g1-wbt-dance · k1-wbt-freekick · g1-29dof-wbt-largebox
python scripts/view.py env=go2-walk-rough

See the full environment gallery for all registered environments and their supported training algorithms.

🤖 Built-in Robot Models

Seven reusable robot models are registered out of the box and can be combined into any scene or task:

Screenshot Registry name Type DoF
anymal_c anymal_c Quadruped 12
dex-evt dex-evt Humanoid 23
g1-29dof g1-29dof Humanoid 29
go1 go1 Quadruped 12
go2 go2 Quadruped 12
k1 k1 Humanoid 22
microduck microduck Humanoid 14
python scripts/view.py robot=go2

Use the public configuration API to compose a model directly:

from motrix_robots import Microduck, UnitreeGo2Robot

microduck = Microduck()
go2 = UnitreeGo2Robot()

See Supported Robots for configuration details and how to add your own model.

🏗️ What's Inside

MotrixLab is a uv workspace with the following packages:

Package PyPI name Description
motrix_deploy motrix-deploy Artifacts, control sessions, runtime contracts, and deployment CLI
motrix_deploy_mujoco motrix-deploy-mujoco MuJoCo deployment backend plugin
motrix_deploy_motrixsim motrix-deploy-motrixsim Native MotrixSim deployment backend plugin
motrix_deploy_unitree motrix-deploy-unitree Asset-free Unitree hardware configuration, sensor/actuation wiring, and SDK2 DDS backend plugin
motrix_deploy_tasks motrix-deploy-tasks Walking tasks, deployment scenes, and installed Hydra recipes
motrix_env_core motrix-env-core Backend-agnostic environment framework, configuration, registry, and rendering
motrix_env_motrixsim motrix-env-motrixsim Live MotrixSim backend, renderer, and Torch frontend
motrix_env_mujoco motrix-env-mujoco Compile-only MuJoCo scene backend
motrix_robots motrix-robots Reusable robot configurations, default poses, and model assets
motrix_envs motrix-envs Built-in environments, task assets, data, and deployment-profile compilers
motrix_rl motrix-rl RL control plane, provider/trainer contracts, run/checkpoint handling, and discovery
motrix_rl_builtin motrix-rl-builtin Built-in Motrix FastSAC provider
motrix_rl_skrl motrix-rl-skrl Required SKRL PPO Torch provider; optional JAX extra
motrix_rl_rslrl motrix-rl-rslrl Optional RSL-RL PPO Torch provider

🤝 Contributing

Contributions are welcome! See CONTRIBUTING.md for the development environment setup, branch and commit conventions, and the configured checks (prek, ruff, dprint, mypy).

📬 Contact

Have questions or suggestions? Feel free to contact us through:

Project policies

About

A general-purpose machine learning architecture designed for robot training

Resources

Code of conduct

Contributing

Security policy

Stars

153 stars

Watchers

2 watching

Forks

Releases

Packages

Contributors

Languages