Microduck: A reinforcement-learning biped duck robot running on RK3566
A Rust system that runs reinforcement-learning brains on Microduck robots, with the same daemons also connecting to MuJoCo simulation.
GitHub pollen-robotics/microduck Updated 2026-10-25 Branch main Stars 11.0K Forks 1.4K
Rust Reinforcement-learning robotics MuJoCo and PPO Rockchip RK3566 ONNX WebRTC

🧭 Decision Guide

Try it if you

  • You have a Microduck on Rockchip RK3566 and want to debug the 50 Hz control loop and fifteen servos.
    The README section “This repo is the duck's brain” names RK3566, a 50 Hz control loop, and fifteen servos.
  • You train policies with MuJoCo and PPO and need to load ONNX exported by microduck_rl.
    The README says policies are trained in microduck_rl with MuJoCo and PPO and exported to ONNX for this repository to load.
  • You want to run the real daemons through scripts/duck-sim without a physical duck.
    The README section “The simulated duck” says scripts/duck-sim runs the real daemons against a duck body in MuJoCo.

Skip it if you

  • You only need to train MuJoCo or PPO policies and do not need the Microduck runtime or daemons.
    The README places MuJoCo, PPO, sim2real, and ONNX export in the external microduck_rl repository.
  • Your target is not Rockchip RK3566 and you will use neither a physical robot nor MuJoCo simulation.
    The README identifies Rockchip RK3566 as the robot hardware and describes only the physical duck or scripts/duck-sim simulation paths.
  • You need to choose from a ready-made feature list, while the project README provides no list-form feature points.
    The supplied material explicitly states that no list-form feature points were found in the README.

Requirements

  • A Microduck physical robot is required; the README describes it as about 25 cm and 800 g, running on Rockchip RK3566.
  • The robot runs Rust daemons including robotd, updaterd, configd, btd, padd, mediad, and tofd.
  • The policy runtime depends on MuJoCo, PPO, and ONNX export provided by microduck_rl.
  • Without a physical robot, the README provides scripts/duck-sim for MuJoCo simulation.

First step (verbatim from README)

scripts/duck-sim

Watch out

  • updaterd performs signature verification, health gating, and rollback; branch builds also require attention to restart traps.
    The README sections “Updates” and “Dev cheat sheet” mention verified, health-gated, reversible updates and restart traps.
  • All clients communicate through the same JSON-RPC contract over Unix sockets, so components should not be treated as unrelated APIs.
    The README section “Under the hood” says the app, console, gamepad, and scripts send exactly the same calls.
  • The laptop-control path is duckctl over Bluetooth, not a network or SSH connection.
    The README duckctl entry explicitly says “over Bluetooth, with no network and no ssh”.

Alternatives

  • microduck_rl:Use it when your focus is MuJoCo, PPO, domain randomisation, and exporting policies to ONNX.
    The README section “You are building on it” and the main text describing microduck_rl.

Not stated in the README

  • The provided README material does not specify the operating-system version, image acquisition method, or complete installation commands for Rockchip RK3566.
  • The provided README material does not list the Microduck hardware BOM, servo model, camera model, or depth-sensor model.
  • The provided README material does not specify the ONNX runtime, Rust version, or build-toolchain version.
  • The provided README material does not provide latency, resource usage, or supported concurrent simulation scale for the 50 Hz control loop.
  • The provided README material does not identify supported Bluetooth gamepad models or operating systems.
  • The provided README material does not explain the release-stability relationship between 5 releases and daemon 0.17.8-dev.1433.e603c93.

💡 Deep Analysis

6
It depends I want to port this Rust workspace to another robot. My platform is not Rockchip RK3566, has a different number of servos, and uses different sensors, but I want to keep ONNX policies, JSON-RPC, and the update system. Is this project suitable as a direct foundation?
For: A Rust developer who wants to adapt Microduck to another robot platform whose hardware is not the documented Rockchip RK3566 and whose servo count and sensors differ

It depends: the project can provide architectural patterns and reusable software boundaries, but it is not a directly runnable, general-purpose platform for another robot.

  • The README targets a roughly 25 cm, 800 g Microduck built around Rockchip RK3566.
  • robotd owns the motor bus and drives fifteen servos at 50 Hz, tying actuator assumptions closely to the documented hardware.
  • mediad, tofd, and configd are specific services for the camera, depth sensor, Wi-Fi, and device identity; different sensors would require service and interface adaptation.
  • The JSON-RPC contract, Rust workspace, signed updates, and MuJoCo daemon simulation may be reusable, but the README promises neither multi-hardware support nor a portability layer.

It can serve as a reference if you are prepared to rewrite hardware services, policy I/O, and deployment configuration. It is not suitable if you expect a board swap with no adaptation.

  • README opening: "About 25 cm and 800 g of robot" running on "Rockchip RK3566"
  • README, "Under the hood": `robotd` owns the control loop and motor bus
  • README opening: "a 50 Hz control loop driving fifteen servos"
  • README, "Under the hood": `configd`, `mediad`, and `tofd` handle identity/Wi-Fi, camera, and depth sensing
  • Project insight, "usage_limitations": the core runtime is clearly targeted at Microduck and Rockchip RK3566
Not stated in the README:The README does not say whether a separate hardware-abstraction layer or replaceable motor-bus interface exists.;It does not identify which crates or configurations must change for different servo counts and sensors.;It does not state whether ONNX policies support different observation dimensions, action dimensions, or actuator ranges.
Yes I own a Microduck and want to drive it with a gamepad without network access or SSH, while also using pick-up, stand-up, and roller modes. Is this project suitable as the robot's runtime software?
For: A Microduck owner with the approximately 25 cm, 800 g robot who wants to control it with a gamepad and Bluetooth without network access or SSH

Yes, because the README describes this repository as the complete runtime for Microduck rather than only a control algorithm.

  • The robot runs on Rockchip RK3566; robotd drives fifteen servos at 50 Hz and loads neural policies.
  • The README lists gamepad driving, object pickup, self-righting, sitting, kicking, and roller mode.
  • duckctl controls the robot from a laptop over Bluetooth, explicitly without network access or SSH.
  • The cheat sheet covers driving, configuration, voice, Wi-Fi, updates, and logs; the gamepad requires one-time pairing.

This makes it suitable for an owner with the actual Microduck hardware. The README does not specify detailed guarantees for battery state, servo faults, unusual terrain, or policy behavior after a fall.

  • README: "This repo is the duck's brain."
  • README: "a 50 Hz control loop driving fifteen servos from neural policies"
  • README, "Where to find things": `duckctl`, "over Bluetooth, with no network and no ssh"
  • README, "It does things": walks, rolls, picks things up, and gets back up
Not stated in the README:The README does not specify which gamepad models are supported.;It does not describe safety behavior under low battery, servo faults, or complex terrain.;It does not provide battery life or success rates for the listed behaviors.
Yes I maintain Rust embedded software on Rockchip RK3566. I need to install branch builds without bricking the robot and roll back if an update fails. Does this project meet those requirements?
For: An embedded-software engineer using Rust on Rockchip RK3566 who needs the robot to accept branch builds and remote updates

Yes, because the project makes RK3566 branch deployment and recoverable updates part of the runtime design rather than providing only an SSH file-copy script.

  • The README describes a Rust, no-framework workspace containing multiple daemons, which is appropriate for modifying the runtime components.
  • Set up a dev board covers going from a blank board to a robot that accepts branch builds; Push your branch describes building locally and installing over SSH.
  • updaterd installs signed releases and rolls them back when the robot starts unhealthy; the update documentation explicitly supports install, rollback, and pinning.
  • The README also calls out restart traps after updates, so deployment includes service lifecycle handling rather than just replacing binaries.

It fits developers whose hardware and service layout match the documented Microduck platform. The repository does not promise direct portability to other RK3566 devices or actuator layouts.

  • README, "Under the hood": "Rust, no framework, one workspace"
  • README, "Set up a dev board": "From a blank board to a robot that takes branch builds"
  • README, "Push your branch": "Build on your machine, install over ssh"
  • README, "Updates": "Install, roll back, pin. Every update is verified, health-gated and reversible."
  • README, "Under the hood": `updaterd` installs signed releases and rolls them back
Not stated in the README:The README does not provide the exact board-flashing command, system image, or toolchain versions.;It does not describe signing-key generation, distribution, or rotation.;It does not enumerate which services and hardware states are covered by the health checks.
It depends I currently only have a MuJoCo environment and no physical Microduck. My training workflow uses PPO, domain randomization, and ONNX export. Can I reuse the real robot daemons in this repository to test policy deployment?
For: A reinforcement-learning researcher working with MuJoCo, PPO, and sim2real who has no physical Microduck and wants to run the real daemons against a simulated body first

It depends: the project is suitable for runtime-integration testing, but simulation alone cannot establish stable behavior on a real Microduck.

  • The README places policy training in the separate microduck_rl project, using MuJoCo, PPO, domain randomization, and ONNX export consumed by this repository.
  • scripts/duck-sim connects the real daemons to a simulated MuJoCo body, so substantial runtime logic can be exercised without hardware.
  • robotd owns the 50 Hz control loop, fifteen servos, and policy loading, making it useful for checking runtime interfaces and behavior calls.
  • A simulated body does not automatically reproduce servo latency, friction, load, battery voltage, or mechanical error, and the README does not claim simulation is equivalent to hardware.

It is a strong fit for ONNX integration and daemon-level tests, but sim2real success still requires a physical robot.

  • README, "The policies it runs are trained next door": MuJoCo, PPO, sim2real, and ONNX export
  • README, "The simulated duck": `scripts/duck-sim` runs the real daemons against a body in MuJoCo
  • README, "Under the hood": `robotd` owns the control loop and motor bus
  • Project insight, "usage_limitations": simulation cannot fully reproduce servo latency, wear, power variation, or wireless conditions
scripts/duck-sim
Not stated in the README:The README does not specify supported sensor noise, actuator latency, or fault injection in the simulator.;It does not document the exact ONNX tensor shapes, normalization parameters, or action ranges.;It does not quantify inference-performance differences between simulation and the real RK3566.
Yes I need to maintain control, updates, Wi-Fi, Bluetooth, gamepad, camera, and depth-sensor services in one Rust workspace, while letting scripts, the console, and the app use the same API. Is this architecture suitable?
For: A Rust systems engineer maintaining robotd, updaterd, configd, btd, padd, mediad, and tofd who wants scripts, the console, and the app to share one interface

Yes, because the README explicitly uses responsibility-separated daemons and gives every client one JSON-RPC contract.

  • robotd owns the control loop and motor bus; updaterd handles signed updates; configd owns Wi-Fi and identity; other daemons handle Bluetooth, gamepad, camera, and depth sensing.
  • The daemons communicate over Unix sockets, avoiding the need to expose every internal device service over the network.
  • The README states that the app, console, gamepad, and scripts send exactly the same calls, so automation and interactive clients share one boundary.
  • Separating real-time control from updates, media, and configuration helps prevent background work from directly blocking the control loop, although interface changes can affect multiple clients.

This is a strong fit for service-oriented Rust device software, but it is not presented as a general robotics framework; its hardware and service model remain Microduck-specific.

  • README, "Under the hood": responsibilities of `robotd`, `updaterd`, `configd`, `btd`, `padd`, `mediad`, and `tofd`
  • README, "Under the hood": "They talk over one JSON-RPC contract on Unix sockets"
  • README, "Under the hood": "every client — the app, the console, the gamepad, your script — sends exactly the same calls"
  • Project insight, "architectural_strengths": real-time control is separated from update and configuration services
Not stated in the README:The README does not provide the complete JSON-RPC method list, parameters, or compatibility policy.;It does not document Unix-socket permissions or inter-process authentication.;It does not explain arbitration when multiple clients issue motion-control requests concurrently.
Yes I am developing camera and depth-sensing features on Microduck. I want WebRTC video and depth data through a separate service without modifying the 50 Hz motion-control loop. Is this project suitable?
For: An engineer developing camera and depth-sensing features for a 25 cm, 800 g biped robot who needs camera access over WebRTC and depth data through `tofd`

Yes, because the project already separates media, depth sensing, and motion control into different daemons, matching the requirement to isolate perception from real-time control.

  • robotd owns the control loop and motor bus, including 50 Hz motion control for fifteen servos.
  • mediad streams the camera over WebRTC, while tofd provides the depth-sensor service.
  • All daemons communicate through one JSON-RPC contract over Unix sockets, so applications, consoles, and scripts do not need unrelated protocols for each device.
  • The project insight states that real-time control is separated from media and update tasks, reducing the chance that background work directly blocks motion control.

The architectural fit is therefore strong. However, the README does not specify video resolution, frame rate, depth format, bandwidth requirements, or control behavior when a sensor fails, so concrete performance cannot be inferred.

  • README, "Under the hood": `mediad` streams the camera over WebRTC; `tofd` serves the depth sensor
  • README, "Under the hood": `robotd` owns the control loop and motor bus
  • README, "Under the hood": services communicate through a JSON-RPC contract on Unix sockets
  • Project insight, "architectural_strengths": the real-time loop is separated from media and other non-real-time services
Not stated in the README:The README does not specify supported camera resolutions, frame rates, or codecs.;It does not describe WebRTC network topology, latency, or bandwidth requirements.;It does not document the depth-data format, sampling rate, or `robotd` fallback behavior on sensor failure.

✨ Highlights

  • RK3566 runs a 50 Hz control loop driving fifteen servos
  • A Rust workspace splits the system into daemons such as robotd and updaterd
  • MuJoCo and PPO policies are exported to ONNX and loaded by this repository
  • updaterd supports signed updates, health gating, and rollback

🔧 Engineering

  • robotd drives walking, self-righting, ball-kicking, and fifteen-servo control
  • Roller mode loads a different reinforcement-learning brain after wheels are installed
  • duckctl lets a laptop control the robot over Bluetooth
  • scripts/duck-sim connects the real daemons to a duck body in MuJoCo

⚠️ Risks

  • The core runtime target is a physical robot measuring about 25 cm and weighing 800 g
  • Policy training is done in the external microduck_rl repository, not this repository
  • The Dev cheat sheet explicitly mentions restart traps after updates

👥 For who?

  • Developers with a Rockchip RK3566 duck robot who work in Rust
  • Robotics teams working with MuJoCo, PPO, and sim2real policies
  • Developers needing Bluetooth, WebRTC, and Unix-socket debugging paths