microduck-moonwalk

A moonwalk for Microduck. Over 5 s the duck glides backwards: one foot stands on its toe with the heel up (33–35°) while the other slides back flat (5 cm per glide, two glides per second). Then a 2 s stop brings the feet together and holds the heading, and the duck hands back to the stand network.

Status: simulation only. It has never run on a real duck. Publishing it so someone with a robot can try it. Read "Before you try it" first.

What is in the file

policy.onnx is two networks composed into one graph (61 obs → 14 actions, normalizer baked in):

part net job
walk moonwalk-v195 @ 50 the glide; runs while the phase obs[48:50] is on the unit circle
stop moonwalk-v258 @ 20 runs once the daemon zeroes the phase (the stop signal); brings the feet together and stops the turning

The graph routes by |obs[48:50]|² < 0.25. Both nets were trained with 2° of gear backlash (-Backlash-).

Before you try it

  1. Moonwalk shoes. The soles must slide and the toes must grip. Without them the duck does not moonwalk. In training:

    • each sole was slick, with friction μ randomised over 0.10–0.40 for the walk and 0.12–0.50 for the stop;
    • a grippy toe pad: a 3 mm-radius strip across each toe tip, 1.5 mm above the floor with the sole flat, rubber-like μ 0.7–1.3. It touches the floor from about 6° of toe-down.

    On a robot: PTFE tape on each sole and a thin rubber strip on each toe tip, on a smooth hard floor.

  2. A daemon that can drive it. The ground pick has to:

    • run for 5 cycles (released daemons stop a pick at 0.7 of one cycle);
    • feed the heading error into the third twist slot;
    • keep driving for 2 s with the phase zeroed.

    That takes three [policy] keys, which are not in robotd 0.23.1 yet (proposed in pollen-robotics/microduck#628; until it merges, build robotd from that branch):

    [policy]
    allow_community = true   # off by default: lets the robot fetch from a repo outside pollen-robotics
    ground_pick_period = 1.0
    ground_pick_end_phase = 5.0
    ground_pick_heading = 8.0
    ground_pick_settle_s = 2.0
    

    Then load it and press the ground-pick button:

    robotctl policy load ground_pick giuvilasvito/microduck-moonwalk
    

    Without the four ground-pick keys the duck hands back after 0.7 s, mid-glide. To go back to the stock pick: robotctl policy reset ground_pick, and remove the four ground-pick keys.

  3. Something soft to fall on, and a hand ready. A skill switches the fall reflex off while it runs.

How it did in simulation

These numbers come from mjlab / MuJoCo Warp with BAM XL330 actuators, 2° backlash, observation noise and domain randomisation, and no pushes. Each cell is 128 robots, and none of them fell.

  • Glide: travel −0.22 to −0.30 m over 5 s at sole μ 0.12–0.40.

  • Heading after the stop and stand (stop start → 3 s on alpha_stand.onnx):

    sole μ median, seed 0 / seed 1 ≤ 5°
    0.12 2.04 / 1.53° 88 / 90%
    0.25 1.92 / 2.23° 88 / 85%
    0.40 2.28 / 2.79° 77 / 78%

    A later stop signal, at 5.25 s on μ 0.12, gives a median of 2.35° with 85% ≤ 5°.

  • Through the real daemon (robotd 0.17.8 with the three keys, against the duck-sim body):

    • stop at 5.0 s: median 1.45°, worst 2.7°, 10/10 within 5°;
    • stop at 5.25 s: median 4.8°, 5/10 within 5°.

Known risks on a real robot

  • Loop latency. The walk survives +20 ms of extra observation→action delay but mostly falls at +40 ms (1–4 of 64 survive). If the real loop is slower than training assumed, this is the first thing to break.
  • Floor friction. At high sole friction (μ 0.40) the stop turns about −3.5° on its own, and the stand hand-back adds about +1.5° at every μ.
  • Actuators and shoes are models. The BAM XL330 fit, the backlash and the shoe friction are all simulated guesses.

Testing it on a robot

  1. Hover test. Hold the duck just above the floor and trigger the pick. The legs should make small, sane glide motions, with nothing slamming into a limit.
  2. Ten runs on the floor, filmed from the side and from above, with a mark on the floor for the start heading. For each run note:
    • whether it fell;
    • how far it went backwards;
    • how much its heading changed;
    • roughly how high the heel got.
  3. A fall in the first second probably means loop latency. Please include the robotd log.
  4. Take the shoes off before walking again. The walk and stand networks were trained barefoot.

Report back on the repo's Community tab, with:

  • the floor and sole materials;
  • the results;
  • the videos.

Training

pollen-robotics/microduck_rl, task family Mjlab-Moonwalk-Clock-… (local changes on develop b02fdea4, not upstreamed yet; ask on the Community tab if you want them). PPO (rsl_rl), trained locally with tensorboard (no wandb).

  • Clock-driven mimic of an IK reference cycle. The reference is moonwalk_reference_glide_h45to30_s15.npz: heel 45° → 30°, 1.5 cm stride, CoM inside the support polygon in every frame.
  • Rewards and conditions: heading tracking with a heading observation, symmetry, shoes, gear backlash, and a sole-μ range for travel.
  • The stop net is trained on a stop signal: phase slots zeroed for 2 s. It is rewarded for:
    • holding its heading;
    • locking feet yaw;
    • ending in the stand net's rest pose;
    • doing this on grippier soles.
  • Composition. Walk and stop are trained as separate nets. A single net that both walks and stops was tried and kept losing its walk.
Downloads last month

-

Downloads are not tracked for this model. How to track
Video Preview
loading