Skip to content

Add coordinated placement and atomic action benchmarks#318

Open
skywhite1024 wants to merge 15 commits into
mainfrom
ljd/coordinated_placement_atomic_actions
Open

Add coordinated placement and atomic action benchmarks#318
skywhite1024 wants to merge 15 commits into
mainfrom
ljd/coordinated_placement_atomic_actions

Conversation

@skywhite1024

@skywhite1024 skywhite1024 commented Jun 20, 2026

Copy link
Copy Markdown
Collaborator

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.
  • A bread-on-pan coordinated placement tutorial with target-axis visualization and a documented GIF.
  • The Press atomic action/tutorial documentation and the atomic action benchmark suite that were previously based on ljd/benchmark_atomic_actions.
  • Merge conflict resolution against latest origin/main, keeping main robot/tutorial refactors while preserving this PR`s atomic action additions.

Dependencies: none beyond the existing simulation/tutorial dependencies.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (non-breaking change which improves an existing functionality)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (existing functionality will not work without user modification)
  • Documentation update

Screenshots

See docs/source/_static/atomic_actions/coordinated_placement.gif and the built-in atomic actions documentation.

Notes

  • CoordinatedPlacementTarget explicitly carries both placing/support HeldObjectState values instead of relying on the single-slot WorldState.held_object to represent dual held objects.
  • On success, WorldState.held_object is updated to the support object held state, because the placing object has been released while the support object remains held.
  • The coordinated placement tutorial draws target axes at the support/placing object target poses.

Checklist

  • I have run the black . command to format the code base.
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • Dependencies have been updated, if applicable.

Tests

  • conda run -n embodichain python -m pytest tests/sim/atomic_actions/test_actions.py
  • conda run -n embodichain python -m pytest tests/sim/atomic_actions/test_trajectory.py
  • conda run -n embodichain black --check --diff --color ./

@skywhite1024 skywhite1024 changed the base branch from ljd/press_atomic_actions to refactor/atomic-actions-redesign June 23, 2026 12:46
Base automatically changed from refactor/atomic-actions-redesign to main June 25, 2026 06:08
@skywhite1024 skywhite1024 force-pushed the ljd/coordinated_placement_atomic_actions branch from 297c3e6 to b9e4823 Compare June 26, 2026 03:07
Normalize coordinated placement held-state outputs, add target-axis recording support, and include the documented demo GIF for PR review.
@skywhite1024 skywhite1024 added docs Improvements or additions to documentation enhancement New feature or request motion gen Things related to motion generation for robot visualization Features or functions for visualization with the simulation labels Jun 26, 2026
…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
@skywhite1024 skywhite1024 changed the base branch from main to ljd/benchmark_atomic_actions June 29, 2026 12:00
…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
@skywhite1024 skywhite1024 changed the base branch from ljd/benchmark_atomic_actions to main July 1, 2026 12:41
@skywhite1024 skywhite1024 changed the title Add coordinated placement atomic action demo Add coordinated placement and atomic action benchmarks Jul 1, 2026
Copilot AI review requested due to automatic review settings July 1, 2026 13:34

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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) and CoordinatedPlacement (dual-arm, object-centric target).
  • Added/updated tutorial utilities and a new press.py tutorial 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}")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Improvements or additions to documentation enhancement New feature or request motion gen Things related to motion generation for robot visualization Features or functions for visualization with the simulation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants