From ef74255166c056ee0711e75a0800f9f0861657c5 Mon Sep 17 00:00:00 2001 From: tfrere Date: Thu, 20 Aug 2026 14:07:29 +0200 Subject: [PATCH] feat: one-shot kick moves from the runtime's ball-kick policies ball_kick_left/right.onnx (same 61-dim obs interface) run for a fixed 0.5 s window with zeroed commands, then hand back to walking - same mechanics as the robot runtime. F on the keyboard alternates feet, RB / LB on the gamepad pick explicitly. Kicks only launch from a standing walk and are mutually locked with the roll. Co-authored-by: Cursor --- README.md | 3 + index.html | 5 +- policies/ball_kick_left.onnx | 3 + policies/ball_kick_right.onnx | 3 + rl.js | 104 +++++++++++++++++++++++++++------- 5 files changed, 97 insertions(+), 21 deletions(-) create mode 100644 policies/ball_kick_left.onnx create mode 100644 policies/ball_kick_right.onnx diff --git a/README.md b/README.md index a02af45..7fb9779 100644 --- a/README.md +++ b/README.md @@ -20,6 +20,7 @@ runs the policy network at 50 Hz. No server, no backend. | Run | `BEST_alpha_walking.onnx` | Velocity-tracking locomotion (arrows / WASD to steer) | | Sit | `BEST_alpha_sitstand.onnx` | Sits down on its hull, stands back up | | Roll | `roulade.onnx` | Rolls over and recovers | +| Kick | `ball_kick_left.onnx` / `ball_kick_right.onnx` | Blind one-shot kick (0.5 s window, zeroed commands), left or right leg | Policies and MJCF model from [apirrone/microduck_runtime](https://github.com/apirrone/microduck_runtime) @@ -31,6 +32,7 @@ and [apirrone/mjlab_microduck](https://github.com/apirrone/mjlab_microduck). - Arrow left / right: turn - A / E: strafe - Space: roll (one barrel roll, then back to running) +- F: kick, alternating feet - R: reset - Drag to orbit, scroll to zoom - Colour dots: repaint the duck (it quacks) @@ -42,6 +44,7 @@ Plug in a controller and the same mapping as the real robot runtime applies: - Left stick: forward / back + strafe - Right stick: turn - X: roll +- RB / LB: right / left kick - D-pad down: sit / stand toggle - Right trigger: mouth (analog) + quack diff --git a/index.html b/index.html index c000b18..5430ac9 100644 --- a/index.html +++ b/index.html @@ -392,10 +392,12 @@ ←→ turn   AE strafe
Space roll   + F kick   R reset   drag to orbit · scroll to zoom
gamepad: X roll   + RBLB kick   ⇓ sit   ⇑ run   RT quack @@ -419,6 +421,7 @@
  • MoveArrows or ZQSD to run and turn, A / E to strafe, drag to orbit.
  • RollSpace triggers a barrel roll, then it gets back up.
  • +
  • KickF throws a kick, alternating feet (RB / LB on the pad).
  • GamepadPlug one in - same mapping as the real robot.
  • GhostsOther visitors right now appear as translucent ducks, live.
@@ -468,7 +471,7 @@ appended: a plain src attribute can 401 when the browser blocks the *.static.hf.space auth cookie inside the hub iframe. -->