microduck-running
This policy adds running to the Microduck at 1.6 m/s - 4x faster than the normal 0.4 m/s walking speed.
Command
The 13-D command block is [twist(3), head_pose(4), body_pose(6)].
| slot | meaning |
|---|---|
twist[0] |
forward-velocity command; trained through 2.20 m/s, evaluated at 2.20 m/s |
twist[1] |
lateral command; use 0 (only a tiny ±0.02 m/s range was seen in training) |
twist[2] |
yaw-rate command; use 0 (only a tiny ±0.05 rad/s range was seen in training) |
head_pose[0:4] |
unused for this policy; zeros |
body_pose[0:6] |
unused for this policy; zeros |
An exact-zero standing bucket made up 3% of training environments, so
twist = [0, 0, 0] is the intended idle command. The speed objective rewards
forward progress and can differ from the command; twist[0] is not a hard
speed limiter. Do not begin a hardware test at the 2.20 m/s simulation command.
Try it in simulation
The training family is based on the private Vottivott/microduck_rl tag
running-sim-v1, with the robustness continuation described below.
git clone https://github.com/Vottivott/microduck_rl.git
cd microduck_rl
git checkout running-sim-v1
uv sync
hf download HannesVonEssen/microduck-running policy.onnx --local-dir policies/running
uv run scripts/infer_policy.py \
--walking policies/running/policy.onnx \
--new-cmd-obs \
--lin-vel-x 2.2
Contract
- input:
obs, float32[1, 61] - output:
actions, float32[1, 14] - control rate: 50 Hz
- action scale: 1.0, joint-position targets around MicroDuck HOME
- observation normalizer: baked into
policy.onnx - entry pose: standing
- robot: MicroDuck hardware revision 1, 14 Dynamixel XL330 servos
- policy type: perpetual flat-ground locomotion
Simulation evaluation
All results below use a 2.20 m/s command for 10 seconds. “Stress” adds random ±0.10 m/s planar velocity pushes every 3–6 seconds, trunk CoM offsets of ±10 mm, head CoM offsets of ±6 mm, and initial pitch/roll up to ±2 degrees.
| model / condition | envs | survival | mean body-forward speed |
|---|---|---|---|
| plain, nominal | 512 | 99.22% | 1.6511 m/s |
| plain, stress | 512 | 98.83% | 1.6350 m/s |
| plain, stress + friction 0.7–1.8 | 512 | 96.68% | 1.6424 m/s |
| backlash model, nominal | 256 | 98.83% | 1.6362 m/s |
| backlash model, stress | 256 | 98.44% | 1.6122 m/s |
Heading control remains weak: nominal mean absolute heading error was 31.33° and final absolute heading error averaged 59.87° over the 10-second battery. The speed figures are simulation body-forward means, not real-hardware measurements.
Sim-to-real constraints
The policy retains deployment-oriented modeling from the walking recipe:
- BAM XL330 M6 voltage control, back-EMF, current limiting, battery variation from 6.5–8.2 V, and load-dependent voltage sag;
- 3–6 physics-step actuator delay, 0–1-step IMU delay, and one-control-step joint-velocity lag;
- foot friction randomized from 0.7–1.3 during training;
- trunk mass/inertia ±5%, armature ±10%, BAM joint friction ±10%, joint encoder bias ±0.015 rad, IMU misalignment up to 6°, and actor noise.
The fast-gait discovery run originally relaxed several constraints: flat terrain, no pushes, non-backlash dynamics, no wide CoM curriculum, weaker posture/motion/slip/action-rate regularization, and disabled pose tracking. The hardware continuation then progressively added:
- planar velocity pushes ±0.03 → ±0.06 → ±0.10 m/s;
- trunk CoM offsets ±3 → ±5 → ±8 mm;
- head CoM offsets ±3 → ±5 → ±6 mm;
- initial pitch/roll up to ±1 → ±1.5 → ±2°.
Backlash and the held-out ±10 mm trunk-CoM / high-grip combination were used for evaluation, not silently folded into nominal training. Remaining concerns include real impact loading, gearbox compliance, foot contact, heading drift, and sustained actuator current/temperature.