Uh oh!
There was an error while loading. Please reload this page.
Simplify atomic action planning contracts - #517
Merged
Conversation
Centralize goal validation and shared primitive planning helpers, consolidate attachment state, and remove redundant global extension APIs. Rename n_envs to num_envs across the repository and update tests, documentation, and agent context.
Greptile SummaryThis follow-up adds exclusivity-aware attachment handling so single-arm actions cannot mutate one side of a shared multi-manipulator grasp.
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains.
|
| Filename | Overview |
|---|---|
| embodichain/lab/sim/atomic_actions/state.py | Adds shared-physical-object detection and per-environment exclusive attachment masks. |
| embodichain/lab/sim/atomic_actions/primitives/coordinated_pickment.py | Represents a coordinated grasp using two attachment entries sharing the same semantic object. |
| embodichain/lab/sim/atomic_actions/primitives/move_held_object.py | Rejects transport rows where another manipulator holds the same object. |
| embodichain/lab/sim/atomic_actions/primitives/place.py | Prevents release of one side of a shared attachment while retaining empty-gripper placement behavior. |
| embodichain/lab/sim/atomic_actions/primitives/hand_over.py | Requires the source attachment to be exclusive before transferring ownership. |
| embodichain/lab/sim/atomic_actions/effects.py | Consolidates verified attachment updates into the sole per-manipulator held-object map. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Coordinated pick succeeds] --> B[Store one HeldObjectState per manipulator]
B --> C[Entries share object semantics]
C --> D[exclusive_held_object_mask]
D -->|Shared object detected| E[Reject single-arm move, release, or handover]
D -->|Exclusive object| F[Allow single-arm operation]
Reviews (2): Last reviewed commit: "fix(atomic-actions): guard shared held o..." | Re-trigger Greptile
Uh oh!
There was an error while loading. Please reload this page.
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 freeto 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 simplifies the Atomic Action planning and runtime contracts, removes duplicated primitive logic, and establishes one authoritative path for validation, registration, and attachment state.
The previous design combined repeated per-primitive validation, a disconnected process-wide extension registry, a marker-only goal protocol, and parallel individual/coordinated attachment representations. This made extensions harder to reason about and allowed equivalent state to drift between abstractions.
Dependencies: none.
Issue: no issue is linked.
What changed
ActionGoalprotocol andgoal_kind; each action declares and validates its concreteGoalType.TaskState.held_objects, including coordinated grasps represented by oneHeldObjectStateper manipulator.dtand share simulator command writing logic.n_envstonum_envsacross public APIs, implementations, tests, examples, and documentation.Breaking API migrations
n_envsandn_envs=becomenum_envsandnum_envs=.ActionGoalandgoal_kindare removed; define an action-owned goal dataclass and setAtomicAction.GoalType.register_action,unregister_action, andget_registered_actionsare removed; instantiate the action and callengine.register(action).engine.plan_actionis removed; register the action and useengine.plan.plan,compile, orstart.CoordinatedHeldObjectStateand the coordinated attachment map are removed; use per-manipulatorHeldObjectStateentries.Type of change
Screenshots
Not applicable.
Validation
conda run -n open black .— 905 files unchanged with Black 26.3.1.__all__, andgit diff --checkchecks.n_envsor removed Atomic Action API symbols.conda run -n open make -C docs html— succeeded; the repository still emits pre-existing Sphinx warnings unrelated to this change.Checklist
black .command to format the code base.