microduck README

The project's README from github.com/pollen-robotics/microduck. As one markdown file: README.md.

microduck

Microduck

A tiny biped robot that moves using reinforcement learning policies.

Get yours here · Cheat sheet · Training the policies · How it works · Contributing

CI


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, hold D-pad up, 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.

microduck (pollen-robotics/microduck)

daemon
Searching Database…

What is this?Microduck is a tiny biped duck robot (about 25cm, 800g), and this repo is the robot's brain: Rust daemons that run a 50Hz control loop driving fifteen servos using reinforcement-learning policies exported to ONNX.
Is this the robot's control software or the training code?This repo is only the on-robot software stack (robotd, updaterd, configd, btd, padd, mediad, tofd) that loads and runs trained policies; the actual RL training with MuJoCo and PPO happens in the separate microduckrl repo.
How do I get it running on a robot?You need an actual Microduck (bought via the link in the README), then connect with duckctl over Bluetooth or a gamepad and use the robotctl cheat sheet for driving, configuring, and updating it; a separate guide covers setting up a dev board from blank to accepting branch builds.
Do I need the physical robot to try this?No — scripts/duck-sim runs the real daemons against a simulated body in MuJoCo, so you can try one duck in a window or several as separate machines without owning hardware.
How risky are software updates to the robot?Updates are designed to be safe: every release is signed and health-gated, and updaterd automatically rolls back an update if the robot comes up unhealthy afterward.
What hardware does this actually run on?A Rockchip RK3566 SoC inside the duck drives fifteen servos, radios, a camera and a depth sensor, running plain Rust with no framework, split into small daemons that talk JSON-RPC over Unix sockets.
What can the duck do out of the box?It walks and can be driven with a gamepad, rolls on wheels when fitted, picks things up beak-first, stands itself back up when knocked over, sits, kicks a ball, and quacks in its own synthesized voice.
How do I control it without a phone or network?duckctl lets you control the robot from a laptop over Bluetooth, with no network connection and no ssh required.
How do I push my own code to the robot?You build on your own machine and install the branch build over ssh, a workflow the README describes as taking about a minute.
Why did they build it with separate daemons instead of one framework?The team split the system into small single-purpose daemons (robotd, updaterd, configd, btd, padd, mediad, tofd) that all speak one JSON-RPC contract over Unix sockets, so every client — app, console, gamepad, or script — makes exactly the same calls.
Size
28 MB
Stars
9.5K
Age
2mo
Commits · 90 Days