On the robot the approach curved — walking and turning at once — and near the ball it stopped and looked back up without kicking. Turn, then walk: the legs only walk once the ball is within `[soccer] align_rad` of straight ahead (near the ball, the kicking foot's line to it), and stop to turn again past twice that. The kick: autonomous soccer used to forget the ball and look away the moment it *asked* for a kick, whether or not the loop started one — and a refused skill is logged at debug, so nothing said why. The loop now reports each soccer kick's outcome back in the same tick: started, the ball is forgotten for the cooldown with the head left on where it was; refused, the ball stays tracked, the reason is logged at warn, and the kick is asked again after another settle. And within approach_m, where the ball is under the beak and out of the picture, it is remembered for `close_memory_ms` (10 s) rather than memory_ms, so lining up by odometry alone does not run out of time. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Microduck
A tiny biped robot that moves using reinforcement learning policies.
Get yours here · Cheat sheet · Training the policies · How it works · Contributing
This repo is the duck's brain. About 25 cm and 800 g of robot, run by a handful of daemons on a Rockchip RK3566: a 50 Hz control loop driving fifteen servos from neural policies, the radios and the camera, and the update machinery that gets new software onto a robot without bricking it.
Everything you need to run a Microduck is here. If you want one, get yours here.
The policies it runs are trained next door, in microduck_rl — MuJoCo and PPO, the sim2real recipe, and the export to ONNX that this repo loads.
It does things
| It walks. Pick up a gamepad and drive. | It rolls. Put wheels on, ask for roller mode, and it loads the other brain. |
| It picks things up. Beak to the floor, one button. | It gets back up. Knock it over and it stands itself up. |
It also sits, kicks a ball, rolls forward on command, and quacks in a voice that is its own.
Where to find things
You have a duck
| Cheat sheet | Every robotctl command: drive, configure, voice, chorale, theremin, wifi, updates, logs. Start here. |
| Gamepad | The full button mapping, and pairing a pad — once per pad, plus what to do when it will not bond. |
duckctl |
The robot from a laptop over Bluetooth, with no network and no ssh. |
| Updates | Install, roll back, pin. Every update is verified, health-gated and reversible. |
You are building on it
| microduck_rl | Where the policies come from: MuJoCo, PPO, domain randomisation, and the ONNX export this repo loads. |
| How it works | The whole system on one page — the daemons, the bus, how an update reaches a robot — then a page per part. |
| Set up a dev board | From a blank board to a robot that takes branch builds. |
| Dev cheat sheet | Branch builds, release candidates, driving from a laptop, and the restart traps after an update. |
| Push your branch | Build on your machine, install over ssh, about a minute. |
| The simulated duck | No robot on the desk? scripts/duck-sim runs the real daemons against a body in MuJoCo — one duck in a window, or four as machines you log into. |
| CONTRIBUTING.md | Building, testing, layout, conventions, releasing. |
| Docs index | Everything, including the design pages and the open problems. |
Under the hood
Rust, no framework, one workspace. robotd owns the control loop and the motor bus; updaterd
installs signed releases and rolls them back when a robot comes up unhealthy; configd owns wifi
and identity; btd is the Bluetooth path a phone uses; padd reads the gamepad; mediad streams
the camera over WebRTC; tofd serves the depth sensor. They talk over one JSON-RPC contract on
Unix sockets, and every client — the app, the console, the gamepad, your script — sends exactly the
same calls.
The interesting decisions are written down: docs/design/ is why things are the
way they are, and docs/project/ is what has gone wrong and what would close it.
A note on ducks
No duck was harmed in the making of this robot. Several were consulted.