pollen-robotics /
microduck
Software for a 25 cm biped robot that walks using reinforcement learning policies
- 10.2k stars
- 1.1k stars since 3 Oct
- Rust
- Updated today
- Some experience
- Other
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.
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.
Commands are copied from the project's README. Read it on GitHub for the full setup.