An open API service indexing awesome lists of open source software.

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

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