Simplify atomic action scene context setup - #558
Merged
Conversation
Add an engine scene provider default and a simulation factory that registers selected rigid objects. Update atomic action tutorials, tracking-policy forwarding, tests, context, and API documentation.
Greptile SummaryThe PR simplifies direct atomic-action simulation setup by allowing engines to obtain initial scene snapshots from a borrowed provider and by adding a public rigid-object factory.
Confidence Score: 5/5The PR appears safe to merge because no blocking failure remains. No blocking failure remains.
|
| Filename | Overview |
|---|---|
| embodichain/lab/sim/atomic_actions/engine.py | Adds optional scene-provider capture to initial context creation and forwards caller-selected tracking policies into invocations. |
| embodichain/lab/sim/atomic_actions/sim_adapter.py | Adds the public factory that builds an atomic-action engine around explicitly selected rigid objects. |
| embodichain/lab/sim/atomic_actions/init.py | Exposes the new simulation engine factory through the package API. |
| tests/sim/atomic_actions/test_engine.py | Covers provider capture, explicit-scene precedence, provider validation, and tracking-policy forwarding. |
| tests/sim/atomic_actions/test_sim_adapter.py | Covers factory argument forwarding, selected UID registration, snapshot generation, and duplicate UID rejection. |
| tests/sim/atomic_actions/test_tutorial_utils.py | Verifies that all tutorial entry points use their designated rigid, static-pose, explicit-lifecycle, or scene-free strategy. |
Sequence Diagram
sequenceDiagram
participant Caller
participant Factory as create_simulation_atomic_action_engine
participant Engine as AtomicActionEngine
participant Provider as RigidObjectSceneProvider
participant Object as RigidObject
Caller->>Factory: motion generator + selected scene entities
Factory->>Provider: construct UID-keyed provider
Factory->>Engine: construct with scene_provider
Caller->>Engine: initial_context(timestamp, control_dt)
Engine->>Provider: snapshot(timestamp, env_ids)
Provider->>Object: "get_local_pose(to_matrix=True)"
Object-->>Provider: batched pose
Provider-->>Engine: SceneSnapshot
Engine-->>Caller: PlanningContext
Reviews (3): Last reviewed commit: "Merge remote-tracking branch 'origin/mai..." | Re-trigger Greptile
Remove stale configured-runtime and layout expectations for the rearrangement task, which is not currently shipped. Keep the expert-program context registry aligned with the available task configurations.
…-scene-context # Conflicts: # tests/gym/envs/test_official_task_layout.py
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 simplifies direct simulation setup for atomic actions by allowing an engine to borrow a default scene provider and by adding a public
create_simulation_atomic_action_engine(...)factory for explicitly selected rigid objects.It also:
tracking_policythroughAtomicActionEngine.make_invocation();This keeps direct examples concise while retaining
scene_provider=as the advanced override for aliases, articulations, collision roles, dynamic execution, and external perception.Dependencies: None.
Issue reference: None.
Type of change
Screenshots
Not applicable.
Validation
black .black --check --diff --color ./python docs/scripts/check_api_docs.py— 1716/1716 exports documentedpython -m compileall -q embodichain/lab/sim/atomic_actions scripts/tutorials/atomic_action tests/sim/atomic_actions/test_engine.py tests/sim/atomic_actions/test_sim_adapter.py tests/sim/atomic_actions/test_tutorial_utils.pypytest -q tests/sim/atomic_actions— 618 passed, 1 skipped, 3 deselectedpytest tests/docs -q --confcutdir=tests/docs— 20 passedpytest tests --ignore=tests/docs -m "not requires_sim and not gpu" -n 4 --dist loadgroup— 2574 passed, 2 skippedsphinx-build -b dummy docs/source docs/build/dummy— succeeded with repository warningsgit diff --checkChecklist
black .command to format the code base.python docs/scripts/check_api_docs.py).