Refactor atomic action target contracts - #444
Merged
Merged
Conversation
Move action-specific target classes beside their primitives, add a shared object target base, and track held objects by control part. Update tutorials, benchmarks, tests, documentation, and agent context for the new contracts.
yuecideng
force-pushed
the
refactor/atomic-action-target-contracts
branch
from
July 31, 2026 06:05
9346444 to
2319d6e
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.
Description
This PR refactors atomic-action target and runtime-state contracts to make ownership and extension boundaries explicit.
core.pyand colocate action-specific target dataclasses with their primitive implementations.ActionTargetmarker and a neutralObjectActionTarget(semantics)base for object-centric actions without introducing a generic, ambiguous pose field.BuiltinTargetas the closed union of built-in executable target contracts.PlaceTargetandPressTarget; keepCoordinatedPickmentTargetas a compatibility alias forCoordinatedPickTarget.WorldStateby control part, separating runtime held-object state from desired action targets.atomic_actions.targetsAPI-reference page and include concrete Target contracts in the primitives autosummary, following the module documentation structure introduced by Complete API reference module descriptions and stale listings #445.The target hierarchy is motivated in part by the shared object-semantics requirements surfaced in #432: actions can share the minimal semantic-object contract while retaining precise action-specific pose roles.
The branch is rebased onto
origin/mainat21091106(including #441 and #445).Dependencies: None.
Related: #432
Type of change
Migration notes
embodichain.lab.sim.atomic_actions, notatomic_actions.core.PlaceTargetforPlaceandPressTargetforPress.semantics=when constructingCoordinatedPickTarget.WorldState.held_objectsandWorldState.coordinated_held_objects, keyed by control part.Validation
black --check --diff --color ./— 531 files unchanged.pytest -q tests/sim/atomic_actions— 173 passed, 1 skipped.(1, 96, 16)trajectory.ObjectActionTarget, and existing repository warnings remain.__all__, and diff-whitespace checks.Screenshots
Not applicable; this is an API and architecture refactor.
Checklist
black .command to format the code base.