Add coordinated placement and atomic action benchmarks#318
Open
skywhite1024 wants to merge 15 commits into
Open
Add coordinated placement and atomic action benchmarks#318skywhite1024 wants to merge 15 commits into
skywhite1024 wants to merge 15 commits into
Conversation
297c3e6 to
b9e4823
Compare
Normalize coordinated placement held-state outputs, add target-axis recording support, and include the documented demo GIF for PR review.
…to ljd/coordinated_placement_atomic_actions # Conflicts: # docs/source/api_reference/embodichain/embodichain.lab.sim.atomic_actions.rst # docs/source/overview/sim/atomic_actions/builtin_actions.md # docs/source/overview/sim/atomic_actions/index.md # embodichain/lab/sim/atomic_actions/__init__.py # embodichain/lab/sim/atomic_actions/actions.py # tests/sim/atomic_actions/test_actions.py
…ment_atomic_actions # Conflicts: # scripts/benchmark/__main__.py # scripts/tutorials/atomic_action/move_end_effector.py # scripts/tutorials/atomic_action/move_held_object.py # scripts/tutorials/atomic_action/move_joints.py # scripts/tutorials/atomic_action/pickup.py # scripts/tutorials/atomic_action/place.py # scripts/tutorials/atomic_action/tutorial_utils.py # tests/sim/atomic_actions/test_actions.py
Contributor
There was a problem hiding this comment.
Pull request overview
This PR expands EmbodiChain’s atomic action layer with new manipulation primitives and supporting developer tooling, including tutorials, documentation, benchmarks, and unit tests.
Changes:
- Added two new atomic actions:
Press(single-arm) andCoordinatedPlacement(dual-arm, object-centric target). - Added/updated tutorial utilities and a new
press.pytutorial script, plus documentation updates to include the new actions/targets. - Introduced an atomic-action benchmark suite (dispatcher + per-action benchmarks) and integrated it into
scripts/benchmark.
Reviewed changes
Copilot reviewed 21 out of 26 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tests/sim/atomic_actions/test_actions.py | Adds unit tests for Press and CoordinatedPlacement behavior/trajectory shapes. |
| scripts/tutorials/atomic_action/tutorial_utils.py | Adds make_ur5_solver_cfg() and extends axis marker drawing with arena_index. |
| scripts/tutorials/atomic_action/press.py | New tutorial script demonstrating Press planning/replay and target-axis visualization. |
| scripts/benchmark/atomic_action/run_benchmark.py | New benchmark dispatcher to run one or many atomic-action benchmarks (optionally subprocess-isolated). |
| scripts/benchmark/atomic_action/press_benchmark.py | New Press benchmark including timing/memory and “press center hit” metric + markdown report output. |
| scripts/benchmark/atomic_action/place_benchmark.py | New Place benchmark (with PickUp precondition) using shared benchmark helpers. |
| scripts/benchmark/atomic_action/pickup_benchmark.py | New PickUp benchmark using shared benchmark helpers. |
| scripts/benchmark/atomic_action/move_joints_benchmark.py | New MoveJoints benchmark using shared benchmark helpers. |
| scripts/benchmark/atomic_action/move_held_object_benchmark.py | New MoveHeldObject benchmark (with PickUp precondition) using shared benchmark helpers. |
| scripts/benchmark/atomic_action/move_end_effector_benchmark.py | New MoveEndEffector benchmark using shared benchmark helpers. |
| scripts/benchmark/atomic_action/common.py | New shared utilities for benchmark selection, timing/memory, video recording, and markdown reporting. |
| scripts/benchmark/atomic_action/init.py | New benchmark package initializer. |
| scripts/benchmark/main.py | Adds atomic-action subcommand wiring to the benchmark CLI. |
| embodichain/lab/sim/atomic_actions/core.py | Introduces CoordinatedPlacementTarget and extends the Target union + exports. |
| embodichain/lab/sim/atomic_actions/actions.py | Implements Press + CoordinatedPlacement actions and their config classes; updates module exports/docs. |
| embodichain/lab/sim/atomic_actions/init.py | Re-exports new action types/configs/targets and updates module docs. |
| docs/source/tutorial/atomic_actions.rst | Updates tutorial index to include Press and its demo script. |
| docs/source/overview/sim/atomic_actions/index.md | Updates overview diagrams/tables to include CoordinatedPlacementTarget and new demos. |
| docs/source/overview/sim/atomic_actions/builtin_actions.md | Documents Press and CoordinatedPlacement with config/target details and GIF references. |
| docs/source/api_reference/embodichain/embodichain.lab.sim.atomic_actions.rst | Adds API reference entries for Press* and CoordinatedPlacement* symbols. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+394
to
+398
| def _default_object_types_for_profile(profile: str) -> tuple[str, ...]: | ||
| """Return default Press primitive object names for a profile.""" | ||
| if profile in ("smoke", "coverage", "full"): | ||
| return SMOKE_OBJECT_TYPES | ||
| raise ValueError(f"Unsupported benchmark profile: {profile}") |
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 adds the atomic action updates needed for the current branch to merge directly into
main:CoordinatedPlacement, an object-centric dual-arm atomic action where both arms already hold objects: the support arm keeps holding the support object, while the placing arm aligns its held object, releases it, and retreats.ljd/benchmark_atomic_actions.origin/main, keepingmainrobot/tutorial refactors while preserving this PR`s atomic action additions.Dependencies: none beyond the existing simulation/tutorial dependencies.
Type of change
Screenshots
See
docs/source/_static/atomic_actions/coordinated_placement.gifand the built-in atomic actions documentation.Notes
CoordinatedPlacementTargetexplicitly carries both placing/supportHeldObjectStatevalues instead of relying on the single-slotWorldState.held_objectto represent dual held objects.WorldState.held_objectis updated to the support object held state, because the placing object has been released while the support object remains held.Checklist
black .command to format the code base.Tests
conda run -n embodichain python -m pytest tests/sim/atomic_actions/test_actions.pyconda run -n embodichain python -m pytest tests/sim/atomic_actions/test_trajectory.pyconda run -n embodichain black --check --diff --color ./