Skip to content

feat(g1): add SONIC Desktop activation and stop controls - #4783

Draft
Nabla7 wants to merge 8 commits into
pim/feat/g1-sonic-wbcfrom
pim/feat/g1-sonic-desktop
Draft

Nabla7 wants to merge 8 commits into
pim/feat/g1-sonic-wbcfrom
pim/feat/g1-sonic-desktop

Conversation

@Nabla7

@Nabla7 Nabla7 commented Oct 22, 2026 •

Copy link
Copy Markdown
Collaborator

Why do we need this?

An operator should be able to activate SONIC, stop a navigation command without dropping balance, and request damping from Desktop. The Controller app must act on the run the operator inspected, not a replacement run.

What is this feature?

Stack: #4304 -> #4305 -> #3557 -> #4783 -> #4784.

Layer 4, based on #3557. 9 files, +220/-2 relative to that base.

  • Add G1SonicPolicyModule.activate(): validate feedback, clocks and ramp, then request live measured-pose activation in one operation.
  • Add policy stop_motion() and MovementManager stop/status RPCs. Stop motion cancels navigation and operator references while balancing continues.
  • Expose feedback ages and execution mode in policy status.
  • Let the existing generic gateway RPC route accept an optional run_id, rejecting a replaced run. No new controller or motor-command publisher.

The UI is a companion change in jeff-hykin/dim-controller#1. This PR has no sim2, ControlCoordinator or Pico implementation.

How to manually run this

On macOS or a CUDA-enabled Linux host with SONIC dependencies installed:

uv run dimos-sonic-models
uv run --no-sync dimos --simulation mujoco --transport zenoh --viewer rerun run unitree-g1-sonic-wbc

Open Desktop's Controller app with the companion frontend branch. Inspect the SONIC panel, drive with the existing controls, click Stop motion and confirm walking stops but balancing continues. Exercise Deactivate/Activate with the robot supported in simulation, then Damping stop. Damping is latched until restart, not a physical power disconnect. Hardware starts unarmed; the existing sim automatically activates.

macOS simulation selects CPU inference automatically. Install with uv sync --extra control --extra sim on a Mac. Real hardware still requires CUDA and rejects the CPU-simulation option. See sonic-desktop.md.

Verification

  • Focused backend checks: 43 passed, 2 deselected; targeted mypy and commit hooks passed.
  • Companion frontend: 290 tests, production build/typecheck and endpoint manifest validation passed.
  • Production-bundle browser checks at desktop and mobile sizes used mocked gateway responses: activation, stop, damping, run binding, no JS errors or horizontal overflow.
  • Native Mac CPU walking/stopping checks passed for the WBC and WebXR stacks using actual models; a heavily loaded repeat hit the planner watchdog (details in Integrate standalone G1 SONIC policy and blueprint #3557). Desktop UI checks above still use mocked gateway responses; live Desktop-to-simulator interaction, enterprise headset tracking and physical-robot acceptance remain pending. No robot deployment or actuation was performed.

Which issue(s) does this PR close?

Follow-up to #3557; no separate issue closed.

Checklist

  • I have read and approved the CLA.

@github-actions github-actions Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

go2 replay realtime (arm64)

Details
Benchmark suite Current: 2fb2aab Previous: c3f0add Ratio
peak memory 1780.062 MB 1762.234 MB 1.01
peak threads 356 threads 359 threads 0.99
network (transport) 2730.958 MB 2735.794 MB 1.00
disk write 1.793 MB 1.699 MB 1.06
instructions 137.571 G 137.654 G 1.00

This comment was automatically generated by workflow using github-action-benchmark.

@codecov

codecov Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

❌ 1 Tests Failed:

Tests completed Failed Passed Skipped
6778 1 6777 46
View the top 1 failed test(s) by shortest run time
experimental.gateway.tests.test_config::test_every_registered_blueprint_is_annotated
Stack Traces | 0.185s run time
def test_every_registered_blueprint_is_annotated() -> None:
        source = annotation_file.load()
        annotated = {name for robot in source["robots"].values() for name in robot["blueprints"]}
        missing = sorted(
            name
            for name in all_blueprints
            if name not in annotated and not annotation_file.HIDDEN_NAME.search(name)
        )
>       assert not missing, f"add these to experimental/gateway/annotations.yaml: {', '.join(missing)}"
E       AssertionError: add these to experimental/gateway/annotations.yaml: unitree-g1-sonic-wbc
E       assert not ['unitree-g1-sonic-wbc']

annotated  = {'a1z-planner-coordinator', 'alfred-keyboard-teleop', 'alfred-mls-nav', 'alfred-mls-nav-lidar', 'alfred-nav', 'coordinator-a1z', ...}
missing    = ['unitree-g1-sonic-wbc']
source     = {'robots': {'a1z': {'blueprints': {'a1z-planner-coordinator': {'description': 'Motion planning and execution for a Gal...': {'label': 'Arms'}, 'dog': {'label': 'Dogs'}, 'drone': {'label': 'Drones'}, 'humanoid': {'label': 'Humanoids'}, ...}}

.../gateway/tests/test_config.py:255: AssertionError

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

This branch was previously deployed

1 inactive (outdated) deployment
cachix — 4f262cf4 Deployed Oct 23, 2026 by Nabla7 via cachix-build #14111
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