embodichain.lab.sim.atomic_actions.primitives

Contents

embodichain.lab.sim.atomic_actions.primitives#

Built-in atomic action primitive implementations.

Built-in Primitive Actions

MoveEndEffectorCfg

MoveEndEffectorCfg(name: 'str' = <factory>, control_part: 'str' = <factory>, interpolation_type: 'str' = <factory>, velocity_limit: 'float | None' = <factory>, acceleration_limit: 'float | None' = <factory>, motion_source: 'str' = <factory>, planner_type: 'str | None' = <factory>, sample_interval: 'int' = <factory>)

MoveEndEffector

Plan a free-space end-effector move to a target pose.

MoveJointsCfg

MoveJointsCfg(name: 'str' = <factory>, control_part: 'str' = <factory>, interpolation_type: 'str' = <factory>, velocity_limit: 'float | None' = <factory>, acceleration_limit: 'float | None' = <factory>, motion_source: 'str' = <factory>, planner_type: 'str | None' = <factory>, sample_interval: 'int' = <factory>, named_joint_positions: 'dict[str, torch.Tensor] | None' = <factory>)

MoveJoints

Plan a joint-space move for the configured control part.

PickUpCfg

PickUpCfg(name: 'str' = <factory>, control_part: 'str' = <factory>, interpolation_type: 'str' = <factory>, velocity_limit: 'float | None' = <factory>, acceleration_limit: 'float | None' = <factory>, motion_source: 'str' = <factory>, planner_type: 'str | None' = <factory>, sample_interval: 'int' = <factory>, hand_interp_steps: 'int' = <factory>, hand_control_part: 'str' = <factory>, hand_open_qpos: 'torch.Tensor | None' = <factory>, hand_close_qpos: 'torch.Tensor | None' = <factory>, lift_height: 'float' = <factory>, pre_grasp_distance: 'float' = <factory>, approach_direction: 'torch.Tensor' = <factory>, approach_alignment_max_angle: 'float | None' = <factory>, downstream_object_target_poses: 'tuple[torch.Tensor, ...]' = <factory>, obj_upright_direction: 'torch.Tensor | None' = <factory>, rotate_upright: 'float | None' = <factory>)

PickUp

Approach a grasp pose, close the gripper, lift.

MoveHeldObjectCfg

MoveHeldObjectCfg(name: 'str' = <factory>, control_part: 'str' = <factory>, interpolation_type: 'str' = <factory>, velocity_limit: 'float | None' = <factory>, acceleration_limit: 'float | None' = <factory>, motion_source: 'str' = <factory>, planner_type: 'str | None' = <factory>, sample_interval: 'int' = <factory>, hand_control_part: 'str' = <factory>, hand_close_qpos: 'torch.Tensor | None' = <factory>, obj_upright_direction: 'torch.Tensor | None' = <factory>, pick_rotate_upright: 'float | None' = <factory>)

MoveHeldObject

Move the held object to a target object pose; keep the gripper closed.

PlaceCfg

PlaceCfg(name: 'str' = <factory>, control_part: 'str' = <factory>, interpolation_type: 'str' = <factory>, velocity_limit: 'float | None' = <factory>, acceleration_limit: 'float | None' = <factory>, motion_source: 'str' = <factory>, planner_type: 'str | None' = <factory>, sample_interval: 'int' = <factory>, hand_interp_steps: 'int' = <factory>, hand_control_part: 'str' = <factory>, hand_open_qpos: 'torch.Tensor | None' = <factory>, hand_close_qpos: 'torch.Tensor | None' = <factory>, lift_height: 'float' = <factory>, max_approach_retract_z: 'float | None' = <factory>, cartesian_waypoint_count: 'int' = <factory>)

Place

Lower the held object to a place pose, open the gripper, retract.

PressCfg

PressCfg(name: 'str' = <factory>, control_part: 'str' = <factory>, interpolation_type: 'str' = <factory>, velocity_limit: 'float | None' = <factory>, acceleration_limit: 'float | None' = <factory>, motion_source: 'str' = <factory>, planner_type: 'str | None' = <factory>, sample_interval: 'int' = <factory>, hand_interp_steps: 'int' = <factory>, hand_control_part: 'str' = <factory>, hand_close_qpos: 'torch.Tensor | None' = <factory>)

Press

Close the gripper, press down to a target pose, then return.

CoordinatedPickmentCfg

CoordinatedPickmentCfg(name: 'str' = <factory>, control_part: 'str' = <factory>, interpolation_type: 'str' = <factory>, velocity_limit: 'float | None' = <factory>, acceleration_limit: 'float | None' = <factory>, motion_source: 'str' = <factory>, planner_type: 'str | None' = <factory>, left_arm_control_part: 'str' = <factory>, right_arm_control_part: 'str' = <factory>, left_hand_control_part: 'str' = <factory>, right_hand_control_part: 'str' = <factory>, left_hand_open_qpos: 'torch.Tensor | None' = <factory>, left_hand_close_qpos: 'torch.Tensor | None' = <factory>, right_hand_open_qpos: 'torch.Tensor | None' = <factory>, right_hand_close_qpos: 'torch.Tensor | None' = <factory>, object_motion_keyframes: 'int' = <factory>, pre_grasp_distance: 'float' = <factory>, lift_height: 'float' = <factory>, sample_interval: 'int' = <factory>, hand_interp_steps: 'int' = <factory>, hold_steps: 'int' = <factory>)

CoordinatedPickment

Pick and move a single object pinched by two hands.

CoordinatedPlacementCfg

CoordinatedPlacementCfg(name: 'str' = <factory>, control_part: 'str' = <factory>, interpolation_type: 'str' = <factory>, velocity_limit: 'float | None' = <factory>, acceleration_limit: 'float | None' = <factory>, motion_source: 'str' = <factory>, planner_type: 'str | None' = <factory>, placing_arm_control_part: 'str' = <factory>, support_arm_control_part: 'str' = <factory>, placing_hand_control_part: 'str' = <factory>, support_hand_control_part: 'str' = <factory>, placing_hand_open_qpos: 'torch.Tensor | None' = <factory>, placing_hand_close_qpos: 'torch.Tensor | None' = <factory>, support_hand_close_qpos: 'torch.Tensor | None' = <factory>, release: 'bool' = <factory>, placing_height_offset: 'float' = <factory>, support_height_offset: 'float' = <factory>, lift_height: 'float' = <factory>, sample_interval: 'int' = <factory>, hand_interp_steps: 'int' = <factory>, hold_steps: 'int' = <factory>, retreat_steps: 'int' = <factory>)

CoordinatedPlacement

Coordinate two held objects: support object below, placing object above.

MoveEndEffector#

MoveEndEffector atomic action implementation.

Classes:

MoveEndEffector

Plan a free-space end-effector move to a target pose.

MoveEndEffectorCfg

MoveEndEffectorCfg(name: 'str' = <factory>, control_part: 'str' = <factory>, interpolation_type: 'str' = <factory>, velocity_limit: 'float | None' = <factory>, acceleration_limit: 'float | None' = <factory>, motion_source: 'str' = <factory>, planner_type: 'str | None' = <factory>, sample_interval: 'int' = <factory>)

class embodichain.lab.sim.atomic_actions.primitives.move_end_effector.MoveEndEffector[source]#

Bases: AtomicAction

Plan a free-space end-effector move to a target pose.

The EndEffectorPoseTarget may carry either a single waypoint (n_envs, 4, 4) (or a broadcastable (4, 4)) or a multi-waypoint trajectory (n_envs, n_waypoint, 4, 4). In the multi-waypoint case the action plans a single trajectory that visits every waypoint in order, starting from the inherited WorldState.last_qpos; IK is solved for each waypoint with the previous waypoint’s solution as the seed.

Classes:

Methods:

execute(target, state)

Plan and return a full-DoF trajectory for this action.

TargetType#

alias of EndEffectorPoseTarget

execute(target, state)[source]#

Plan and return a full-DoF trajectory for this action.

Parameters:
  • target (EndEffectorPoseTarget) – Typed target dataclass; must be an instance of self.TargetType.

  • state (WorldState) – World state inherited from the previous action (or the engine seed).

Return type:

ActionResult

Returns:

ActionResult with the planned trajectory and the successor world state.

class embodichain.lab.sim.atomic_actions.primitives.move_end_effector.MoveEndEffectorCfg[source]#

Bases: ActionCfg

MoveEndEffectorCfg(name: ‘str’ = <factory>, control_part: ‘str’ = <factory>, interpolation_type: ‘str’ = <factory>, velocity_limit: ‘float | None’ = <factory>, acceleration_limit: ‘float | None’ = <factory>, motion_source: ‘str’ = <factory>, planner_type: ‘str | None’ = <factory>, sample_interval: ‘int’ = <factory>)

Attributes:

motion_source

'ik_interp' (default, batched IK + linear interp) or 'motion_gen' (batched MotionGenerator).

name

Name of the action, used for identification and logging.

planner_type

'toppra' | 'neural'.

sample_interval

Number of waypoints in the planned trajectory.

Methods:

validate([prefix])

Check the validity of configclass object.

motion_source: str#

‘ik_interp’ (default, batched IK + linear interp) or ‘motion_gen’ (batched MotionGenerator).

Type:

Trajectory source

name: str#

Name of the action, used for identification and logging.

planner_type: str | None#

‘toppra’ | ‘neural’. Required when motion_source=’motion_gen’.

Type:

Planner type for motion_source=’motion_gen’

sample_interval: int#

Number of waypoints in the planned trajectory.

validate(prefix='')#

Check the validity of configclass object.

This function checks if the object is a valid configclass object. A valid configclass object contains no MISSING entries.

Parameters:
  • obj (object) – The object to check.

  • prefix (str) – The prefix to add to the missing fields. Defaults to ‘’.

Return type:

list[str]

Returns:

A list of missing fields.

Raises:

TypeError – When the object is not a valid configuration object.

MoveJoints#

MoveJoints atomic action implementation.

Classes:

MoveJoints

Plan a joint-space move for the configured control part.

MoveJointsCfg

MoveJointsCfg(name: 'str' = <factory>, control_part: 'str' = <factory>, interpolation_type: 'str' = <factory>, velocity_limit: 'float | None' = <factory>, acceleration_limit: 'float | None' = <factory>, motion_source: 'str' = <factory>, planner_type: 'str | None' = <factory>, sample_interval: 'int' = <factory>, named_joint_positions: 'dict[str, torch.Tensor] | None' = <factory>)

class embodichain.lab.sim.atomic_actions.primitives.move_joints.MoveJoints[source]#

Bases: AtomicAction

Plan a joint-space move for the configured control part.

The JointPositionTarget may carry either a single waypoint (n_envs, control_dof) or a multi-waypoint trajectory (n_envs, n_waypoint, control_dof). In the multi-waypoint case the action plans a single trajectory that visits every waypoint in order, starting from the inherited WorldState.last_qpos.

Attributes:

TargetType

Concrete target dataclass or dataclasses accepted by execute.

Methods:

execute(target, state)

Plan and return a full-DoF trajectory for this action.

TargetType: ClassVar[tuple[type, ...]] = (<class 'embodichain.lab.sim.atomic_actions.core.JointPositionTarget'>, <class 'embodichain.lab.sim.atomic_actions.core.NamedJointPositionTarget'>)#

Concrete target dataclass or dataclasses accepted by execute.

execute(target, state)[source]#

Plan and return a full-DoF trajectory for this action.

Parameters:
Return type:

ActionResult

Returns:

ActionResult with the planned trajectory and the successor world state.

class embodichain.lab.sim.atomic_actions.primitives.move_joints.MoveJointsCfg[source]#

Bases: ActionCfg

MoveJointsCfg(name: ‘str’ = <factory>, control_part: ‘str’ = <factory>, interpolation_type: ‘str’ = <factory>, velocity_limit: ‘float | None’ = <factory>, acceleration_limit: ‘float | None’ = <factory>, motion_source: ‘str’ = <factory>, planner_type: ‘str | None’ = <factory>, sample_interval: ‘int’ = <factory>, named_joint_positions: ‘dict[str, torch.Tensor] | None’ = <factory>)

Attributes:

motion_source

'ik_interp' (default, batched IK + linear interp) or 'motion_gen' (batched MotionGenerator).

name

Name of the action, used for identification and logging.

named_joint_positions

Optional named joint targets resolved by NamedJointPositionTarget.

planner_type

'toppra' | 'neural'.

sample_interval

Number of waypoints in the interpolated joint-space trajectory.

Methods:

validate([prefix])

Check the validity of configclass object.

motion_source: str#

‘ik_interp’ (default, batched IK + linear interp) or ‘motion_gen’ (batched MotionGenerator).

Type:

Trajectory source

name: str#

Name of the action, used for identification and logging.

named_joint_positions: dict[str, Tensor] | None#

Optional named joint targets resolved by NamedJointPositionTarget.

planner_type: str | None#

‘toppra’ | ‘neural’. Required when motion_source=’motion_gen’.

Type:

Planner type for motion_source=’motion_gen’

sample_interval: int#

Number of waypoints in the interpolated joint-space trajectory.

validate(prefix='')#

Check the validity of configclass object.

This function checks if the object is a valid configclass object. A valid configclass object contains no MISSING entries.

Parameters:
  • obj (object) – The object to check.

  • prefix (str) – The prefix to add to the missing fields. Defaults to ‘’.

Return type:

list[str]

Returns:

A list of missing fields.

Raises:

TypeError – When the object is not a valid configuration object.

PickUp#

PickUp atomic action implementation.

Classes:

PickUp

Approach a grasp pose, close the gripper, lift.

PickUpCfg

PickUpCfg(name: 'str' = <factory>, control_part: 'str' = <factory>, interpolation_type: 'str' = <factory>, velocity_limit: 'float | None' = <factory>, acceleration_limit: 'float | None' = <factory>, motion_source: 'str' = <factory>, planner_type: 'str | None' = <factory>, sample_interval: 'int' = <factory>, hand_interp_steps: 'int' = <factory>, hand_control_part: 'str' = <factory>, hand_open_qpos: 'torch.Tensor | None' = <factory>, hand_close_qpos: 'torch.Tensor | None' = <factory>, lift_height: 'float' = <factory>, pre_grasp_distance: 'float' = <factory>, approach_direction: 'torch.Tensor' = <factory>, approach_alignment_max_angle: 'float | None' = <factory>, downstream_object_target_poses: 'tuple[torch.Tensor, ...]' = <factory>, obj_upright_direction: 'torch.Tensor | None' = <factory>, rotate_upright: 'float | None' = <factory>)

class embodichain.lab.sim.atomic_actions.primitives.pick_up.PickUp[source]#

Bases: AtomicAction

Approach a grasp pose, close the gripper, lift.

Classes:

Methods:

execute(target, state)

Plan and return a full-DoF trajectory for this action.

TargetType#

alias of GraspTarget

execute(target, state)[source]#

Plan and return a full-DoF trajectory for this action.

Parameters:
  • target (GraspTarget) – Typed target dataclass; must be an instance of self.TargetType.

  • state (WorldState) – World state inherited from the previous action (or the engine seed).

Return type:

ActionResult

Returns:

ActionResult with the planned trajectory and the successor world state.

class embodichain.lab.sim.atomic_actions.primitives.pick_up.PickUpCfg[source]#

Bases: ActionCfg

PickUpCfg(name: ‘str’ = <factory>, control_part: ‘str’ = <factory>, interpolation_type: ‘str’ = <factory>, velocity_limit: ‘float | None’ = <factory>, acceleration_limit: ‘float | None’ = <factory>, motion_source: ‘str’ = <factory>, planner_type: ‘str | None’ = <factory>, sample_interval: ‘int’ = <factory>, hand_interp_steps: ‘int’ = <factory>, hand_control_part: ‘str’ = <factory>, hand_open_qpos: ‘torch.Tensor | None’ = <factory>, hand_close_qpos: ‘torch.Tensor | None’ = <factory>, lift_height: ‘float’ = <factory>, pre_grasp_distance: ‘float’ = <factory>, approach_direction: ‘torch.Tensor’ = <factory>, approach_alignment_max_angle: ‘float | None’ = <factory>, downstream_object_target_poses: ‘tuple[torch.Tensor, …]’ = <factory>, obj_upright_direction: ‘torch.Tensor | None’ = <factory>, rotate_upright: ‘float | None’ = <factory>)

Attributes:

approach_alignment_max_angle

Optional maximum TCP z-axis deviation from the approach direction.

approach_direction

World-frame direction from the pre-grasp pose to the grasp pose.

downstream_object_target_poses

Future object poses that must be reachable with the selected grasp.

hand_close_qpos

Joint positions for the closed hand state, shape [hand_dof,].

hand_control_part

Name of the robot part that controls the hand joints.

hand_interp_steps

Number of waypoints for the gripper close interpolation phase.

hand_open_qpos

Joint positions for the open hand state, shape [hand_dof,].

lift_height

Height (m) to lift the end-effector after closing the gripper.

motion_source

'ik_interp' (default, batched IK + linear interp) or 'motion_gen' (batched MotionGenerator).

name

Name of the action, used for identification and logging.

obj_upright_direction

Optional object local direction used to choose the upright grasp rotation.

planner_type

'toppra' | 'neural'.

pre_grasp_distance

Distance to offset back from the grasp pose along the approach direction.

rotate_upright

Optional rotation (radians) about the grasp x-axis to apply after grasp selection.

sample_interval

Number of waypoints for the full trajectory (approach + hand + lift).

Methods:

validate([prefix])

Check the validity of configclass object.

approach_alignment_max_angle: float | None#

Optional maximum TCP z-axis deviation from the approach direction.

approach_direction: Tensor#

World-frame direction from the pre-grasp pose to the grasp pose.

downstream_object_target_poses: tuple[Tensor, ...]#

Future object poses that must be reachable with the selected grasp.

hand_close_qpos: Tensor | None#

Joint positions for the closed hand state, shape [hand_dof,].

hand_control_part: str#

Name of the robot part that controls the hand joints.

hand_interp_steps: int#

Number of waypoints for the gripper close interpolation phase.

hand_open_qpos: Tensor | None#

Joint positions for the open hand state, shape [hand_dof,].

lift_height: float#

Height (m) to lift the end-effector after closing the gripper.

motion_source: str#

‘ik_interp’ (default, batched IK + linear interp) or ‘motion_gen’ (batched MotionGenerator).

Type:

Trajectory source

name: str#

Name of the action, used for identification and logging.

obj_upright_direction: Tensor | None#

Optional object local direction used to choose the upright grasp rotation.

planner_type: str | None#

‘toppra’ | ‘neural’. Required when motion_source=’motion_gen’.

Type:

Planner type for motion_source=’motion_gen’

pre_grasp_distance: float#

Distance to offset back from the grasp pose along the approach direction.

rotate_upright: float | None#

Optional rotation (radians) about the grasp x-axis to apply after grasp selection.

sample_interval: int#

Number of waypoints for the full trajectory (approach + hand + lift).

validate(prefix='')#

Check the validity of configclass object.

This function checks if the object is a valid configclass object. A valid configclass object contains no MISSING entries.

Parameters:
  • obj (object) – The object to check.

  • prefix (str) – The prefix to add to the missing fields. Defaults to ‘’.

Return type:

list[str]

Returns:

A list of missing fields.

Raises:

TypeError – When the object is not a valid configuration object.

MoveHeldObject#

MoveHeldObject atomic action implementation.

Classes:

MoveHeldObject

Move the held object to a target object pose; keep the gripper closed.

MoveHeldObjectCfg

MoveHeldObjectCfg(name: 'str' = <factory>, control_part: 'str' = <factory>, interpolation_type: 'str' = <factory>, velocity_limit: 'float | None' = <factory>, acceleration_limit: 'float | None' = <factory>, motion_source: 'str' = <factory>, planner_type: 'str | None' = <factory>, sample_interval: 'int' = <factory>, hand_control_part: 'str' = <factory>, hand_close_qpos: 'torch.Tensor | None' = <factory>, obj_upright_direction: 'torch.Tensor | None' = <factory>, pick_rotate_upright: 'float | None' = <factory>)

class embodichain.lab.sim.atomic_actions.primitives.move_held_object.MoveHeldObject[source]#

Bases: AtomicAction

Move the held object to a target object pose; keep the gripper closed.

Classes:

Methods:

execute(target, state)

Plan and return a full-DoF trajectory for this action.

TargetType#

alias of HeldObjectPoseTarget

execute(target, state)[source]#

Plan and return a full-DoF trajectory for this action.

Parameters:
  • target (HeldObjectPoseTarget) – Typed target dataclass; must be an instance of self.TargetType.

  • state (WorldState) – World state inherited from the previous action (or the engine seed).

Return type:

ActionResult

Returns:

ActionResult with the planned trajectory and the successor world state.

class embodichain.lab.sim.atomic_actions.primitives.move_held_object.MoveHeldObjectCfg[source]#

Bases: ActionCfg

MoveHeldObjectCfg(name: ‘str’ = <factory>, control_part: ‘str’ = <factory>, interpolation_type: ‘str’ = <factory>, velocity_limit: ‘float | None’ = <factory>, acceleration_limit: ‘float | None’ = <factory>, motion_source: ‘str’ = <factory>, planner_type: ‘str | None’ = <factory>, sample_interval: ‘int’ = <factory>, hand_control_part: ‘str’ = <factory>, hand_close_qpos: ‘torch.Tensor | None’ = <factory>, obj_upright_direction: ‘torch.Tensor | None’ = <factory>, pick_rotate_upright: ‘float | None’ = <factory>)

Attributes:

hand_close_qpos

Joint positions for the closed hand state, shape [hand_dof,].

hand_control_part

Name of the robot part that controls the hand joints.

motion_source

'ik_interp' (default, batched IK + linear interp) or 'motion_gen' (batched MotionGenerator).

name

Name of the action, used for identification and logging.

obj_upright_direction

Optional object-local direction to align with world up while moving.

pick_rotate_upright

Optional rotation in radians used by the legacy upright transport mode.

planner_type

'toppra' | 'neural'.

sample_interval

Number of waypoints in the planned trajectory.

Methods:

validate([prefix])

Check the validity of configclass object.

hand_close_qpos: Tensor | None#

Joint positions for the closed hand state, shape [hand_dof,].

hand_control_part: str#

Name of the robot part that controls the hand joints.

motion_source: str#

‘ik_interp’ (default, batched IK + linear interp) or ‘motion_gen’ (batched MotionGenerator).

Type:

Trajectory source

name: str#

Name of the action, used for identification and logging.

obj_upright_direction: Tensor | None#

Optional object-local direction to align with world up while moving.

pick_rotate_upright: float | None#

Optional rotation in radians used by the legacy upright transport mode.

planner_type: str | None#

‘toppra’ | ‘neural’. Required when motion_source=’motion_gen’.

Type:

Planner type for motion_source=’motion_gen’

sample_interval: int#

Number of waypoints in the planned trajectory.

validate(prefix='')#

Check the validity of configclass object.

This function checks if the object is a valid configclass object. A valid configclass object contains no MISSING entries.

Parameters:
  • obj (object) – The object to check.

  • prefix (str) – The prefix to add to the missing fields. Defaults to ‘’.

Return type:

list[str]

Returns:

A list of missing fields.

Raises:

TypeError – When the object is not a valid configuration object.

Place#

Place atomic action implementation.

Classes:

Place

Lower the held object to a place pose, open the gripper, retract.

PlaceCfg

PlaceCfg(name: 'str' = <factory>, control_part: 'str' = <factory>, interpolation_type: 'str' = <factory>, velocity_limit: 'float | None' = <factory>, acceleration_limit: 'float | None' = <factory>, motion_source: 'str' = <factory>, planner_type: 'str | None' = <factory>, sample_interval: 'int' = <factory>, hand_interp_steps: 'int' = <factory>, hand_control_part: 'str' = <factory>, hand_open_qpos: 'torch.Tensor | None' = <factory>, hand_close_qpos: 'torch.Tensor | None' = <factory>, lift_height: 'float' = <factory>, max_approach_retract_z: 'float | None' = <factory>, cartesian_waypoint_count: 'int' = <factory>)

class embodichain.lab.sim.atomic_actions.primitives.place.Place[source]#

Bases: AtomicAction

Lower the held object to a place pose, open the gripper, retract.

The EndEffectorPoseTarget may carry either a single waypoint (n_envs, 4, 4) (or a broadcastable (4, 4)) or a multi-waypoint trajectory (n_envs, n_waypoint, 4, 4). In the multi-waypoint case the down phase visits every waypoint in order; approaching from above the first waypoint, descending through each waypoint, then opening the gripper at the final waypoint and retracting to above the last waypoint. Starting joint positions are inherited from WorldState.last_qpos.

Classes:

Methods:

execute(target, state)

Plan and return a full-DoF trajectory for this action.

TargetType#

alias of EndEffectorPoseTarget

execute(target, state)[source]#

Plan and return a full-DoF trajectory for this action.

Parameters:
  • target (EndEffectorPoseTarget) – Typed target dataclass; must be an instance of self.TargetType.

  • state (WorldState) – World state inherited from the previous action (or the engine seed).

Return type:

ActionResult

Returns:

ActionResult with the planned trajectory and the successor world state.

class embodichain.lab.sim.atomic_actions.primitives.place.PlaceCfg[source]#

Bases: ActionCfg

PlaceCfg(name: ‘str’ = <factory>, control_part: ‘str’ = <factory>, interpolation_type: ‘str’ = <factory>, velocity_limit: ‘float | None’ = <factory>, acceleration_limit: ‘float | None’ = <factory>, motion_source: ‘str’ = <factory>, planner_type: ‘str | None’ = <factory>, sample_interval: ‘int’ = <factory>, hand_interp_steps: ‘int’ = <factory>, hand_control_part: ‘str’ = <factory>, hand_open_qpos: ‘torch.Tensor | None’ = <factory>, hand_close_qpos: ‘torch.Tensor | None’ = <factory>, lift_height: ‘float’ = <factory>, max_approach_retract_z: ‘float | None’ = <factory>, cartesian_waypoint_count: ‘int’ = <factory>)

Attributes:

cartesian_waypoint_count

Number of fixed-orientation Cartesian keyframes per translation segment.

hand_close_qpos

Joint positions for the closed hand state, shape [hand_dof,].

hand_control_part

Name of the robot part that controls the hand joints.

hand_interp_steps

Number of waypoints for the gripper open interpolation phase.

hand_open_qpos

Joint positions for the open hand state, shape [hand_dof,].

lift_height

Height (m) to retract the end-effector after opening the gripper.

max_approach_retract_z

Optional maximum world-frame TCP z for approach and retract poses (m).

motion_source

'ik_interp' (default, batched IK + linear interp) or 'motion_gen' (batched MotionGenerator).

name

Name of the action, used for identification and logging.

planner_type

'toppra' | 'neural'.

sample_interval

Number of waypoints for the full trajectory (down + hand + back).

Methods:

validate([prefix])

Check the validity of configclass object.

cartesian_waypoint_count: int#

Number of fixed-orientation Cartesian keyframes per translation segment.

hand_close_qpos: Tensor | None#

Joint positions for the closed hand state, shape [hand_dof,].

hand_control_part: str#

Name of the robot part that controls the hand joints.

hand_interp_steps: int#

Number of waypoints for the gripper open interpolation phase.

hand_open_qpos: Tensor | None#

Joint positions for the open hand state, shape [hand_dof,].

lift_height: float#

Height (m) to retract the end-effector after opening the gripper.

max_approach_retract_z: float | None#

Optional maximum world-frame TCP z for approach and retract poses (m).

motion_source: str#

‘ik_interp’ (default, batched IK + linear interp) or ‘motion_gen’ (batched MotionGenerator).

Type:

Trajectory source

name: str#

Name of the action, used for identification and logging.

planner_type: str | None#

‘toppra’ | ‘neural’. Required when motion_source=’motion_gen’.

Type:

Planner type for motion_source=’motion_gen’

sample_interval: int#

Number of waypoints for the full trajectory (down + hand + back).

validate(prefix='')#

Check the validity of configclass object.

This function checks if the object is a valid configclass object. A valid configclass object contains no MISSING entries.

Parameters:
  • obj (object) – The object to check.

  • prefix (str) – The prefix to add to the missing fields. Defaults to ‘’.

Return type:

list[str]

Returns:

A list of missing fields.

Raises:

TypeError – When the object is not a valid configuration object.

Press#

Press atomic action implementation.

Classes:

Press

Close the gripper, press down to a target pose, then return.

PressCfg

PressCfg(name: 'str' = <factory>, control_part: 'str' = <factory>, interpolation_type: 'str' = <factory>, velocity_limit: 'float | None' = <factory>, acceleration_limit: 'float | None' = <factory>, motion_source: 'str' = <factory>, planner_type: 'str | None' = <factory>, sample_interval: 'int' = <factory>, hand_interp_steps: 'int' = <factory>, hand_control_part: 'str' = <factory>, hand_close_qpos: 'torch.Tensor | None' = <factory>)

class embodichain.lab.sim.atomic_actions.primitives.press.Press[source]#

Bases: AtomicAction

Close the gripper, press down to a target pose, then return.

Classes:

Methods:

execute(target, state)

Plan and return a full-DoF trajectory for this action.

TargetType#

alias of EndEffectorPoseTarget

execute(target, state)[source]#

Plan and return a full-DoF trajectory for this action.

Parameters:
  • target (EndEffectorPoseTarget) – Typed target dataclass; must be an instance of self.TargetType.

  • state (WorldState) – World state inherited from the previous action (or the engine seed).

Return type:

ActionResult

Returns:

ActionResult with the planned trajectory and the successor world state.

class embodichain.lab.sim.atomic_actions.primitives.press.PressCfg[source]#

Bases: ActionCfg

PressCfg(name: ‘str’ = <factory>, control_part: ‘str’ = <factory>, interpolation_type: ‘str’ = <factory>, velocity_limit: ‘float | None’ = <factory>, acceleration_limit: ‘float | None’ = <factory>, motion_source: ‘str’ = <factory>, planner_type: ‘str | None’ = <factory>, sample_interval: ‘int’ = <factory>, hand_interp_steps: ‘int’ = <factory>, hand_control_part: ‘str’ = <factory>, hand_close_qpos: ‘torch.Tensor | None’ = <factory>)

Attributes:

hand_close_qpos

Joint positions for the closed hand state, shape [hand_dof,].

hand_control_part

Name of the robot part that controls the hand joints.

hand_interp_steps

Number of waypoints for closing the gripper before pressing.

motion_source

'ik_interp' (default, batched IK + linear interp) or 'motion_gen' (batched MotionGenerator).

name

Name of the action, used for identification and logging.

planner_type

'toppra' | 'neural'.

sample_interval

Number of waypoints for the full trajectory (hand close + down + back).

Methods:

validate([prefix])

Check the validity of configclass object.

hand_close_qpos: Tensor | None#

Joint positions for the closed hand state, shape [hand_dof,].

hand_control_part: str#

Name of the robot part that controls the hand joints.

hand_interp_steps: int#

Number of waypoints for closing the gripper before pressing.

motion_source: str#

‘ik_interp’ (default, batched IK + linear interp) or ‘motion_gen’ (batched MotionGenerator).

Type:

Trajectory source

name: str#

Name of the action, used for identification and logging.

planner_type: str | None#

‘toppra’ | ‘neural’. Required when motion_source=’motion_gen’.

Type:

Planner type for motion_source=’motion_gen’

sample_interval: int#

Number of waypoints for the full trajectory (hand close + down + back).

validate(prefix='')#

Check the validity of configclass object.

This function checks if the object is a valid configclass object. A valid configclass object contains no MISSING entries.

Parameters:
  • obj (object) – The object to check.

  • prefix (str) – The prefix to add to the missing fields. Defaults to ‘’.

Return type:

list[str]

Returns:

A list of missing fields.

Raises:

TypeError – When the object is not a valid configuration object.

CoordinatedPickment#

CoordinatedPickment atomic action implementation.

Classes:

CoordinatedPickment

Pick and move a single object pinched by two hands.

CoordinatedPickmentCfg

CoordinatedPickmentCfg(name: 'str' = <factory>, control_part: 'str' = <factory>, interpolation_type: 'str' = <factory>, velocity_limit: 'float | None' = <factory>, acceleration_limit: 'float | None' = <factory>, motion_source: 'str' = <factory>, planner_type: 'str | None' = <factory>, left_arm_control_part: 'str' = <factory>, right_arm_control_part: 'str' = <factory>, left_hand_control_part: 'str' = <factory>, right_hand_control_part: 'str' = <factory>, left_hand_open_qpos: 'torch.Tensor | None' = <factory>, left_hand_close_qpos: 'torch.Tensor | None' = <factory>, right_hand_open_qpos: 'torch.Tensor | None' = <factory>, right_hand_close_qpos: 'torch.Tensor | None' = <factory>, object_motion_keyframes: 'int' = <factory>, pre_grasp_distance: 'float' = <factory>, lift_height: 'float' = <factory>, sample_interval: 'int' = <factory>, hand_interp_steps: 'int' = <factory>, hold_steps: 'int' = <factory>)

class embodichain.lab.sim.atomic_actions.primitives.coordinated_pickment.CoordinatedPickment[source]#

Bases: AtomicAction

Pick and move a single object pinched by two hands.

Classes:

Methods:

execute(target, state)

Plan and return a full-DoF trajectory for this action.

TargetType#

alias of CoordinatedPickmentTarget

execute(target, state)[source]#

Plan and return a full-DoF trajectory for this action.

Parameters:
  • target (CoordinatedPickmentTarget) – Typed target dataclass; must be an instance of self.TargetType.

  • state (WorldState) – World state inherited from the previous action (or the engine seed).

Return type:

ActionResult

Returns:

ActionResult with the planned trajectory and the successor world state.

class embodichain.lab.sim.atomic_actions.primitives.coordinated_pickment.CoordinatedPickmentCfg[source]#

Bases: ActionCfg

CoordinatedPickmentCfg(name: ‘str’ = <factory>, control_part: ‘str’ = <factory>, interpolation_type: ‘str’ = <factory>, velocity_limit: ‘float | None’ = <factory>, acceleration_limit: ‘float | None’ = <factory>, motion_source: ‘str’ = <factory>, planner_type: ‘str | None’ = <factory>, left_arm_control_part: ‘str’ = <factory>, right_arm_control_part: ‘str’ = <factory>, left_hand_control_part: ‘str’ = <factory>, right_hand_control_part: ‘str’ = <factory>, left_hand_open_qpos: ‘torch.Tensor | None’ = <factory>, left_hand_close_qpos: ‘torch.Tensor | None’ = <factory>, right_hand_open_qpos: ‘torch.Tensor | None’ = <factory>, right_hand_close_qpos: ‘torch.Tensor | None’ = <factory>, object_motion_keyframes: ‘int’ = <factory>, pre_grasp_distance: ‘float’ = <factory>, lift_height: ‘float’ = <factory>, sample_interval: ‘int’ = <factory>, hand_interp_steps: ‘int’ = <factory>, hold_steps: ‘int’ = <factory>)

Attributes:

control_part

Combined control part containing left and right arm joints.

hand_interp_steps

Number of waypoints used for the simultaneous hand close phase.

hold_steps

Number of waypoints to hold the final object target pose.

left_arm_control_part

Left arm control part used to grasp one end of the object.

left_hand_close_qpos

Left hand qpos for the closed state.

left_hand_control_part

Hand attached to the left arm.

left_hand_open_qpos

Left hand qpos for the open state.

lift_height

World-Z lift distance before moving to the object target pose.

motion_source

'ik_interp' (default, batched IK + linear interp) or 'motion_gen' (batched MotionGenerator).

name

Name of the action, used for identification and logging.

object_motion_keyframes

Number of object-pose keyframes solved by IK before joint-space interpolation.

planner_type

'toppra' | 'neural'.

pre_grasp_distance

World distance to retreat from each grasp pose along negative TCP z.

right_arm_control_part

Right arm control part used to grasp the other end of the object.

right_hand_close_qpos

Right hand qpos for the closed state.

right_hand_control_part

Hand attached to the right arm.

right_hand_open_qpos

Right hand qpos for the open state.

sample_interval

Number of waypoints for the full coordinated pickment trajectory.

Methods:

validate([prefix])

Check the validity of configclass object.

control_part: str#

Combined control part containing left and right arm joints.

hand_interp_steps: int#

Number of waypoints used for the simultaneous hand close phase.

hold_steps: int#

Number of waypoints to hold the final object target pose.

left_arm_control_part: str#

Left arm control part used to grasp one end of the object.

left_hand_close_qpos: Tensor | None#

Left hand qpos for the closed state.

left_hand_control_part: str#

Hand attached to the left arm.

left_hand_open_qpos: Tensor | None#

Left hand qpos for the open state.

lift_height: float#

World-Z lift distance before moving to the object target pose.

motion_source: str#

‘ik_interp’ (default, batched IK + linear interp) or ‘motion_gen’ (batched MotionGenerator).

Type:

Trajectory source

name: str#

Name of the action, used for identification and logging.

object_motion_keyframes: int#

Number of object-pose keyframes solved by IK before joint-space interpolation.

planner_type: str | None#

‘toppra’ | ‘neural’. Required when motion_source=’motion_gen’.

Type:

Planner type for motion_source=’motion_gen’

pre_grasp_distance: float#

World distance to retreat from each grasp pose along negative TCP z.

right_arm_control_part: str#

Right arm control part used to grasp the other end of the object.

right_hand_close_qpos: Tensor | None#

Right hand qpos for the closed state.

right_hand_control_part: str#

Hand attached to the right arm.

right_hand_open_qpos: Tensor | None#

Right hand qpos for the open state.

sample_interval: int#

Number of waypoints for the full coordinated pickment trajectory.

validate(prefix='')#

Check the validity of configclass object.

This function checks if the object is a valid configclass object. A valid configclass object contains no MISSING entries.

Parameters:
  • obj (object) – The object to check.

  • prefix (str) – The prefix to add to the missing fields. Defaults to ‘’.

Return type:

list[str]

Returns:

A list of missing fields.

Raises:

TypeError – When the object is not a valid configuration object.

CoordinatedPlacement#

CoordinatedPlacement atomic action implementation.

Classes:

CoordinatedPlacement

Coordinate two held objects: support object below, placing object above.

CoordinatedPlacementCfg

CoordinatedPlacementCfg(name: 'str' = <factory>, control_part: 'str' = <factory>, interpolation_type: 'str' = <factory>, velocity_limit: 'float | None' = <factory>, acceleration_limit: 'float | None' = <factory>, motion_source: 'str' = <factory>, planner_type: 'str | None' = <factory>, placing_arm_control_part: 'str' = <factory>, support_arm_control_part: 'str' = <factory>, placing_hand_control_part: 'str' = <factory>, support_hand_control_part: 'str' = <factory>, placing_hand_open_qpos: 'torch.Tensor | None' = <factory>, placing_hand_close_qpos: 'torch.Tensor | None' = <factory>, support_hand_close_qpos: 'torch.Tensor | None' = <factory>, release: 'bool' = <factory>, placing_height_offset: 'float' = <factory>, support_height_offset: 'float' = <factory>, lift_height: 'float' = <factory>, sample_interval: 'int' = <factory>, hand_interp_steps: 'int' = <factory>, hold_steps: 'int' = <factory>, retreat_steps: 'int' = <factory>)

class embodichain.lab.sim.atomic_actions.primitives.coordinated_placement.CoordinatedPlacement[source]#

Bases: AtomicAction

Coordinate two held objects: support object below, placing object above.

Classes:

Methods:

execute(target, state)

Plan and return a full-DoF trajectory for this action.

TargetType#

alias of CoordinatedPlacementTarget

execute(target, state)[source]#

Plan and return a full-DoF trajectory for this action.

Parameters:
  • target (CoordinatedPlacementTarget) – Typed target dataclass; must be an instance of self.TargetType.

  • state (WorldState) – World state inherited from the previous action (or the engine seed).

Return type:

ActionResult

Returns:

ActionResult with the planned trajectory and the successor world state.

class embodichain.lab.sim.atomic_actions.primitives.coordinated_placement.CoordinatedPlacementCfg[source]#

Bases: ActionCfg

CoordinatedPlacementCfg(name: ‘str’ = <factory>, control_part: ‘str’ = <factory>, interpolation_type: ‘str’ = <factory>, velocity_limit: ‘float | None’ = <factory>, acceleration_limit: ‘float | None’ = <factory>, motion_source: ‘str’ = <factory>, planner_type: ‘str | None’ = <factory>, placing_arm_control_part: ‘str’ = <factory>, support_arm_control_part: ‘str’ = <factory>, placing_hand_control_part: ‘str’ = <factory>, support_hand_control_part: ‘str’ = <factory>, placing_hand_open_qpos: ‘torch.Tensor | None’ = <factory>, placing_hand_close_qpos: ‘torch.Tensor | None’ = <factory>, support_hand_close_qpos: ‘torch.Tensor | None’ = <factory>, release: ‘bool’ = <factory>, placing_height_offset: ‘float’ = <factory>, support_height_offset: ‘float’ = <factory>, lift_height: ‘float’ = <factory>, sample_interval: ‘int’ = <factory>, hand_interp_steps: ‘int’ = <factory>, hold_steps: ‘int’ = <factory>, retreat_steps: ‘int’ = <factory>)

Attributes:

control_part

Robot control part containing both placing and support arms.

hand_interp_steps

Number of waypoints for the placing-hand release interpolation.

hold_steps

Number of waypoints to hold alignment before releasing.

lift_height

World-Z lift distance for the placing arm after release.

motion_source

'ik_interp' (default, batched IK + linear interp) or 'motion_gen' (batched MotionGenerator).

name

Name of the action, used for identification and logging.

placing_arm_control_part

Arm that places and releases its held object.

placing_hand_close_qpos

Placing-hand qpos for the closed state, shape [hand_dof,].

placing_hand_control_part

Hand attached to the placing arm.

placing_hand_open_qpos

Placing-hand qpos for the open state, shape [hand_dof,].

placing_height_offset

Default World-Z offset above the placing object target pose.

planner_type

'toppra' | 'neural'.

release

Whether to open the placing hand at the aligned placement pose.

retreat_steps

Number of waypoints used for the placing-arm lift retreat.

sample_interval

Number of waypoints for the full coordinated placement trajectory.

support_arm_control_part

Arm that moves the support object and keeps holding it.

support_hand_close_qpos

Support-hand qpos for the closed state, shape [hand_dof,].

support_hand_control_part

Hand attached to the support arm.

support_height_offset

Default World-Z offset above the support object target pose.

Methods:

validate([prefix])

Check the validity of configclass object.

control_part: str#

Robot control part containing both placing and support arms.

hand_interp_steps: int#

Number of waypoints for the placing-hand release interpolation.

hold_steps: int#

Number of waypoints to hold alignment before releasing.

lift_height: float#

World-Z lift distance for the placing arm after release.

motion_source: str#

‘ik_interp’ (default, batched IK + linear interp) or ‘motion_gen’ (batched MotionGenerator).

Type:

Trajectory source

name: str#

Name of the action, used for identification and logging.

placing_arm_control_part: str#

Arm that places and releases its held object.

placing_hand_close_qpos: Tensor | None#

Placing-hand qpos for the closed state, shape [hand_dof,].

placing_hand_control_part: str#

Hand attached to the placing arm.

placing_hand_open_qpos: Tensor | None#

Placing-hand qpos for the open state, shape [hand_dof,].

placing_height_offset: float#

Default World-Z offset above the placing object target pose.

planner_type: str | None#

‘toppra’ | ‘neural’. Required when motion_source=’motion_gen’.

Type:

Planner type for motion_source=’motion_gen’

release: bool#

Whether to open the placing hand at the aligned placement pose.

retreat_steps: int#

Number of waypoints used for the placing-arm lift retreat.

sample_interval: int#

Number of waypoints for the full coordinated placement trajectory.

support_arm_control_part: str#

Arm that moves the support object and keeps holding it.

support_hand_close_qpos: Tensor | None#

Support-hand qpos for the closed state, shape [hand_dof,].

support_hand_control_part: str#

Hand attached to the support arm.

support_height_offset: float#

Default World-Z offset above the support object target pose.

validate(prefix='')#

Check the validity of configclass object.

This function checks if the object is a valid configclass object. A valid configclass object contains no MISSING entries.

Parameters:
  • obj (object) – The object to check.

  • prefix (str) – The prefix to add to the missing fields. Defaults to ‘’.

Return type:

list[str]

Returns:

A list of missing fields.

Raises:

TypeError – When the object is not a valid configuration object.