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 守护进程,以 50Hz 的控制循环驱动十五个舵机,运行导出为 ONNX 格式的强化学习策略。
这是机器人的控制软件,还是训练代码?本仓库只包含机器人本体上的软件栈(robotd、updaterd、configd、btd、padd、mediad、tofd),负责加载并运行已训练好的策略;真正的强化学习训练(使用 MuJoCo 和 PPO)则在单独的 microduckrl 仓库中进行。
怎样让它在机器人上跑起来?你需要一台真正的 Microduck(可通过 README 中的链接购买),然后通过蓝牙或游戏手柄用 duckctl 连接,并参照 robotctl 速查表进行驾驶、配置和更新;另有一份单独的指南,介绍如何把开发板从零配置到能接受分支构建。
想试用这个项目,一定需要实体机器人吗?不需要。scripts/duck-sim 会让真正的守护进程对接 MuJoCo 中的模拟机身运行,你可以在一个窗口里跑一只鸭子,也可以把多只鸭子分别放在不同机器上运行,无需拥有任何硬件。
给机器人更新软件有多大风险?更新在设计上是安全的:每个版本都经过签名,并且要通过健康检查;如果机器人更新后状态不正常,updaterd 会自动回滚这次更新。
这套软件实际运行在什么硬件上?鸭子内部的 Rockchip RK3566 片上系统负责驱动十五个舵机、无线电、摄像头和深度传感器。软件使用原生 Rust 编写,不依赖任何框架,拆分为多个小型守护进程,并通过 Unix 套接字使用 JSON-RPC 通信。
这只鸭子开箱即能做什么?它能行走,可以用游戏手柄操控;装上轮子后能滚动;能用喙部夹起东西;被推倒后能自己站起来;会坐下,会踢球,还能用它自己合成的声音叫唤。
没有手机或网络,怎样控制它?duckctl 允许你用笔记本电脑通过蓝牙控制机器人,无需网络连接,也不需要 ssh。
怎样把我自己的代码推送到机器人上?你在自己的电脑上完成构建,然后通过 ssh 安装分支构建版本;README 中介绍的这套流程大约只需一分钟。
他们为什么用多个独立的守护进程,而不是一个框架?团队把系统拆分为多个功能单一的小型守护进程(robotd、updaterd、configd、btd、padd、mediad、tofd),它们都通过 Unix 套接字遵循同一套 JSON-RPC 约定,因此无论是应用、控制台、游戏手柄还是脚本,发出的调用都完全一致。
Size
29.6 MB
Stars
9.6K
Age
2mo
Commits · 90 Days