Skip to content

R1Pro adapter-free dual grippers on the standard manipulation API - #5019

Open
TomCC7 wants to merge 43 commits into
mainfrom
cc/feat/r1pro-grippers
Open

TomCC7 wants to merge 43 commits into
mainfrom
cc/feat/r1pro-grippers

Conversation

@TomCC7

@TomCC7 TomCC7 commented Nov 4, 2026 •

Copy link
Copy Markdown
Member

Overview

Add independent R1Pro grippers through the existing manipulation API. Stacked on #5017.

Problem

Each manipulation group needs its own jaw without changing generic control policy.

Changes

  • Declare jaw positions in metres and reuse the unchanged GripperTask.
  • Bind left/right inputs and manipulation groups separately.
  • Keep vendor conversion, feedback checks and target deduplication in R1ProConnection.
  • Combine jaw resources with the parent's native body-velocity resources.
  • Leave generic control code unchanged from refactor(control): retire shared transport adapters #5017.

Validation

  • Eight focused driver/gripper/assembly checks passed; targeted mypy and Ruff passed.
  • Startup requires actual jaw feedback; recovery alone does not reauthorize an interrupted target.
  • No hardware run. Software stop is not vendor cancellation or proof of torque-off. New CI is unverified.

@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: c53e78c Previous: 3d91dbb Ratio
peak memory 1770.113 MB 1772.094 MB 1.00
peak threads 371 threads 369 threads 1.01
network (transport) 2724.746 MB 2722.266 MB 1.00
disk write 1.902 MB 1.621 MB 1.17
instructions 141.698 G 141.68 G 1.00

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

@codecov

codecov Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

❌ 1 Tests Failed:

Tests completed Failed Passed Skipped
9375 1 9374 43
View the top 1 failed test(s) by shortest run time
dimos.utils.test_reactive::test_getter_ondemand_timeout
Stack Traces | 0.246s run time
def test_getter_ondemand_timeout() -> None:
        source = dispose_spy(rx.interval(0.2).pipe(ops.take(50)))
        getter = getter_ondemand(source, timeout=0.1)
>       with pytest.raises(Exception):
E       Failed: DID NOT RAISE <class 'Exception'>

getter     = <function getter_ondemand.<locals>.getter at 0x17e6855a0>
source     = <reactivex.observable.observable.Observable object at 0x17ed559f0>

dimos/utils/test_reactive.py:629: Failed

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

TomCC7 and others added 12 commits November 9, 2026 21:00
…coordinator

A robot behind a ConnectionModule with a cmd_vel port had its base told 0
on every axis every tick, so no task could drive it. Now its base axes
(<robot>/base/vx, vy, wz) are registered like an adapter base's virtual
joints: tasks claim and win them in arbitration, the tick loop routes them
to their own per-robot entry so a velocity task on the base never
mode-conflicts with a position task on the joints, and ConnectionSource
fills each axis with the winner's speed or 0 when idle or stopped.

The coordinator's twist_command mapping covers connection robots too, so
the same teleop/nav publishers drive an adapter base or a connection base
unchanged. Estop semantics are unchanged: commands stop, the connection
module's own deadman halts the robot.

Arm-only coordinators and legacy adapter stacks are untouched: a robot
without a cmd_vel port has no base axes, and adapters never take the new
route.
Follow-up verification for the connection base winners: a velocity task or
twist drives vx, vy and wz each non-zero through to the robot's cmd_vel
port; two velocity tasks on the same base arbitrate by priority and the
loser resumes when the winner stops; and a task whose stream goes quiet
zeroes every axis, as an adapter base's does.
The velocity-task timeout can be observed by a later tick than the
sleep(0.1) boundary on slow or loaded runners (seen on macOS CI), so
keep ticking until the zeroed command shows up.
… hold

Greptile review on #5016:

- P1: OperatorHoldTask discovered axes only in the joint-state snapshot,
  which never contains a connection robot's base axes (they are commanded
  speeds, not read positions), so a running velocity task kept driving the
  base through a hold, including after an e-stop clear. The coordinator
  now names every connection base axis to the hold (on start and on
  add_task), and the hold zeroes them like an adapter base's velocity
  joints.
- P2: the base-timeout test slept 0.1s against a 0.2s reading timeout, so
  a paused runner stopped the command entirely and the zeroed twist never
  arrived (seen on macOS CI). The test now advances the task clock
  (perf_counter, the source of state.t_now) past the task timeout by hand
  and re-reports the base's feedback right before each tick, so only the
  task command expires.
- P2: the routing test drove an arm named mock and a base named go2, never
  exercising one robot's <robot>/base split and merge. A new test gives
  one robot joint ports and cmd_vel and asserts both commands leave in the
  same tick; another covers the route-level mode-conflict guard, which was
  the patch's only uncovered code.

Regressions: the hold zeroes a running base and keeps it after an e-stop
clear (connection level), and unit tests cover set_base_axes with and
without an e-stop.
The task clock (perf_counter) was already patched, but the connection
source stamps feedback receipts and checks their freshness with the real
monotonic clock, so a scheduling pause longer than reading_timeout_s
between the last report and the tick could still stale the feedback and
drop the zeroing command.

Patch time.monotonic with its own frozen clock too, and keep a real
0.25s pause between the report and the tick to prove a slow runner
cannot stale the feedback: with the monotonic patch removed the strict
assertions fail again.
@greptile-apps

greptile-apps Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 4/5

[Medium impact] The PR adds independent jaw actuation to the R1Pro manipulation workflow.

Fix the uncleared-fault command path and the test race before merging.

Findings

  1. P1 Uncleared faults stop blocking commands ▶
  2. P2 Jaw test can fail randomly ▶

Summary

Adds independent left and right R1Pro jaws through ordinary position joints and the existing manipulation API.

  • The R1Pro manipulation API now opens each jaw on its own command stream.

Other reviewed concerns were set aside:

  • Initial readiness requires both jaws, explicitly intentional in TomCC7's PR description.
  • Reissuing the same interrupted opening remains blocked, explicitly intentional in TomCC7's PR description; a different opening is required.
  • Generic gripper readback retains its last measurement, explicitly acknowledged by TomCC7 as not being a freshness signal.
  • Software stop does not cancel an accepted vendor jaw target, explicitly acknowledged by TomCC7 and documented in the changed README.
  • Future or zero feedback timestamps still expire by receipt age; indefinite authorization was not established.
  • Finite out-of-range feedback had no established supported-device failure path.
  • ConnectionModule serializes writes and halt calls with _hardware_lock.
  • The inspected model limits, jaw units, group mapping, and task bindings agree with the new names and ranges.
  • The fake's empty-status description conflicts with the callback, but the vendor's empty-report contract was not established.

Reviews (1) · Last reviewed commit: "refactor(r1pro): trim gripper channel st..." · Reviewed by Greptile

Comment thread dimos/robot/galaxea/r1pro/connection.py Outdated
return (
self.measured_m is not None
and now - self.feedback_at <= timeout_s
and all(now - at > timeout_s for at in self.faults.values())

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.

P1 Uncleared faults stop blocking commands

If the status stream stalls after reporting a fault while jaw measurements continue, valid() becomes true after gripper_feedback_timeout_s—one second by default. A different opening then reaches the vendor controller despite the unresolved torso, arm, or jaw fault. Keep reported faults blocking until an explicit clear arrives.

Base automatically changed from cc/refactor/r1pro-connection to main November 21, 2026 21:25
Merged with #5017 old head b61686c as base, so every file outside the
PR's own change matches main. connection.py: kept main's wrist-camera
removal, added the gripper feedback timeout.
A fault stopped blocking 1 s after the last status report that carried it,
so a stalled status stream let commands through again.

This branch was successfully deployed

No deployments
cachix — 07de484f Deployed Nov 10, 2026 by TomCC7 via cachix-build-macos #16900
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