- MicroDuck Dynamic Manipulation Suite
- Project Highlights and Quantitative Benchmarks
- Video Showcases and Demonstrations
- Comprehensive Load and Manipulation Benchmark
- Local Apple Silicon (MacBook M2) Training Architecture
- Quick-Start Guide
- Interactive 3D Viewer and Terminal Execution
- Interactive Viewer Navigation Controls:
- 1. Lemon & Tableware Spoon Dynamic Balance
- 2. 5-Duck Olympic Stadium Race (Interactive 3D Viewer)
- 3. 5-Duck Olympic Race Headless Physics Benchmark
- 4. Athletic Racket Carrying Suite (Interactive 3D Simulation)
- 5. Barbell Pure Physical Clamping Tests (100g, 200g, 300g)
- 6. Render All Showcase Media
- Repository Structure
- Technical Documentation
- Project Highlights and Quantitative Benchmarks
MicroDuck Dynamic Manipulation Suite
Autonomous bipedal manipulation, non-prehensile lemon & spoon balancing, multi-robot Olympic stadium racing, athletic racket carries (Table Tennis, Badminton, Pickleball), and dynamic heavy load-carrying for the 14-DoF miniature bipedal robot Microduck (Pollen Robotics).
Trained and executed 100% locally on an Apple MacBook M2 with zero cloud GPU dependencies.
Project Highlights and Quantitative Benchmarks
Microduck is a miniature bipedal humanoid/avian robot. This repository provides a complete simulation, reinforcement learning, and control stack enabling Microduck to dynamically stabilize, balance, clamp, and sprint with physical payloads:
Dynamic Lemon & Tableware Spoon Balance (Core Policy):
- Non-prehensile balancing of a citrus lemon in the shallow bowl of a tableware spoon during forward walking at speeds up to 0.30 m/s with zero drop, stabilized by an active bio-mimetic Steadicam pantograph.
- Ground parallelism maintained at 0.0 deg +/- 0.4 deg true horizontal relative to ground, with lemon center-of-mass deviation strictly below 1.2 mm across the entire continuous walking horizon (25.0 seconds at authentic 1x natural physics speed).
5-Duck Olympic Stadium Race (Multi-Robot Sprint):
- 5 autonomous Microducks in vibrant Pollen Robotics liveries sprint side-by-side in parallel lanes down an authentic Olympic Mondo red track in full natural physics time (dt = 0.002s, 50 Hz control, zero time-warping).
- Each duck balances a real lemon on a tableware spoon with active bio-mimetic Steadicam pantographs and zero drop.
- Sprinted continuously in authentic 1x natural physics time (35.0 seconds duration) with zero static pause at the starting line.
- Finish hierarchy: 1st Place: Emerald Green (Winner), 2nd Place: Ruby Coral Pink, 3rd Place: Sunflower Duck Gold, 4th Place: Royal Amethyst Purple, 5th Place: Riviera Sky Blue.
Athletic Racket Carrying Suite (Table Tennis, Badminton, Pickleball):
- Precision dynamic carrying across Table Tennis, Badminton (doubled athletic oval geometry with cheek clearance), and Pickleball paddles. Successful carry across showcase demonstrations; not fully robust over extended continuous locomotion due to gradual slip from head movement and actuator torque limits.
Heavy Barbell Physical Clamping Suite (100g, 200g, 300g):
- Pure physical clamping inside the beak cavity with zero welds, carrying payloads up to 41% of robot bodyweight during showcase demonstrations; not fully robust over continuous locomotion due to micro-slip from footstep impact shocks and actuator torque limits.
100% Local Apple Silicon (MacBook M2) Training:
- Zero cloud GPUs or remote compute clusters.
- Every policy was trained, fine-tuned, and benchmarked on a standard consumer Apple MacBook M2 laptop (8-core CPU, 16 GB Unified Memory) within 18 to 31 minutes per task.
Video Showcases and Demonstrations
All demonstrations run under authentic rigid-body contact physics in MuJoCo.
1. Dynamic Lemon & Tableware Spoon Balance (Core Policy, 1x Natural Physics Speed)
The core training achievement of this project: dynamic non-prehensile balancing of an unconstrained citrus lemon in the shallow bowl of a tableware spoon during continuous bipedal walking.
An active bio-mimetic Steadicam pantograph controller decouples trunk walking oscillations from the beak, maintaining spoon levelness and achieving 100% balance retention with zero drop across forward walking speeds from 0.08 to 0.30 m/s. Video is recorded continuously in authentic 1x natural physics time (real-time speed, dt = 0.002s, 50 Hz control decimation, 25.0s continuous duration) with zero static starting pause.
π₯ View Lemon & Spoon 1x MP4 Video
Dynamic non-prehensile stabilization: The bio-mimetic Steadicam compensator continuously counters torso pitch oscillations, keeping the lemon securely balanced in the spoon bowl during smooth forward locomotion in authentic 1x natural physics time.
2. 5-Duck Olympic Stadium Race (Multi-Robot Sprint, 1x Natural Physics Speed)
Five autonomous Microducks competing down the Olympic Mondo red track, each deploying the champion Steadicam lemon balancing policy. The simulation runs under natural physics (timestep dt = 0.002s, 50 Hz control decimation) with 100% lemon retention across all lanes, recorded and presented in authentic 1x natural physics time (35.0 seconds continuous real-time duration) with zero static pause at the start line. All five robots sprint actively across the track above their limit-cycle locomotion threshold with zero stalls.
π₯ View 5-Duck Olympic Race 1x MP4 Video
Pacing: Emerald Green leads across the line (0.260 m/s), followed by Ruby Coral (0.240 m/s), Duck Gold (0.220 m/s), Royal Amethyst (0.200 m/s), and Riviera Sky (0.185 m/s). 100% lemon retention across all 5 lanes.
Closed-Loop Steadicam Control Architecture & Empirical Telemetry
Below is the verified control architecture and real-time telemetry from continuous forward locomotion:
- Anti-Phase Pitch Compensation: Trunk sway (oscillating +/- 2.8 deg per walking cycle) is dynamically cancelled by counter-phase differential head-neck actuation (
action[5] = +head_pos_steadicam,action[6] = -head_pos_steadicam), locking spoon bowl pitch at 0.0 deg +/- 0.4 deg true horizontal relative to ground. - Micro-Millimeter Lemon Retention: Lemon position deviation inside the concave spoon bowl is constrained within 0.9 mm to 1.1 mm across the entire run with zero drops and zero static pause.
3. Athletic Racket Carrying Suite (Table Tennis, Badminton, Pickleball)
Microduck successfully carries athletic racketsβincluding a table tennis paddle with Steadicam leveling, a doubled oval badminton racket with collision-free cheek clearance, and a wide composite pickleball paddleβheld purely via beak clamping against silicone contact pads during forward walking.
While each racket is successfully retained across its showcase video demonstration, the grip is not fully robust over extended continuous locomotion horizons due to cumulative slippage from head movement and actuator torque limits. If an actuator of higher torque is used, the problem would be fixed; one approach would be to upgrade the beak actuator to a higher torque servo, providing sufficient holding force to eliminate slip and maintain continuous grip across all gaits.
4. Heavy Barbell Physical Clamping Suite (100g, 200g, 300g)
Microduck physically clamps cylindrical barbell payloads (100g, 200g, and 300g β up to 41% of total robot bodyweight) inside the mouth cavity purely via beak actuator torque against soft silicone pads with zero welds or artificial constraints.
All payloads are successfully retained across their showcase video demonstrations during forward walking. However, the clamping is not fully robust over extended continuous locomotion horizons due to micro-slippage caused by footstep impact shocks and actuator torque limits, causing the payload to drop after some time. If an actuator of higher torque is used, the problem would be fixed; one approach would be to upgrade the beak actuator to a higher torque servo, supplying sufficient clamping force against footstep shocks to eliminate slippage and prevent drops altogether.
Comprehensive Load and Manipulation Benchmark
The following table summarizes empirical performance across short demonstration clips versus continuous extended locomotion horizons:
| Task / Payload | Payload Mass | Clamping Torque | Forward Velocity | Showcase Clip | Extended Locomotion Outcome | Primary Failure Mode |
|---|---|---|---|---|---|---|
| Lemon & Spoon (0.16 m/s) | 22g lemon | 0.45 NΒ·m | 0.16 m/s | Retained | Stable continuous balance | Steadicam pitch cancellation |
| 5-Duck Stadium Race | 5x 22g Lemons | 0.45 NΒ·m | 0.14 - 0.18 m/s | Retained | Stable continuous balance | Lane-tuned Steadicam balance |
| Lemon & Spoon (0.08 m/s) | 22g lemon | 0.45 NΒ·m | 0.08 m/s | Drops after some time | Drops after some time | Low-speed gait hesitation roll |
| Lemon & Spoon (0.12 m/s) | 22g lemon | 0.45 NΒ·m | 0.12 m/s | Retained | Drops after some time | Long-term drift drop |
| Table Tennis Racket | 40g (scaled) | 0.50 NΒ·m | 0.18 m/s | Retained | Indefinitely stable | Handle clamped indefinitely |
| Ping-Pong Ball on Blade | 1.3g ball | N/A (unconstrained) | 0.18 m/s | Unstable | Drops after some time | Blade vibration kicks ball off |
| Badminton Racket | 45g (scaled) | 0.50 NΒ·m | 0.18 m/s | Retained | Gradual slip | Slip due to head movement and actuator torque limits |
| Pickleball Paddle | 75g (scaled) | 0.50 NΒ·m | 0.18 m/s | Retained | Gradual slip | Slip due to head movement and actuator torque limits |
| 100g Barbell Carry | 100g (13.6% BW) | 0.10 NΒ·m | 0.25 m/s | Retained | Drops after some time | Impact shockwave micro-slip |
| 200g Barbell Carry | 200g (27.1% BW) | 0.10 NΒ·m | 0.25 m/s | Retained | Drops after some time | Cumulative impact vibration slip |
| 300g Barbell Carry | 300g (40.7% BW) | 0.10 NΒ·m | 0.25 m/s | Retained | Drops after some time | High-inertia mouth separation |
| 350g Barbell Carry | 350g (47.5% BW) | 0.10 NΒ·m | 0.25 m/s | Marginal | Drops after some time | Rapid jaw slip |
| 400g Barbell Carry | 400g (54.3% BW) | 0.10 NΒ·m | 0.25 m/s | Fails early | Drops after some time | Severe forward pitch slip |
| 500g Barbell Carry | 500g (67.8% BW) | 0.10 NΒ·m | 0.25 m/s | Fails early | Topples after some time | Robot topples (overturning torque) |
Note on Extended Clamping Retention: When payloads drop or slip after some time under continuous locomotion vibrations, if an actuator of higher torque is used, the problem would be fixed. One approach would be to upgrade the beak actuator to a higher torque servo, providing increased holding force to eliminate slip and prevent drops altogether.
Full Empirical Report: See docs/EMPIRICAL_CLAMPING_FAILURE_BENCHMARK.md for the complete failure matrix, contact mechanics, and failure modes.
Local Apple Silicon (MacBook M2) Training Architecture
A central scientific and engineering milestone of this project is that every single policy was trained, fine-tuned, and evaluated 100% locally on a single consumer Apple MacBook M2 laptop:
- Hardware: Apple M2 chip (8 CPU cores: 4 performance cores + 4 efficiency cores)
- Memory: 16 GB Unified Memory (100 GB/s high-bandwidth zero-copy architecture)
- Operating System: macOS (Darwin ARM64)
- Compute Stack: Python 3.12, PyTorch MPS/CPU, MuJoCo 3.3.6 C-API, ONNX Runtime
How We Achieved Rapid Local Training Without Cloud GPUs
Training complex bipedal manipulation policies usually demands expensive multi-GPU clusters and millions of samples. We achieved fast, robust convergence on a consumer laptop by engineering three key innovations:
High-Throughput MuJoCo C-API Batch Physics on Unified Memory:
- Rather than sending simulation states over network buses or CUDA host-to-device transfers, MuJoCo executes directly on ARM64 performance cores.
- The Apple Silicon unified memory architecture eliminates GPU-CPU memory transfer bottlenecks, allowing batched rollout simulations to run at over 3,500 simulation steps per second per core.
Decoupled Hierarchical Architecture:
- Rather than attempting to learn walking, balancing, grasping, and payload compensation end-to-end from scratch, the system uses a hierarchical decomposition:
- Base Layer: A robust 14-DOF walking foundation policy pre-trained on diverse bipedal gaits.
- Manipulation Layer: A specialized residual policy and bio-mimetic Steadicam compensator trained on the upper-body degrees of freedom (neck pitch, head pitch, beak clamping).
- This reduces the action space and observation complexity, shrinking required sample counts from 50M+ steps to just 2Mβ4M steps.
- Rather than attempting to learn walking, balancing, grasping, and payload compensation end-to-end from scratch, the system uses a hierarchical decomposition:
Sample-Efficient Residual PPO:
- The residual policy learns corrective joint position offsets directly on top of the base walking policy.
- Training completes in 18 to 31 minutes per task, using under 1.5 GB of RAM.
Curriculum Progression: Kinematic Weld Bootstrap to Physical Clamping Transfer
To solve the challenging dynamics of carrying heavy payloads (up to 300g, over 40% of the robot's total bodyweight) without policy divergence during initial learning, we developed a two-stage curriculum strategy:
- Stage 1 (Kinematic Weld Bootstrap):
- The payload was initially affixed inside the mouth cavity using an idealized equality weld constraint.
- This allowed the reinforcement learning algorithm to isolate the gross whole-body balance problem β discovering how to pitch the torso back, adjust hip flexion, and counteract forward rotational inertia without having to simultaneously master micro-contact dynamics.
- Stage 2 (Zero-Weld Clamping Transfer):
- Once stable gait rhythms and posture compensations were established, the weld was completely removed.
- The payload was placed inside the open mouth cavity and held purely via 6D spatial contact (
condim="6") under active beak actuator clamping torque (0.10 to 0.50 NΒ·m). - Because the policy had already learned to balance the forward center-of-mass shift, transferring from the idealized weld to pure physical clamping was achieved seamlessly with zero drops.
Local M2 Training Benchmarks
| Policy / Task | Algorithm | Environment Steps | Local M2 Training Time | Peak RAM | Throughput |
|---|---|---|---|---|---|
| Base Walking Locomotion | PPO (mjlab) | 4,000,000 steps | 18m 42s | 1.1 GB | ~3,500 steps/sec |
| Loadcarry Head-Up Residual | Residual PPO | 3,000,000 steps | 24m 15s | 1.3 GB | ~2,100 steps/sec |
| Table Tennis Racket Carry | PPO Curriculum | 5,000,000 steps | 31m 50s | 1.4 GB | ~2,600 steps/sec |
| Ball Balance Residual | Residual PPO | 2,500,000 steps | 21m 05s | 1.2 GB | ~2,000 steps/sec |
| 5-Duck Stadium Race Physics | Multi-Agent Sim | 40,000 steps (5 robots) | 14.2 seconds | 1.1 GB | 2.82x Real-Time |
| High-Definition Video Render | MuJoCo Offscreen | 2,000 frames @ 720p | 1m 35s | 1.4 GB | 21.0 fps offscreen |
Quick-Start Guide
This repository is completely self-contained. Anyone can clone and run all interactive simulations and benchmarks on macOS or Linux out of the box:
1. Clone the Repository
git clone https://github.com/Raghav-kathuria16/microduck_manipulation.git
cd microduck_manipulation
2. Set Up Python Environment
# Create virtual environment
python3 -m venv .venv
source .venv/bin/activate
# Install dependencies
pip install -r requirements.txt
Note for macOS Users: For native interactive 3D GUI viewers, install and use
mjpython(bundled with MuJoCo) to properly attach to the macOS GLFW event loop:pip install mujoco # mjpython is available in your .venv/bin/
Interactive 3D Viewer and Terminal Execution
Interactive Viewer Navigation Controls:
- Spacebar: Pause / Resume physics
- Left-Click + Drag: Rotate camera azimuth and elevation
- Right-Click + Drag: Zoom in / out
- Scroll Wheel: Fine zoom
- C: Cycle camera viewpoints (Chase, Track, Aerial, Front)
1. Lemon & Tableware Spoon Dynamic Balance
Test precision non-prehensile balancing of an authentic citrus lemon in a shallow tableware spoon:
python scripts/test_spoon_lemon_balance.py --gui
2. 5-Duck Olympic Stadium Race (Interactive 3D Viewer)
Watch all 5 ducks sprint down the Olympic track with active Steadicam lemon balancing:
mjpython scripts/test_duck_racer_lemon_balance.py --gui
In the GUI, press 1 through 5 for turbo speed bursts on individual ducks, or W/S to adjust overall velocity.
3. 5-Duck Olympic Race Headless Physics Benchmark
Run the headless quantitative benchmark across all 5 lanes:
python scripts/test_duck_racer_lemon_balance.py --benchmark --duration 80.0
4. Athletic Racket Carrying Suite (Interactive 3D Simulation)
Launch interactive GLFW 3D simulations for any of the sports rackets in MuJoCo (on macOS, run with mjpython or python in a terminal with GUI display support):
# 1. Badminton Racket (Doubled Oval Geometry & Extended Shaft)
python scripts/test_racket_drop_and_walk.py --racket badminton --no-ball --gui
# 2. Pickleball Paddle (Wide-Body Composite Blade)
python scripts/test_racket_drop_and_walk.py --racket pickleball --no-ball --gui
# 3. Table Tennis Racket (Active Steadicam Horizontal Leveling)
python scripts/test_racket_drop_and_walk.py --racket table_tennis --no-ball --steadicam --gui
# 4. Table Tennis Dynamic Ball Balancing Test
python scripts/test_racket_drop_and_walk.py --racket table_tennis --steadicam --gui
5. Barbell Pure Physical Clamping Tests (100g, 200g, 300g)
Evaluate physical clamping with contact grip inside the beak cavity:
# 100g Barbell (0.10 NΒ·m clamping torque)
mjpython scripts/test_physical_clamp_policy.py --mass 100 --torque 0.10 --gui
# 200g Barbell (0.25 NΒ·m clamping torque)
mjpython scripts/test_physical_clamp_policy.py --mass 200 --torque 0.25 --gui
# 300g Barbell (0.50 NΒ·m clamping torque, 41% robot bodyweight)
mjpython scripts/test_physical_clamp_policy.py --mass 300 --torque 0.50 --gui
6. Render All Showcase Media
Batch render all high-definition MP4 and WebP demonstration files into docs/media/:
python scripts/render_all_readme_media.py
Repository Structure
This repository is organized so that any researcher or robotics engineer can clone it and run the policies immediately in MuJoCo:
microduck_manipulation/
βββ docs/
β βββ COMPREHENSIVE_PROJECT_REPORT.md # Detailed engineering report & benchmarks
β βββ EMPIRICAL_CLAMPING_FAILURE_BENCHMARK.md # Empirical clamping limits & contact mechanics
β βββ PROJECT_MASTER_PIPELINE_AND_THEORY.md # Control theory & math documentation
β βββ media/ # All showcase MP4 & WebP demonstration files & plots
βββ models/ # Self-contained MJCF robot, racket & object models
β βββ assets/ # 3D CAD meshes for Microduck, rackets & spoon
β βββ scene_loadcarry_physical_clamp.xml # Core non-welded physical clamping scene
β βββ scene_microduck_badminton.xml # Badminton athletic scene
β βββ scene_microduck_pickleball.xml # Pickleball paddle scene
β βββ table_tennis_racket.xml # Tournament table tennis racket
β βββ badminton_racket.xml # BWF badminton racket
β βββ pickleball_paddle.xml # Wide composite pickleball paddle
β βββ spoon_and_lemon.xml # Tableware spoon & citrus lemon
βββ policies/ # Pre-trained ONNX neural network policies
β βββ onnx/
β βββ microduck_spoon_lemon_steadicam_production.onnx # Champion Steadicam policy
β βββ payload_clamping_locomotion.onnx # Primary heavy load-carrying & balance policy
β βββ racket_steadicam_carry.onnx # Precision Steadicam racket carry policy
β βββ racket_ball_balance.onnx # Closed-loop ping-pong ball balance policy
βββ scripts/ # Executable evaluation & rendering suite
β βββ infer_policy.py # Standalone ONNX policy inference engine
β βββ test_duck_racer_lemon_balance.py # 5-Duck Olympic Race GUI & Benchmark
β βββ test_physical_clamp_policy.py # 100g, 200g, 300g Barbell Clamping GUI & Eval
β βββ test_racket_drop_and_walk.py # Athletic Racket Carries & Ball Balance GUI
β βββ test_spoon_lemon_balance.py # Lemon & Spoon Balance GUI & Eval
β βββ render_all_readme_media.py # Batch media rendering script
βββ requirements.txt # Python dependencies
βββ README.md
Technical Documentation
For complete mathematical derivations, control diagrams, and multi-robot benchmark logs:





