Skip to content

feat(hal): add Galaxea A1 real deployment path - #30

Merged
pengyue-polaron merged 10 commits into
masterfrom
galaxea-a1-hal
Jul 31, 2026
Merged

feat(hal): add Galaxea A1 real deployment path#30
pengyue-polaron merged 10 commits into
masterfrom
galaxea-a1-hal

Conversation

@pengyue-polaron

@pengyue-polaron pengyue-polaron commented Jul 24, 2026

Copy link
Copy Markdown
Collaborator

Summary

This adds a real-hardware Galaxea A1 HAL and the OpenRAL deployment path around
it. The HAL is policy-independent; the vendor ROS 1 SDK stays in an
operator-provided sidecar.

The LingBot-VA adapter is included as one concrete rSkill integration. OpenRAL
connects to versioned local camera and policy services provided by the A1
Runtime. It does not locate or import the Runtime checkout. Other rSkills can
use the same HAL without depending on the Runtime.

Hardware validation

Instruction: put the lemon into the blue plate

The run completed a visible lemon pick-and-place on the real A1. The execution
path was:

ExecuteRskill -> rSkill -> safety kernel -> GalaxeaA1HAL -> ROS 1 sidecar -> official driver -> A1

Design

  • Typed galaxea_a1 robot manifest and real-only GalaxeaA1HAL.
  • Loopback JSON sidecar for the official ROS 1 tracker and driver.
  • Fail-closed freshness, motor-status, alignment, limit, lease, and e-stop
    checks.
  • ROS 2 lifecycle and deploy-run integration.
  • Native MessagePack clients for the Runtime-owned Camera Bridge and LingBot
    policy gateway; no checkout lookup, sys.path mutation, or Runtime import.
  • One deployment-scoped paired-camera session shared by the front and wrist
    readers. Runtime remains the sole RealSense owner.
  • The rSkill pins the model revision and joint substep. OpenRAL supplies its
    ordered joint envelope, while Runtime owns the exact model config, EEF
    transforms, temporal-cache replay, and IK.
  • Every returned joint/gripper proposal still traverses OpenRAL's normal
    candidate-action, C++ safety-kernel, safe-action, and HAL path.

Validation

  • OpenRAL just lint: passed.
  • Galaxea A1 and sensor-factory tests: 42 passed, 1 skipped.
  • A1 Runtime just check: 258 passed.
  • Real HIL passed for observation, hold, joint and gripper round trips,
    command lease, jump rejection, deploy hold, and LingBot pick-and-place.

The skipped targeted test requires the optional GStreamer dependency.

@pengyue-polaron pengyue-polaron changed the title feat(hal): add Galaxea A1 real deployment (under construction) feat(hal): add Galaxea A1 real deployment path Jul 25, 2026
Signed-off-by: PengYue <yp2841@nyu.edu>
Signed-off-by: PengYue <yp2841@nyu.edu>
Signed-off-by: PengYue <yp2841@nyu.edu>
Signed-off-by: PengYue <yp2841@nyu.edu>
Signed-off-by: PengYue <yp2841@nyu.edu>
Signed-off-by: PengYue <yp2841@nyu.edu>
Signed-off-by: PengYue <yp2841@nyu.edu>
Signed-off-by: PengYue <yp2841@nyu.edu>
@pengyue-polaron
pengyue-polaron marked this pull request as ready for review July 30, 2026 17:54
Copilot AI review requested due to automatic review settings July 30, 2026 17:54

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

AdrianLlopart and others added 2 commits July 30, 2026 22:16
sim_bringup's unknown-scene error message does sorted(SCENES), but
_Registry never implemented __iter__ — any unknown scene id crashed with
"TypeError: '_Registry' object is not iterable" while formatting the
typed ROSConfigError it was about to raise (masking the real
diagnostic). The type-ignore at the call site claimed iterability that
did not exist; both are fixed and the regression is pinned by a unit
test.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: Adrian Llopart <adrianllopart@gmail.com>
…tates through e-stop

Review fixes on the Galaxea A1 deployment path:

- The sidecar forwarded gripper setpoints to
  /gripper_position_control_host regardless of the LOCKED/ARMING/ACTIVE
  relay machine that gates arm joints. The gripper bypasses the
  tracker's staged-hold interpolation, so it now fails closed unless the
  relay is ACTIVE — matching the validated bring-up order (HIL streams
  the joint hold to ACTIVE before the first gripper setpoint). Covered
  for LOCKED, ARMING (including riding in a joint packet), and ACTIVE.
- _publish_joint_state went dark for every HAL while the e-stop latch
  was set. Snapshot-backed (sim-attached) HALs now keep publishing the
  last post-step frame so operators retain joint visibility; only real
  HALs — whose transport may already be torn down — are skipped.
- GalaxeaA1CameraBridgeReader.read_latest raised a bare RuntimeError for
  "reader closed" where the sibling session class raises ROSRuntimeError.
- Docstrings: runnable Examples on the galaxea_a1 module and
  GalaxeaA1HAL (matching every sibling real-HW HAL), the estop() timeout
  comment now states the real 4 s bound (3 s SIGINT grace + 1 s SIGKILL
  wait), and _on_estop_cleared documents the per-HAL RESTART_REQUIRED /
  RESETTABLE recovery branching it implements.
- deploy-sim of the real-only robot is pinned by a test: bare sim mode
  raises ROSCapabilityMismatch and the scene-attached path raises the
  typed unknown-scene ROSConfigError (not the TypeError fixed in the
  prior commit). Sidecar test fakes are hoisted to module scope and
  shared.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: Adrian Llopart <adrianllopart@gmail.com>
@AdrianLlopart

Copy link
Copy Markdown
Contributor

Ive made minor changes to the tests / docstrings and fixed a preexisting bug. Nothing should be have broken so please re-test with the HIL and if everything works correctly, feel free to merge

@pengyue-polaron

Copy link
Copy Markdown
Collaborator Author

Ive made minor changes to the tests / docstrings and fixed a preexisting bug. Nothing should be have broken so please re-test with the HIL and if everything works correctly, feel free to merge

Thanks! I will merge it.

@pengyue-polaron
pengyue-polaron merged commit cfa9ac4 into master Jul 31, 2026
3 checks passed
@AdrianLlopart
AdrianLlopart deleted the galaxea-a1-hal branch August 1, 2026 13:33
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.

3 participants