Control a 25cm duck robot with a gamepad and watch it recover from falls
You can pilot a small duck robot with a gamepad and watch it get back up on its own after being knocked over. The hardware and software are bundled together, providing everything needed to build the robot or run experiments in simulation.
What the duck robot does
The robot performs various actions, including walking, rolling, grasping objects, and standing up. Connecting a gamepad allows for direct control, while attaching wheels switches it to roller mode, loading a different brain to perform rolling motions. Pressing a button with the beak on the ground picks up objects, and the robot stands back up on its own if knocked over. It can also sit, kick a ball, move forward on command, and quack with a unique voice.
How to handle the robot
Users who own the robot use the robotctl command to perform operations such as driving, configuration, audio, Wi-Fi, updates, and log checking.
- Cheat sheet A document summarizing all
robotctlcommands, gamepad button mappings, and pairing methods. - Bluetooth control The
duckctltool for controlling the robot from a laptop via Bluetooth without a network. - Update management A verified update system with installation, rollback, and pinning features.
Structure for developers
This repository serves as the robot's brain, with policies trained in the adjacent microduck_rl repository using MuJoCo and the PPO algorithm.
- Policy training The process of training policies using MuJoCo, PPO, and domain randomization, then exporting them to ONNX.
- Simulation The
scripts/duck-simscript for running the daemon in MuJoCo to test without a physical robot. - Development guide The CONTRIBUTING.md document covering build, test, layout, conventions, and release processes.
Internal system structure
Written in Rust as a single workspace without a framework. robotd handles the control loop and motor bus, while updaterd installs signed releases and rolls back if health status is poor. configd manages Wi-Fi and identity, btd handles the Bluetooth path, padd processes gamepad input, mediad streams the camera via WebRTC, and tofd provides depth sensor data. All clients use the same JSON-RPC contract via Unix sockets. The reasons for design decisions, past issues, and solutions are documented in docs/design/ and docs/project/.
Pre-use checks
This repository is designed for a Rockchip RK3566-based robot approximately 25cm in size and 800g in weight. You must assemble or purchase the robot yourself, and policy training is conducted in the separate microduck_rl repository. While you can test in a simulation environment, hardware is required for actual robot operation. License information is not specified in the README.