Skip to content

Add robot profile: unitree/go2/unitree.go2.mujoco-pybullet-sim.v1 - #87

Closed
EslaM-X wants to merge 4 commits into
fabricfoundation:mainfrom
EslaM-X:feature/go2-tier1-sim
Closed

Add robot profile: unitree/go2/unitree.go2.mujoco-pybullet-sim.v1#87
EslaM-X wants to merge 4 commits into
fabricfoundation:mainfrom
EslaM-X:feature/go2-tier1-sim

Conversation

@EslaM-X

@EslaM-X EslaM-X commented Aug 12, 2026

Copy link
Copy Markdown

🤖 Unitree Go2 · Tier 1 Simulator Submission

Profile: unitree/go2/unitree.go2.mujoco-pybullet-sim.v1
Scope: Simulator-only · 8 priced skills · MuJoCo + PyBullet sim-to-sim

A paid RoboPay action hitting the Zenoh topic robot/tunnel/action drives
the official Go2 model from mujoco_menagerie through real,
policy-triggered skill episodes — joint-space PD trajectory control, body
weight compensated, never a replayed animation or a built-in demo motion.


🎯 What's in the box

Path Purpose
registry/vendors/unitree/go2/unitree.go2.mujoco-pybullet-sim.v1/ Full robot action profile (robot · skills · functions · payment policy · execution mapping · example envelope · skill-contract tests · validation report)
simulation/go2/ Go2 controller, x402 payment gate, Zenoh action link, 5 test suites
simulation/pybullet/ Sim-to-sim validation + machine-readable report
simulation/setup.sh Pinned, reproducible fetch of the official Go2 model assets

🦿 The 8 skills (all priced, all measurable)

wave · sit · stand · stop (safe stop) · bow · nod · turn_to_face · hold

Every skill runs through a joint-space trajectory controller and reports
real simulator metrics — paw lift height, sit depth, torso pitch, body
height, achieved heading — then returns to the home stance
(|bodyZ − 0.283| < 0.02) so paid actions can run back to back. stop is the
fail-safe skill: it halts motion and returns the robot to its stable home pose.

⚙️ The Go2 specifics (what's not a copy of the Spot demo)

  • Go2 exposes torque motor actuators (no native position actuators), so
    the controller wraps them in a small PD position servo — while keeping
    the torque limits in the model intact.
  • Base frame is base_link, robot id unitree-go2; the hip-yaw chain is
    calibrated (pitch −0.6 rad / roll −1.5s) so the robot actually settles.
  • turn_to_face yaws the body with a bounded applied yaw torque
    (xfrc) plus a differential hip-abduction shuffle, then reports the
    achieved yaw and the remaining error honestly
    — a partial turn is never
    faked as a complete one.

✅ Success criteria — cleared

  • End-to-end paid flow — paid action → Zenoh → skill episode → correlated result on robot/tunnel/result
  • Zenoh bridge — subscribes on robot/tunnel/action, republishes with actionId, responds on the documented result topic
  • Real action requirement — 8 non-trivial embodied skills, visually demonstrable (screen recording: simulation/docs/go2.gif)
  • Payment gate — unpaid ⇒ 402 + PAYMENT-REQUIRED; forged/expired receipts ⇒ 402; replayed idempotencyKey/txHash ⇒ 409; only status: success may settle
  • Success & failure semantics — success + 6 deliberately testable failure paths (UNPAID, INVALID_PARAMS, UNKNOWN_SKILL, WRONG_ROBOT, DUPLICATE, tampered paramsHash)
  • Reproducible — clean checkout + 5 commands, under 30 minutes, on Windows or ubuntu-latest (CI)
  • Safe stopstop halts motion and returns to the stable home stance
  • Code quality — no secrets, configurable topics/robotId/model path, JSON logs, 5 test suites
  • Sim-to-sim — same joint configurations recomputed in MuJoCo and PyBullet agree to 0.01 cm across all salient poses (simulation/pybullet/sim2sim_report.json)

🔁 End-to-end flow

paid action (x402) → tunnel → Zenoh robot/tunnel/action
    → robopay_link.py → validate envelope + payment gate
    → joint-space Go2 controller on mujoco_menagerie
    → metrics → result on robot/tunnel/result (correlated by actionId)

🎬 Evidence

🚀 Reproduce in < 30 minutes

git clone https://github.com/fabricfoundation/RoboPay.git
cd RoboPay/simulation
./setup.sh                       # pinned official Go2 model assets
cd go2
python3 test_go2_control.py      # every skill's physics actually happen
python3 test_payment_gate.py     # 402/409, no-settle-on-failure
python3 test_result_semantics.py # success/error semantics, replay, tampering
python3 test_link.py             # paid action → Zenoh → episode → result
cd ../pybullet
python3 test_sim2sim_go2.py      # MuJoCo ⇄ PyBullet kinematics agreement

⚠️ Known limitations (honest scope)

  • Simulator-only submission — settlement is exercised end to end against the
    same local facilitator the robot link trusts; no on-chain settlement.
  • The Go tunnel binary is not run on Windows; the Python payment gate
    reimplements the exact x402 decisions the tunnel's middleware makes before
    actuation, and the wire contract is exercised through peer-mode Zenoh exactly
    as the tunnel would publish it.
  • turn_to_face uses an applied yaw torque as a documented stand-in for the
    ground interaction a real Go2 shuffle produces — the only skill (besides
    wave's body-weight compensation) that applies an external force.

Built with care by EslaM-X 🇪🇬 — open to review feedback and happy to
iterate on any criterion.

@EslaM-X
EslaM-X requested a review from a team August 12, 2026 07:55
@EslaM-X EslaM-X changed the title Tier 1 Go2 paid-action simulation (MuJoCo + PyBullet) Add robot profile: unitree/go2/unitree.go2.mujoco-pybullet-sim.v1 Aug 12, 2026
…docs

- Use the MuJoCo body name 'base' (not 'base_link') so the controller
  loads the pinned mujoco_menagerie Go2 model on ubuntu-latest.
- Replace the body yaw torque with a pure static-stability hip-abduction
  shuffle (front vs hind hip splay) so the turn converges toward the
  target without overshoot or toppling; achieved yaw and remaining error
  are still reported honestly.
- Rename the sim-to-sim artifact to go2_sim2sim_report.json and point the
  test, README and validation report at it.
- Unify simulation/setup.sh and simulation/README.md with the spot branch
  (both robots share one pinned menagerie clone, idempotent), scope the
  submission to simulation/ (revert the root README edit), ignore the
  ephemeral facilitator key, and refresh the terminal-log evidence from a
  clean full-suite run (5/5 PASS, sim-to-sim 0.02 cm).
@EslaM-X

EslaM-X commented Aug 12, 2026

Copy link
Copy Markdown
Author

Closing - duplicate targeting wrong base (main). Correct PR is #89 targeting unitree-go2-tier-1 (bounty branch).

@EslaM-X EslaM-X closed this Aug 12, 2026
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.

1 participant