https://github.com/deltartificial/g1
Simulate, train and deploy locomotion policies for Unitree G1 humanoid using Genesis on Mac M-series. 🦿
https://github.com/deltartificial/g1
genesis macos python reinforcement-learning unitree
Last synced: 2 months ago
JSON representation
Simulate, train and deploy locomotion policies for Unitree G1 humanoid using Genesis on Mac M-series. 🦿
- Host: GitHub
- URL: https://github.com/deltartificial/g1
- Owner: deltartificial
- Created: 2025-12-24T14:02:31.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2025-12-27T18:43:20.000Z (6 months ago)
- Last Synced: 2025-12-28T09:34:23.407Z (6 months ago)
- Topics: genesis, macos, python, reinforcement-learning, unitree
- Language: Python
- Homepage:
- Size: 85 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# G1
Simulate, train and evaluate Unitree G1 humanoid robot using Genesis physics engine on Apple Silicon (Metal).
## Setup
```bash
pip install -r walk/requirements.txt
```
## Usage
```bash
cd walk
make train # Train
make eval # Evaluate
```
### Training
```bash
PYTHONUNBUFFERED=1 python3 -u g1_train.py -B 4096 --max_iter 1000
```
| Parameter | Description |
|-----------|-------------|
| `PYTHONUNBUFFERED=1` | Disable output buffering for real-time logs |
| `-u` | Force unbuffered stdout/stderr |
| `-B` | Number of parallel environments |
| `--max_iter` | Maximum training iterations |
| `--device` | Device: `mps` (default), `cuda`, `cpu` |
| `--backend` | RL library: `auto`, `rsl_rl`, `sb3` |
### Evaluation
```bash
python3 g1_eval.py --ckpt 700 --cmd_vel 0.8 0.0 0.0 # Fast forward walk
python3 g1_eval.py --ckpt 700 --cmd_vel 0.3 0.2 0.0 # Lateral walk
```
| Parameter | Description |
|-----------|-------------|
| `--ckpt` | Checkpoint iteration to load |
| `--cmd_vel vx vy vyaw` | Velocity command (m/s, m/s, rad/s) |
Joint positions, velocities and link XYZ coordinates are logged automatically every 10 steps.
`cmd_vel` controls robot movement:
- `vx`: forward/backward speed
- `vy`: lateral speed (left/right)
- `vyaw`: rotation speed