The XGO-Duck training repository uses mjlab, MuJoCo Warp and PPO for simulated motion learning. This is an advanced workflow: first complete the standard assembly, calibration and acceptance checks so hardware faults are not confused with a policy issue.
Prepare a training computer
Use the repository’s supported Linux/CUDA environment with a suitable NVIDIA GPU. Training runs on that computer, not on UNO Q.
Install Python 3.12 and uv as specified by the repository. Clone xgoduck_rl and read its current dependency and driver requirements.
Run uv sync in the repository. Keep a record of the commit, environment and configuration used for each experiment.
git clone https://github.com/LuwuDynamics/xgoduck_rl.git
cd xgoduck_rl
uv sync
uv run list-envsChoose and train a task
Start with one of the supplied flat-ground walking, standing-up or skating tasks. Choose one command below. The 4096 parallel environments may need reducing for your GPU memory; list-envs also shows the available rough-ground and action tasks.
uv run train Mjlab-Velocity-Flat-XgoDuck --env.scene.num-envs 4096
uv run train Mjlab-StandUp-Flat-XgoDuck --env.scene.num-envs 4096
uv run train Mjlab-Velocity-Swizzle-XgoDuck --env.scene.num-envs 4096Begin with the supplied configuration and a short run to confirm that simulation, rewards and checkpoints work.
Inspect playback of the latest checkpoint and compare with earlier checkpoints. A higher reward alone does not prove safe physical behavior.
Record observation normalization, action scale, joint order, control frequency and the trained robot model alongside each checkpoint.
Play a checkpoint
uv run play Mjlab-Velocity-Flat-XgoDuck
uv run play Mjlab-Velocity-Swizzle-XgoDuckWithout a checkpoint flag, play loads the newest model_*.pt in that task’s experiment directory. Use --checkpoint-file path/to/model_XXXX.pt to select a specific checkpoint. Keep a known working checkpoint for comparison.
Export and validate
Replace the run and checkpoint placeholders with an actual training result. The exporter incorporates observation normalization into the ONNX graph.
uv run python scripts/export.py Mjlab-Velocity-Flat-XgoDuck \
--checkpoint-file logs/rsl_rl/xgoduck_velocity/<run>/model_XXXX.pt \
--onnx-file logs/rsl_rl/xgoduck_velocity/<run>/<run>.onnxKeep the exported network beside its run metadata, including joint order, action scale and control frequency.
Check the runtime’s expected observations and outputs. The 14 motion joints exclude the mouth; keep the deployment mapping exact.
Back up the working policy and configuration on this robot. Test loading and inference without motion before selecting the new policy.
Start a supported physical test with limited commands. If the pose, direction or scaling is wrong, stop and restore the known working policy.
Research scope and attribution
Simulation results need physical validation and do not establish a universal obstacle-avoidance or fall-recovery guarantee. Follow the repository license and attribution: Microduck RL comes from Pollen Robotics, while BAM (Better Actuator Models) comes from Rhoban. For deployment interfaces, continue to Software and hardware interfaces.
Wiki