Repository navigation
Unify connection joint/interface routing for task commands - #5016
Conversation
There was a problem hiding this comment.
go2 replay realtime (arm64)
Details
| Benchmark suite | Current: 6d4ea6e | Previous: 5bc57a0 | Ratio |
|---|---|---|---|
peak memory |
1736.574 MB |
1776.91 MB |
0.98 |
peak threads |
375 threads |
376 threads |
1.00 |
network (transport) |
2725.84 MB |
2730.972 MB |
1.00 |
disk write |
1.566 MB |
1.59 MB |
0.98 |
instructions |
137.175 G |
138.52 G |
0.99 |
This comment was automatically generated by workflow using github-action-benchmark.
[High impact] The PR changes shared command routing used by arm and mobile-robot control workflows. Do not merge yet: xArm commands can still fight each other, and joint-feedback recovery can still restore old holds. Findings
SummaryUnifies connection commands around named joints and their declared interfaces.
Reviews (4) · Last reviewed commit: "fix(control): stop velocity-only joints ..." · Reviewed by Greptile |
Codecov Report❌ Patch coverage is @@ Coverage Diff @@
## main #5016 +/- ##
==========================================
+ Coverage 83.82% 83.93% +0.11%
==========================================
Files 1866 1868 +2
Lines 182008 182436 +428
Branches 14987 15002 +15
==========================================
+ Hits 152575 153136 +561
+ Misses 25467 25428 -39
+ Partials 3966 3872 -94
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 6 files with indirect coverage changes 🚀 New features to boost your workflow:
|
… 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.
… 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.
8f86fbc to
a1502e7
Compare
|
@greptile review |
…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.
d7763c0 to
6d4ea6e
Compare
Overview
Unify connection control around named joints and supported interfaces. First layer of #5017 → #5019 → #5084.
Changes
joint_namesrestricts both groups. Update the hold documentation accordingly.Rebase and validation
Head:
6d4ea6e92245816d0c59396d302cd36d0e236a09, rebased onto main5bc57a07087d427cbbdd84281523c5c1e970ff0c. All 17 original commits were replayed from the previous main boundary; the original head is backed up locally.Implementer validation at this head:
CI=1.git diff --checkpassed.Hardware behavior/latency, the full test suite, and post-push CI are not verified. No new CI polling was started. Existing dependency deprecation/resource warnings remain.
Only this root PR was rewritten. The published R1 Pro descendants already use dictionary declarations and
connections=, but still need a separate parent synchronization after this root rebase; their branches were not changed.