# microduck

> Software for a 25 cm biped robot that walks using reinforcement learning policies

- Repository: https://github.com/pollen-robotics/microduck
- Category: Other
- Stars: 10,161 · Forks: 1,303 · Language: Rust · License: Apache-2.0
- Experience: Some experience
- Page: https://ir.adyog.com/repos/pollen-robotics/microduck/

Microduck is a robot about 25 cm tall and 800 g. This repo is its brain: a set of Rust daemons that run the control loop, drive fifteen servos, handle the radios and camera, and install software updates.

The walking and other motions come from neural policies. They are trained in a separate repo, microduck_rl, using MuJoCo and PPO. They are exported to ONNX, and this repo loads them and runs them on the robot.

The system is split into small programs that talk over one JSON-RPC contract on Unix sockets. The app, the console, the gamepad and your own scripts all send the same calls. Updates are signed, checked for health, and can be rolled back. There is also a simulated duck in MuJoCo, so you can try the real daemons without hardware.

## What it does

- **Policy-driven movement**: The robot walks, rolls with wheels attached, picks things up, sits, kicks a ball and stands itself up after a fall. Each behavior comes from a trained policy.
- **Small set of Rust daemons**: robotd runs the control loop and motor bus. Other daemons handle wifi and identity, Bluetooth, the gamepad, WebRTC camera streaming and the depth sensor.
- **Safe updates**: updaterd installs signed releases and rolls them back if the robot comes up unhealthy. You can also pin a version.
- **Control from several places**: A gamepad, the robotctl command line, or duckctl over Bluetooth from a laptop with no network or ssh.
- **Simulated duck**: scripts/duck-sim runs the real daemons against a MuJoCo body, either one duck in a window or four as machines you log into.

## What you could build

- Drive a Microduck with a gamepad and switch between walking and rolling modes.
- Study how a sim-to-real reinforcement learning policy is loaded from ONNX and run in a 50 Hz loop.
- Test robot software on your laptop using the MuJoCo simulated duck.
- Write scripts that control the robot through its JSON-RPC calls.
- Build and push your own branch to a dev board over ssh in about a minute.

## Who it's for

Suits robotics hobbyists and students who have a Microduck or want to read a well-documented robot stack; some Rust and Linux comfort helps, and the policy training lives in a separate repo.

## Get started

The README gives no install commands here. If you have a duck, start with the cheat sheet in docs/robot/cheatsheet.md. If you don't, read docs/robot/simulation.md to run scripts/duck-sim.



Tags: robotics, rust, reinforcement-learning, mujoco, biped
