Skip to content

Soccerbot orchestrator: in-process ACT pickup, clamping, and killswitch - #5

Open
arjuncoder1 wants to merge 9 commits into
mainfrom
cursor/soccerbot-orchestrator-19ea
Open

arjuncoder1 wants to merge 9 commits into
mainfrom
cursor/soccerbot-orchestrator-19ea

Conversation

@arjuncoder1

@arjuncoder1 arjuncoder1 commented Jul 19, 2026

Copy link
Copy Markdown
Owner

Summary

Makes soccerbot/ the core orchestrator (workspace-local, not PyPI). Logic stays in sibling deps and is imported in-process:

  • local-vla-inference — ACT pickup
  • scripted-behavior — turn / avoid / throw + trajectory replay

Defaults

  • --layout 14d
  • --policy ajkoder/g1-pickup-ball-act
  • --clamp 0.002
  • --camera zmq://192.168.123.164:55555 (working teleimager head JPEG port)

Safety (defense in depth)

  1. URDF hard limit clamp at the choke pointG1Arms.send_arm_positions clamps every commanded joint to real G1 URDF limits; covers ACT, replay, arm holds, throw, and go-home no matter what the caller computes.
  2. Slew clamps on every path — ACT / go-home 0.002 rad/step (recovery as calm as inference); replay 0.01; throw 0.06 (loose on purpose so the push keeps its dynamics, only catches garbage targets). Throw phases chain from the actual last command so the clamp can never cause a position step-jump.
  3. Ctrl+C graceful resetStopMove + release arm_sdk; opens a short-timeout temp publisher when the interrupted stage held no handle.
  4. Emergency-first killswitch — Damp / ZeroTorque switch the FSM immediately, then clean up the arm overlay; emergencies never wait on an arm connect.
  5. Home pose validated against URDF limits at load; no-ramp weight=1 engage avoids the documented re-engage jerk.

(Rerun telemetry was prototyped and then scrapped per request — no viz deps.)

Killswitch (CLI default + GUI)

./killswitch.sh --iface enp5s0            # interactive CLI (no tkinter needed)
./killswitch.sh --iface enp5s0 stop|home  # one-shot
./killswitch.sh --gui --iface enp5s0      # Tk panel: Stop / Go Home / Damp / Zero Torque / Start

Run

./install.sh
./run_soccerbot.sh --iface enp5s0
./diagnose.sh --iface enp5s0

Tests

  • scripted-behavior/test_throw.py — 9 passed (FK/limit checks on the push delta)
  • Fake-arms slew-chain test: all consecutive throw command deltas ≤ clamp
Open in Web Open in Cursor 

…itch

Make soccerbot the core workspace orchestrator that imports local-vla-inference
(ACT pickup with ajkoder/g1-pickup-ball-act, clamp 0.002, working teleimager
zmq://192.168.123.164:55555) and scripted-behavior stages in-process. Add
Rerun telemetry, Ctrl+C graceful reset (StopMove + arm_sdk release), headed
killswitch GUI, and root install/diagnose/run scripts. Leave front_camera
single-port path untouched.

Co-authored-by: arjuncoder1 <arjuncoder1@users.noreply.github.com>
@arjuncoder1
arjuncoder1 marked this pull request as ready for review July 19, 2026 07:53
@cursor

cursor Bot commented Jul 19, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@arjuncoder1

Copy link
Copy Markdown
Owner Author

@cursor review

Comment thread soccerbot/src/soccerbot/pickup.py
Comment thread local-vla-inference/main.py
Comment thread soccerbot/src/soccerbot/main.py
Comment thread diagnose.sh
Comment thread local-vla-inference/main.py Outdated
- Load local-vla-inference/main as local_vla_inference_main so scripted
  main.py cannot shadow build_args/run
- Share process-wide ensure_dds (dds_init) across ACT and scripted stages
- graceful_reset always opens a temp G1Arms to release arm_sdk when no handle
- ACT leave-engaged path freezes then detach() so only one rt/arm_sdk publisher
- diagnose.sh cds to REPO_ROOT before relative import checks

Co-authored-by: arjuncoder1 <arjuncoder1@users.noreply.github.com>
Comment thread local-vla-inference/main.py
Comment thread soccerbot/src/soccerbot/killswitch.py Outdated
Comment thread soccerbot/src/soccerbot/pickup.py
@arjuncoder1

Copy link
Copy Markdown
Owner Author

Default killswitch is a no-GUI CLI (interactive or one-shot stop/damp/zero/
start/home/status). --gui keeps the Tk panel and adds a GO HOME button.
Home is Unitree zeros by default, overridable via scripted-behavior/home_pose.json,
and motion is slew-clamped.

Co-authored-by: arjuncoder1 <arjuncoder1@users.noreply.github.com>
Comment thread local-vla-inference/main.py
Comment thread soccerbot/src/soccerbot/home.py Outdated
Comment thread soccerbot/src/soccerbot/main.py
cursoragent and others added 2 commits July 19, 2026 15:07
…zero

- G1Arms.send_arm_positions hard-clamps every commanded q to URDF limits
  (single choke point for ACT / replay / holds / throw / home)
- Damp & ZeroTorque switch FSM first, arm cleanup after; temp release
  publisher uses 3s lowstate timeout so emergencies never stall
- throw phases chain from the actual last command (no step-jump when the
  slew clamp lags the blend); verified with fake-arms delta test
- go-home: no-ramp weight=1 engage (avoids re-engage jerk), home_pose.json
  validated against URDF limits at load
- Rerun telemetry disables itself on any error instead of breaking control

Co-authored-by: arjuncoder1 <arjuncoder1@users.noreply.github.com>
…its dynamics; clamp stays as a garbage-target net

Co-authored-by: arjuncoder1 <arjuncoder1@users.noreply.github.com>

@cursor cursor Bot 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.

Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 35dbcc5. Configure here.

Comment thread local-vla-inference/main.py
….py, --rerun flags, lerobot[viz] deps, and diagnose check

Co-authored-by: arjuncoder1 <arjuncoder1@users.noreply.github.com>
@cursor cursor Bot changed the title Soccerbot orchestrator: in-process ACT pickup, clamping, killswitch, Rerun Soccerbot orchestrator: in-process ACT pickup, clamping, and killswitch Jul 19, 2026
Go-home now matches ACT at 0.002 rad/step (was 0.02 / 1 rad/s), with a
longer duration budget so the tight slew can still reach the pose. Replay
safety net drops to 0.01; throw stays loose at 0.06 for push dynamics.

Co-authored-by: arjuncoder1 <arjuncoder1@users.noreply.github.com>
Repository owner deleted a comment from cursor Bot Jul 19, 2026
Repository owner deleted a comment from cursor Bot Jul 19, 2026
cursoragent and others added 2 commits July 19, 2026 15:44
Soccerbot --pickup-duration and in-process build_args now default to 45
seconds instead of 30.

Co-authored-by: arjuncoder1 <arjuncoder1@users.noreply.github.com>
Co-authored-by: arjuncoder1 <arjuncoder1@users.noreply.github.com>
Repository owner deleted a comment from cursor Bot Jul 22, 2026

This branch has not been deployed

No deployments
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