Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ embodichain.lab.sim.atomic_actions
GraspTarget
HeldObjectPoseTarget
CoordinatedPickmentTarget
CoordinatedPlacementTarget
Target
HeldObjectState
CoordinatedHeldObjectState
Expand All @@ -39,6 +40,8 @@ embodichain.lab.sim.atomic_actions
Press
CoordinatedPickmentCfg
CoordinatedPickment
CoordinatedPlacementCfg
CoordinatedPlacement
AtomicActionEngine

.. currentmodule:: embodichain.lab.sim.atomic_actions
Expand Down Expand Up @@ -86,6 +89,10 @@ Core
:members:
:show-inheritance:

.. autoclass:: CoordinatedPlacementTarget
:members:
:show-inheritance:

.. autodata:: Target

.. autoclass:: HeldObjectState
Expand Down Expand Up @@ -185,6 +192,15 @@ Actions
:members:
:show-inheritance:

.. autoclass:: CoordinatedPlacementCfg
:members:
:exclude-members: __init__, copy, replace, to_dict
:show-inheritance:

.. autoclass:: CoordinatedPlacement
:members:
:show-inheritance:

Engine & Registry
-----------------

Expand Down
39 changes: 39 additions & 0 deletions docs/source/overview/sim/atomic_actions/builtin_actions.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ The following actions are available out of the box:
| `Place` | Single | `EndEffectorPoseTarget` — EEF release pose | Lower → open gripper → retract | <img src="../../../_static/atomic_actions/place.gif" alt="Place" width="480" style="max-width: 100%;" /> |
| `Press` | Single | `EndEffectorPoseTarget` — EEF press pose | Close gripper → press down → return | <img src="../../../_static/atomic_actions/press.gif" alt="Press" width="480" style="max-width: 100%;" /> |
| `CoordinatedPickment` | Dual | `CoordinatedPickmentTarget` — shared-object pose | Approach both ends → close both grippers → lift → move object | <img src="../../../_static/atomic_actions/coordinated_pickment.gif" alt="CoordinatedPickment" width="480" style="max-width: 100%;" /> |
| `CoordinatedPlacement` | Dual | `CoordinatedPlacementTarget` — two held-object poses | Move support object → align placing object → release placing hand → retreat | <img src="../../../_static/atomic_actions/coordinated_placement.gif" alt="CoordinatedPlacement" width="480" style="max-width: 100%;" /> |

---

Expand Down Expand Up @@ -171,3 +172,41 @@ while keeping both grippers closed. On success, the returned `WorldState` carrie
semantics, and left/right object-to-EEF transforms.

![CoordinatedPickment demo](../../../_static/atomic_actions/coordinated_pickment.gif)

---

## `CoordinatedPlacement`

Dual-arm object-centric placement. The support arm moves its held object to a lower
target pose and keeps its gripper closed. The placing arm moves its held object to
the aligned upper target pose, optionally opens the placing hand, then lifts away.

`CoordinatedPlacement` is intentionally explicit about dual-arm state: the target
contains both `placing_held_object` and `support_held_object`. This avoids relying
on the engine's single `WorldState.held_object` slot to infer two simultaneously
held objects.

| Config field | Default | Description |
|---|---|---|
| `control_part` | `"dual_arm"` | Robot control part containing both arms |
| `placing_arm_control_part` | `"left_arm"` | Arm that releases the placed object |
| `support_arm_control_part` | `"right_arm"` | Arm that keeps holding the support object |
| `placing_hand_control_part` | `"left_hand"` | Placing gripper control part |
| `support_hand_control_part` | `"right_hand"` | Support gripper control part |
| `placing_hand_open_qpos` | `None` | **Required.** Placing gripper open joint positions |
| `placing_hand_close_qpos` | `None` | **Required.** Placing gripper closed joint positions |
| `support_hand_close_qpos` | `None` | **Required.** Support gripper closed joint positions |
| `release` | `True` | Whether to open the placing gripper |
| `placing_height_offset` | `0.0` | World-Z offset applied to the placing object target pose |
| `support_height_offset` | `0.0` | World-Z offset applied to the support object target pose |
| `lift_height` | `0.08` | Placing-arm lift distance after release (m) |
| `hand_interp_steps` | `10` | Waypoints for placing-hand release |
| `hold_steps` | `4` | Alignment hold waypoints before release |
| `retreat_steps` | `16` | Placing-arm retreat waypoints |
| `sample_interval` | `100` | Total waypoints across all phases |

**Target:** `CoordinatedPlacementTarget(...)` with placing/support object target
poses plus the corresponding `HeldObjectState` values. On success, the returned
`WorldState.held_object` is the support object's held state.

![CoordinatedPlacement demo](../../../_static/atomic_actions/coordinated_placement.gif)
5 changes: 5 additions & 0 deletions docs/source/overview/sim/atomic_actions/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ EndEffectorPoseTarget(xpos) │
JointPositionTarget(qpos) ├─ IK solve when pose-based
NamedJointPositionTarget(name) ├─ Motion plan / interpolation
HeldObjectPoseTarget(pose) └─ Gripper interpolation when needed
CoordinatedPlacementTarget(...) │
│
ActionResult
(success, full-DoF traj, next_state)
Expand Down Expand Up @@ -62,6 +63,7 @@ and every action declares the target type, or tuple of target types, it accepts
| `NamedJointPositionTarget` | `NamedJointPositionTarget(name)` | `MoveJoints` |
| `GraspTarget` | `GraspTarget(semantics)` | `PickUp` |
| `HeldObjectPoseTarget` | `HeldObjectPoseTarget(object_target_pose)` | `MoveHeldObject` |
| `CoordinatedPlacementTarget` | `CoordinatedPlacementTarget(...)` | `CoordinatedPlacement` |

`Target` is the union of these typed target dataclasses.

Expand Down Expand Up @@ -99,6 +101,7 @@ action's `TargetType` before calling `execute`:
| `NamedJointPositionTarget(name)` | Name resolved from `MoveJointsCfg.named_joint_positions` | `MoveJoints` |
| `GraspTarget(semantics)` | `ObjectSemantics` (affordance + entity) | `PickUp` |
| `HeldObjectPoseTarget(object_target_pose)` | Desired held-object pose tensor | `MoveHeldObject` |
| `CoordinatedPlacementTarget(...)` | Two held-object states plus object-centric placing/support target poses | `CoordinatedPlacement` |

`WorldState` is threaded between actions and carries the robot's `last_qpos` plus an optional
`held_object: HeldObjectState`. The built-in actions update it as follows:
Expand All @@ -108,6 +111,7 @@ action's `TargetType` before calling `execute`:
| `PickUp` | Populates it (computed object-to-EEF transform) |
| `MoveHeldObject` | Requires it; preserves it unchanged |
| `Place` | Clears it to `None` |
| `CoordinatedPlacement` | Returns the support arm's `HeldObjectState`; the placing object is released |
| `MoveEndEffector` | Leaves it unchanged |
| `MoveJoints` | Leaves it unchanged |
| `Press` | Leaves it unchanged |
Expand Down Expand Up @@ -307,6 +311,7 @@ builtin_actions
- `scripts/tutorials/atomic_action/move_held_object.py`
- `scripts/tutorials/atomic_action/place.py`
- `scripts/tutorials/atomic_action/press.py`
- `scripts/tutorials/atomic_action/coordinated_placement.py`

Run a demo in headless CPU mode with `--auto_play --headless --device cpu` to record
an MP4 under `outputs/videos`. For example:
Expand Down
6 changes: 6 additions & 0 deletions embodichain/lab/sim/atomic_actions/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
AtomicAction,
CoordinatedHeldObjectState,
CoordinatedPickmentTarget,
CoordinatedPlacementTarget,
GraspTarget,
HeldObjectState,
HeldObjectPoseTarget,
Expand All @@ -46,6 +47,8 @@
from .actions import (
CoordinatedPickment,
CoordinatedPickmentCfg,
CoordinatedPlacement,
CoordinatedPlacementCfg,
MoveEndEffector,
MoveJoints,
MoveHeldObject,
Expand Down Expand Up @@ -75,6 +78,7 @@
"ObjectSemantics",
"CoordinatedHeldObjectState",
"CoordinatedPickmentTarget",
"CoordinatedPlacementTarget",
"HeldObjectState",
"HeldObjectPoseTarget",
"JointPositionTarget",
Expand All @@ -88,13 +92,15 @@
"AtomicAction",
# Action implementations
"CoordinatedPickment",
"CoordinatedPlacement",
"MoveEndEffector",
"MoveJoints",
"MoveHeldObject",
"PickUp",
"Place",
"Press",
"CoordinatedPickmentCfg",
"CoordinatedPlacementCfg",
"MoveEndEffectorCfg",
"MoveJointsCfg",
"MoveHeldObjectCfg",
Expand Down
Loading
Loading