Control per instance addressing - #3407
Open
mustafab0 wants to merge 1 commit into
Open
Conversation
mustafab0
force-pushed
the
control-per-instance-addressing
branch
from
August 8, 2026 21:11
c2d5457 to
1d5e5f4
Compare
Codecov Report❌ Patch coverage is @@ Coverage Diff @@
## main #3407 +/- ##
==========================================
- Coverage 76.09% 76.08% -0.02%
==========================================
Files 1190 1190
Lines 115295 115276 -19
Branches 10367 10361 -6
==========================================
- Hits 87729 87703 -26
- Misses 24554 24560 +6
- Partials 3012 3013 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 3 files with indirect coverage changes 🚀 New features to boost your workflow:
|
mustafab0
marked this pull request as ready for review
August 8, 2026 21:57
mustafab0
requested review from
Dreamsorcerer,
leshy,
paul-nechifor and
spomichter
as code owners
August 8, 2026 21:57
mustafab0
force-pushed
the
control-per-instance-addressing
branch
from
August 8, 2026 21:59
1d5e5f4 to
42537cf
Compare
…essing Cartesian and EEF-twist commands were addressed by writing the consuming TASK NAME into the message's frame_id, read back per message by the dispatcher's BY_TASK_NAME rule. Addressing is now topology: the cards declare neutral logical inputs (cartesian_command / ee_twist_command, routing 'direct'), each consuming task instance reads its own coordinator port wired once at startup, and frame_id means a coordinate frame again. Cards and deployments: - cartesian_ik / teleop_ik / eef_twist cards: logical input names + direct. - Single-arm deployments subclass the coordinator with a port named like the logical input (name-match, no stream_bind): shared private coordinator subclasses in manipulators/common/blueprints.py, instance_name='ControlCoordinator'. - Dual-arm quest teleop gets left_cartesian/right_cartesian ports with stream_bind per teleop_ik task; the quest blueprint remaps each controller output to its side's port. This deletes the reason frame_id addressing existed. Publishers stop stuffing the address. All three consumers ignore frame_id (IK reads only position/orientation; eef_twist reads only linear/angular), so the stamp is dropped, not replaced: quest arm teleop loses task_names config (poses keep their handedness frame_id), keyboard/hosted twists go out unaddressed, and the jogger publishes the port's topic /cartesian_command. Machinery deleted: Routing.BY_TASK_NAME, the frame_id branch and both dispatch warnings (empty/unknown frame_id — nothing consults the field anymore), and the base-class coordinator_cartesian_command / coordinator_ee_twist_command ports. BREAKING for out-of-tree blueprints composing these tasks: declare the port on a coordinator subclass and retarget the producer remap. Riders: - Routes store the handler BOUND at add_task (validated there; a stub missing a card handler now fails registration instead of erroring per message). _dispatch keeps only the claim-overlap 'name' read. - auto_start goes through task_invoke and the declared-command table; servo, velocity, cartesian_ik, and g1_groot_wbc declare 'start' (the in-tree auto_start users are servo and g1_groot_wbc). Tests: by-name delivery pins become per-instance port isolation (left arm's command never reaches the right task) and single-instance name-match; unmatched-frame_id-drops becomes frame_id-not-consulted (the intentional addressing delta). Stubs gain the card stream handlers that add_task now resolves eagerly.
mustafab0
force-pushed
the
control-per-instance-addressing
branch
from
August 9, 2026 00:38
13aff6a to
7e0972c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
To steer a specific arm, teleop and jogger publishers write the name of the
consuming control task into each pose/twist message's
frame_idfield, and thecoordinator reads it back per message to pick the task.
Issue: #
Solution
Each cartesian / EEF-twist task instance reads its own coordinator input port, connected once in the blueprint.
Single-arm deployments declare a port named after the card's input; the dual-arm quest teleop declares one port per arm and binds each task to its side with
stream_bind.Breaking Changes
The shared coordinator ports for cartesian and EEF-twist commands are deleted.
Out-of-tree blueprints composing these tasks must declare the port on a
coordinator subclass and point their producer remap at it (one line each).
How to Test
pytest dimos/control dimos/teleop dimos/robot/manipulators -m 'not (tool or self_hosted or mujoco or self_hosted_large)'