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)

Searching Database…

Что это такое?Microduck — крошечный двуногий робот-утка (около 25 см, 800 г), а этот репозиторий — его мозг: демоны на Rust, которые запускают цикл управления на 50 Гц и двигают пятнадцатью сервоприводами, используя политики обучения с подкреплением, экспортированные в ONNX.
Это программа управления роботом или код для обучения?Этот репозиторий содержит только программный стек на роботе (robotd, updaterd, configd, btd, padd, mediad, tofd), который загружает и запускает обученные политики. Само обучение с подкреплением на MuJoCo и PPO происходит в отдельном репозитории microduckrl.
Как мне запустить это на роботе?Нужна настоящая Microduck (купить её можно по ссылке из README). Затем подключитесь через duckctl по Bluetooth или с геймпада и используйте шпаргалку robotctl для управления, настройки и обновления. Отдельное руководство описывает, как настроить плату разработки с нуля до приёма сборок из веток.
Нужен ли мне физический робот, чтобы это попробовать?Нет — scripts/duck-sim запускает настоящие демоны с симулированным телом в MuJoCo, так что можно попробовать одну утку в окне или несколько — на отдельных машинах — без собственного железа.
Насколько рискованны программные обновления робота?Обновления спроектированы безопасными: каждый релиз подписан и проходит проверку состояния, а updaterd автоматически откатывает обновление, если после него робот запускается в нерабочем состоянии.
Какое железо на самом деле используется?Внутри утки стоит SoC Rockchip RK3566, который управляет пятнадцатью сервоприводами, радиомодулями, камерой и датчиком глубины. Код написан на простом Rust без фреймворков и разделён на небольшие демоны, которые общаются через JSON-RPC по Unix-сокетам.
Что утка умеет из коробки?Ходит и управляется с геймпада, катается на колёсах, если их установить, подбирает предметы клювом, встаёт сама, если её сбили с ног, садится, пинает мяч и крякает своим синтезированным голосом.
Как мне управлять им без телефона и сети?duckctl позволяет управлять роботом с ноутбука по Bluetooth, без сетевого подключения и без необходимости в ssh.
Как мне загрузить свой код на робота?Вы собираете проект на своей машине и устанавливаете сборку ветки через ssh. По словам README, этот процесс занимает около минуты.
Зачем было строить систему из отдельных демонов, а не на одном фреймворке?Команда разделила систему на небольшие демоны с одной задачей (robotd, updaterd, configd, btd, padd, mediad, tofd), которые все говорят по одному контракту JSON-RPC через Unix-сокеты. Поэтому каждый клиент — приложение, консоль, геймпад или скрипт — делает одни и те же вызовы.
Size
28 MB
Stars
9.5K
Age
2mo
Commits · 90 Days