pollen-robotics / microduck

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.

Microduck 是一款小型双足机器人,通过强化学习策略进行移动。点击此处获取 · 速查表 · 训练策略 · 工作原理 · 贡献指南。此仓库是该机器人的“大脑”。它高约 25 厘米,重 800 克,由运行在 Rockchip RK3566 芯片上的多个守护进程驱动:一个 50 Hz 的控制循环通过神经网络策略驱动十五个舵机、无线电和摄像头,以及一套确保新软件安装到机器人上而不会导致其损坏的更新机制。运行 Microduck 所需的一切都在这里。如果你想要一个,请点击此处获取。

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 walk.MP4 roller_cut.mp4 It walks. Pick up a gamepad and drive. It rolls. Put wheels on, ask for roller mode, and it loads the other brain. grasp.MP4 standup.MP4 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.

它运行的策略是在隔壁的 microduck_rl 中训练的——使用了 MuJoCo 和 PPO,即“仿真到现实”(sim2real)的配方,以及本仓库加载的 ONNX 导出文件。它能做很多事情:walk.MP4 roller_cut.mp4 它会行走。拿起游戏手柄即可操控。它会滚动。装上轮子,切换到滚动模式,它就会加载另一个“大脑”。grasp.MP4 standup.MP4 它能抓取物体。喙触地,一键操作,它就能重新站起来。把它推倒,它会自己站立。它还会坐下、踢球、按指令向前滚动,并发出属于它自己的嘎嘎声。

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.

资源索引:你拥有了一只鸭子。速查表:所有 robotctl 命令:驱动、配置、语音、合唱、特雷门琴、WiFi、更新、日志。从这里开始。游戏手柄:完整的按键映射和手柄配对——每个手柄只需配对一次,以及无法连接时的处理方法。duckctl:通过蓝牙从笔记本电脑控制机器人,无需网络和 SSH。更新:安装、回滚、锁定。每次更新都经过验证、健康检查且可撤销。你正在基于此进行构建。microduck_rl:策略的来源:MuJoCo、PPO、域随机化以及本仓库加载的 ONNX 导出文件。

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.

工作原理:用一页纸概括整个系统——守护进程、总线、更新如何到达机器人——然后分页面介绍每个部分。设置开发板:从空白板到能够接收分支构建的机器人。开发速查表:分支构建、候选发布版本、从笔记本电脑驱动以及更新后的重启陷阱。推送你的分支:在你的机器上构建,通过 SSH 安装,大约需要一分钟。模拟鸭子:桌上没有机器人?scripts/duck-sim 在 MuJoCo 中针对一个实体运行真实的守护进程——可以在窗口中运行一只鸭子,或者作为你可以登录的四台机器。

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.

CONTRIBUTING.md:构建、测试、布局、规范、发布。文档索引:所有内容,包括设计页面和待解决的问题。底层技术:Rust,无框架,单一工作区。robotd 负责控制循环和电机总线;updaterd 安装签名版本,并在机器人运行不健康时进行回滚;configd 负责 WiFi 和身份识别;btd 是手机使用的蓝牙路径;padd 读取游戏手柄;mediad 通过 WebRTC 流式传输摄像头画面;tofd 提供深度传感器服务。它们通过 Unix 套接字上的单一 JSON-RPC 协议进行通信,每个客户端——应用程序、控制台、游戏手柄、你的脚本——发送的调用完全相同。

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.

有趣的决策都被记录了下来:docs/design/ 解释了为什么事情是这样设计的,而 docs/project/ 记录了出现过的问题以及什么会导致项目关闭。关于鸭子的说明:在制造此机器人的过程中没有伤害任何鸭子。我们咨询了几只鸭子的意见。