Skip to content

Add jump task: two-foot hop, land standing - #14

Open
SAMBAS123 wants to merge 1 commit into
pollen-robotics:developfrom
SAMBAS123:feat/jump-task
Open

SAMBAS123 wants to merge 1 commit into
pollen-robotics:developfrom
SAMBAS123:feat/jump-task

Conversation

@SAMBAS123

Copy link
Copy Markdown

Why

Roulade is a roll. Kick is a swing. Sitstand is a sit. Nothing in the pad means leave the ground and land — swap the ONNX in, the duck hops, then auto-hands back to stand/walk after ~2 s.

A two-foot hop is at the XL330 margin (open-loop BAM crouch→extend never left the floor). The env therefore pays Δpeak height and Δbilateral flight only while both feet are off, upright, and at/above stand — a sit/fall with feet off does not count. Reverse-curriculum airborne / crouch-upward spawns put landing on-policy even if takeoff is rare.

What

  • New env Mjlab-Jump-Flat-MicroDuck (+ backlash twin on the allcollisions model)
  • 61D actor obs: 48 proprio + twist(3) + head(4) pad + body(6) pad — hot-swappable with walk/stand/roulade
  • Reset mix: 60% standing (learn takeoff) / 25% crouched with upward vz / 15% already airborne (learn the landing); curriculum shifts toward standing starts
  • scripts/infer_policy.py --jump (key J). Auto-return after 2 s — jump ends standing
  • CPU cfg tests lock the contract, signs, sit-vs-hop gates, and registration

AGENTS.md bar

uv run --with pytest pytest tests/test_jump_cfg.py
uv run train Mjlab-Jump-Flat-MicroDuck --env.scene.num-envs 64 --agent.max_iterations 5

Ran on a Spark (GB10): 16 jump tests green. Smoke 64 envs × 5 iters: actor obs (61,), every reward term computed, Episode_Termination/nan_state = 0, self-negating penalties logged ≤ 0.

This is the env. A real run is ~2000–3000 iters at 4096 envs (experiment_name=microduck_jump), then scripts/export.py (bakes the normalizer — mandatory). A local 4096-env Spark run produced a visible ~3 cm hop from a standing start; weights stay out of git (same as the other tricks).

Deploy rehearsal

uv run scripts/infer_policy.py --walking walk.onnx --standing stand.onnx \
    --jump jump.onnx --new-cmd-obs

J hops; after ~2 s control hands back to standing/walking.

Episodic 61D hot-swap trick (flat + backlash twin). Potential-based peak
height and bilateral flight; sit/fall with feet off does not count.
Reverse-curriculum airborne / crouch-up spawns teach landing. CPU cfg
tests lock the contract; 64-env × 5-iter smoke is NaN-free.

@abhinav3 abhinav3 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, have you tested that it is able to jump with its tiny motors? Could you pls share the simulation video?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants