embodichain.lab.sim.atomic_skills#
Typed planning contracts and built-in atomic skills.
The engine resolves an SkillInvocation into a
ResolvedSkillRequest, which an action combines with a
PlanningContext through AtomicSkill.plan(). Planning is
side-effect free: it returns an SkillPlan with timed motion,
completion criteria, diagnostics, and uncommitted expected task-state effects.
AtomicSkillEngine can compile a static sequence. For closed-loop use,
ExecutionSession owns recovery and invocation-revision state while
ExecutionRunner connects it to observations, commands, and time.
Planning contracts
Engine-owned generic endpoint bindings for one atomic skill call. |
|
One action-local endpoint resolved to a runtime controller target. |
|
Stable controller destination produced by an endpoint adapter. |
|
Joint-position destination backed by one robot control part. |
|
Immutable-by-ownership command associated with one control part. |
|
A semantic command represented by one or batched joint positions. |
|
Reusable semantic commands for one named robot control part. |
|
Per-invocation semantic commands keyed by slot and endpoint. |
|
One fully typed and endpoint-bound atomic skill request. |
|
|
Require physical-effect evidence before one trajectory segment starts. |
Engine-owned immutable planning snapshot for one invocation revision. |
|
Marker base for immutable, skill-specific runtime options. |
|
Immutable motion-generation policy for one action invocation. |
|
Bounded local recovery policy used by the execution runtime. |
|
Measured robot state used as the start of planning or replanning. |
|
Symbolic task state, separate from measured robot state. |
|
Versioned scene state used to ground dynamic goals and obstacles. |
|
Late-bound pose derived from a versioned scene entity. |
|
Complete side-effect-free input to |
|
Expected task-state changes that require post-execution verification. |
|
Full-robot joint trajectory with per-environment timing metadata. |
|
Immutable-by-ownership payload submitted to one runtime transport. |
|
Batched joint-position targets for the built-in robot transport. |
|
One transport-compatible payload addressed to one runtime target. |
|
Synchronized endpoint commands for one batched runtime instant. |
|
Ordered runtime command frames for one stable environment batch. |
|
|
Named half-open waypoint range inside an action trajectory. |
|
Planner metadata retained for debugging and recovery decisions. |
Stable planning-failure classification used by recovery policy. |
|
Scene-bound planning result for one grounded atomic skill invocation. |
|
|
Offline compilation result for a sequence of action invocations. |
Articulation geometry adaptation
|
Owned sampled geometry for articulation-link affordances. |
|
Deterministic articulation facts required for geometry adaptation. |
|
Structural joint geometry consumed by the articulation adapter. |
|
Build root-frame, link-scoped grasp geometry for a rigidized articulation. |
|
Sample initial articulation geometry for Atomic Skill affordances. |
Semantic resource contracts
Machine-readable metadata for one registered atomic skill. |
|
Complete robot-independent binding contract for one atomic skill. |
|
One skill-local participant selected as an indivisible resource unit. |
|
Capabilities and commands required from one slot-local endpoint. |
|
Require selected endpoints within one participant to be disjoint. |
|
Require selected slots to have pairwise-disjoint physical claims. |
Execution contracts
Side-effect-free planner for one semantically meaningful robot skill. |
|
Own planning resources and coordinate side-effect-free atomic skills. |
|
alias of |
|
Execute grounded invocations incrementally with bounded local recovery. |
|
Connect an execution session to observation, controller, and time ports. |
|
Transport and scheduling policy for an |
|
Result of one non-blocking execution-runner update. |
|
Lifecycle status owned by an |
|
Source of fresh planning contexts for feedback-driven execution. |
|
Controller boundary used by |
|
Backend that owns one kind of runtime endpoint command. |
|
Route generic endpoint operations to exact registered transports. |
|
Synchronous acknowledgement returned by a |
|
Outcome reported by a command transport or controller. |
|
Auditable record of one controller operation and acknowledgement. |
|
Command-sink operation recorded by an execution runner. |
|
Clock abstraction used for deterministic and simulation scheduling. |
|
|
Create an engine whose initial context observes selected rigid objects. |
Describe a locked articulation as one antipodal-graspable rigid object. |
|
Structural contract a scene provider requires of an observed entity. |
|
Adapt a simulation robot to observation, command, and clock protocols. |
|
Result returned after one closed-loop execution update. |
|
Typed boundary describing a physical effect awaiting verification. |
|
Explicit physical-effect verification independent of symbolic state. |
|
Correlated per-environment update for one effect boundary. |
|
One typed-by-convention physical channel for an environment batch. |
|
Synchronized evidence channels from one execution observation tick. |
|
Acquire synchronized physical evidence for an execution observation. |
|
One synchronized request for runtime physical evidence. |
|
|
Correlate a blocking physical-effect check with a segment entry. |
|
Current-observation decision for one blocking segment-entry gate. |
alias of |
|
alias of |
|
|
Describe the next in-flight command boundary for held-object checks. |
|
Correlated in-flight held-object loss and recovery decision. |
alias of |
|
Owned inspection snapshot for one installed action plan. |
|
One timestamped execution or recovery event. |
|
Structured event categories emitted by |
|
Lifecycle status of an execution session. |
Built-in goals and actions
|
End-effector pose goal with optional batched intermediate waypoints. |
|
Explicit or named joint-space goal for a bound robot resource. |
|
Pickup target with an affordance-selected or supplied grasp pose. |
|
Object to pick and hand over, plus its final object pose. |
|
Object whose local axis should be aligned after an antipodal grasp. |
|
Per-invocation grasp-and-axis-alignment behavior. |
|
Antipodal grasp affordance with an object-local alignment axis. |
|
Desired pose for the object held by this action's control part. |
|
Pour toward an opening, or rotate in place when no target is supplied. |
|
Per-invocation pouring behavior. |
|
Push one rigid object toward a target pose on the target support plane. |
|
Per-invocation planar pushing behavior. |
|
End-effector calibration selected by a bound motion control part. |
|
End-effector release-pose target used by |
|
Place a held assemble object onto a base object at a relative pose. |
|
Target object described by a press affordance. |
|
Per-invocation pressing behavior. |
|
Target-local contact point and parent-joint pressing geometry. |
|
Translating articulation link described by a slide affordance. |
|
Per-invocation sliding behavior for a translating articulation link. |
|
Target-local antipodal grasp and parent-joint translation geometry. |
|
Door handle and desired absolute opening state. |
|
Per-invocation approach, interpolation, release, and retract behavior. |
|
Target-local handle geometry and a resolved hinge axis. |
|
Target object described by a twist affordance. |
|
Per-invocation twisting behavior. |
|
Target-local grasp point and parent-joint rotation geometry. |
|
Object-centric target for picking and moving one object with two hands. |
|
Object-centric target for dual-arm coordinated placement. |
|
Plan a free-space move for a bound manipulator. |
|
Plan joint motion from the observed state to one or more waypoints. |
|
Approach a grasp pose, close the gripper, lift. |
|
Grasp an object and align its local axis to a world axis. |
|
Move the held object through exact target poses with a closed hand. |
|
Rotate and return an exclusively held object about its internal axis. |
|
Close the end effector, contact a rigid object, and push it in-plane. |
|
Lower the held object to a place pose, open the gripper, retract. |
|
Open-loop motion primitive that approaches, presses, and retracts. |
|
Open-loop approach, grasp, and axis-constrained sliding motion. |
|
Approach, grasp, rotate a door about its hinge, release, and retract. |
|
Open-loop approach, grasp, twist, release, and retract motion. |
|
Pick and move a single object pinched by two hands. |
|
Coordinate two held objects: support object below, placing object above. |
|
Pick an object with the nearer arm and transfer it to the other arm. |
Classes:
|
alias of |
|
alias of |
|
alias of |
|
alias of |
|
alias of |
|
alias of |
|
alias of |
|
Base class for affordance data. |
|
Batched pose candidates with cost and explicit validity. |
|
Owned result of one batched Affordance sampling operation. |
|
Immutable identity for reproducible parallel Affordance sampling. |
|
Antipodal grasp affordance for parallel-jaw grippers. |
|
Owned sampled geometry for articulation-link affordances. |
|
Deterministic articulation facts required for geometry adaptation. |
|
Structural joint geometry consumed by the articulation adapter. |
|
Verified symbolic state for one named articulation joint. |
|
Affordance describing how an assemble object fits onto a base object. |
|
Place a held assemble object onto a base object at a relative pose. |
|
alias of |
|
alias of |
Side-effect-free planner for one semantically meaningful robot skill. |
|
Own planning resources and coordinate side-effect-free atomic skills. |
|
|
Grasp an object and align its local axis to a world axis. |
|
Antipodal grasp affordance with an object-local alignment axis. |
|
Object whose local axis should be aligned after an antipodal grasp. |
|
Per-invocation grasp-and-axis-alignment behavior. |
Outcome reported by a command transport or controller. |
|
Synchronous acknowledgement returned by a |
|
Auditable record of one controller operation and acknowledgement. |
|
Command-sink operation recorded by an execution runner. |
|
Controller boundary used by |
|
|
Offline compilation result for a sequence of action invocations. |
|
Engine-owned candidate construction and selected-plan finalization. |
|
Contact-only pickup at an observed TCP pose in the planning frame. |
|
Approach, establish contact grasp and lift using an observed path source. |
|
Place a contact-held subject without projecting a rigid object/tool relation. |
Immutable-by-ownership command associated with one control part. |
|
Reusable semantic commands for one named robot control part. |
|
|
Observed or projected relation for an object held by two manipulators. |
|
Object-centric target for picking and moving one object with two hands. |
|
Pick and move a single object pinched by two hands. |
|
Per-invocation coordinated pickup behavior. |
|
Coordinate two held objects: support object below, placing object above. |
|
Object-centric target for dual-arm coordinated placement. |
|
Per-invocation coordinated placement behavior. |
|
Host-owned acquisition port; no stepping or planned values as evidence. |
|
Pinned asset identity and logical scene roles, without hardware names. |
|
Latch failures and require every declared event and success predicate. |
|
Instantiate same-robot motion and validate its measured execution. |
|
Owned measurements aligned to one robot observation and physical row. |
Require selected slots to have pairwise-disjoint physical claims. |
|
Require selected endpoints within one participant to be disjoint. |
|
|
Policy for consuming a live dynamic collision world. |
|
Current-observation outcome for one physical state expectation. |
Typed boundary describing a physical effect awaiting verification. |
|
Explicit physical-effect verification independent of symbolic state. |
|
Correlated per-environment update for one effect boundary. |
|
|
End-effector pose goal with optional batched intermediate waypoints. |
One action-local endpoint resolved to a runtime controller target. |
|
One transport-compatible payload addressed to one runtime target. |
|
Route generic endpoint operations to exact registered transports. |
|
Backend that owns one kind of runtime endpoint command. |
|
|
Resolved source and projector for one endpoint tracking channel. |
|
Feedback address for one runtime endpoint and open tracking channel. |
|
Scene entity state addressable by a stable entity identifier. |
|
Execute one demonstration contract as one planning/recovery boundary. |
Clock abstraction used for deterministic and simulation scheduling. |
|
One timestamped execution or recovery event. |
|
Structured event categories emitted by |
|
Owned inspection snapshot for one installed action plan. |
|
|
Explicit host-owned logical-plan/adoption lifecycle, before dispatch. |
Connect an execution session to observation, controller, and time ports. |
|
Transport and scheduling policy for an |
|
Execute grounded invocations incrementally with bounded local recovery. |
|
Lifecycle status of an execution session. |
|
Result returned after one closed-loop execution update. |
|
|
Terminal acceptance proven by typed endpoint feedback. |
|
Pickup target with an affordance-selected or supplied grasp pose. |
|
Already-grounded support and object poses from the closing observation. |
|
Pick an object with the nearer arm and transfer it to the other arm. |
|
Object to pick and hand over, plus its final object pose. |
|
Per-invocation pick-up, handover, and placement behavior. |
|
Describe the next in-flight command boundary for held-object checks. |
|
Correlated in-flight held-object loss and recovery decision. |
|
Desired pose for the object held by this action's control part. |
Observed or projected relation between an object and one manipulator. |
|
|
Feedback checks used while a command sequence is still in flight. |
|
An external full-joint motion with explicit skill-stage boundaries. |
|
Batch of 3D interaction points on an object surface. |
A semantic command represented by one or batched joint positions. |
|
|
Explicit or named joint-space goal for a bound robot resource. |
Batched joint-position targets for the built-in robot transport. |
|
Joint-position destination backed by one robot control part. |
|
|
Evaluator for |
|
Maximum absolute joint-error tolerance. |
|
Built-in projector for joint-position endpoint commands. |
|
Batched joint positions with shape |
|
Optional observation/verification port for a source-owned motion contract. |
Wall-clock implementation backed by |
|
Immutable motion-generation policy for one action invocation. |
|
|
Plan a free-space move for a bound manipulator. |
|
Per-invocation behavior for |
|
Move the held object through exact target poses with a closed hand. |
|
Per-invocation held-object transport behavior. |
|
Plan joint motion from the observed state to one or more waypoints. |
|
Per-invocation behavior for |
|
Provide motion for one grounded invocation without owning its effects. |
|
alias of |
Shallow-frozen semantic information about an interaction object. |
|
|
Shared semantic-object goal contract for object-centric skills. |
Source of fresh planning contexts for feedback-driven execution. |
|
|
Live measured state for one scene articulation joint. |
|
One timed joint motion resolved at declared observation boundaries. |
|
Episode-owned source of live full-robot commands for MoveJoints. |
|
Approach, grasp, rotate a door about its hinge, release, and retract. |
|
Target-local handle geometry and a resolved hinge axis. |
|
Door handle and desired absolute opening state. |
|
Per-invocation approach, interpolation, release, and retract behavior. |
|
Correlate a blocking physical-effect check with a segment entry. |
|
Require physical-effect evidence before one trajectory segment starts. |
|
Current-observation decision for one blocking segment-entry gate. |
One typed-by-convention physical channel for an environment batch. |
|
Synchronized evidence channels from one execution observation tick. |
|
Acquire synchronized physical evidence for an execution observation. |
|
One synchronized request for runtime physical evidence. |
|
|
Approach a grasp pose, close the gripper, lift. |
|
Per-invocation pickup behavior. |
|
Lower the held object to a place pose, open the gripper, retract. |
|
End-effector release-pose target used by |
|
Per-invocation placement behavior. |
|
Read-only final-plan qualification that may only reject planning rows. |
|
Planner metadata retained for debugging and recovery decisions. |
|
Explicit complete-request measurements and optional cooperative deadline. |
Complete side-effect-free input to |
|
|
Built-in provider backed by |
Stable planning-failure classification used by recovery policy. |
|
|
Immutable, callable-free declaration owned by one concrete skill. |
|
Immutable logical-planning proposal, never physical-effect evidence. |
|
Evaluator for |
|
Independent translation and rotation tolerances for base pose. |
|
Batched homogeneous poses with shape |
|
Rotate and return an exclusively held object about its internal axis. |
|
Pour toward an opening, or rotate in place when no target is supplied. |
|
Per-invocation pouring behavior. |
|
Geometry of a receiving opening and the held object's mouth. |
|
Open-loop motion primitive that approaches, presses, and retracts. |
|
Target-local contact point and parent-joint pressing geometry. |
|
Target object described by a press affordance. |
|
Per-invocation pressing behavior. |
Failure-only B1 Press planning rules with the fixed source attempt budget. |
|
|
Instantiate a prototype with an explicit motion authority. |
|
Close the end effector, contact a rigid object, and push it in-plane. |
|
Push one rigid object toward a target pose on the target support plane. |
|
Per-invocation planar pushing behavior. |
|
End-effector calibration selected by a bound motion control part. |
Bounded local recovery policy used by the execution runtime. |
|
|
alias of |
Engine-owned immutable planning snapshot for one invocation revision. |
|
|
Observe simulation rigid objects and maintain scene revisions. |
|
Material-pose thresholds used to advance scene revisions. |
Measured robot state used as the start of planning or replanning. |
|
Lifecycle status owned by an |
|
Result of one non-blocking execution-runner update. |
|
Synchronized endpoint commands for one batched runtime instant. |
|
Immutable-by-ownership payload submitted to one runtime transport. |
|
Stable controller destination produced by an endpoint adapter. |
|
Structural contract a scene provider requires of an observed entity. |
|
Late-bound pose derived from a versioned scene entity. |
|
|
Produce scene snapshots correlated with execution environments. |
Versioned scene state used to ground dynamic goals and obstacles. |
|
Adapt a simulation robot to observation, command, and clock protocols. |
|
Engine-owned generic endpoint bindings for one atomic skill call. |
|
Complete robot-independent binding contract for one atomic skill. |
|
Per-invocation semantic commands keyed by slot and endpoint. |
|
Machine-readable metadata for one registered atomic skill. |
|
Capabilities and commands required from one slot-local endpoint. |
|
One fully typed and endpoint-bound atomic skill request. |
|
Marker base for immutable, skill-specific runtime options. |
|
Scene-bound planning result for one grounded atomic skill invocation. |
|
Export one explicit Atomic Skill plan as a qpos template. |
|
|
Engine-scoped registry of planning services used by atomic skills. |
One skill-local participant selected as an indivisible resource unit. |
|
|
Open-loop approach, grasp, and axis-constrained sliding motion. |
|
Target-local antipodal grasp and parent-joint translation geometry. |
|
Translating articulation link described by a slide affordance. |
|
Absolute prismatic coordinate, in metres, with a calibrated axis sign. |
|
Per-invocation sliding behavior for a translating articulation link. |
Expected task-state changes that require post-execution verification. |
|
Symbolic task state, separate from measured robot state. |
|
Ordered runtime command frames for one stable environment batch. |
|
|
Explicit terminal acceptance without endpoint feedback. |
|
Tracking frames aligned by index with an authoritative command sequence. |
Full-robot joint trajectory with per-environment timing metadata. |
|
|
Versioned pure projector from an endpoint command to desired state. |
|
Per-row metric result with unit-preserving component errors. |
|
Immutable exact-version metric-evaluator registry. |
|
Immutable address understood by one tracking-feedback provider. |
|
One synchronized typed observation from an exact feedback source. |
|
Versioned live port that reads one exact tracking source. |
|
Immutable exact-version feedback-provider registry. |
|
Versioned provider route plus one immutable feedback address. |
|
Desired endpoint states associated with one command frame. |
|
Immutable tolerance configuration dispatched by exact metric ID/revision. |
|
Versioned evaluator for one exact metric configuration type. |
|
Independent in-flight recovery signal and terminal acceptance contract. |
|
Exact version of a command-to-tracking-state projector. |
|
Immutable exact-version command-projector registry. |
|
Runtime facade for projecting commands and evaluating typed feedback. |
|
One endpoint-local desired state and its typed feedback route. |
|
Immutable-by-ownership typed desired or observed tracking state. |
|
Named half-open waypoint range inside an action trajectory. |
|
Open-loop approach, grasp, twist, release, and retract motion. |
|
Target-local grasp point and parent-joint rotation geometry. |
|
Target object described by a twist affordance. |
|
Per-invocation twisting behavior. |
|
Evaluator for |
|
Independent base-pose and joint-position tolerances. |
|
Batched base poses and joint positions for whole-body tracking. |
Functions:
|
Build root-frame, link-scoped grasp geometry for a rigidized articulation. |
Describe a locked articulation as one antipodal-graspable rigid object. |
|
|
Create an engine whose initial context observes selected rigid objects. |
|
Create an engine whose initial context observes selected rigid objects. |
|
Sample initial articulation geometry for Atomic Skill affordances. |
Validate an optional declaration-owned addition to an authored press stroke. |
- embodichain.lab.sim.atomic_skills.ActionBinding
alias of
SkillBinding
- embodichain.lab.sim.atomic_skills.ActionControlOverrides
alias of
SkillControlOverrides
- embodichain.lab.sim.atomic_skills.ActionInvocation
alias of
SkillInvocation
- embodichain.lab.sim.atomic_skills.ActionOptions
alias of
SkillOptions
- embodichain.lab.sim.atomic_skills.ActionPlan
alias of
SkillPlan
- embodichain.lab.sim.atomic_skills.ActionPlanTemplateAdapter
alias of
SkillPlanTemplateAdapter
- embodichain.lab.sim.atomic_skills.ActionPlanningServices
alias of
SkillPlanningServices
- class embodichain.lab.sim.atomic_skills.Affordance[source]
Base class for affordance data.
Represents an object’s interaction possibilities. Subclasses carry whatever typed fields they need (mesh tensors, interaction points, etc.); the base class only carries an object label and a free-form custom_config dict.
Methods:
__init__([object_label, custom_config])get_batch_size()Return the batch size of this affordance data.
get_custom_config(key[, default])Get a custom affordance configuration value.
resolve_from_object_geometry(geometry)Resolve geometry-derived fields after object semantics are assembled.
sample_candidates(candidates, *, sampling, ...)Select poses from a legal candidate set for each logical branch.
set_custom_config(key, value)Set a custom affordance configuration value.
Attributes:
custom_configUser-defined configuration payload.
object_labelLabel of the object this affordance belongs to.
- __init__(object_label='', custom_config=<factory>)
-
custom_config:
dict[str,Any] User-defined configuration payload.
- get_batch_size()[source]
Return the batch size of this affordance data.
- Return type:
int
- get_custom_config(key, default=None)[source]
Get a custom affordance configuration value.
- Return type:
Any
-
object_label:
str= '' Label of the object this affordance belongs to.
- resolve_from_object_geometry(geometry)[source]
Resolve geometry-derived fields after object semantics are assembled.
Subclasses may override this hook when their derived semantic values require metadata owned by
ObjectSemantics.geometry.- Parameters:
geometry (
Mapping[str,Any]) – Non-affordance object geometry metadata.- Return type:
None
- sample_candidates(candidates, *, sampling, env_ids, key, reference_poses=None)[source]
Select poses from a legal candidate set for each logical branch.
- Parameters:
candidates (
AffordancePoseCandidates) – Batched world poses, costs, and validity produced by geometry.sampling (
AffordanceSamplingContext|None) – Optional reproducible branch stream.Noneselects the lowest-cost candidate in every row.env_ids (
Tensor) – Stable environment identities matching candidate rows.key (
str) – Sampling operation identity.reference_poses (
Tensor|None) – Optional world poses of frames used to compare candidate geometry and recorded in the sampling provenance.
- Return type:
AffordanceSample- Returns:
Per-row success, selected poses, and selection metadata.
- set_custom_config(key, value)[source]
Set a custom affordance configuration value.
- Return type:
None
- class embodichain.lab.sim.atomic_skills.AffordancePoseCandidates[source]
Batched pose candidates with cost and explicit validity.
- Parameters:
poses (
Tensor) – World-frame homogeneous poses with shape(B, K, 4, 4).costs (
Tensor) – Lower-is-better candidate costs with shape(B, K).valid (
Tensor) – Real-candidate mask with shape(B, K).
Methods:
__init__(poses, costs, valid)from_rows(rows, *, device)Pad variable candidate rows without making padding selectable.
- __init__(poses, costs, valid)
- classmethod from_rows(rows, *, device)[source]
Pad variable candidate rows without making padding selectable.
- Parameters:
rows (
Sequence[tuple[Tensor,Tensor]]) – Per-row(poses, costs)values; rows may be empty.device (
device|str) – Output device.
- Return type:
AffordancePoseCandidates- Returns:
A rectangular candidate batch with explicit validity.
- class embodichain.lab.sim.atomic_skills.AffordanceSample[source]
Owned result of one batched Affordance sampling operation.
- Parameters:
success (
Tensor) – Per-row legal-sample mask with shape(B,).poses (
Tensor) – Selected poses with shape(B, 4, 4).metadata (
dict[str,object]) – Sampling provenance and selection diagnostics. Affordance samplers recordpose_frame="world",selected_poses, optional world-framereference_poses,env_ids, and geometricsuccessas JSON-compatible values. Row lists follow the input batch order. Failed rows retain identity placeholder poses and must be interpreted withsuccess; this is not IK or execution success. Candidate IDs identify only each row’s candidate pool.
Methods:
__init__(success, poses, metadata)- __init__(success, poses, metadata)
- class embodichain.lab.sim.atomic_skills.AffordanceSamplingContext[source]
Immutable identity for reproducible parallel Affordance sampling.
- Parameters:
count (
int) – Number of logical branches in each sampling group.seed (
int) – Host-selected base seed.episode_id (
int) – Host-selected episode or batch identity.attempt_id (
int) – Explicit resampling attempt identity.branch_override (
int|None) – Optional logical branch selected independently of the physical environment row.preferred_local_poses (
tuple[tuple[str,tuple[float,...]],...]) – Previously accepted reference-relative poses by sampling key, stored as immutable row-major matrices. A match must be a distinct non-nominal candidate in the current valid set.
Methods:
__init__([count, seed, episode_id, ...])branch_for(env_id, *[, row_index])Return the selected branch for one environment identity.
generator(key, *[, group])Create a private CPU generator for a stable named stream.
metadata()Return JSON-compatible sampling provenance.
sample_range(nominal, bounds, *, env_ids, key)Stratify a legal scalar interval while retaining nominal branches.
Attributes:
enabledWhether more than the nominal branch was requested.
- __init__(count=1, seed=0, episode_id=0, attempt_id=0, branch_override=None, branch_overrides=None, preferred_local_poses=())
- branch_for(env_id, *, row_index=None)[source]
Return the selected branch for one environment identity.
- Return type:
int
- property enabled: bool
Whether more than the nominal branch was requested.
- generator(key, *, group=0)[source]
Create a private CPU generator for a stable named stream.
- Parameters:
key (
str) – Non-empty sampling operation identity.group (
int) – Non-negative logical branch-group identity.
- Return type:
Generator- Returns:
A generator independent of PyTorch’s global random state.
- metadata()[source]
Return JSON-compatible sampling provenance.
- Return type:
dict[str,object]
- sample_range(nominal, bounds, *, env_ids, key)[source]
Stratify a legal scalar interval while retaining nominal branches.
- Parameters:
nominal (
float|Tensor) – Scalar or one value per environment row.bounds (
tuple[float,float] |None) – Inclusive lower and upper bounds, orNonefor no freedom.env_ids (
Tensor) – Stable non-negative environment identities, shape(B,).key (
str) – Sampling operation identity.
- Return type:
Tensor- Returns:
Sampled values with shape
(B,)on the environment device.
- class embodichain.lab.sim.atomic_skills.AntipodalAffordance[source]
Antipodal grasp affordance for parallel-jaw grippers.
The affordance owns only target-local triangle-mesh data. Its mesh may describe either the whole object or one selected articulation link; operations that infer whole-object geometry reject the latter. Simulator entity handles and live poses belong to scene grounding.
Attributes:
MAX_SURFACE_POINT_COUNTMaximum point-cloud size used for geometry-distribution analysis.
custom_configUser-defined configuration payload.
mesh_scopeWhether the mesh describes the whole object or one selected link.
mesh_trianglesTarget-local mesh triangle indices, shape [M, 3].
mesh_verticesTarget-local mesh vertices, shape [N, 3].
Methods:
__init__([object_label, custom_config, ...])get_grasp_candidates(generator, ...[, ...])Generate constrained candidates using an externally owned service.
get_object_longest_axis(obj_poses, *[, ...])Return the widest surface-point distribution axis in world space.
require_whole_object_mesh()Reject a link-only grasp mesh where whole-object geometry is required.
sample_surface_points([max_points])Deterministically sample target-local mesh-surface points.
-
MAX_SURFACE_POINT_COUNT:
ClassVar[int] = 1000 Maximum point-cloud size used for geometry-distribution analysis.
- __init__(object_label='', custom_config=<factory>, mesh_vertices=None, mesh_triangles=None, mesh_scope='object')
-
custom_config:
dict[str,Any] User-defined configuration payload.
- get_grasp_candidates(generator, object_poses, approach_direction, *, obj_longest_axis=None, is_positive_part=True)[source]
Generate constrained candidates using an externally owned service.
- Parameters:
generator (
GraspPoseGenerator) – Grasp-pose service configured for the actual gripper.object_poses (
Tensor) – Live-grounded world poses with shape(B, 4, 4).approach_direction (
Tensor) – Shared or per-row approach direction.obj_longest_axis (
Tensor|None) – Optional axis restricting the graspable region.is_positive_part (
bool|Tensor) – Which end of the optional axis is graspable.
- Return type:
AffordancePoseCandidates- Returns:
Padded candidates with explicit validity.
- get_object_longest_axis(obj_poses, *, max_points=1000)[source]
Return the widest surface-point distribution axis in world space.
- Return type:
Tensor
-
mesh_scope:
Literal['object','link'] = 'object' Whether the mesh describes the whole object or one selected link.
-
mesh_triangles:
Tensor|None= None Target-local mesh triangle indices, shape [M, 3].
-
mesh_vertices:
Tensor|None= None Target-local mesh vertices, shape [N, 3].
- require_whole_object_mesh()[source]
Reject a link-only grasp mesh where whole-object geometry is required.
- Raises:
ValueError – If this affordance contains only a selected link mesh.
- Return type:
None
- sample_surface_points(max_points=1000)[source]
Deterministically sample target-local mesh-surface points.
- Parameters:
max_points (
int) – Requested point cap in[1, 1000].- Return type:
Tensor- Returns:
Target-local surface points with shape
(N, 3).
-
MAX_SURFACE_POINT_COUNT:
- class embodichain.lab.sim.atomic_skills.ArticulationAffordanceGeometry[source]
Owned sampled geometry for articulation-link affordances.
The point clouds and optional joint data are expressed in the target link’s initial local frame. Joint axes are normalized. Use
to_object_geometry()at theObjectSemanticsboundary so the Atomic Skill-specific string-key protocol remains in this module.- Parameters:
target_link_point_cloud (
Tensor) – Sampled target-link surface, shape(N, 3).articulation_point_cloud (
Tensor) – Sampled merged-articulation surface, shape(M, 3).prismatic_joint_axis (
Tensor|None) – Optional nearest prismatic ancestor axis.revolute_joint_axis (
Tensor|None) – Optional nearest revolute ancestor axis.revolute_axis_origin (
Tensor|None) – Optional matching revolute-joint origin.non_target_articulation_point_cloud (
Tensor|None) – Sampled merged surface of every link except the target, shape(K, 3). An empty tensor records that the articulation has no non-target link surface.Noneis accepted only for geometry created without source-link provenance.
Methods:
__init__(target_link_point_cloud, ...[, ...])to_object_geometry()Return an owned
ObjectSemantics.geometrydictionary.- __init__(target_link_point_cloud, articulation_point_cloud, prismatic_joint_axis=None, revolute_joint_axis=None, revolute_axis_origin=None, non_target_articulation_point_cloud=None)
- to_object_geometry()[source]
Return an owned
ObjectSemantics.geometrydictionary.- Return type:
dict[str,Tensor]- Returns:
A new real dictionary containing cloned point clouds and whichever optional joint entries are available.
- class embodichain.lab.sim.atomic_skills.ArticulationGeometryProvider[source]
Deterministic articulation facts required for geometry adaptation.
Implementations provide raw link meshes, FK, and immediate-parent-first joint topology. Initial configuration and scale are explicit adapter inputs so this protocol does not depend on an
ArticulationCfgor PK-chain API.- device
Device on which geometry tensors are assembled.
- link_names
Stable articulation link names.
Methods:
__init__(*args, **kwargs)compute_fk(qpos, *, link_names, qpos_joint_names)Return root-frame link poses for the supplied named joint state.
get_link_vert_face(link_name)Return one link-local triangle mesh.
get_parent_joint_chain(link_name)Return parent joints ordered from the link toward the root.
- __init__(*args, **kwargs)
- compute_fk(qpos, *, link_names, qpos_joint_names)[source]
Return root-frame link poses for the supplied named joint state.
- Parameters:
qpos (
Tensor) – Joint positions with shape(B, J).link_names (
Sequence[str]) – Links whose poses should be returned.qpos_joint_names (
Sequence[str]) – Names corresponding to the lastqposaxis.
- Return type:
Tensor- Returns:
Root-frame poses with shape
(B, L, 4, 4).
- get_link_vert_face(link_name)[source]
Return one link-local triangle mesh.
- Parameters:
link_name (
str) – Stable link name.- Return type:
tuple[Tensor,Tensor]- Returns:
Link-local vertices and triangle indices.
Attention
A non-empty link mesh must contain at least one non-degenerate triangle surface.
- get_parent_joint_chain(link_name)[source]
Return parent joints ordered from the link toward the root.
- Parameters:
link_name (
str) – Link at which to begin traversal.- Return type:
tuple[ArticulationJointGeometry,...]- Returns:
Immediate-parent-first structural joint geometry.
- class embodichain.lab.sim.atomic_skills.ArticulationJointGeometry[source]
Structural joint geometry consumed by the articulation adapter.
- name
Stable joint name.
- joint_type
Normalized joint type such as
fixed,prismatic, orrevolute.
- parent_link_name
Stable parent-link name.
- child_link_name
Stable child-link name.
- origin_pose
Joint-frame pose in the parent-link frame, shape
(4, 4).
- axis
Joint axis in the joint frame, shape
(3,).
Methods:
__init__(*args, **kwargs)- __init__(*args, **kwargs)
- class embodichain.lab.sim.atomic_skills.ArticulationJointState[source]
Verified symbolic state for one named articulation joint.
Methods:
__init__(position[, env_mask])Attributes:
env_maskRows for which the verified state is present.
positionJoint positions with shape
(J,)or(B, J).- __init__(position, env_mask=None)
-
env_mask:
Tensor|None Rows for which the verified state is present.
-
position:
Tensor Joint positions with shape
(J,)or(B, J).
- class embodichain.lab.sim.atomic_skills.AssembleAffordance[source]
Affordance describing how an assemble object fits onto a base object.
The affordance stores the relative assembly relation. Planning supplies the base object’s snapshot pose through
AssembleGoal.base_pose. The assemble object’s target pose isbase_pose @ assemble_to_base_pose.Methods:
__init__([object_label, custom_config, ...])get_assemble_object_pose(base_pose)Return the assemble-object target pose for a given base-object pose.
sample_assemble_object_pose(base_pose, *, ...)Sample only explicitly declared assembly-equivalent rotations.
Attributes:
assemble_to_base_posePose of the assemble object relative to the base object frame, shape
(4, 4)or(num_envs, 4, 4).custom_configUser-defined configuration payload.
symmetry_transformsAssembly-equivalent object-local rotations with shape
(K, 4, 4).- __init__(object_label='', custom_config=<factory>, assemble_to_base_pose=<factory>, symmetry_transforms=None)
-
assemble_to_base_pose:
Tensor Pose of the assemble object relative to the base object frame, shape
(4, 4)or(num_envs, 4, 4).
-
custom_config:
dict[str,Any] User-defined configuration payload.
- get_assemble_object_pose(base_pose)[source]
Return the assemble-object target pose for a given base-object pose.
The assemble object is placed at
base_pose @ assemble_to_base_pose.- Parameters:
base_pose (
Tensor) – Base-object pose with shape(4, 4)or(num_envs, 4, 4).- Return type:
Tensor- Returns:
Assemble-object target pose with shape
(num_envs, 4, 4).- Raises:
TypeError – If either pose value is not a tensor.
ValueError – If either pose has an unsupported shape or batch size.
- sample_assemble_object_pose(base_pose, *, sampling, env_ids, key='assembly_symmetry')[source]
Sample only explicitly declared assembly-equivalent rotations.
- Parameters:
base_pose (
Tensor) – Base-object world poses.sampling (
AffordanceSamplingContext|None) – Optional reproducible branch stream.env_ids (
Tensor) – Stable environment identities matching base rows.key (
str) – Sampling operation identity.
- Return type:
AffordanceSample- Returns:
Assembly target poses with selection success and metadata.
-
symmetry_transforms:
Tensor|None= None Assembly-equivalent object-local rotations with shape
(K, 4, 4).
- class embodichain.lab.sim.atomic_skills.AssembleGoal[source]
Place a held assemble object onto a base object at a relative pose.
The base object pose is a late-bound
SceneEntityPose. The assemble object’s target pose isbase_pose @ assemble_to_base_pose. The held-object transform (object_to_eef) is read fromPlanningContextfor the place control part, which a priorPickUppopulates.Methods:
__init__(affordance, base_pose)Attributes:
affordanceAssembly affordance anchoring the assemble object to the base object.
base_poseLate-bound base-object pose used for snapshot-consistent planning.
- __init__(affordance, base_pose)
-
affordance:
AssembleAffordance Assembly affordance anchoring the assemble object to the base object.
-
base_pose:
SceneEntityPose Late-bound base-object pose used for snapshot-consistent planning.
- embodichain.lab.sim.atomic_skills.AtomicAction
alias of
AtomicSkill
- embodichain.lab.sim.atomic_skills.AtomicActionEngine
alias of
AtomicSkillEngine
- class embodichain.lab.sim.atomic_skills.AtomicSkill[source]
Side-effect-free planner for one semantically meaningful robot skill.
Actions own only typed default runtime options. An
AtomicSkillEnginebinds its shared planning services before an action is invoked.Attributes:
Concrete goal dataclass or dataclasses accepted by this skill.
Exact opt-in planning declarations supported by this skill.
Whether an Action Agent should expose this skill by default.
Explicit robot-independent requirements for semantic discovery.
Return an owned copy of the action's default runtime options.
Return the concrete runtime device associated with the engine.
Whether an engine has supplied this action's planning resources.
Return the engine-owned motion generator borrowed by this action.
Number of environments owned by the bound robot.
Whether the skill intentionally declares no verified physical effect.
Return the engine-owned services borrowed by this action.
Return the robot associated with the owning engine.
Number of full-robot degrees of freedom.
Stable registry identifier for this skill.
Classes:
alias of
SkillOptionsMethods:
__init__([default_options])build_command_plan(request, context, *, ...)Build a plan from transport-neutral runtime command frames.
build_plan(request, context, *, success, ...)Build a validated action plan for a primitive implementation.
continue_plan(request, context, plan, ...)Plan a later chunk without beginning another logical skill.
Return stable metadata used by registries and Action Agent adapters.
failed_plan(request, context, *[, message, ...])Build a failed empty plan without changing task state.
on_plan_installed(request, context, plan)Publish bookkeeping only after an execution plan was accepted.
plan(request, context, *[, nominal_source, ...])Bind the current collision scene and invoke the skill planner.
plan_complete_request(request, context, *, build)Delegate one complete request, optionally specialized by a typed skill.
require_goal(request)Validate a resolved request and return its concrete goal.
resolve_request(invocation)Validate and snapshot an invocation through engine-owned resources.
Return execution-independent reward recipes without binding a planner.
-
GoalType:
ClassVar[type[Any] |tuple[type[Any],...]] Concrete goal dataclass or dataclasses accepted by this skill.
- OptionsType
alias of
SkillOptions
-
PlanningRecoveryType:
ClassVar[type[PlanningRecovery] |tuple[type[PlanningRecovery],...] |None] = None Exact opt-in planning declarations supported by this skill.
- __init__(default_options=None)[source]
-
agent_visible:
ClassVar[bool] = True Whether an Action Agent should expose this skill by default.
-
binding_contract:
ClassVar[SkillBindingContract|None] = None Explicit robot-independent requirements for semantic discovery.
Concrete action classes must declare this attribute in their own class body to opt into the semantic catalog. Inheriting another action’s contract does not silently expose a new skill identifier.
- build_command_plan(request, context, *, success, commands, expected_effects=None, effect_candidates=None, effect_verification=None, replannable=True, diagnostics=None, segment_lengths=None, scene_dependency_monitor_until=None, scene_dependency_end_segment=None, joint_trajectory=None)[source]
Build a plan from transport-neutral runtime command frames.
Tracking targets are projected from the command payloads through the typed channels declared by each bound endpoint. Semantic effects remain externally verified through the execution session.
- Parameters:
request (
ResolvedSkillRequest[TypeVar(GoalT),TypeVar(OptionsT, bound=SkillOptions)]) – Resolved invocation snapshot being planned.context (
PlanningContext) – Planning input used for the plan.success (
bool|Tensor) – Per-environment planning success or scalar planner result.commands (
TimedCommandSequence) – Transport-neutral command sequence for the action.expected_effects (
StateDelta|None) – Symbolic effects to verify after execution.effect_candidates (
StateDelta|None) – Planned attachment baselines used by phase gates and in-flight held-object guards without committing task state.effect_verification (
EffectVerificationRequirement|None) – Optional explicit physical-effect boundary.replannable (
bool) – Whether the execution runtime may replan this action.diagnostics (
PlannerDiagnostics|None) – Optional retained planner diagnostics.segment_lengths (
Mapping[str,int] |None) – Optional ordered mapping from semantic segment names to command-frame counts. Zero-length entries are omitted.scene_dependency_monitor_until (
Mapping[str,int] |None) – Optional per-entity exclusive command-frame-index upper bound for scene-motion invalidation. An entity is monitored while the current frame index is smaller than its bound.0disables monitoring immediately; omitted dependencies remain monitored for the full action. Once the bound is reached, all pose changes for that entity are ignored.scene_dependency_end_segment (
str|None) – Optional last segment during which scene motion may invalidate and replan the action for every dependency.joint_trajectory (
TimedTrajectory|None) – Optional joint trajectory retained for offline compilation and inspection.
- Return type:
- Returns:
Side-effect-free action plan.
- build_plan(request, context, *, success, trajectory, expected_effects=None, effect_candidates=None, effect_verification=None, replannable=True, preserve_velocity_samples=False, diagnostics=None, segment_lengths=None, scene_dependency_monitor_until=None, scene_dependency_end_segment=None)[source]
Build a validated action plan for a primitive implementation.
- Parameters:
request (
ResolvedSkillRequest[TypeVar(GoalT),TypeVar(OptionsT, bound=SkillOptions)]) – Resolved invocation snapshot being planned.context (
PlanningContext) – Planning input used for the plan.success (
bool|Tensor) – Per-environment planning success or scalar planner result.trajectory (
TimedTrajectory) – Full-robot trajectory with explicit timing.expected_effects (
StateDelta|None) – Symbolic effects to verify after execution.effect_candidates (
StateDelta|None) – Planned attachment baselines used by phase gates and in-flight held-object guards without committing task state.effect_verification (
EffectVerificationRequirement|None) – Optional explicit physical-effect boundary. Use this when verification is required without a symbolic task- state delta.preserve_velocity_samples (
bool) – Keep explicitly authored arrival velocities across consecutive timed segments. Derived velocity targets retain their usual boundary and stationary treatment.replannable (
bool) – Whether the execution runtime may replan this action.diagnostics (
PlannerDiagnostics|None) – Optional retained planner diagnostics.segment_lengths (
Mapping[str,int] |None) – Optional ordered mapping from semantic segment names to waypoint counts. Zero-length entries are omitted.scene_dependency_monitor_until (
Mapping[str,int] |None) – Optional per-entity exclusive waypoint-index upper bound for scene-motion invalidation. An entity is monitored while the current waypoint index is smaller than its bound.0disables monitoring immediately; omitted dependencies remain monitored for the full action. Once the bound is reached, all pose changes for that entity are ignored.scene_dependency_end_segment (
str|None) – Optional last segment during which scene motion may invalidate and replan the action for every dependency.
- Return type:
- Returns:
Side-effect-free action plan.
- continue_plan(request, context, plan, active_mask)[source]
Plan a later chunk without beginning another logical skill.
- Parameters:
request (
ResolvedSkillRequest) – The unchanged resolved invocation.context (
PlanningContext) – Fresh observations with authoritative row identity and timing.plan (
SkillPlan) – Completed chunk and its owned continuation cursor.active_mask (
Tensor) – Eligible rows that executed the completed chunk.
- Return type:
- Returns:
Physical row acceptance and an optional later plan.
- property default_options: OptionsT
Return an owned copy of the action’s default runtime options.
- classmethod descriptor()[source]
Return stable metadata used by registries and Action Agent adapters.
- Return type:
- property device: device
Return the concrete runtime device associated with the engine.
- failed_plan(request, context, *, message=None, failure_code='planning_failed', retryable=True)[source]
Build a failed empty plan without changing task state.
- Parameters:
request (
ResolvedSkillRequest[TypeVar(GoalT),TypeVar(OptionsT, bound=SkillOptions)]) – Resolved invocation that failed to plan.context (
PlanningContext) – Planning input used for the attempt.message (
str|None) – Optional diagnostic message.failure_code (
str) – Stable machine-readable planning failure code.retryable (
bool) – Whether execution may spend action-retry budget on the failed rows.
- Return type:
- Returns:
Failed action plan with an empty trajectory.
- property is_bound: bool
Whether an engine has supplied this action’s planning resources.
- property motion_generator: MotionGenerator
Return the engine-owned motion generator borrowed by this action.
- property num_envs: int
Number of environments owned by the bound robot.
- on_plan_installed(request, context, plan)[source]
Publish bookkeeping only after an execution plan was accepted.
- Parameters:
request (
ResolvedSkillRequest) – The installed plan’s resolved invocation.context (
PlanningContext) – Observations used for this plan.plan (
SkillPlan) – Validated plan after destination and lifecycle acceptance.
- Return type:
None
-
open_loop:
ClassVar[bool] = False Whether the skill intentionally declares no verified physical effect.
- plan(request, context, *, nominal_source=None, planner=None)[source]
Bind the current collision scene and invoke the skill planner.
- Parameters:
request (
ResolvedSkillRequest[TypeVar(GoalT),TypeVar(OptionsT, bound=SkillOptions)]) – Immutable, typed, and embodiment-resolved action request.context (
PlanningContext) – Latest observed robot, task, and scene state.
- Return type:
- Returns:
Scene-bound action plan with expected, uncommitted effects.
- plan_complete_request(request, context, *, build, external_nominal=False)[source]
Delegate one complete request, optionally specialized by a typed skill.
- Parameters:
request (
ResolvedSkillRequest[TypeVar(GoalT),TypeVar(OptionsT, bound=SkillOptions)]) – Already-resolved immutable invocation and selected policies.context (
PlanningContext) – Actual planning observation; no execution is permitted.build (
CompletePlanBuilder) – Engine-owned builder retaining generic retry/transform/final qualification boundaries. A skill may select only its declared bounded alternatives; it cannot modify the builder or registry.external_nominal (
bool) – Whether the caller supplied an external nominal motion source. Unsupported explicit recovery combinations reject.
- Return type:
- Returns:
One complete action plan. The default delegates exactly once and performs no reads, snapshots, retries or state changes.
- property planning_services: SkillPlanningServices
Return the engine-owned services borrowed by this action.
- Raises:
RuntimeError – If the action has not been registered or planned by an
AtomicSkillEngine.
- require_goal(request)[source]
Validate a resolved request and return its concrete goal.
- Return type:
TypeVar(GoalT)
- resolve_request(invocation)[source]
Validate and snapshot an invocation through engine-owned resources.
- Parameters:
invocation (
SkillInvocation[TypeVar(GoalT),TypeVar(OptionsT, bound=SkillOptions)]) – Caller-owned invocation to resolve.- Return type:
ResolvedSkillRequest[TypeVar(GoalT),TypeVar(OptionsT, bound=SkillOptions)]- Returns:
Immutable request reused by planning and recovery replans.
- Raises:
ValueError – If the stable skill identifier does not match.
TypeError – If the goal or options type is incompatible.
KeyError – If a required binding role is missing.
- classmethod reward_profiles()[source]
Return execution-independent reward recipes without binding a planner.
- Return type:
dict[str,SkillRewardProfile]
- property robot: Robot
Return the robot associated with the owning engine.
- property robot_dof: int
Number of full-robot degrees of freedom.
-
skill_id:
ClassVar[str] Stable registry identifier for this skill.
-
GoalType:
- class embodichain.lab.sim.atomic_skills.AtomicSkillEngine[source]
Own planning resources and coordinate side-effect-free atomic skills.
Methods:
__init__(motion_generator[, ...])Initialize one engine and bind its built-in action implementations.
bind_control_parts(skill_id, endpoints, *[, ...])Build an advanced direct-core binding from control-part names.
compile(invocations[, context, plan_transform])Compile a static sequence of grounded invocations.
continue_request(request, context, previous, ...)Prepare another bounded observed chunk of the current invocation.
initial_context(*[, task, scene, timestamp, ...])Capture the robot state needed to start offline compilation.
make_invocation(skill_id, goal, *[, ...])Construct a grounded invocation while naming the skill only once.
plan(invocation[, context, plan_transform, ...])Plan one registered invocation through the engine-owned backend.
plan_request(request[, context, ...])Plan an already-resolved request without rebuilding its snapshot.
rebuild_plan_from_mapped_trajectory(request, ...)Rebuild a B=1 plan after explicit, protected control-grid retiming.
rebuild_plan_from_trajectory(request, ...)Rebuild a complete plan from a same-grid full-joint trajectory.
register(action, *[, replace])Register one action instance using its descriptor.
resolve(invocation)Resolve a registered invocation into an engine-owned snapshot.
start(invocations[, context, eligible_mask, ...])Start incremental execution for a grounded invocation sequence.
Attributes:
Deprecated alias for
skill_implementations.Return the opaque owner identity required by action bindings.
Semantic command profiles registered for robot control parts.
Return the concrete planning device used by this engine.
Standalone grasp-pose services installed for endpoint targets.
Return independently owned explicit hand calibrations by target ID.
Return the single motion generator owned by this engine.
Engine-owned resources shared by every bound atomic skill.
Return the robot controlled by this engine.
Return explicitly declared, agent-visible installed skill metadata.
Return the monotonic installed Atomic Skill catalog revision.
Registered action instances keyed by stable skill identifier.
Deprecated alias for
skill_catalog.Typed endpoint-feedback runtime used by plans and sessions.
- __init__(motion_generator, control_profiles=None, grasp_pose_generators=None, *, hand_geometry_cfgs=None, load_builtins=True, tracking_runtime=None, scene_provider=None, env_ids=None, profiler=None)[source]
Initialize one engine and bind its built-in action implementations.
- Parameters:
motion_generator (
MotionGenerator) – Engine-owned motion-generation backend.control_profiles (
Optional[Mapping[str,ControlPartCommandProfile]]) – Semantic commands keyed by robot control-part name.grasp_pose_generators (
Optional[Mapping[str,GraspPoseGenerator]]) – Standalone grasp-pose services keyed by the runtime target ID of each grasp endpoint, normally its robot control-part name.hand_geometry_cfgs (
Optional[Mapping[str,RobotHandGeometryCfg]]) – Explicit hand calibrations keyed by grasp endpoint target ID. Settings are copied; construction performs no hand FK.load_builtins (
bool) – Whether to instantiate and register every built-in action. Disable this for isolated tests or fully custom engines.tracking_runtime (
TrackingRuntime|None) – Optional exact-version feedback, projector, and metric registries. Built-in joint tracking is installed when omitted.scene_provider (
SceneProvider|None) – Optional default scene-observation source used byinitial_context()when the caller does not supply an explicit scene snapshot. The provider is borrowed by reference.env_ids (
tuple[int,...] |None) – Optional environment subset bound to planning services.profiler (
object|None) – Optional owner-provided profiler exposingsection. Planning is recorded underatomic_planningwithout taking ownership of the profiler or looking up a simulation World.
- property actions: dict[str, AtomicSkill]
Deprecated alias for
skill_implementations.
- bind_control_parts(skill_id, endpoints, *, task_state_keys=None)[source]
Build an advanced direct-core binding from control-part names.
- Parameters:
skill_id (
str) – Installed skill ID.endpoints (
Mapping[str,Mapping[str,str]]) – Nestedslot_id -> endpoint_id -> control_partmapping.task_state_keys (
Optional[Mapping[str,str]]) – Optional explicit stable task-state key for each resource slot. SeeSkillPlanningServices.bind_control_parts()for inference rules when omitted.
- Return type:
- Returns:
Engine-owned generic endpoint binding.
- property binding_owner_id: str
Return the opaque owner identity required by action bindings.
- compile(invocations, context=None, *, plan_transform=None)[source]
Compile a static sequence of grounded invocations.
Planning is side-effect free. Expected effects are applied only to the returned hypothetical
projected_contextso following actions can be checked against the expected state. No simulator or observed task state is mutated.- Parameters:
invocations (
Iterable[SkillInvocation]) – Grounded action requests in execution order.context (
PlanningContext|None) – Optional initial planning context captured by the caller.plan_transform (
Optional[Callable[[ResolvedSkillRequest,PlanningContext,SkillPlan],SkillPlan]]) – Optional same-grid transform applied to each plan before concatenation and projected-state propagation.
- Return type:
CompiledTrajectory- Returns:
Concatenated timed trajectory, individual plans, and projected state.
- Raises:
KeyError – If an invocation references an unregistered skill.
ValueError – If context, plan, or trajectory dimensions are incompatible.
- continue_request(request, context, previous, active_mask)[source]
Prepare another bounded observed chunk of the current invocation.
- Return type:
- property control_profiles: Mapping[str, ControlPartCommandProfile]
Semantic command profiles registered for robot control parts.
- property device: device
Return the concrete planning device used by this engine.
- property grasp_pose_generators: Mapping[str, GraspPoseGenerator]
Standalone grasp-pose services installed for endpoint targets.
- property hand_geometry_cfgs: Mapping[str, RobotHandGeometryCfg]
Return independently owned explicit hand calibrations by target ID.
- initial_context(*, task=None, scene=None, timestamp=0.0, control_dt=None, affordance_sampling=None)[source]
Capture the robot state needed to start offline compilation.
- Parameters:
task (
TaskState|None) – Optional symbolic task state; an empty state is used otherwise.scene (
SceneSnapshot|None) – Optional explicit scene snapshot. It overrides the engine’s configured scene provider; an empty snapshot is used when both are absent.timestamp (
float) – Timestamp assigned to the captured robot observation.control_dt (
float|None) – Explicit command period for action-owned interpolation.affordance_sampling (
AffordanceSamplingContext|None) – Optional reproducible Affordance sampling stream.
- Return type:
- Returns:
Planning context containing owned robot tensors.
- make_invocation(skill_id, goal, *, control_parts=None, motion_policy=None, tracking_policy=None, recovery_policy=None, skill_options=None, control_overrides=None, invocation_id=None, revision=0)[source]
Construct a grounded invocation while naming the skill only once.
control_partsuses the advanced direct-core binding path. Profile- based integrations resolve anSkillBindingin the semantic layer and constructSkillInvocationdirectly.- Parameters:
skill_id (
str) – Stable identifier of an installed atomic skill.goal (
TypeVar(GoalT)) – Action-specific typed goal.control_parts (
Optional[Mapping[str,Mapping[str,str]]]) – Directslot -> endpoint -> control_partmapping.motion_policy (
MotionPolicy|None) – Optional invocation motion policy.tracking_policy (
TrackingPolicy|None) – Optional typed tracking and terminal-acceptance policy.recovery_policy (
RecoveryPolicy|None) – Optional invocation recovery policy.skill_options (
Optional[TypeVar(OptionsT, bound=SkillOptions)]) – Optional action-specific invocation options.control_overrides (
SkillControlOverrides|None) – Optional endpoint-scoped command overrides.invocation_id (
str|None) – Optional correlation identifier.revision (
int) – Monotonic invocation revision.
- Return type:
SkillInvocation[TypeVar(GoalT),TypeVar(OptionsT, bound=SkillOptions)]- Returns:
A standard
SkillInvocationaccepted byplan,compile, andstart.- Raises:
ValueError – If
control_partsis omitted.KeyError – If the skill or control part is unknown.
TypeError – If an invocation field or binding input has an invalid type.
- property motion_generator: MotionGenerator
Return the single motion generator owned by this engine.
- plan(invocation, context=None, *, plan_transform=None, nominal_source=None)[source]
Plan one registered invocation through the engine-owned backend.
- Parameters:
invocation (
SkillInvocation) – Grounded request for a registered skill.context (
PlanningContext|None) – Optional latest planning state; captured when omitted.
- Return type:
- Returns:
Validated action plan.
- Raises:
KeyError – If the invocation references an unregistered skill.
- plan_request(request, context=None, *, plan_transform=None, nominal_source=None)[source]
Plan an already-resolved request without rebuilding its snapshot.
- Parameters:
request (
ResolvedSkillRequest) – Immutable request previously returned byresolve().context (
PlanningContext|None) – Optional latest planning state; captured when omitted.plan_transform (
Optional[Callable[[ResolvedSkillRequest,PlanningContext,SkillPlan],SkillPlan]]) – Optional callback scoped to this planning call. The callback receives and must return independently owned plan values.
- Return type:
- Returns:
Validated side-effect-free action plan.
- property planning_services: SkillPlanningServices
Engine-owned resources shared by every bound atomic skill.
- rebuild_plan_from_mapped_trajectory(request, context, plan, reference, result, *, joint_limits, velocity_limits, acceleration_limits)[source]
Rebuild a B=1 plan after explicit, protected control-grid retiming.
The mapping must retain every protected phase sample and scene dependency boundary. Skills’ declared free phases remain authoritative; a reference can narrow but never broaden those permissions. Commands, tracking and effect information are rebuilt together. This does not certify collision freedom or physical task success.
- Parameters:
request (
ResolvedSkillRequest) – Resolved request used for the original plan.context (
PlanningContext) – Original planning context.plan (
SkillPlan) – Original validated action plan.reference (
TrajectoryTemplate) – Its exact full-joint expansion template.result (
MappedRetimeResult) – Retimed trajectory with source brackets and hard events.joint_limits (
Tensor) – Full-layout joint limits with shape(D, 2).velocity_limits (
Tensor) – Positive full-layout joint speed limits(D,).acceleration_limits (
Tensor) – Positive full-layout acceleration limits(D,).
- Return type:
- Returns:
A validated complete plan on the new control grid.
- Raises:
ValueError – Mapping, phase permissions or protected samples differ.
- rebuild_plan_from_trajectory(request, context, plan, trajectory)[source]
Rebuild a complete plan from a same-grid full-joint trajectory.
This is the execution-side boundary for trajectory expansion. The caller supplies a trajectory with the same frame count as the original plan; timing-grid remapping and phase-index changes remain the responsibility of a later adapter.
- Parameters:
request (
ResolvedSkillRequest) – Resolved request that producedplan.context (
PlanningContext) – Planning context used for the original plan.plan (
SkillPlan) – Original validated action plan.trajectory (
TimedTrajectory) – Replacement full-joint trajectory on the same grid.
- Return type:
- Returns:
A newly lowered and validated action plan with commands, tracking, segments, and effect metadata rebuilt together.
- register(action, *, replace=False)[source]
Register one action instance using its descriptor.
- Parameters:
action (
AtomicSkill) – Configured action instance.replace (
bool) – Whether to replace an implementation already registered under the same stable skill identifier. Replacement is always explicit so extensions cannot silently shadow built-ins.
- Raises:
TypeError – If
actionis not an AtomicSkill.ValueError – If it belongs to another engine or its skill identifier conflicts with an existing action.
- Return type:
None
- resolve(invocation)[source]
Resolve a registered invocation into an engine-owned snapshot.
- Return type:
- property robot: Robot
Return the robot controlled by this engine.
- property skill_catalog: Mapping[str, SkillDescriptor]
Return explicitly declared, agent-visible installed skill metadata.
Process-wide type discovery, engine installation, and semantic exposure are separate boundaries. Only an action installed in this engine whose concrete class explicitly declares a generic binding contract appears here. Direct-core callers may continue to use every entry in
skill_implementations.
- property skill_catalog_revision: int
Return the monotonic installed Atomic Skill catalog revision.
Installing or replacing an agent-visible implementation advances the revision even when its public descriptor is equal. External binding and compilation layers can therefore reject stale implementation snapshots.
- property skill_implementations: dict[str, AtomicSkill]
Registered action instances keyed by stable skill identifier.
- property skills: Mapping[str, SkillDescriptor]
Deprecated alias for
skill_catalog.
- start(invocations, context=None, *, eligible_mask=None, plan_transform=None, nominal_source=None, plan_lifecycle=None)[source]
Start incremental execution for a grounded invocation sequence.
- Parameters:
invocations (
Iterable[SkillInvocation]) – Grounded action requests in execution order.context (
PlanningContext|None) – Initial measured state and scene snapshot. The engine captures one when omitted.eligible_mask (
Tensor|None) – Optional per-environment cohort allowed to execute. Ineligible rows remain excluded for the whole session. All rows are eligible when omitted.plan_transform (
Optional[Callable[[ResolvedSkillRequest,PlanningContext,SkillPlan],SkillPlan]]) – Optional transform scoped to every planning call in the returned execution session.plan_lifecycle (
ExecutionPlanLifecycle|None) – Optional host-owned plan/adoption lifecycle, called after complete validation and before dispatch.
- Return type:
- Returns:
Stateful execution session advanced by
session.tick(...).
- property tracking_runtime: TrackingRuntime
Typed endpoint-feedback runtime used by plans and sessions.
- class embodichain.lab.sim.atomic_skills.AxisAlign[source]
Grasp an object and align its local axis to a world axis.
Classes:
GoalTypealias of
AxisAlignGoalOptionsTypealias of
AxisAlignOptionsAttributes:
binding_contractExplicit robot-independent requirements for semantic discovery.
open_loopWhether the skill intentionally declares no verified physical effect.
skill_idStable registry identifier for this skill.
- GoalType
alias of
AxisAlignGoal
- OptionsType
alias of
AxisAlignOptions
- binding_contract: ClassVar[SkillBindingContract] = SkillBindingContract(slots=(SkillResourceSlot(slot_id='primary', endpoints=(SkillEndpointRequirement(endpoint_id='motion', capabilities=frozenset({'motion.cartesian_pose', 'kinematics.forward'}), required_commands=mappingproxy({})), SkillEndpointRequirement(endpoint_id='grasp', capabilities=frozenset({'interaction.grasp'}), required_commands=mappingproxy({'open': <class 'embodichain.lab.sim.atomic_skills.control.JointPositionCommand'>, 'grasp': <class 'embodichain.lab.sim.atomic_skills.control.JointPositionCommand'>}))), constraints=(DisjointSlotEndpoints(endpoint_ids=('motion', 'grasp')),)),), constraints=())
Explicit robot-independent requirements for semantic discovery.
Concrete action classes must declare this attribute in their own class body to opt into the semantic catalog. Inheriting another action’s contract does not silently expose a new skill identifier.
- open_loop: ClassVar[bool] = True
Whether the skill intentionally declares no verified physical effect.
- skill_id: ClassVar[str] = 'axis_align'
Stable registry identifier for this skill.
- class embodichain.lab.sim.atomic_skills.AxisAlignAffordance[source]
Antipodal grasp affordance with an object-local alignment axis.
Methods:
__init__([object_label, custom_config, ...])Attributes:
custom_configUser-defined configuration payload.
internal_axisAxis expressed in the target object's local frame.
- __init__(object_label='', custom_config=<factory>, mesh_vertices=None, mesh_triangles=None, mesh_scope='object', internal_axis=<factory>)
-
custom_config:
dict[str,Any] User-defined configuration payload.
-
internal_axis:
Tensor Axis expressed in the target object’s local frame.
- class embodichain.lab.sim.atomic_skills.AxisAlignGoal[source]
Object whose local axis should be aligned after an antipodal grasp.
Methods:
__init__(semantics[, grasp_xpos])Attributes:
grasp_xposOptional explicit end-effector grasp pose; omitted poses are sampled.
- __init__(semantics, grasp_xpos=None)
-
grasp_xpos:
Tensor|SceneEntityPose|None Optional explicit end-effector grasp pose; omitted poses are sampled.
- class embodichain.lab.sim.atomic_skills.AxisAlignOptions[source]
Per-invocation grasp-and-axis-alignment behavior.
Methods:
__init__([hand_interp_steps, ...])Attributes:
alignment_offset_mWorld translation from the lifted object centre,
(3,)or(B,3).alignment_twist_radRotation about the aligned world target axis after the shortest arc.
target_axisDesired world-frame axis, shape
(3,)or(B, 3).- __init__(hand_interp_steps=5, grasp_settle_steps=0, pick_object_part='center', lift_height=0.1, pre_grasp_distance=0.15, grasp_commit_fraction=1.0, approach_direction=tensor([0., 0., -1.]), approach_alignment_max_angle=None, downstream_object_target_poses=(), obj_upright_direction=None, rotate_upright=None, grasp_frame_to_eef=tensor([[1., 0., 0., 0.], [0., 1., 0., 0.], [0., 0., 1., 0.], [0., 0., 0., 1.]]), fixed_object_to_eef=None, grasp_variant='closest', approach_along_grasp_axis=False, cartesian_lift=False, target_axis=tensor([0., 0., 1.]), alignment_offset_m=tensor([0., 0., 0.]), alignment_twist_rad=0.0, *, initial_lift_height=0.0)
-
alignment_offset_m:
Tensor World translation from the lifted object centre,
(3,)or(B,3).This freezes a position realisation without changing the directed axis. Zero retains the original fixed-centre behavior.
-
alignment_twist_rad:
float|Tensor Rotation about the aligned world target axis after the shortest arc.
A scalar applies to every row; a tensor may be scalar or shaped
(B,). This chooses the otherwise free object heading without changing its directed axis goal. Zero preserves the shortest-arc realisation.
-
target_axis:
Tensor Desired world-frame axis, shape
(3,)or(B, 3).
- class embodichain.lab.sim.atomic_skills.CommandAckStatus[source]
Outcome reported by a command transport or controller.
Methods:
__new__(value)- __new__(value)
- class embodichain.lab.sim.atomic_skills.CommandAcknowledgement[source]
Synchronous acknowledgement returned by a
CommandSink.Methods:
__init__(status[, message])accepted_ack([message])Build an accepted acknowledgement.
Attributes:
Whether the controller accepted the requested operation.
Human-readable diagnostic intended for logs, not policy branching.
Transport/controller acknowledgement status.
- __init__(status, message='')
- property accepted: bool
Whether the controller accepted the requested operation.
- classmethod accepted_ack(message='')[source]
Build an accepted acknowledgement.
- Parameters:
message (
str) – Optional controller diagnostic.- Return type:
- Returns:
Accepted acknowledgement.
-
message:
str Human-readable diagnostic intended for logs, not policy branching.
-
status:
CommandAckStatus Transport/controller acknowledgement status.
- class embodichain.lab.sim.atomic_skills.CommandDispatch[source]
Auditable record of one controller operation and acknowledgement.
Methods:
__init__(operation, acknowledgement)- __init__(operation, acknowledgement)
- class embodichain.lab.sim.atomic_skills.CommandOperation[source]
Command-sink operation recorded by an execution runner.
Methods:
__new__(value)- __new__(value)
- class embodichain.lab.sim.atomic_skills.CommandSink[source]
Controller boundary used by
ExecutionRunner.Methods:
__init__(*args, **kwargs)cancel(targets, *, timeout)Cancel any controller-side command that has not completed.
hold(targets, context, *, timeout)Apply transport-specific safe state to the supplied targets.
send(command, *, timeout)Submit one synchronized endpoint-command frame.
- __init__(*args, **kwargs)
- cancel(targets, *, timeout)[source]
Cancel any controller-side command that has not completed.
- Parameters:
targets (
tuple[RuntimeEndpointTarget,...]) – Runtime targets whose queued work must be cancelled.timeout (
float) – Maximum acknowledgement latency in seconds.
- Return type:
- Returns:
Transport or controller acknowledgement.
- hold(targets, context, *, timeout)[source]
Apply transport-specific safe state to the supplied targets.
- Parameters:
targets (
tuple[RuntimeEndpointTarget,...]) – Runtime targets that may retain controller state.context (
PlanningContext) – Latest observation used by position-hold transports.timeout (
float) – Maximum acknowledgement latency in seconds.
- Return type:
- Returns:
Transport or controller acknowledgement.
- send(command, *, timeout)[source]
Submit one synchronized endpoint-command frame.
- Parameters:
command (
RuntimeCommandFrame) – Transport-neutral command frame with an active-row mask. The sink must actively neutralize inactive rows for every addressed target; omission is not a safe state for persistent controllers.timeout (
float) – Maximum acknowledgement latency in seconds.
- Return type:
- Returns:
Transport or controller acknowledgement.
- class embodichain.lab.sim.atomic_skills.CompiledTrajectory[source]
Offline compilation result for a sequence of action invocations.
Methods:
__init__(plan_success, trajectory, ...)segment(skill_index, name)Return action segment metadata shifted into compiled coordinates.
skill_waypoint_offset(skill_index)Return the global waypoint offset of one compiled action.
- __init__(plan_success, trajectory, skill_plans, projected_context)
- segment(skill_index, name)[source]
Return action segment metadata shifted into compiled coordinates.
- Return type:
TrajectorySegment
- skill_waypoint_offset(skill_index)[source]
Return the global waypoint offset of one compiled action.
- Return type:
int
- class embodichain.lab.sim.atomic_skills.CompletePlanBuilder[source]
Engine-owned candidate construction and selected-plan finalization.
Methods:
__init__(*args, **kwargs)finalize_selected(request, plan)Transform the selected candidate and qualify it without replanning.
plan_preview(request, context)Build an exact suffix under a private same-observation context.
- __init__(*args, **kwargs)
- finalize_selected(request, plan)[source]
Transform the selected candidate and qualify it without replanning.
Call once after selecting a candidate built with
apply_transform=False. Structural, velocity and action final-plan qualification remain enforced.- Return type:
- plan_preview(request, context)[source]
Build an exact suffix under a private same-observation context.
The original caller transform stays local to this complete planning call. The engine validates rows, observed robot, world/scene and request owner; no command, state commit or second compiler is created by a preview.
- Return type:
- class embodichain.lab.sim.atomic_skills.ContactGraspGoal[source]
Contact-only pickup at an observed TCP pose in the planning frame.
- Parameters:
grasp_xpos (
Tensor|SceneEntityPose) – Explicit or late-bound grasp pose. The host supplies physical evidence that the target remains pinched during lift. The goal does not project a fixed object-to-tool relationship.
Methods:
__init__(grasp_xpos)- __init__(grasp_xpos)
- class embodichain.lab.sim.atomic_skills.ContactPickUpGoal[source]
Approach, establish contact grasp and lift using an observed path source.
- Parameters:
source (
str) – Engine-local source identifier; its episode host retains ownership.phases (
tuple[ContactPhase,...]) – Bounded path containing exactly one grasp and its required evidence.
The source supplies physical acceptance; completion projects no rigid relation.
Methods:
__init__(source, phases)- __init__(source, phases)
- class embodichain.lab.sim.atomic_skills.ContactPlaceGoal[source]
Place a contact-held subject without projecting a rigid object/tool relation.
- Parameters:
source (
str) – Engine-local source that observes the existing physical grasp.phases (
tuple[ContactPhase,...]) – Bounded transport, release and retreat path, with no new grasp.
Methods:
__init__(source, phases)- __init__(source, phases)
- class embodichain.lab.sim.atomic_skills.ControlCommand[source]
Immutable-by-ownership command associated with one control part.
Command subclasses own their payload and must return another owned value from
snapshot(). This keeps engine profiles and resolved invocation requests isolated from caller-owned mutable tensors.Methods:
equivalent_to(other)Return whether
otherhas exactly the same command semantics.snapshot()Return an independently owned copy of this command.
- abstract equivalent_to(other)[source]
Return whether
otherhas exactly the same command semantics.- Return type:
bool
- abstract snapshot()[source]
Return an independently owned copy of this command.
- Return type:
- class embodichain.lab.sim.atomic_skills.ControlPartCommandProfile[source]
Reusable semantic commands for one named robot control part.
Profiles are registered once on
AtomicSkillEngine, keyed by names fromRobot.control_parts. They describe embodiment-specific meanings such asopen,grasporreadywithout coupling those values to an action implementation.Methods:
__init__([commands])joint_positions(**commands)Build a profile whose entries are joint-position commands.
snapshot()Return an independently owned profile snapshot.
- __init__(commands=<factory>)
- classmethod joint_positions(**commands)[source]
Build a profile whose entries are joint-position commands.
- Return type:
- snapshot()[source]
Return an independently owned profile snapshot.
- Return type:
- class embodichain.lab.sim.atomic_skills.CoordinatedHeldObjectState[source]
Observed or projected relation for an object held by two manipulators.
Methods:
__init__(semantics, left_object_to_eef, ...)- __init__(semantics, left_object_to_eef, right_object_to_eef, left_grasp_xpos, right_grasp_xpos, env_mask=None)
- class embodichain.lab.sim.atomic_skills.CoordinatedPickGoal[source]
Object-centric target for picking and moving one object with two hands.
The left/right grasp poses are not supplied by the caller; they are sampled by the parallel-jaw grasp-pose service at planning time using the dual-arm direction and approach direction declared on
CoordinatedPickmentOptions.Methods:
__init__(semantics, object_target_pose[, ...])Attributes:
object_initial_poseOptional initial object pose.
object_target_poseTarget pose for the shared object, shape
(4, 4)or(num_envs, 4, 4).- __init__(semantics, object_target_pose, object_initial_pose=None)
-
object_initial_pose:
Tensor|SceneEntityPose|None Optional initial object pose.
When omitted, the pose is grounded through the semantic object’s stable scene identity.
-
object_target_pose:
Tensor|SceneEntityPose Target pose for the shared object, shape
(4, 4)or(num_envs, 4, 4).
- class embodichain.lab.sim.atomic_skills.CoordinatedPickment[source]
Pick and move a single object pinched by two hands.
Classes:
GoalTypealias of
CoordinatedPickGoalOptionsTypealias of
CoordinatedPickmentOptionsAttributes:
binding_contractExplicit robot-independent requirements for semantic discovery.
skill_idStable registry identifier for this skill.
- GoalType
alias of
CoordinatedPickGoal
- OptionsType
alias of
CoordinatedPickmentOptions
- binding_contract: ClassVar[SkillBindingContract] = SkillBindingContract(slots=(SkillResourceSlot(slot_id='left', endpoints=(SkillEndpointRequirement(endpoint_id='motion', capabilities=frozenset({'kinematics.inverse', 'kinematics.batch_inverse'}), required_commands=mappingproxy({})), SkillEndpointRequirement(endpoint_id='grasp', capabilities=frozenset({'interaction.grasp'}), required_commands=mappingproxy({'open': <class 'embodichain.lab.sim.atomic_skills.control.JointPositionCommand'>, 'grasp': <class 'embodichain.lab.sim.atomic_skills.control.JointPositionCommand'>}))), constraints=(DisjointSlotEndpoints(endpoint_ids=('motion', 'grasp')),)), SkillResourceSlot(slot_id='right', endpoints=(SkillEndpointRequirement(endpoint_id='motion', capabilities=frozenset({'kinematics.inverse', 'kinematics.batch_inverse'}), required_commands=mappingproxy({})), SkillEndpointRequirement(endpoint_id='grasp', capabilities=frozenset({'interaction.grasp'}), required_commands=mappingproxy({'open': <class 'embodichain.lab.sim.atomic_skills.control.JointPositionCommand'>, 'grasp': <class 'embodichain.lab.sim.atomic_skills.control.JointPositionCommand'>}))), constraints=(DisjointSlotEndpoints(endpoint_ids=('motion', 'grasp')),))), constraints=(DisjointResourceSlots(slots=('left', 'right')),))
Explicit robot-independent requirements for semantic discovery.
Concrete action classes must declare this attribute in their own class body to opt into the semantic catalog. Inheriting another action’s contract does not silently expose a new skill identifier.
- skill_id: ClassVar[str] = 'coordinated_pickment'
Stable registry identifier for this skill.
- class embodichain.lab.sim.atomic_skills.CoordinatedPickmentOptions[source]
Per-invocation coordinated pickup behavior.
Left/right grasps are sampled from target-local affordance geometry by the engine’s parallel-jaw grasp-pose service. The dual-arm direction splits the object into left/right grasp regions and the approach direction filters the sampled antipodal pairs.
Methods:
__init__([object_motion_keyframes, ...])Attributes:
approach_directionWorld-frame direction used to sample and approach both grasps, shape
(3,).grasp_seedDeterministic seed isolated around coordinated grasp sampling.
hand_interp_stepsNumber of waypoints used for the simultaneous hand-close segment.
hold_stepsNumber of waypoints to hold the final object target pose.
left_to_right_arm_directionWorld-frame direction from the left arm base to the right arm base, shape
(3,).lift_heightWorld-Z lift distance before moving to the object target pose.
middle_empty_ratioFraction of the object's left-to-right extent left grasp-free in the middle so the two grippers pinch opposite ends.
object_motion_keyframesNumber of object-pose keyframes solved by IK before joint-space interpolation.
paired_object_to_eefInstallation-calibrated left/right TCP transforms in the rigid object's frame.
pre_grasp_distanceWorld distance to retreat from each grasp pose along negative TCP z.
releaseWhether both hands open after reaching the shared object target pose.
release_stepsNumber of waypoints used for the simultaneous hand-open segment.
retreat_distanceWorld-Z retreat distance after a coordinated release.
retreat_stepsNumber of waypoints used for the simultaneous post-release retreat.
- __init__(object_motion_keyframes=6, pre_grasp_distance=0.1, lift_height=0.08, hand_interp_steps=10, hold_steps=4, release=False, release_steps=10, retreat_distance=0.08, retreat_steps=12, approach_direction=tensor([0., 0., -1.]), left_to_right_arm_direction=tensor([1., 0., 0.]), middle_empty_ratio=0.4, grasp_seed=17393, paired_object_to_eef=None)
-
approach_direction:
Tensor World-frame direction used to sample and approach both grasps, shape
(3,).
-
grasp_seed:
int Deterministic seed isolated around coordinated grasp sampling.
-
hand_interp_steps:
int Number of waypoints used for the simultaneous hand-close segment.
-
hold_steps:
int Number of waypoints to hold the final object target pose.
-
left_to_right_arm_direction:
Tensor World-frame direction from the left arm base to the right arm base, shape
(3,). It partitions the object into left/right grasp regions and should be a finite, non-zero vector; it is normalized at planning time.
-
lift_height:
float World-Z lift distance before moving to the object target pose.
-
middle_empty_ratio:
float Fraction of the object’s left-to-right extent left grasp-free in the middle so the two grippers pinch opposite ends. Must be in
[0, 1).
-
object_motion_keyframes:
int Number of object-pose keyframes solved by IK before joint-space interpolation.
-
paired_object_to_eef:
Tensor|None Installation-calibrated left/right TCP transforms in the rigid object’s frame.
-
pre_grasp_distance:
float World distance to retreat from each grasp pose along negative TCP z.
-
release:
bool Whether both hands open after reaching the shared object target pose.
-
release_steps:
int Number of waypoints used for the simultaneous hand-open segment.
-
retreat_distance:
float World-Z retreat distance after a coordinated release.
-
retreat_steps:
int Number of waypoints used for the simultaneous post-release retreat.
- class embodichain.lab.sim.atomic_skills.CoordinatedPlacement[source]
Coordinate two held objects: support object below, placing object above.
Classes:
GoalTypealias of
CoordinatedPlacementGoalOptionsTypealias of
CoordinatedPlacementOptionsAttributes:
binding_contractExplicit robot-independent requirements for semantic discovery.
skill_idStable registry identifier for this skill.
- GoalType
alias of
CoordinatedPlacementGoal
- OptionsType
alias of
CoordinatedPlacementOptions
- binding_contract: ClassVar[SkillBindingContract] = SkillBindingContract(slots=(SkillResourceSlot(slot_id='placing', endpoints=(SkillEndpointRequirement(endpoint_id='motion', capabilities=frozenset({'motion.cartesian_pose'}), required_commands=mappingproxy({})), SkillEndpointRequirement(endpoint_id='grasp', capabilities=frozenset({'interaction.grasp'}), required_commands=mappingproxy({'open': <class 'embodichain.lab.sim.atomic_skills.control.JointPositionCommand'>, 'grasp': <class 'embodichain.lab.sim.atomic_skills.control.JointPositionCommand'>}))), constraints=(DisjointSlotEndpoints(endpoint_ids=('motion', 'grasp')),)), SkillResourceSlot(slot_id='support', endpoints=(SkillEndpointRequirement(endpoint_id='motion', capabilities=frozenset({'motion.cartesian_pose'}), required_commands=mappingproxy({})), SkillEndpointRequirement(endpoint_id='grasp', capabilities=frozenset({'interaction.grasp'}), required_commands=mappingproxy({'grasp': <class 'embodichain.lab.sim.atomic_skills.control.JointPositionCommand'>}))), constraints=(DisjointSlotEndpoints(endpoint_ids=('motion', 'grasp')),))), constraints=(DisjointResourceSlots(slots=('placing', 'support')),))
Explicit robot-independent requirements for semantic discovery.
Concrete action classes must declare this attribute in their own class body to opt into the semantic catalog. Inheriting another action’s contract does not silently expose a new skill identifier.
- skill_id: ClassVar[str] = 'coordinated_placement'
Stable registry identifier for this skill.
- class embodichain.lab.sim.atomic_skills.CoordinatedPlacementGoal[source]
Object-centric target for dual-arm coordinated placement.
Methods:
__init__(placing_object_target_pose, ...[, ...])Attributes:
placing_height_offsetWorld-Z offset above the placing object target pose.
placing_object_target_poseTarget pose for the object released by the placing arm.
releaseWhether the placing hand releases.
support_height_offsetWorld-Z offset above the support object target pose.
support_object_target_poseTarget pose for the object held by the support arm.
- __init__(placing_object_target_pose, support_object_target_pose, placing_height_offset=None, support_height_offset=None, release=None)
-
placing_height_offset:
float|None World-Z offset above the placing object target pose.
-
placing_object_target_pose:
Tensor|SceneEntityPose Target pose for the object released by the placing arm.
-
release:
bool|None Whether the placing hand releases.
Noneuses invocation options.
-
support_height_offset:
float|None World-Z offset above the support object target pose.
-
support_object_target_pose:
Tensor|SceneEntityPose Target pose for the object held by the support arm.
- class embodichain.lab.sim.atomic_skills.CoordinatedPlacementOptions[source]
Per-invocation coordinated placement behavior.
Methods:
__init__([release, placing_height_offset, ...])Attributes:
hand_interp_stepsNumber of waypoints for the placing-hand release interpolation.
hold_stepsNumber of waypoints to hold alignment before releasing.
lift_heightWorld-Z lift distance for the placing arm after release.
placing_height_offsetDefault World-Z offset above the placing object target pose.
releaseWhether to open the placing hand at the aligned placement pose.
retreat_stepsNumber of waypoints used for the placing-arm lift retreat.
support_height_offsetDefault World-Z offset above the support object target pose.
- __init__(release=True, placing_height_offset=0.0, support_height_offset=0.0, lift_height=0.08, hand_interp_steps=10, hold_steps=4, retreat_steps=16)
-
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.
-
placing_height_offset:
float Default World-Z offset above the placing object target pose.
-
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.
-
support_height_offset:
float Default World-Z offset above the support object target pose.
- class embodichain.lab.sim.atomic_skills.DemoSkillEvidenceProvider[source]
Host-owned acquisition port; no stepping or planned values as evidence.
Methods:
__init__(*args, **kwargs)observe(context)Acquire one synchronized measured frame for the active row.
- __init__(*args, **kwargs)
- observe(context)[source]
Acquire one synchronized measured frame for the active row.
- Return type:
- class embodichain.lab.sim.atomic_skills.DemoSkillGoal[source]
Pinned asset identity and logical scene roles, without hardware names.
Methods:
__init__(asset_sha256, role_bindings[, ...])- __init__(asset_sha256, role_bindings, role_uids=<factory>, terminal_semantics=None)
- class embodichain.lab.sim.atomic_skills.DemoSkillMonitor[source]
Latch failures and require every declared event and success predicate.
- Parameters:
artifact (
DemoSkillArtifact) – Frozen event, phase and predicate declarations.evidence_provider (
DemoSkillEvidenceProvider) – Independent measured observation port.
Methods:
__init__(artifact, evidence_provider)observe(context, sample_index, *[, terminal])Validate fresh measured state and latch failures before the next command.
- __init__(artifact, evidence_provider)[source]
- observe(context, sample_index, *, terminal=False)[source]
Validate fresh measured state and latch failures before the next command.
- Parameters:
context (
PlanningContext) – Exact robot observation and physical-row identity.sample_index (
int|None) – Last acknowledged local plan sample, None at entry.terminal (
bool) – Whether the execution session is at its effect boundary.
- Return type:
None
- class embodichain.lab.sim.atomic_skills.DemoSkillMotionProvider[source]
Instantiate same-robot motion and validate its measured execution.
- Parameters:
artifact (
DemoSkillArtifact) – One immutable exemplar with explicit adaptation authority.role_bindings (
Mapping[str,str]) – Logical role to scene entity identifiers.robot_geometry_sha256 (
str) – Identity captured from the live robot model.role_geometry_sha256 (
Mapping[str,str]) – Identities captured from live physical role geometry.evidence_provider (
DemoSkillEvidenceProvider) – Fresh measured contact/pose/task evidence.motion_generator (
object) – Engine-owned generator for Cartesian phases.plan_validator (
Callable[[TimedTrajectory],bool] |None) – Optional full-plan collision validator; required for an admitted physical expansion job, supplied by its source adapter.
Methods:
__init__(artifact, *, role_bindings, ...[, ...])bind_execution_plan(plan)Freeze the actual plan and remap monitors after authorized expansion.
execution_report()Return owned measured qualification and source lineage for persistence.
instantiate(request, context)Ground one frozen nominal path without stepping or changing task state.
observe_execution(context, sample_index, *, ...)Validate measured evidence before the runner submits its next frame.
owns_effect(request)Select only this invocation's explicit DemoSkill effect boundary.
verify_effect(context, request)Confirm the terminal boundary after all measured predicates pass.
- __init__(artifact, *, role_bindings, robot_geometry_sha256, role_geometry_sha256, evidence_provider, motion_generator, plan_validator=None)[source]
- bind_execution_plan(plan)[source]
Freeze the actual plan and remap monitors after authorized expansion.
- Parameters:
plan (
SkillPlan) – Engine-validated plan after the selected transformation.- Return type:
None
- execution_report()[source]
Return owned measured qualification and source lineage for persistence.
- Return type:
dict[str,object]
- instantiate(request, context)[source]
Ground one frozen nominal path without stepping or changing task state.
- Parameters:
request (
ResolvedSkillRequest) – Bound ExecuteDemoSkill invocation.context (
PlanningContext) – Current measured robot and scene state.
- Return type:
InstantiatedSkillMotion- Returns:
Full-robot timed motion preserving recorded gripper samples.
- observe_execution(context, sample_index, *, terminal)[source]
Validate measured evidence before the runner submits its next frame.
- Parameters:
context (
PlanningContext) – Fresh measured robot and scene observation.sample_index (
int|None) – Last acknowledged sample in the installed plan.terminal (
bool) – Whether the session is waiting for its terminal effect.
- Return type:
None
- owns_effect(request)[source]
Select only this invocation’s explicit DemoSkill effect boundary.
- Parameters:
request (
object) – Pending core verification request.- Return type:
bool- Returns:
Whether the request selects the DemoSkill terminal requirement.
- verify_effect(context, request)[source]
Confirm the terminal boundary after all measured predicates pass.
- Parameters:
context (
PlanningContext) – Fresh observation correlated with the pending request.request (
EffectVerificationRequest) – Core request whose identity must be retained.
- Return type:
- Returns:
Source-contract approval; the runner also preserves any external verifier required for nonempty symbolic state changes.
- class embodichain.lab.sim.atomic_skills.DemoSkillObservation[source]
Owned measurements aligned to one robot observation and physical row.
Missing contact pairs mean unavailable evidence, including for no-contact requirements.
metricsmust come from a task monitor of measured state.Methods:
__init__(timestamp, env_id, poses[, ...])- __init__(timestamp, env_id, poses, contacts=<factory>, metrics=<factory>)
- class embodichain.lab.sim.atomic_skills.DisjointResourceSlots[source]
Require selected slots to have pairwise-disjoint physical claims.
Methods:
__init__(slots)- __init__(slots)
- class embodichain.lab.sim.atomic_skills.DisjointSlotEndpoints[source]
Require selected endpoints within one participant to be disjoint.
Methods:
__init__(endpoint_ids)- __init__(endpoint_ids)
- class embodichain.lab.sim.atomic_skills.DynamicCollisionMode[source]
Policy for consuming a live dynamic collision world.
This mode controls scene-snapshot obstacle binding and collision-world revision recovery. It does not enable or disable a planner’s configured static-world or self-collision checks.
Attributes:
AUTOUse live collision entities when the selected motion strategy supports them.
OFFIgnore scene-snapshot collision entities and their revisions.
REQUIREDRequire live collision entities and a compatible motion planner.
Methods:
__new__(value)- AUTO = 'auto'
Use live collision entities when the selected motion strategy supports them.
- OFF = 'off'
Ignore scene-snapshot collision entities and their revisions.
- REQUIRED = 'required'
Require live collision entities and a compatible motion planner.
- __new__(value)
- class embodichain.lab.sim.atomic_skills.EffectExpectationResult[source]
Current-observation outcome for one physical state expectation.
inverse_satisfied_maskis stronger than contradiction: every clause must have reached its explicit inverse band for the monitor’s complete hysteresis window. It may therefore be used to retain a pre-existing relation during failure reconciliation, while a single contradictory clause may not.Methods:
__init__(expectation_id, satisfied_mask, ...)snapshot()Return an independently owned expectation outcome.
- __init__(expectation_id, satisfied_mask, contradicted_mask, inverse_satisfied_mask)
- snapshot()[source]
Return an independently owned expectation outcome.
- Return type:
EffectExpectationResult
- class embodichain.lab.sim.atomic_skills.EffectVerificationRequest[source]
Typed boundary describing a physical effect awaiting verification.
requested_atanddeadlineuse the same timestamp domain asRobotObservation. Request-mask shrinkage retains both values; only a newly installed plan starts a new attempt deadline.attempt_generationis session-local and remains stable when partial resolution or row deactivation replaces only the request ID.failure_invalidationis a core-owned removal-only delta; verification results may select failed rows on which to apply it but cannot replace it.Methods:
__init__(verification_id, skill_id, ...[, ...])snapshot()Return a request snapshot with an independently owned row mask.
- __init__(verification_id, skill_id, invocation_id, invocation_revision, invocation_index, attempt_generation, terminal_segment, requested_at, deadline, env_mask, expected_effects, effect_verification=None, failure_invalidation=<factory>)
- snapshot()[source]
Return a request snapshot with an independently owned row mask.
- Return type:
- class embodichain.lab.sim.atomic_skills.EffectVerificationRequirement[source]
Explicit physical-effect verification independent of symbolic state.
Presence of this value on an
SkillPlanforces a terminal effect boundary even when the plan declares noStateDelta. The openkindidentifier lets an external runtime select an appropriate verifier without placing backend-specific callbacks in the core plan.- Parameters:
kind (
str) – Stable, non-empty discriminator for the physical effect.
Methods:
- __init__(kind)
- snapshot()[source]
Return an independently owned requirement value.
- Return type:
- class embodichain.lab.sim.atomic_skills.EffectVerificationResult[source]
Correlated per-environment update for one effect boundary.
Rows absent from both
success_maskandfailure_maskremain unresolved.invalidation_maskandretry_maskclassify only failed rows: the former selects the request’s core-owned removal delta, while the latter authorizes replay of the same invocation. Failed rows outside the retry mask require external recovery. This lets one shared batch barrier commit verified rows while other rows continue observing the same physical effect.Methods:
__init__(verification_id, success_mask, ...)- __init__(verification_id, success_mask, failure_mask, invalidation_mask, retry_mask, expectation_results=())
- class embodichain.lab.sim.atomic_skills.EndEffectorPoseGoal[source]
End-effector pose goal with optional batched intermediate waypoints.
Methods:
__init__(xpos)Attributes:
xposHomogeneous pose with shape
(4,4),(B,4,4)or(B,N,4,4).- __init__(xpos)
-
xpos:
Tensor|SceneEntityPose Homogeneous pose with shape
(4,4),(B,4,4)or(B,N,4,4).
- class embodichain.lab.sim.atomic_skills.EndpointBinding[source]
One action-local endpoint resolved to a runtime controller target.
Methods:
__init__(slot_id, endpoint_id, resource_id, ...)command(name)Return one owned semantic-command snapshot.
joint_positions(name, *, num_envs, device[, ...])Resolve a named joint-position command for a planning batch.
require_target(target_type)Return the runtime target after an explicit type check.
snapshot()Return an independently owned endpoint-binding snapshot.
tracking_channel(channel_id)Return one independently owned typed tracking-channel binding.
with_commands(overrides)Return an endpoint snapshot with semantic-command overrides.
Attributes:
Return the transport-scoped physical destination key.
Return the action-local
(slot, endpoint)key.Symbolic task-state key; defaults to
target.target_id.- __init__(slot_id, endpoint_id, resource_id, adapter_id, target, task_state_key=None, tracking_channels=<factory>, capabilities=frozenset({}), commands=<factory>, claim_tokens=frozenset({}), joint_ids=())
- command(name)[source]
Return one owned semantic-command snapshot.
- Return type:
- property destination_key: tuple[str, str]
Return the transport-scoped physical destination key.
- joint_positions(name, *, num_envs, device, dtype=None)[source]
Resolve a named joint-position command for a planning batch.
- Return type:
Tensor
- property key: tuple[str, str]
Return the action-local
(slot, endpoint)key.
- require_target(target_type)[source]
Return the runtime target after an explicit type check.
- Return type:
TypeVar(TargetT, bound=RuntimeEndpointTarget)
- snapshot()[source]
Return an independently owned endpoint-binding snapshot.
- Return type:
-
task_state_key:
str|None Symbolic task-state key; defaults to
target.target_id.
- tracking_channel(channel_id)[source]
Return one independently owned typed tracking-channel binding.
- Return type:
EndpointTrackingChannelBinding
- with_commands(overrides)[source]
Return an endpoint snapshot with semantic-command overrides.
- Return type:
- class embodichain.lab.sim.atomic_skills.EndpointCommand[source]
One transport-compatible payload addressed to one runtime target.
- Parameters:
target (
RuntimeEndpointTarget) – Immutable destination resolved from an action endpoint.payload (
RuntimeCommandPayload) – Batched command value accepted by the target transport.
Methods:
Attributes:
Return the payload batch size.
Return the transport-scoped destination identifier.
Return the payload device.
Return the common target and payload transport identifier.
- __init__(target, payload)
- property batch_size: int
Return the payload batch size.
- property destination_key: tuple[str, str]
Return the transport-scoped destination identifier.
- property device: device
Return the payload device.
- snapshot()[source]
Return an independently owned endpoint command.
- Return type:
- property transport_id: str
Return the common target and payload transport identifier.
- class embodichain.lab.sim.atomic_skills.EndpointCommandRouter[source]
Route generic endpoint operations to exact registered transports.
The router implements
CommandSinkstructurally while avoiding a module-load dependency onrunner. Acknowledgement types are imported only when an operation is executed, which keeps the transport boundary safe to import while the runner imports this module.- Parameters:
transports (
Mapping[str,EndpointCommandTransport] |Iterable[EndpointCommandTransport]) – Either an exacttransport_id -> transportmapping or an iterable of transports from which that mapping is built. Mapping keys must exactly equal each value’s declaredtransport_id.- Raises:
TypeError – If a registration does not implement the transport contract.
ValueError – If an identifier is invalid, a mapping key is not exact, or the same transport identifier is registered more than once.
Methods:
__init__(transports)cancel(targets, *, timeout)Route cancellation by target transport.
hold(targets, context, *, timeout)Route an observed-state hold request by target transport.
send(frame, *, timeout)Route one synchronized command frame by transport identifier.
Attributes:
Return the immutable exact transport registry.
- __init__(transports)[source]
- cancel(targets, *, timeout)[source]
Route cancellation by target transport.
- Parameters:
targets (
tuple[RuntimeEndpointTarget,...]) – Runtime destinations whose outstanding commands are cancelled.timeout (
float) – Maximum acknowledgement latency for each transport.
- Return type:
- Returns:
Aggregated acknowledgement. It is accepted only when every addressed transport accepts cancellation.
- hold(targets, context, *, timeout)[source]
Route an observed-state hold request by target transport.
- Parameters:
targets (
tuple[RuntimeEndpointTarget,...]) – Runtime destinations to hold.context (
PlanningContext) – Fresh observation used by each transport to form its hold.timeout (
float) – Maximum acknowledgement latency for each transport.
- Return type:
- Returns:
Aggregated acknowledgement. It is accepted only when every addressed transport accepts its hold.
- send(frame, *, timeout)[source]
Route one synchronized command frame by transport identifier.
Dispatch is preflighted before any transport is called. An unknown transport or incompatible payload therefore rejects the whole frame without creating a partially dispatched operation.
- Parameters:
frame (
RuntimeCommandFrame) – Generic runtime command frame to split by transport.timeout (
float) – Maximum acknowledgement latency for each transport.
- Return type:
- Returns:
Aggregated acknowledgement. It is accepted only when every addressed transport accepts its local frame.
- property transports: Mapping[str, EndpointCommandTransport]
Return the immutable exact transport registry.
- class embodichain.lab.sim.atomic_skills.EndpointCommandTransport[source]
Backend that owns one kind of runtime endpoint command.
Implementations own live simulator entities, device clients, or controller handles. Runtime command values retain only immutable addressing and payload data, so they remain independent of those process-owned resources.
Methods:
__init__(*args, **kwargs)cancel(targets, *, timeout)Cancel outstanding commands for transport-local targets.
hold(targets, context, *, timeout)Hold transport-local targets at their observed state.
send(frame, *, timeout)Submit one transport-local command frame.
Attributes:
Return the runtime payload type accepted by
send().Return the exact identifier used to register this transport.
- __init__(*args, **kwargs)
- cancel(targets, *, timeout)[source]
Cancel outstanding commands for transport-local targets.
- Return type:
- hold(targets, context, *, timeout)[source]
Hold transport-local targets at their observed state.
- Return type:
- property payload_type: type[RuntimeCommandPayload]
Return the runtime payload type accepted by
send().
- send(frame, *, timeout)[source]
Submit one transport-local command frame.
Implementations must actively neutralize every inactive environment row for every addressed target. Silently skipping an inactive row is unsafe for persistent controllers such as base-velocity transports.
- Return type:
- property transport_id: str
Return the exact identifier used to register this transport.
- class embodichain.lab.sim.atomic_skills.EndpointTrackingChannelBinding[source]
Resolved source and projector for one endpoint tracking channel.
Methods:
__init__(channel_id, source, projector)snapshot()Return an independently owned channel binding.
Attributes:
route_fingerprintReturn the exact channel, source, and projector route identity.
- __init__(channel_id, source, projector)
- property route_fingerprint: tuple[str, Hashable, str, str]
Return the exact channel, source, and projector route identity.
- snapshot()[source]
Return an independently owned channel binding.
- Return type:
EndpointTrackingChannelBinding
- class embodichain.lab.sim.atomic_skills.EndpointTrackingFeedbackAddress[source]
Feedback address for one runtime endpoint and open tracking channel.
Methods:
__init__(target, channel_id)Attributes:
address_fingerprintReturn the endpoint- and channel-scoped address identity.
- __init__(target, channel_id)
- property address_fingerprint: Hashable
Return the endpoint- and channel-scoped address identity.
- class embodichain.lab.sim.atomic_skills.EntityState[source]
Scene entity state addressable by a stable entity identifier.
Methods:
__init__(pose[, confidence])- __init__(pose, confidence=1.0)
- class embodichain.lab.sim.atomic_skills.ExecuteDemoSkill[source]
Execute one demonstration contract as one planning/recovery boundary.
Classes:
GoalTypealias of
DemoSkillGoalOptionsTypealias of
SkillOptionsAttributes:
binding_contractExplicit robot-independent requirements for semantic discovery.
skill_idStable registry identifier for this skill.
- GoalType
alias of
DemoSkillGoal
- OptionsType
alias of
SkillOptions
- binding_contract: ClassVar[SkillBindingContract] = SkillBindingContract(slots=(SkillResourceSlot(slot_id='primary', endpoints=(SkillEndpointRequirement(endpoint_id='motion', capabilities=frozenset({'motion.joint_position'}), required_commands=mappingproxy({})), SkillEndpointRequirement(endpoint_id='grasp', capabilities=frozenset({'interaction.grasp'}), required_commands=mappingproxy({}))), constraints=(DisjointSlotEndpoints(endpoint_ids=('motion', 'grasp')),)),), constraints=())
Explicit robot-independent requirements for semantic discovery.
Concrete action classes must declare this attribute in their own class body to opt into the semantic catalog. Inheriting another action’s contract does not silently expose a new skill identifier.
- skill_id: ClassVar[str] = 'execute_demo_skill'
Stable registry identifier for this skill.
- class embodichain.lab.sim.atomic_skills.ExecutionClock[source]
Clock abstraction used for deterministic and simulation scheduling.
Methods:
__init__(*args, **kwargs)now()Return a monotonic timestamp in seconds.
sleep(duration)Wait or advance the execution backend by
durationseconds.- __init__(*args, **kwargs)
- now()[source]
Return a monotonic timestamp in seconds.
- Return type:
float- Returns:
Monotonic timestamp in seconds.
- sleep(duration)[source]
Wait or advance the execution backend by
durationseconds.- Parameters:
duration (
float) – Non-negative duration in seconds.- Return type:
None
- class embodichain.lab.sim.atomic_skills.ExecutionEvent[source]
One timestamped execution or recovery event.
Methods:
__init__(kind, timestamp, skill_id, ...[, ...])- __init__(kind, timestamp, skill_id, invocation_id, invocation_revision, invocation_index, env_mask, message='', segment_name=None, failure_code=None, retryable=None)
- class embodichain.lab.sim.atomic_skills.ExecutionEventKind[source]
Structured event categories emitted by
ExecutionSession.tick().Methods:
__new__(value)- __new__(value)
- class embodichain.lab.sim.atomic_skills.ExecutionPlanAttempt[source]
Owned inspection snapshot for one installed action plan.
Recovery can install several plans for one logical invocation. This value preserves the exact scene/collision revisions and trajectory structure of every installation, correlated with the session-local attempt generation and row-local recovery counters.
Methods:
__init__(attempt_generation, event_kind, ...)snapshot()Return an independently owned plan-attempt trace.
- __init__(attempt_generation, event_kind, planned_at, invocation_index, planned_mask, skill_retry_counts, replan_counts, request, plan)
- snapshot()[source]
Return an independently owned plan-attempt trace.
- Return type:
- class embodichain.lab.sim.atomic_skills.ExecutionPlanLifecycle[source]
Explicit host-owned logical-plan/adoption lifecycle, before dispatch.
Implementations may commit their own recovery state from an owned attempt. They cannot replace the installed plan or infer physical success. Abort notification invalidates external adoption/resources; it never steps physics or replaces the runner’s cancel-then-hold safe stop.
Methods:
__init__(*args, **kwargs)on_execution_aborted(reason)Invalidate host state once after cancellation or failure.
on_plan_installed(attempt)Consume an owned validated attempt before its first command.
- __init__(*args, **kwargs)
- on_execution_aborted(reason)[source]
Invalidate host state once after cancellation or failure.
- Parameters:
reason (
str) – Original failure or cancellation context after host safe stop.- Return type:
None
- on_plan_installed(attempt)[source]
Consume an owned validated attempt before its first command.
- Parameters:
attempt (
ExecutionPlanAttempt) – Installed plan identity, masks, and independently owned data.- Return type:
None
- class embodichain.lab.sim.atomic_skills.ExecutionRunner[source]
Connect an execution session to observation, controller, and time ports.
step()is non-blocking. It observes and advances the session only when the next command is due according toRuntimeCommandFrame.hold_duration.run_until_blocked()supplies the blocking loop for tutorials and simple applications. Controller rejection, timeout, observation failure, and session exceptions all trigger a best-effort cancel-then-hold sequence. Runner methods are designed for serialized event-loop use and are not thread-safe.- Parameters:
session (
ExecutionSession) – Stateful atomic-skill execution session.observation_provider (
ObservationProvider) – Source of fresh robot and scene observations.command_sink (
CommandSink) – Controller or simulation command boundary.clock (
ExecutionClock|None) – Optional scheduler clock. Defaults to monotonic wall time.cfg (
ExecutionRunnerCfg|None) – Optional acknowledgement, scheduling, and completion policy.physical_evidence_provider (
PhysicalEvidenceProvider|None) – Optional synchronized evidence source used by evidence-aware verifiers.
Methods:
__init__(session, observation_provider, ...)cancel([reason])Cancel controller work and hold the latest observed position.
deactivate_rows(env_mask, *, reason)Permanently deactivate environment rows owned by this runner.
revise_current(invocation)Stage a newer revision for the next scheduled observation boundary.
run_until_blocked(*[, effect_verifier, ...])Run with clock-driven waiting until terminal or effect verification blocks.
step(*[, effect_result, effect_verifier, ...])Perform one due observation/session/controller update without sleeping.
Attributes:
Number of active commands accepted by the sink.
Whether execution is waiting for an external semantic-effect result.
Return the latest collected evidence snapshot, if available.
Return the optional runtime physical-evidence provider.
Execution session advanced by this runner.
Current runner lifecycle status.
- __init__(session, observation_provider, command_sink, *, clock=None, cfg=None, physical_evidence_provider=None)[source]
- cancel(reason='Execution cancelled by caller.')[source]
Cancel controller work and hold the latest observed position.
- Parameters:
reason (
str) – Human-readable cancellation reason.- Return type:
- Returns:
Terminal runner step. The status is
cancelledonly when both cancel and hold are acknowledged; otherwise it isfailed.
- property command_count: int
Number of active commands accepted by the sink.
- deactivate_rows(env_mask, *, reason)[source]
Permanently deactivate environment rows owned by this runner.
The runner refreshes its cached effect boundary so a verifier cannot submit a result correlated with a request that deactivation replaced. In-flight controller work is neutralized for those rows by the next due command frame according to the
CommandSinkcontract.- Parameters:
env_mask (
Tensor) – Rows requested for deactivation.reason (
str) – Human-readable event message.
- Return type:
Tensor- Returns:
Owned mask of rows that changed from eligible to inactive.
- Raises:
RuntimeError – If the runner is already terminal.
TypeError – If
env_maskis not a tensor.ValueError – If the mask or reason is invalid.
- property effect_verification_pending: bool
Whether execution is waiting for an external semantic-effect result.
- property last_evidence: PhysicalEvidenceFrame | None
Return the latest collected evidence snapshot, if available.
- property physical_evidence_provider: PhysicalEvidenceProvider | None
Return the optional runtime physical-evidence provider.
- revise_current(invocation)[source]
Stage a newer revision for the next scheduled observation boundary.
Staging preserves the active frame deadline. When that deadline is due,
step()observes fresh state, atomically plans and installs the replacement, and dispatches its first command. The submitted invocation is resolved into an owned snapshot immediately, so later caller mutation cannot alter the staged revision.- Parameters:
invocation (
SkillInvocation) – Strictly newer revision of the active logical call.- Raises:
TypeError – If
invocationis not an SkillInvocation.RuntimeError – If this runner or its session is no longer running, or if a physical effect is awaiting verification.
ValueError – If session-level revision invariants are violated.
- Return type:
None
- run_until_blocked(*, effect_verifier=None, physical_effect_verifier=None, phase_effect_gate_verifier=None, physical_phase_effect_gate_verifier=None, held_object_guard_verifier=None, physical_held_object_guard_verifier=None, on_step=None, max_steps=100000)[source]
Run with clock-driven waiting until terminal or effect verification blocks.
- Parameters:
effect_verifier (
Callable[[PlanningContext,EffectVerificationRequest],EffectVerificationResult] |None) – Optional synchronous callback used on fresh due-cycle observations while effect verification is pending. Without one, the method returns the running boundary so the caller can verify externally.physical_effect_verifier (
Callable[[PlanningContext,PhysicalEvidenceFrame,EffectVerificationRequest],EffectVerificationResult] |None) – Evidence-aware alternative toeffect_verifier, receiving the synchronized evidence frame.phase_effect_gate_verifier (
Callable[[PlanningContext,PhaseEffectGateRequest],PhaseEffectGateResult] |None) – Optional synchronous callback used on fresh observations while a trajectory-segment entry is gated.physical_phase_effect_gate_verifier (
Callable[[PlanningContext,PhysicalEvidenceFrame,PhaseEffectGateRequest],PhaseEffectGateResult] |None) – Evidence-aware alternative tophase_effect_gate_verifier.held_object_guard_verifier (
Callable[[PlanningContext,HeldObjectGuardRequest],HeldObjectGuardResult|None] |None) – Optional synchronous phase-aware held-object verifier used before every due command cycle.physical_held_object_guard_verifier (
Callable[[PlanningContext,PhysicalEvidenceFrame,HeldObjectGuardRequest],HeldObjectGuardResult|None] |None) – Evidence-aware alternative toheld_object_guard_verifier.on_step (
Callable[[RunnerStep],None] |None) – Optional callback for tracing or tutorial visualization.max_steps (
int) – Hard bound on loop iterations.
- Return type:
- Returns:
Terminal step, or a running step blocked on external verification.
- property session: ExecutionSession
Execution session advanced by this runner.
Call
revise_current()ordeactivate_rows()on the runner, rather than mutating the session directly, while this runner owns scheduling.
- property status: RunnerStatus
Current runner lifecycle status.
- step(*, effect_result=None, effect_verifier=None, physical_effect_verifier=None, phase_effect_gate_result=None, phase_effect_gate_verifier=None, physical_phase_effect_gate_verifier=None, held_object_guard_verifier=None, physical_held_object_guard_verifier=None)[source]
Perform one due observation/session/controller update without sleeping.
- Parameters:
effect_result (
EffectVerificationResult|None) – Optional correlated effect result. If this call occurs before the next cycle is due, it is not consumed and must be supplied again on a later call. A monitored nominal source must also approve this result. Once an explicit result is supplied, unresolved rows continue waiting for a host update.effect_verifier (
Callable[[PlanningContext,EffectVerificationRequest],EffectVerificationResult] |None) – Optional synchronous verifier for the current pending request. It runs after a fresh due-cycle observation and before the session consumes the result. It is not called after the request deadline. Mutually exclusive witheffect_resultandphysical_effect_verifier.physical_effect_verifier (
Callable[[PlanningContext,PhysicalEvidenceFrame,EffectVerificationRequest],EffectVerificationResult] |None) – Evidence-aware alternative toeffect_verifier. It receives the fresh evidence frame collected by this runner and is mutually exclusive witheffect_result.phase_effect_gate_result (
PhaseEffectGateResult|None) – Optional externally produced result for the current blocking trajectory-segment entry gate.phase_effect_gate_verifier (
Callable[[PlanningContext,PhaseEffectGateRequest],PhaseEffectGateResult] |None) – Optional synchronous verifier for the current gate. It runs on a fresh due-cycle observation and is mutually exclusive withphase_effect_gate_resultandphysical_phase_effect_gate_verifier.physical_phase_effect_gate_verifier (
Callable[[PlanningContext,PhysicalEvidenceFrame,PhaseEffectGateRequest],PhaseEffectGateResult] |None) – Evidence-aware alternative tophase_effect_gate_verifier. It is mutually exclusive withphase_effect_gate_result.held_object_guard_verifier (
Callable[[PlanningContext,HeldObjectGuardRequest],HeldObjectGuardResult|None] |None) – Optional synchronous phase-aware verifier. It receives a fresh observation and the current command-phase request beforeExecutionSession.tick()and command dispatch. ReturningNonemeans the current phase has no applicable held-object guard.physical_held_object_guard_verifier (
Callable[[PlanningContext,PhysicalEvidenceFrame,HeldObjectGuardRequest],HeldObjectGuardResult|None] |None) – Evidence-aware alternative toheld_object_guard_verifier.
- Return type:
- Returns:
Runner status, optional session tick, controller acknowledgements, and time remaining before another update is due.
- class embodichain.lab.sim.atomic_skills.ExecutionRunnerCfg[source]
Transport and scheduling policy for an
ExecutionRunner.Methods:
__init__([command_timeout, ...])copy(**kwargs)Return a new object replacing specified fields with new values.
replace(**kwargs)Return a new object replacing specified fields with new values.
to_dict()Convert an object into dictionary recursively.
validate([prefix])Check the validity of configclass object.
Attributes:
Maximum time allowed for a command acknowledgement.
Whether to hold observed state while terminal effects are pending.
Whether to issue a final hold after the session completes.
Minimum delay between feedback cycles, including passive hold cycles.
Maximum time allowed for each cancel or hold acknowledgement.
- __init__(command_timeout=<factory>, safe_stop_timeout=<factory>, minimum_cycle_time=<factory>, hold_on_completion=<factory>, hold_during_effect_verification=<factory>)
-
command_timeout:
float Maximum time allowed for a command acknowledgement.
- copy(**kwargs)
Return a new object replacing specified fields with new values.
This is especially useful for frozen classes. Example usage:
@configclass(frozen=True) class C: x: int y: int c = C(1, 2) c1 = c.replace(x=3) assert c1.x == 3 and c1.y == 2
- Parameters:
obj (
object) – The object to replace.**kwargs – The fields to replace and their new values.
- Return type:
object- Returns:
The new object.
-
hold_during_effect_verification:
bool Whether to hold observed state while terminal effects are pending.
Disable this only for persistent transports whose last accepted command remains active without refresh, such as a position-controlled gripper that must retain contact preload. Failure and cancellation still perform the normal cancel-then-observed-hold safe stop.
-
hold_on_completion:
bool Whether to issue a final hold after the session completes.
-
minimum_cycle_time:
float Minimum delay between feedback cycles, including passive hold cycles.
- replace(**kwargs)
Return a new object replacing specified fields with new values.
This is especially useful for frozen classes. Example usage:
@configclass(frozen=True) class C: x: int y: int c = C(1, 2) c1 = c.replace(x=3) assert c1.x == 3 and c1.y == 2
- Parameters:
obj (
object) – The object to replace.**kwargs – The fields to replace and their new values.
- Return type:
object- Returns:
The new object.
-
safe_stop_timeout:
float Maximum time allowed for each cancel or hold acknowledgement.
- to_dict()
Convert an object into dictionary recursively.
Note
Ignores string names starting with “__” (i.e. built-in methods). Non-string mapping keys retain their original type.
- Parameters:
obj (
object) – An instance of a class to convert.- Raises:
ValueError – When input argument is not an object.
- Return type:
dict[Any,Any]- Returns:
Converted dictionary mapping.
- 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.
- class embodichain.lab.sim.atomic_skills.ExecutionSession[source]
Execute grounded invocations incrementally with bounded local recovery.
The session never steps a simulator itself. Each
tick()consumes the latest observation and scene snapshot and emits at most one synchronized endpoint-command frame. A declared physical-effect boundary resolves only after the caller supplies a correlatedEffectVerificationResult, and non-empty expected symbolic effects are committed for accepted rows only. Higher-level runtimes decide how to produce that result from their configured monitor selection.Environment eligibility and recovery budgets are tracked per row. The waypoint cursor is batch-synchronized: a recoverable row replans the active cohort from the latest observation and restarts the action trajectory. Calls that mutate the session must be serialized by its owner; the session does not provide thread synchronization. A rejected installation blocks further ticks and revisions until the host completes its normal safe stop and invalidates the lifecycle; catching that rejection cannot resume commands.
Methods:
__init__(engine, invocations, context, *[, ...])abort_plan_lifecycle(reason)Invalidate an explicit lifecycle once and stop its further execution.
deactivate_rows(env_mask, *, reason)Permanently remove selected rows from this invocation sequence.
revise_current(invocation, *[, context])Replace and replan the current invocation with a newer revision.
tick(context, *[, effect_result, ...])Advance execution by one observation/command cycle.
trajectory_segment(name)Return named segment metadata for the active action plan.
Attributes:
Return an owned snapshot of the active action command sequence.
Return owned effect candidates for frequent physical monitoring.
Return owned active effects without copying trajectory commands.
Return an independently owned snapshot of the active action plan.
Whether the current physical effect still requires verification.
Rows still eligible to complete the full invocation sequence.
Describe the phase that must be checked before the next command.
Return the source plan and waypoint for the latest command tick.
Latest validated context with the session's verified task state.
Return the optional source-owned measured-execution monitor.
Owned snapshot of the current effect boundary, when present.
Return the blocking gate at the next trajectory-segment entry.
Return every installed plan in deterministic recovery order.
Current session status.
Verified symbolic task state accumulated by this session.
- __init__(engine, invocations, context, *, eligible_mask=None, plan_transform=None, nominal_source=None, plan_lifecycle=None)[source]
- abort_plan_lifecycle(reason)[source]
Invalidate an explicit lifecycle once and stop its further execution.
The runner calls this after cancel/hold; construction-error hosts may call it before any runner exists. This method never issues commands or steps physics. No lifecycle retains the existing default session behavior.
- Parameters:
reason (
str) – Failure or cancellation context retained by the host owner.- Return type:
str|None- Returns:
A cleanup diagnostic if the owner raised, otherwise None. Cleanup failure does not reactivate the session or permit another dispatch.
- property active_commands: TimedCommandSequence
Return an owned snapshot of the active action command sequence.
This inspection surface is intended for diagnostics and visualization. Mutating the returned tensors cannot affect execution state.
- property active_effect_candidates: StateDelta
Return owned effect candidates for frequent physical monitoring.
- Returns:
Independently owned candidate updates for the current plan.
- property active_expected_effects: StateDelta
Return owned active effects without copying trajectory commands.
- Returns:
Independently owned expected symbolic updates for the current plan.
- property active_plan: SkillPlan
Return an independently owned snapshot of the active action plan.
This is a read-only diagnostics boundary for runtime metadata, visualization, and tests. Planning and recovery remain session-owned; mutating any tensor in the returned value cannot affect execution.
- deactivate_rows(env_mask, *, reason)[source]
Permanently remove selected rows from this invocation sequence.
Deactivation is sticky across action barriers and recovery replans. The next emitted command frame marks those rows inactive so the command sink can apply target-specific safe hold behavior.
- Parameters:
env_mask (
Tensor) – Rows requested for deactivation.reason (
str) – Human-readable event message.
- Return type:
Tensor- Returns:
Owned mask of rows that changed from eligible to inactive.
- Raises:
RuntimeError – If the session is already terminal.
ValueError – If
reasonis empty or the mask shape is invalid.
- property effect_verification_pending: bool
Whether the current physical effect still requires verification.
- property eligible_mask: Tensor
Rows still eligible to complete the full invocation sequence.
This is deliberately not named
success_mask: while the session is running, eligibility does not imply that execution or semantic effects have succeeded.
- property held_object_guard_request: HeldObjectGuardRequest | None
Describe the phase that must be checked before the next command.
The request remains available while terminal acceptance is settling, using the final waypoint and segment identity. Once terminal physical effect verification begins, that verifier owns the boundary and this property returns
None.- Returns:
Owned phase-aware guard request, or
Nonewhen no command-phase guard is active.
- property last_commanded_plan_sample: tuple[str | None, int] | None
Return the source plan and waypoint for the latest command tick.
The value is cleared at each tick and does not imply that a host has consumed the command; controller acknowledgements and Gym steps remain separate boundaries.
- property latest_context: PlanningContext
Latest validated context with the session’s verified task state.
- property nominal_motion_monitor: MonitoredNominalMotionSource | None
Return the optional source-owned measured-execution monitor.
- property pending_effect: EffectVerificationRequest | None
Owned snapshot of the current effect boundary, when present.
- property phase_effect_gate_request: PhaseEffectGateRequest | None
Return the blocking gate at the next trajectory-segment entry.
- Returns:
Owned request snapshot, or
Nonewhen the next command is not blocked by a physical-effect gate.
- property plan_attempts: tuple[ExecutionPlanAttempt, ...]
Return every installed plan in deterministic recovery order.
The initial plan has generation zero. Each invocation revision, recovery replan, or whole-action retry appends a new generation instead of replacing earlier scene/collision evidence.
- revise_current(invocation, *, context=None)[source]
Replace and replan the current invocation with a newer revision.
The replacement is resolved into a new immutable request snapshot from
contextor the session’s latest observation. Retry and replan budgets restart for the new revision, while verified task state, the current batch barrier, and per-environment eligibility are preserved. Ordinary recovery replans continue to reuse this snapshot until another explicit revision. Once the action owns runtime destinations, the replacement must preserve their exact address fingerprints; changing controllers or safe-hold footprints requires a new invocation.- Parameters:
invocation (
SkillInvocation) – Grounded replacement for the currently active skill. Itsrevisionmust be strictly greater than the active one, and itsskill_idandinvocation_idmust identify the same logical call.context (
PlanningContext|None) – Optional fresh observation used to ground the replacement. A manually ticked caller may omit it to reuselatest_context. Runner-driven code stages revisions onExecutionRunner, which supplies a due-time observation.
- Raises:
TypeError – If
invocationis not an SkillInvocation.RuntimeError – If the session is no longer running or a physical effect is awaiting verification.
ValueError – If the replacement identifies another invocation or does not advance the revision, or if its plan changes the active runtime target addresses.
- Return type:
None
- property status: ExecutionStatus
Current session status.
- property task_state: TaskState
Verified symbolic task state accumulated by this session.
- tick(context, *, effect_result=None, phase_effect_gate_result=None, held_object_guard_result=None)[source]
Advance execution by one observation/command cycle.
- Parameters:
context (
PlanningContext) – Latest measured robot and versioned scene state. Its task state is replaced by the session’s verified task state.effect_result (
EffectVerificationResult|None) – Optional correlated semantic-effect result for an action waiting at its terminal waypoint.phase_effect_gate_result (
PhaseEffectGateResult|None) – Optional correlated physical-effect decision for a blocked trajectory-segment entry.held_object_guard_result (
HeldObjectGuardResult|None) – Optional correlated in-flight held-object loss result for the current waypoint phase.Nonemeans the verifier found no applicable guard for this phase or no result was supplied.
- Return type:
- Returns:
Status, optional command, events, and current verified task state.
- trajectory_segment(name)[source]
Return named segment metadata for the active action plan.
Segment ranges are action-local and may change after a replan when a backend preserves its own sample count.
- Return type:
TrajectorySegment
- class embodichain.lab.sim.atomic_skills.ExecutionStatus[source]
Lifecycle status of an execution session.
Methods:
__new__(value)- __new__(value)
- class embodichain.lab.sim.atomic_skills.ExecutionTick[source]
Result returned after one closed-loop execution update.
Methods:
__init__(status, eligible_mask, command, ...)- __init__(status, eligible_mask, command, hold_targets, events, task_state, pending_effect=None, pending_phase_effect_gate=None)
- class embodichain.lab.sim.atomic_skills.FeedbackTerminalAcceptance[source]
Terminal acceptance proven by typed endpoint feedback.
Methods:
__init__(metrics[, settle_timeout, ...])- __init__(metrics, settle_timeout=0.0, consecutive_acceptances=1)
- class embodichain.lab.sim.atomic_skills.GraspGoal[source]
Pickup target with an affordance-selected or supplied grasp pose.
Methods:
__init__(semantics[, grasp_xpos, object_pose])Attributes:
grasp_xposOptional end-effector grasp pose.
object_poseOptional explicit object pose used for grasp planning.
- __init__(semantics, grasp_xpos=None, object_pose=None)
-
grasp_xpos:
Tensor|SceneEntityPose|None Optional end-effector grasp pose.
When omitted,
PickUpuses the configured fixed object-relative grasp when available, otherwise it selects one from the target affordance. An explicit tensor or late-boundSceneEntityPoseskips grasp sampling. Late-bound poses also declare the scene dependency used by closed-loop execution recovery.
-
object_pose:
Tensor|SceneEntityPose|None Optional explicit object pose used for grasp planning.
When omitted,
PickUpresolves the object’s pose from the scene snapshot identified byObjectSemantics.entity_id. Supplying a tensor is useful for vectorized benchmark runs: use one(4, 4)pose for every environment or a(num_envs, 4, 4)tensor with one pose per environment. No extra candidate dimension is introduced here; the environment batch itself represents the independent pose trials.A
SceneEntityPosecan also be supplied when the pose should be resolved from another scene entity. The explicit pose is only a planning input; it does not mutate the simulator object.
- class embodichain.lab.sim.atomic_skills.GraspOpeningTarget[source]
Already-grounded support and object poses from the closing observation.
- Parameters:
support_uid (
str) – Exact native rigid support UID selected by the caller.reference_pose (
ndarray|Tensor) – Support-to-world pose, shape (4, 4), copied to CPU float64.object_target_pose (
ndarray|Tensor) – Final placed-object-to-world pose, shape (4, 4), copied to CPU float64. Tensor inputs are detached without changing the input.scope (
NativeQueryScope) – Must equal the closing query’s fresh preparation scope.identity (
Mapping[str,object]) – Optional neutral diagnostic IDs; never runtime or program objects.
Methods:
__init__(support_uid, reference_pose, ...[, ...])- __init__(support_uid, reference_pose, object_target_pose, scope, identity=<factory>)
- class embodichain.lab.sim.atomic_skills.HandOver[source]
Pick an object with the nearer arm and transfer it to the other arm.
For each environment, the action chooses the arm whose root link is closer to the observed object pose. It samples at most 1000 mesh-surface points and applies SVD in the current object pose to find
obj_longest_axis. When that axis is closer to world Z than to the horizontal plane, both grasp the pickup approaches diagonally downward. Otherwise pickup is world-Z downward. The receiver approaches diagonally from its own TCP side when horizontal separation is available, keeping its wrist outside the source hand’s vertical envelope.For a free object, the first arm grasps the projected end of
obj_longest_axisnearest its current TCP. For an existing hold, that source grasp is inherited from the preceding action and the receiving arm uses the configured center, top, or bottom region at the predicted middle object pose. A center request is filtered to the object’s middle third; top and bottom requests let Semantic Call look-ahead reserve the opposite source end.After each grasp waypoint, subsequent EEF waypoints preserve that grasp rotation and change translation only. The released source TCP first retraces its grasp approach; transfer-only execution additionally lifts it. With
release_at_target=True, the receiving arm additionally moves horizontally at handover height, lowers to the final target pose, and releases and withdraws the open receiver before settling. Transfer-only mode stops with the receiving arm recorded as the verified holder for a later Semantic Call.Classes:
GoalTypealias of
HandOverGoalOptionsTypealias of
HandOverOptionsAttributes:
binding_contractExplicit robot-independent requirements for semantic discovery.
open_loopWhether the skill intentionally declares no verified physical effect.
skill_idStable registry identifier for this skill.
- GoalType
alias of
HandOverGoal
- OptionsType
alias of
HandOverOptions
- binding_contract: ClassVar[SkillBindingContract] = SkillBindingContract(slots=(SkillResourceSlot(slot_id='source', endpoints=(SkillEndpointRequirement(endpoint_id='motion', capabilities=frozenset({'motion.cartesian_pose', 'kinematics.forward'}), required_commands=mappingproxy({})), SkillEndpointRequirement(endpoint_id='grasp', capabilities=frozenset({'interaction.grasp'}), required_commands=mappingproxy({'open': <class 'embodichain.lab.sim.atomic_skills.control.JointPositionCommand'>, 'grasp': <class 'embodichain.lab.sim.atomic_skills.control.JointPositionCommand'>}))), constraints=(DisjointSlotEndpoints(endpoint_ids=('motion', 'grasp')),)), SkillResourceSlot(slot_id='destination', endpoints=(SkillEndpointRequirement(endpoint_id='motion', capabilities=frozenset({'motion.cartesian_pose', 'kinematics.forward'}), required_commands=mappingproxy({})), SkillEndpointRequirement(endpoint_id='grasp', capabilities=frozenset({'interaction.grasp'}), required_commands=mappingproxy({'open': <class 'embodichain.lab.sim.atomic_skills.control.JointPositionCommand'>, 'grasp': <class 'embodichain.lab.sim.atomic_skills.control.JointPositionCommand'>}))), constraints=(DisjointSlotEndpoints(endpoint_ids=('motion', 'grasp')),))), constraints=(DisjointResourceSlots(slots=('source', 'destination')),))
Explicit robot-independent requirements for semantic discovery.
Concrete action classes must declare this attribute in their own class body to opt into the semantic catalog. Inheriting another action’s contract does not silently expose a new skill identifier.
- open_loop: ClassVar[bool] = True
Whether the skill intentionally declares no verified physical effect.
- skill_id: ClassVar[str] = 'hand_over'
Stable registry identifier for this skill.
- class embodichain.lab.sim.atomic_skills.HandOverGoal[source]
Object to pick and hand over, plus its final object pose.
Methods:
__init__(semantics, target_pose)Attributes:
target_poseFinal object pose after the receiving arm lowers and releases it.
- __init__(semantics, target_pose)
- target_pose: PoseGoalValue
Final object pose after the receiving arm lowers and releases it.
- class embodichain.lab.sim.atomic_skills.HandOverOptions[source]
Per-invocation pick-up, handover, and placement behavior.
Methods:
__init__([pre_grasp_distance, lift_height, ...])Attributes:
arm_selectionHow the transfer participant is selected.
grasp_retract_distanceBack off sampled grasp TCPs along their approach axis, in metres.
hand_interp_stepsWaypoints used by every gripper open/close interpolation.
hold_stepsClosed-hand waypoints used to settle a receiving grasp.
lift_heightWorld-Z distance used to lift the object after the first grasp.
pre_grasp_distanceDistance from each grasp pose to its approach pose, in metres.
receive_pick_object_partObject end selected by the receiving gripper for an existing hold.
release_at_targetWhether the receiving hand places and releases after the transfer.
retreat_distanceDistance retraced opposite the source TCP approach before lifting.
retreat_stepsWaypoints used while the source hand retreats after release.
- __init__(pre_grasp_distance=0.1, lift_height=0.1, hand_interp_steps=10, hold_steps=4, retreat_steps=20, retreat_distance=0.1, receive_pick_object_part='bottom', release_at_target=True, arm_selection='nearest', *, grasp_retract_distance=0.0)
-
arm_selection:
Literal['nearest','bound'] How the transfer participant is selected.
"nearest"preserves the low-level Atomic Skill default for direct callers. Semantic Task Program bindings should select"bound"so the explicitsourceanddestinationresource slots are authoritative.
-
grasp_retract_distance:
float Back off sampled grasp TCPs along their approach axis, in metres.
-
hand_interp_steps:
int Waypoints used by every gripper open/close interpolation.
-
hold_steps:
int Closed-hand waypoints used to settle a receiving grasp.
-
lift_height:
float World-Z distance used to lift the object after the first grasp.
-
pre_grasp_distance:
float Distance from each grasp pose to its approach pose, in metres.
-
receive_pick_object_part:
Literal['center','top','bottom'] Object end selected by the receiving gripper for an existing hold.
-
release_at_target:
bool Whether the receiving hand places and releases after the transfer.
When false, execution ends after the source hand opens and the receiving resource remains the verified holder. This supports a semantic handover followed by a later Place call without moving that workflow into Task Engine.
-
retreat_distance:
float Distance retraced opposite the source TCP approach before lifting.
-
retreat_steps:
int Waypoints used while the source hand retreats after release.
- class embodichain.lab.sim.atomic_skills.HeldObjectGuardRequest[source]
Describe the next in-flight command boundary for held-object checks.
A request is correlated to one installed action-plan attempt and one next waypoint. The named segment lets an external verifier select phase-aware physical evidence without teaching the execution core skill-specific phases.
deadlineuses the observation timestamp domain.Methods:
__init__(verification_id, skill_id, ...)snapshot()Return an independently owned guard request.
- __init__(verification_id, skill_id, invocation_id, invocation_revision, invocation_index, attempt_generation, next_waypoint_index, segment_name, env_mask, allowed_held_object_relations, allowed_coordinated_held_object_relations, deadline)
- snapshot()[source]
Return an independently owned guard request.
- Return type:
HeldObjectGuardRequest- Returns:
Request with an independently owned environment mask.
- class embodichain.lab.sim.atomic_skills.HeldObjectGuardResult[source]
Correlated in-flight held-object loss and recovery decision.
state_invalidationmay only remove single-resource or coordinated held-object relations. It is applied tofailure_maskbefore recovery planning, so a retry always observes reconciled symbolic state.Methods:
__init__(verification_id, object_id, ...[, ...])- __init__(verification_id, object_id, attempt_generation, invocation_index, next_waypoint_index, failure_mask, state_invalidation, retry_mask, message='')
- class embodichain.lab.sim.atomic_skills.HeldObjectPoseGoal[source]
Desired pose for the object held by this action’s control part.
Methods:
__init__(object_target_pose[, ...])Attributes:
object_idOptional exact held-object identity and retained-attachment effect.
object_target_poseObject target pose or ordered waypoints.
world_yaw_freePermit world-Z yaw changes at the final waypoint, retaining its position.
- __init__(object_target_pose, world_yaw_free=False, *, object_id=None)
-
object_id:
str|None Optional exact held-object identity and retained-attachment effect.
Named goals reject another held object before planning and request terminal effect verification without changing its verified attachment transform. Omission retains the existing effectless transport contract.
-
object_target_pose:
Tensor|SceneEntityPose Object target pose or ordered waypoints.
Accepts
(4, 4),(num_envs, 4, 4)or(num_envs, n_waypoint, 4, 4); every waypoint retains the held grasp.
-
world_yaw_free:
bool Permit world-Z yaw changes at the final waypoint, retaining its position.
Intermediate waypoints remain exact. Planning tries the nominal heading first, then seven 45-degree heading alternatives; each complete path must pass the motion generator’s normal checks. This is not an exhaustive search.
- class embodichain.lab.sim.atomic_skills.HeldObjectState[source]
Observed or projected relation between an object and one manipulator.
Methods:
__init__(semantics, object_to_eef, grasp_xpos)Attributes:
Environments in which the relation is active.
End-effector grasp pose.
Object-to-end-effector transform.
Semantics of the held object.
- __init__(semantics, object_to_eef, grasp_xpos, env_mask=None)
-
env_mask:
Tensor|None Environments in which the relation is active.
-
grasp_xpos:
Tensor End-effector grasp pose.
-
object_to_eef:
Tensor Object-to-end-effector transform.
-
semantics:
ObjectSemantics Semantics of the held object.
- class embodichain.lab.sim.atomic_skills.InFlightTrackingPolicy[source]
Feedback checks used while a command sequence is still in flight.
Methods:
__init__(metrics[, consecutive_violations, ...])- __init__(metrics, consecutive_violations=1, grace_period=0.0)
- class embodichain.lab.sim.atomic_skills.InstantiatedSkillMotion[source]
An external full-joint motion with explicit skill-stage boundaries.
The skill owns semantic effects and command assembly. A source cannot commit held state or step the environment.
grasp_poseis an optional world-frame candidate used by skills with an acquisition boundary. IK smoothing records both its total iterations and any hold-phase feasibility iterations. Those adjustments precede the frozen plan used by trajectory expansion.Methods:
__init__(trajectory, success, ...[, ...])provenance()Return stable source evidence for the assembled plan.
- __init__(trajectory, success, segment_lengths, initial_qpos, source_id, source_revision, unit_id, origin, authority='qpos', collision_evidence='unverified', pose_origin='unknown', qpos_semantics='unknown', source_command_semantics=None, fk_position_error_m=None, fk_rotation_error_rad=None, gripper_mode='recorded', initial_state_origin='unknown', calibration_revision='unverified', annotation_revision='unverified', prototype_sha256=None, source_time_map=None, source_sample_offset=0, ik_smoothing_iterations=0, ik_hold_smoothing_iterations=0, object_supported_regrasp=False, semantic_anchor_position_correction_m=0.0, semantic_anchor_rotation_correction_rad=0.0, phase_permissions=<factory>, grasp_pose=None, joint_names=(), refinement_report=<factory>, refinement_original_tcp=None, refinement_target_tcp=None)
- provenance()[source]
Return stable source evidence for the assembled plan.
- Return type:
dict[str,object]
- class embodichain.lab.sim.atomic_skills.InteractionPoints[source]
Batch of 3D interaction points on an object surface.
Methods:
__init__([object_label, custom_config, ...])get_approach_direction(point_idx)Get recommended approach direction for a given point.
get_batch_size()Return the number of interaction points in this affordance.
get_points_by_type(point_type)Get points by their interaction type.
sample_poses(target_pose, *, sampling, env_ids)Sample local contact points and their inward-facing frames.
Attributes:
custom_configUser-defined configuration payload.
normalsOptional surface normals at each interaction point with shape [B, 3].
point_typesOptional labels for each point's interaction type.
pointsBatch of 3D interaction points with shape [B, 3].
- __init__(object_label='', custom_config=<factory>, points=<factory>, normals=None, point_types=<factory>)
-
custom_config:
dict[str,Any] User-defined configuration payload.
- get_approach_direction(point_idx)[source]
Get recommended approach direction for a given point.
- Return type:
Tensor
- get_batch_size()[source]
Return the number of interaction points in this affordance.
- Return type:
int
- get_points_by_type(point_type)[source]
Get points by their interaction type.
- Return type:
Tensor|None
-
normals:
Tensor|None= None Optional surface normals at each interaction point with shape [B, 3].
-
point_types:
list[str] Optional labels for each point’s interaction type.
-
points:
Tensor Batch of 3D interaction points with shape [B, 3].
- sample_poses(target_pose, *, sampling, env_ids, key='interaction_points', point_type=None)[source]
Sample local contact points and their inward-facing frames.
- Parameters:
target_pose (
Tensor) – Target world poses with shape(B, 4, 4).sampling (
AffordanceSamplingContext|None) – Optional reproducible branch stream.env_ids (
Tensor) – Stable environment identities matching target rows.key (
str) – Sampling operation identity.point_type (
str|None) – Optional exact interaction-point label.
- Return type:
AffordanceSample- Returns:
Sampled contact frames with selection success and metadata.
- Raises:
ValueError – If point geometry, normals, or the requested type is invalid.
- class embodichain.lab.sim.atomic_skills.JointPositionCommand[source]
A semantic command represented by one or batched joint positions.
positionshas shape(control_dof,)or(num_envs, control_dof). A one-dimensional command is broadcast to the planning batch when resolved.Methods:
__init__(positions)equivalent_to(other)Return whether
otherowns identical joint positions.resolve(*, num_envs, control_dof, device[, ...])Validate, move, and broadcast this command for a planning batch.
snapshot()Return an independently owned command snapshot.
Attributes:
Return an owned copy of the command payload.
- __init__(positions)[source]
- equivalent_to(other)[source]
Return whether
otherowns identical joint positions.- Return type:
bool
- property positions: Tensor
Return an owned copy of the command payload.
- resolve(*, num_envs, control_dof, device, dtype=None)[source]
Validate, move, and broadcast this command for a planning batch.
- Parameters:
num_envs (
int) – Number of selected environments.control_dof (
int) – Joint count of the resolved control part.device (
device|str) – Target planning device.dtype (
dtype|None) – Optional target dtype.
- Return type:
Tensor- Returns:
Independently owned tensor with shape
(num_envs, control_dof).- Raises:
ValueError – If the command shape does not match the control part or selected environment batch.
- snapshot()[source]
Return an independently owned command snapshot.
- Return type:
- class embodichain.lab.sim.atomic_skills.JointPositionGoal[source]
Explicit or named joint-space goal for a bound robot resource.
Methods:
__init__(target)Attributes:
targetJoint waypoints, a named command, or a timed full-robot trajectory.
- __init__(target)
-
target:
Tensor|str|TimedTrajectory|ObservedJointTrajectory Joint waypoints, a named command, or a timed full-robot trajectory.
Authored and observed timed motion require dynamic collision planning to be disabled. An observed motion resolves later samples after earlier commands have executed.
- class embodichain.lab.sim.atomic_skills.JointPositionPayload[source]
Batched joint-position targets for the built-in robot transport.
- Parameters:
positions (
Tensor) – Joint positions with shape(batch_size, control_dof).velocities (
Tensor|None) – Optional joint velocities with the same shape and device. Missing velocities mean a zero velocity target in simulation.
Methods:
Attributes:
Return the number of environment rows.
Return the tensor device.
Return the number of controlled joints.
Return the built-in joint-position transport identifier.
- __init__(positions, velocities=None)
- property batch_size: int
Return the number of environment rows.
- property device: device
Return the tensor device.
- property dof: int
Return the number of controlled joints.
- snapshot()[source]
Return an independently owned joint payload.
- Return type:
- property transport_id: str
Return the built-in joint-position transport identifier.
- class embodichain.lab.sim.atomic_skills.JointPositionTarget[source]
Joint-position destination backed by one robot control part.
Methods:
Attributes:
Return the destination plus the joints that must remain holdable.
Return the robot control-part destination.
Return the built-in joint-position transport identifier.
- __init__(control_part, joint_ids)
- property address_fingerprint: Hashable
Return the destination plus the joints that must remain holdable.
- snapshot()[source]
Return an independently owned target.
Standard immutable fields are reconstructed and validated; subclasses and extended scalar types retain generic deep-snapshot semantics.
- Return type:
- Returns:
A new target of the same concrete type.
- property target_id: str
Return the robot control-part destination.
- property transport_id: str
Return the built-in joint-position transport identifier.
- class embodichain.lab.sim.atomic_skills.JointPositionTrackingEvaluator[source]
Evaluator for
JointPositionTrackingMetric.Classes:
metric_typealias of
JointPositionTrackingMetric- metric_type
alias of
JointPositionTrackingMetric
- class embodichain.lab.sim.atomic_skills.JointPositionTrackingMetric[source]
Maximum absolute joint-error tolerance.
Methods:
__init__([tolerance])- __init__(tolerance=0.05)
- class embodichain.lab.sim.atomic_skills.JointPositionTrackingProjector[source]
Built-in projector for joint-position endpoint commands.
- class embodichain.lab.sim.atomic_skills.JointPositionTrackingState[source]
Batched joint positions with shape
(B, D).Methods:
__init__(positions)snapshot()Return an independently owned state snapshot.
Attributes:
batch_sizeReturn the represented environment count.
deviceReturn the tensor device.
- __init__(positions)
- property batch_size: int
Return the represented environment count.
- property device: device
Return the tensor device.
- snapshot()[source]
Return an independently owned state snapshot.
- Return type:
JointPositionTrackingState
- class embodichain.lab.sim.atomic_skills.MonitoredNominalMotionSource[source]
Optional observation/verification port for a source-owned motion contract.
Implementations consume measured observations and never send commands or commit symbolic state. Exceptions use the runner’s ordinary stop path.
Methods:
observe_execution(context, sample_index, *, ...)Check entry or the last acknowledged plan sample against fresh evidence.
owns_effect(request)Return whether this source owns the explicit terminal requirement.
verify_effect(context, request)Return a correlated effect result after measured terminal validation.
- observe_execution(context, sample_index, *, terminal)[source]
Check entry or the last acknowledged plan sample against fresh evidence.
- Return type:
None
- owns_effect(request)[source]
Return whether this source owns the explicit terminal requirement.
- Return type:
bool
- verify_effect(context, request)[source]
Return a correlated effect result after measured terminal validation.
- Return type:
object
- class embodichain.lab.sim.atomic_skills.MonotonicExecutionClock[source]
Wall-clock implementation backed by
time.Methods:
now()Return the current monotonic wall-clock time.
sleep(duration)Sleep for a non-negative wall-clock duration.
- now()[source]
Return the current monotonic wall-clock time.
- Return type:
float- Returns:
Monotonic wall-clock timestamp in seconds.
- sleep(duration)[source]
Sleep for a non-negative wall-clock duration.
- Parameters:
duration (
float) – Requested duration in seconds.- Return type:
None
- class embodichain.lab.sim.atomic_skills.MotionPolicy[source]
Immutable motion-generation policy for one action invocation.
The policy is a runtime value object rather than application configuration.
plan_optsis copied on construction so a caller-owned planner config cannot change an invocation after it has been created.Methods:
__init__([strategy, sample_count, ...])to_motion_gen_options(*, start_qpos, ...[, ...])Translate this atomic policy into motion-generator options.
Attributes:
Scalar acceleration budget in joint units per second squared.
How this invocation consumes live scene-snapshot collision entities.
Represent rejected final-velocity rows as holds or retain their proposal.
Select batched IK or previous-valid-posture waypoint seeding.
Cartesian sampling distance in metres, forwarded to motion generation.
Select adaptive interpolation or an unchanged count/interval grid.
Explicit primitive phase paths; empty preserves each skill's defaults.
Optional typed planner-specific options.
Require authored/runtime speed validity of final full-robot commands.
Minimum trajectory sample count when the backend does not preserve samples.
Explicit denser whole-plan alternatives after successful-row overspeed.
Try unchanged-target/time continuous IK after segment samples fail.
Ordered denser alternatives within one sampled Cartesian segment request.
motion_genorik_interp.Optional scalar speed request, capped by effective Robot joint limits.
Use trajectory velocities or explicit zero velocity targets.
- __init__(strategy='ik_interp', sample_count=50, velocity_targets='auto', dynamic_collision_mode=DynamicCollisionMode.AUTO, plan_opts=None, velocity_limit=None, acceleration_limit=0.5, *, phase_paths=<factory>, interpolate_position_step=0.002, interpolation_mode='adaptive', ik_seed_mode='batched', sample_count_retries=(), segment_sample_count_retries=(), segment_continuous_ik_recovery=False, require_final_velocity=False, final_velocity_rejection='hold')
-
acceleration_limit:
float|None Scalar acceleration budget in joint units per second squared.
For
motion_gen,Noneretains the selected backend’s configured budget. Adaptiveik_interprequires a positive scalar budget; explicitfixed_gridrequiresNoneand does not certify acceleration.
-
dynamic_collision_mode:
DynamicCollisionMode How this invocation consumes live scene-snapshot collision entities.
-
final_velocity_rejection:
Literal['hold','mask_only'] Represent rejected final-velocity rows as holds or retain their proposal.
holdpreserves shared command authorization and rejected-candidate storage. Explicitmask_onlywaits for the complete action request, including its owned candidate recovery and continuations, then changes validity/classification without changing public command or trajectory tensors. Candidate masks stay untouched until that boundary; execution still cannot dispatch failed rows.
-
ik_seed_mode:
Literal['batched','sequential'] Select batched IK or previous-valid-posture waypoint seeding.
-
interpolate_position_step:
float Cartesian sampling distance in metres, forwarded to motion generation.
PickUp contact motions also use this distance to sample their lift on the control grid. Joint-limit qualification can lengthen the resulting path.
-
interpolation_mode:
Literal['adaptive','fixed_grid'] Select adaptive interpolation or an unchanged count/interval grid.
-
phase_paths:
Mapping[str,Literal['joint','cartesian']] Explicit primitive phase paths; empty preserves each skill’s defaults.
PickUp reads pre_grasp/grasp/lift (and optional initial_lift); Place reads pre_place/place/retreat. Other primitives retain their own declared paths. Placement translation keyframes all retain their original phase’s path.
-
plan_opts:
PlanOptions|None Optional typed planner-specific options.
-
require_final_velocity:
bool Require authored/runtime speed validity of final full-robot commands.
This separate opt-in gate runs after any declared sampling retries and plan transforms. Unknown command-only qualification is unsupported. Rejected rows cannot dispatch; their representation is explicit. This is planned evidence, not physical success.
-
sample_count:
int Minimum trajectory sample count when the backend does not preserve samples.
-
sample_count_retries:
tuple[int,...] Explicit denser whole-plan alternatives after successful-row overspeed.
The engine tries only counts above the current count, in declared order, after action composition and any plan transform. This best-effort retry policy alone retains the original plan when alternatives are exhausted; it does not certify final velocity or enable external nominal motion.
-
segment_continuous_ik_recovery:
bool Try unchanged-target/time continuous IK after segment samples fail.
Dense attempts advance the existing random stream. The continuous resolver retains its own Torch-only fork; no outer action counter is reused.
-
segment_sample_count_retries:
tuple[int,...] Ordered denser alternatives within one sampled Cartesian segment request.
These counts are independent of complete-action retries. The first count also bounds eligibility of the original request, preserving the source coarse-grid boundary. Only the explicit Cartesian segment helper consumes them; ordinary
generatecalls reject non-default segment recovery.
-
strategy:
Literal['motion_gen','ik_interp'] motion_genorik_interp.- Type:
Motion strategy
- to_motion_gen_options(*, start_qpos, control_part, sample_count=None, interpolation_dt=None, cartesian_linear=False, cartesian_keyframes=False, cartesian_path_sampler=None)[source]
Translate this atomic policy into motion-generator options.
- Parameters:
start_qpos (
Tensor) – Observed controlled-joint start positions.control_part (
str) – Bound robot control-part name.sample_count (
int|None) – Optional segment-local sample-count override.interpolation_dt (
float|None) – Explicit waypoint interval used only by deterministic interpolation.cartesian_linear (
bool) – Whether every supplied Cartesian keyframe is a required linear-path sample rather than a sparse endpoint.cartesian_keyframes (
bool) – Supply unsampled linear keyframes to the public MotionGenerator sampling/recovery path. This is distinct from already sampledcartesian_linearinput; the two selections cannot be combined.cartesian_path_sampler (
Callable[[Tensor],Tensor] |None) – Optional exact-path sampler receiving normalized progress values. Use this for constrained curves such as rotations about an external hinge.
- Return type:
- Returns:
Independently owned options for
MotionGenerator.- Raises:
ValueError – If a fixed Cartesian path is requested with a planner strategy that does not guarantee those exact samples.
-
velocity_limit:
float|None Optional scalar speed request, capped by effective Robot joint limits.
-
velocity_targets:
Literal['auto','zero'] Use trajectory velocities or explicit zero velocity targets.
- class embodichain.lab.sim.atomic_skills.MoveEndEffector[source]
Plan a free-space move for a bound manipulator.
Classes:
GoalTypealias of
EndEffectorPoseGoalOptionsTypealias of
MoveEndEffectorOptionsAttributes:
binding_contractExplicit robot-independent requirements for semantic discovery.
skill_idStable registry identifier for this skill.
- GoalType
alias of
EndEffectorPoseGoal
- OptionsType
alias of
MoveEndEffectorOptions
- binding_contract: ClassVar[SkillBindingContract] = SkillBindingContract(slots=(SkillResourceSlot(slot_id='primary', endpoints=(SkillEndpointRequirement(endpoint_id='motion', capabilities=frozenset({'motion.cartesian_pose'}), required_commands=mappingproxy({})),), constraints=()),), constraints=())
Explicit robot-independent requirements for semantic discovery.
Concrete action classes must declare this attribute in their own class body to opt into the semantic catalog. Inheriting another action’s contract does not silently expose a new skill identifier.
- skill_id: ClassVar[str] = 'move_end_effector'
Stable registry identifier for this skill.
- class embodichain.lab.sim.atomic_skills.MoveEndEffectorOptions[source]
Per-invocation behavior for
MoveEndEffector.Methods:
__init__([preserve_cartesian_samples])Attributes:
preserve_cartesian_samplesExecute the supplied Cartesian samples on the control grid.
- __init__(preserve_cartesian_samples=False)
-
preserve_cartesian_samples:
bool Execute the supplied Cartesian samples on the control grid.
- class embodichain.lab.sim.atomic_skills.MoveHeldObject[source]
Move the held object through exact target poses with a closed hand.
Requested orientations are exact unless final world yaw is explicitly free. Callers that need a transport orientation must encode it in
HeldObjectPoseGoal; this action never substitutes an implicit end-effector orientation.Classes:
GoalTypealias of
HeldObjectPoseGoalOptionsTypealias of
MoveHeldObjectOptionsAttributes:
binding_contractExplicit robot-independent requirements for semantic discovery.
skill_idStable registry identifier for this skill.
- GoalType
alias of
HeldObjectPoseGoal
- OptionsType
alias of
MoveHeldObjectOptions
- binding_contract: ClassVar[SkillBindingContract] = SkillBindingContract(slots=(SkillResourceSlot(slot_id='primary', endpoints=(SkillEndpointRequirement(endpoint_id='motion', capabilities=frozenset({'motion.cartesian_pose', 'kinematics.forward'}), required_commands=mappingproxy({})), SkillEndpointRequirement(endpoint_id='grasp', capabilities=frozenset({'interaction.grasp'}), required_commands=mappingproxy({'grasp': <class 'embodichain.lab.sim.atomic_skills.control.JointPositionCommand'>}))), constraints=(DisjointSlotEndpoints(endpoint_ids=('motion', 'grasp')),)),), constraints=())
Explicit robot-independent requirements for semantic discovery.
Concrete action classes must declare this attribute in their own class body to opt into the semantic catalog. Inheriting another action’s contract does not silently expose a new skill identifier.
- skill_id: ClassVar[str] = 'move_held_object'
Stable registry identifier for this skill.
- class embodichain.lab.sim.atomic_skills.MoveHeldObjectOptions[source]
Per-invocation held-object transport behavior.
Methods:
__init__()- __init__()
- class embodichain.lab.sim.atomic_skills.MoveJoints[source]
Plan joint motion from the observed state to one or more waypoints.
Classes:
GoalTypealias of
JointPositionGoalOptionsTypealias of
MoveJointsOptionsAttributes:
agent_visibleWhether an Action Agent should expose this skill by default.
binding_contractExplicit robot-independent requirements for semantic discovery.
skill_idStable registry identifier for this skill.
Methods:
continue_plan(request, context, plan, ...)Resolve another observed range within the existing MoveJoints invocation.
- GoalType
alias of
JointPositionGoal
- OptionsType
alias of
MoveJointsOptions
- agent_visible: ClassVar[bool] = True
Whether an Action Agent should expose this skill by default.
- binding_contract: ClassVar[SkillBindingContract] = SkillBindingContract(slots=(SkillResourceSlot(slot_id='primary', endpoints=(SkillEndpointRequirement(endpoint_id='motion', capabilities=frozenset({'motion.joint_position'}), required_commands=mappingproxy({})),), constraints=()),), constraints=())
Explicit robot-independent requirements for semantic discovery.
Concrete action classes must declare this attribute in their own class body to opt into the semantic catalog. Inheriting another action’s contract does not silently expose a new skill identifier.
- continue_plan(request, context, plan, active_mask)[source]
Resolve another observed range within the existing MoveJoints invocation.
- Parameters:
request (
ResolvedSkillRequest[JointPositionGoal,MoveJointsOptions]) – The unchanged grounded invocation.context (
PlanningContext) – Observations from the last acknowledged control step.plan (
SkillPlan) – Completed chunk and its command cursor.active_mask (
Tensor) – Rows that executed the completed chunk.
- Return type:
- Returns:
Accepted rows and their next timed plan, if more commands remain.
- skill_id: ClassVar[str] = 'move_joints'
Stable registry identifier for this skill.
- class embodichain.lab.sim.atomic_skills.MoveJointsOptions[source]
Per-invocation behavior for
MoveJoints.Methods:
__init__([preserve_samples, ...])Attributes:
preserve_samplesKeep authored joint samples at host cadence, rejecting overspeed rows.
preserve_velocity_samplesRetain explicit arrival velocities, including the ends of consecutive timed phases.
- __init__(preserve_samples=False, preserve_velocity_samples=False)
-
preserve_samples:
bool Keep authored joint samples at host cadence, rejecting overspeed rows.
-
preserve_velocity_samples:
bool Retain explicit arrival velocities, including the ends of consecutive timed phases.
- class embodichain.lab.sim.atomic_skills.NominalMotionSource[source]
Provide motion for one grounded invocation without owning its effects.
Methods:
__init__(*args, **kwargs)instantiate(request, context)Create a side-effect-free motion candidate for the current scene.
- __init__(*args, **kwargs)
- instantiate(request, context)[source]
Create a side-effect-free motion candidate for the current scene.
- Return type:
InstantiatedSkillMotion
- embodichain.lab.sim.atomic_skills.ObjectActionGoal
alias of
ObjectSkillGoal
- class embodichain.lab.sim.atomic_skills.ObjectSemantics[source]
Shallow-frozen semantic information about an interaction object.
Attention
Top-level fields cannot be rebound after construction. Nested affordance and metadata objects may remain mutable but never establish object identity.
Methods:
__init__(affordance, geometry, entity_id[, ...])Attributes:
Affordance data describing supported interactions.
Stable scene identifier used by snapshot grounding and object identity.
Non-affordance metadata used to resolve geometry-derived affordance data.
Semantic object category.
Physical properties such as mass and friction.
- __init__(affordance, geometry, entity_id, properties=<factory>, label='none')
-
affordance:
Affordance Affordance data describing supported interactions.
-
entity_id:
str Stable scene identifier used by snapshot grounding and object identity.
-
geometry:
dict[str,Any] Non-affordance metadata used to resolve geometry-derived affordance data.
-
label:
str Semantic object category.
-
properties:
dict[str,Any] Physical properties such as mass and friction.
- class embodichain.lab.sim.atomic_skills.ObjectSkillGoal[source]
Shared semantic-object goal contract for object-centric skills.
Methods:
__init__(semantics)Attributes:
semanticsSemantic and geometric description of the object.
- __init__(semantics)
-
semantics:
ObjectSemantics Semantic and geometric description of the object.
- class embodichain.lab.sim.atomic_skills.ObservationProvider[source]
Source of fresh planning contexts for feedback-driven execution.
Methods:
- __init__(*args, **kwargs)
- class embodichain.lab.sim.atomic_skills.ObservedArticulationJointState[source]
Live measured state for one scene articulation joint.
Methods:
__init__(position[, valid_mask])snapshot()Return an independently owned observation value.
Attributes:
positionMeasured joint position with shape
(J,)or(B, J).valid_maskOptional row-validity mask for a batched observation.
- __init__(position, valid_mask=None)
-
position:
Tensor Measured joint position with shape
(J,)or(B, J).
- snapshot()[source]
Return an independently owned observation value.
- Return type:
ObservedArticulationJointState
-
valid_mask:
Tensor|None Optional row-validity mask for a batched observation.
- class embodichain.lab.sim.atomic_skills.ObservedJointTrajectory[source]
One timed joint motion resolved at declared observation boundaries.
- Parameters:
source_id (
str) – Engine-local identifier owned by the episode’s command source.phase (
str) – Source-local name for this motion.chunk_lengths (
tuple[int,...]) – One positive command count per chunk, in execution order.
Methods:
__init__(source_id, phase, chunk_lengths)- __init__(source_id, phase, chunk_lengths)
- class embodichain.lab.sim.atomic_skills.ObservedJointTrajectorySource[source]
Episode-owned source of live full-robot commands for MoveJoints.
Methods:
__init__(*args, **kwargs)resolve(phase, start, stop, context, active_mask)Resolve timed commands without dispatching or advancing the simulation.
- __init__(*args, **kwargs)
- resolve(phase, start, stop, context, active_mask)[source]
Resolve timed commands without dispatching or advancing the simulation.
- Parameters:
phase (
str) – Source-local motion name from the goal.start (
int) – First command index, zero-based within the phase.stop (
int) – Exclusive end command index.context (
PlanningContext) – Fresh observations, or an isolated nominal preview context.active_mask (
Tensor) – Rows eligible to execute the chunk.
- Return type:
- Returns:
One full-robot command per requested control step and row.
- class embodichain.lab.sim.atomic_skills.OpenDoor[source]
Approach, grasp, rotate a door about its hinge, release, and retract.
Classes:
GoalTypealias of
OpenDoorGoalOptionsTypealias of
OpenDoorOptionsAttributes:
binding_contractExplicit robot-independent requirements for semantic discovery.
open_loopWhether the skill intentionally declares no verified physical effect.
skill_idStable registry identifier for this skill.
- GoalType
alias of
OpenDoorGoal
- OptionsType
alias of
OpenDoorOptions
- binding_contract: ClassVar[SkillBindingContract] = SkillBindingContract(slots=(SkillResourceSlot(slot_id='primary', endpoints=(SkillEndpointRequirement(endpoint_id='motion', capabilities=frozenset({'motion.cartesian_pose'}), required_commands=mappingproxy({})), SkillEndpointRequirement(endpoint_id='grasp', capabilities=frozenset({'interaction.grasp'}), required_commands=mappingproxy({'open': <class 'embodichain.lab.sim.atomic_skills.control.JointPositionCommand'>, 'grasp': <class 'embodichain.lab.sim.atomic_skills.control.JointPositionCommand'>}))), constraints=(DisjointSlotEndpoints(endpoint_ids=('motion', 'grasp')),)),), constraints=())
Explicit robot-independent requirements for semantic discovery.
Concrete action classes must declare this attribute in their own class body to opt into the semantic catalog. Inheriting another action’s contract does not silently expose a new skill identifier.
- open_loop: ClassVar[bool] = True
Whether the skill intentionally declares no verified physical effect.
- skill_id: ClassVar[str] = 'open_door'
Stable registry identifier for this skill.
- class embodichain.lab.sim.atomic_skills.OpenDoorAffordance[source]
Target-local handle geometry and a resolved hinge axis.
Use
from_articulation()to start from a graspable handle link. The factory consumes the articulation’s public parent-joint chain, skips only fixed joints, and automatically accepts one unambiguous active revolute ancestor. Ambiguous mechanisms require an explicit hinge joint name. The resulting affordance owns no simulator entity or live pose.Methods:
__init__([object_label, custom_config, ...])from_articulation(articulation, link_name, *)Build handle semantics from a parent revolute joint.
Attributes:
axis_originResolved point on the hinge axis in the handle-link frame.
custom_configUser-defined configuration payload.
joint_limitsOptional lower and upper hinge limits in radians.
joint_nameStable name of the resolved parent revolute joint.
opening_directionJoint-coordinate direction from the closed limit toward the open limit.
rotation_axisResolved hinge axis expressed in the handle-link frame.
- __init__(object_label='', custom_config=<factory>, mesh_scope='object', joint_limits=None, opening_direction=1, *, mesh_vertices, mesh_triangles, rotation_axis, axis_origin, joint_name)
-
axis_origin:
tuple[float,float,float] Resolved point on the hinge axis in the handle-link frame.
-
custom_config:
dict[str,Any] User-defined configuration payload.
- classmethod from_articulation(articulation, link_name, *, hinge_joint_name=None, opening_direction=1)[source]
Build handle semantics from a parent revolute joint.
Automatic resolution skips only fixed joints. It succeeds when the handle chain contains exactly one active ancestor and that joint is revolute. A chain with multiple active ancestors can represent a latch, handle joint, or another mechanism and therefore requires an explicit
hinge_joint_name. Hinge geometry is converted from the joint frame into the requested handle-link frame using current public link poses.- Parameters:
articulation (Articulation) – Articulation containing the graspable handle link.
link_name (str) – Graspable handle link from which to start the traversal.
hinge_joint_name (str | None) – Optional explicit revolute ancestor. Required when more than one active ancestor makes automatic resolution ambiguous.
opening_direction (int) – Joint-coordinate direction from the closed legal endpoint toward the open endpoint. Defaults to increasing qpos.
- Return type:
OpenDoorAffordance
- Returns:
Pure target-local handle and hinge semantics.
- Raises:
TypeError – If a supplied name is not a string.
ValueError – If the link or explicit joint is unknown, automatic resolution is ambiguous, the selected joint is not revolute, or the resolved joint geometry is invalid.
-
joint_limits:
tuple[float,float] |None= None Optional lower and upper hinge limits in radians.
-
joint_name:
str Stable name of the resolved parent revolute joint.
-
opening_direction:
int= 1 Joint-coordinate direction from the closed limit toward the open limit.
-
rotation_axis:
Tensor Resolved hinge axis expressed in the handle-link frame.
- class embodichain.lab.sim.atomic_skills.OpenDoorGoal[source]
Door handle and desired absolute opening state.
Methods:
__init__(semantics, target_pose, open_fraction)Attributes:
open_fractionDesired hinge position normalized from its closed to open legal endpoint.
target_poseHandle-link pose snapshot or late-bound scene-entity reference.
- __init__(semantics, target_pose, open_fraction)
-
open_fraction:
float|Tensor Desired hinge position normalized from its closed to open legal endpoint.
-
target_pose:
Tensor|SceneEntityPose Handle-link pose snapshot or late-bound scene-entity reference.
- class embodichain.lab.sim.atomic_skills.OpenDoorOptions[source]
Per-invocation approach, interpolation, release, and retract behavior.
Methods:
__init__([hand_interp_steps, ...])Attributes:
approach_distancePre-grasp distance opposite the automatically inferred approach axis.
door_waypoint_countNumber of Cartesian keyframes along the handle's circular arc.
hand_interp_stepsNumber of waypoints used for each close/open hand segment.
joint_position_toleranceTolerance for legal-limit and already-open comparisons in radians.
retract_distancePost-release retreat distance opposite the rotated approach axis.
- __init__(hand_interp_steps=5, door_waypoint_count=20, approach_distance=0.1, retract_distance=0.1, joint_position_tolerance=0.0001)
-
approach_distance:
float Pre-grasp distance opposite the automatically inferred approach axis.
-
door_waypoint_count:
int Number of Cartesian keyframes along the handle’s circular arc.
-
hand_interp_steps:
int Number of waypoints used for each close/open hand segment.
-
joint_position_tolerance:
float Tolerance for legal-limit and already-open comparisons in radians.
-
retract_distance:
float Post-release retreat distance opposite the rotated approach axis.
- class embodichain.lab.sim.atomic_skills.PhaseEffectGateRequest[source]
Correlate a blocking physical-effect check with a segment entry.
The action’s preceding command remains active while the gate is unresolved. A gate is scoped to the enclosing action attempt and does not create a separate planning, recovery, or timeout budget.
- Parameters:
verification_id (
int) – Session-local single-use request identity.gate_id (
str) – Invocation-local stable gate identity.skill_id (
str) – Registered action skill identity.invocation_id (
str|None) – Optional logical invocation correlation identity.invocation_revision (
int) – Active invocation revision.invocation_index (
int) – Active invocation position in the session.attempt_generation (
int) – Installed action-plan attempt generation.next_waypoint_index (
int) – First command frame blocked by the gate.segment_name (
str) – Named trajectory segment blocked by the gate.requested_at (
float) – Request creation time in the observation timestamp domain.deadline (
float) – Enclosing action deadline in that same timestamp domain.env_mask (
Tensor) – Active rows that must satisfy the gate together.
Methods:
__init__(verification_id, gate_id, skill_id, ...)snapshot()Return an independently owned gate request.
- __init__(verification_id, gate_id, skill_id, invocation_id, invocation_revision, invocation_index, attempt_generation, next_waypoint_index, segment_name, requested_at, deadline, env_mask)
- snapshot()[source]
Return an independently owned gate request.
- Return type:
PhaseEffectGateRequest
- class embodichain.lab.sim.atomic_skills.PhaseEffectGateRequirement[source]
Require physical-effect evidence before one trajectory segment starts.
The requirement carries only stable core correlation data. Semantic integrations own the corresponding observation specification and monitor; the execution session owns blocking, timeout, and action-retry behavior.
- Parameters:
gate_id (
str) – Invocation-local stable gate identifier.segment_name (
str) – Exact named trajectory segment blocked by this gate.
Methods:
__init__(gate_id, segment_name)snapshot()Return an independently constructed immutable requirement.
- __init__(gate_id, segment_name)
- snapshot()[source]
Return an independently constructed immutable requirement.
- Return type:
PhaseEffectGateRequirement
- class embodichain.lab.sim.atomic_skills.PhaseEffectGateResult[source]
Current-observation decision for one blocking segment-entry gate.
Rows absent from both decision masks remain unresolved.
retry_maskis a subset of failed rows for which replaying the enclosing action remains valid; no gate outcome mutates verified task state.- Parameters:
verification_id (
int) – Identity copied from the consumed gate request.gate_id (
str) – Stable gate identity copied from the request.attempt_generation (
int) – Action attempt copied from the request.invocation_index (
int) – Session invocation index copied from the request.next_waypoint_index (
int) – Blocked waypoint copied from the request.success_mask (
Tensor) – Rows whose current evidence satisfies the gate.failure_mask (
Tensor) – Rows whose current evidence contradicts the gate.retry_mask (
Tensor) – Failed rows allowed to retry the enclosing action.message (
str) – Optional physical-failure diagnostic.
Methods:
__init__(verification_id, gate_id, ...[, ...])- __init__(verification_id, gate_id, attempt_generation, invocation_index, next_waypoint_index, success_mask, failure_mask, retry_mask, message='')
- class embodichain.lab.sim.atomic_skills.PhysicalEvidenceBatch[source]
One typed-by-convention physical channel for an environment batch.
valueskeeps the channel-specific trailing shape. The first dimension always followsenv_ids.validandacquisition_errorsdistinguish unavailable observations from measured negative evidence.Methods:
__init__(evidence_id, values, valid, ...)snapshot()Return an independently owned evidence batch.
to_dict()Return detached JSON channel values with validity and source identity.
- __init__(evidence_id, values, valid, acquisition_errors, timestamp, env_ids, observation_revision)
- snapshot()[source]
Return an independently owned evidence batch.
- Return type:
- to_dict()[source]
Return detached JSON channel values with validity and source identity.
- Return type:
dict[str,object]- Returns:
A new dictionary retaining dtype, row order, unavailable reasons and the observation timestamp/revision. This method collects no facts. Non-finite scalars in unavailable rows become JSON
null; the original tensor and the row’s validity and error remain unchanged.
- class embodichain.lab.sim.atomic_skills.PhysicalEvidenceFrame[source]
Synchronized evidence channels from one execution observation tick.
Methods:
__init__(timestamp, observation_revision, ...)get(evidence_id)Return one channel or raise a descriptive
KeyError.snapshot()Return an independently owned frame snapshot.
to_dict()Serialize the owned channels without reading runtime state.
Attributes:
Return the number of environment rows in the frame.
- __init__(timestamp, observation_revision, env_ids, batches=<factory>)
- property batch_size: int
Return the number of environment rows in the frame.
- get(evidence_id)[source]
Return one channel or raise a descriptive
KeyError.- Return type:
- snapshot()[source]
Return an independently owned frame snapshot.
- Return type:
- to_dict()[source]
Serialize the owned channels without reading runtime state.
- Return type:
dict[str,object]- Returns:
Synchronized JSON channels retaining every validity and source field.
- class embodichain.lab.sim.atomic_skills.PhysicalEvidenceProvider[source]
Acquire synchronized physical evidence for an execution observation.
Methods:
__init__(*args, **kwargs)collect(context, request)Return evidence aligned with the supplied planning context.
- __init__(*args, **kwargs)
- collect(context, request)[source]
Return evidence aligned with the supplied planning context.
- Return type:
- class embodichain.lab.sim.atomic_skills.PhysicalEvidenceRequest[source]
One synchronized request for runtime physical evidence.
Methods:
__init__(timestamp, observation_revision, ...)snapshot()Return an independently owned request snapshot.
- __init__(timestamp, observation_revision, env_ids, channels=())
- snapshot()[source]
Return an independently owned request snapshot.
- Return type:
- class embodichain.lab.sim.atomic_skills.PickUp[source]
Approach a grasp pose, close the gripper, lift.
Attributes:
GoalTypeConcrete goal dataclass or dataclasses accepted by this skill.
binding_contractExplicit robot-independent requirements for semantic discovery.
skill_idStable registry identifier for this skill.
Classes:
OptionsTypealias of
PickUpOptionsMethods:
continue_plan(request, context, plan, ...)Plan a later chunk without beginning another logical skill.
on_plan_installed(request, context, plan)Publish bookkeeping only after an execution plan was accepted.
- GoalType: ClassVar[tuple[type, ...]] = (<class 'embodichain.lab.sim.atomic_skills.primitives.pick_up.GraspGoal'>, <class 'embodichain.lab.sim.atomic_skills.primitives.pick_up.ContactGraspGoal'>, <class 'embodichain.lab.sim.atomic_skills.primitives.contact.ContactPickUpGoal'>)
Concrete goal dataclass or dataclasses accepted by this skill.
- OptionsType
alias of
PickUpOptions
- binding_contract: ClassVar[SkillBindingContract] = SkillBindingContract(slots=(SkillResourceSlot(slot_id='primary', endpoints=(SkillEndpointRequirement(endpoint_id='motion', capabilities=frozenset({'motion.cartesian_pose', 'kinematics.batch_inverse', 'kinematics.forward'}), required_commands=mappingproxy({})), SkillEndpointRequirement(endpoint_id='grasp', capabilities=frozenset({'interaction.grasp'}), required_commands=mappingproxy({'open': <class 'embodichain.lab.sim.atomic_skills.control.JointPositionCommand'>, 'grasp': <class 'embodichain.lab.sim.atomic_skills.control.JointPositionCommand'>}))), constraints=(DisjointSlotEndpoints(endpoint_ids=('motion', 'grasp')),)),), constraints=())
Explicit robot-independent requirements for semantic discovery.
Concrete action classes must declare this attribute in their own class body to opt into the semantic catalog. Inheriting another action’s contract does not silently expose a new skill identifier.
- continue_plan(request, context, plan, active_mask)[source]
Plan a later chunk without beginning another logical skill.
- Parameters:
request (
ResolvedSkillRequest) – The unchanged resolved invocation.context (
PlanningContext) – Fresh observations with authoritative row identity and timing.plan (
SkillPlan) – Completed chunk and its owned continuation cursor.active_mask (
Tensor) – Eligible rows that executed the completed chunk.
- Return type:
- Returns:
Physical row acceptance and an optional later plan.
- on_plan_installed(request, context, plan)[source]
Publish bookkeeping only after an execution plan was accepted.
- Parameters:
request (
ResolvedSkillRequest) – The installed plan’s resolved invocation.context (
PlanningContext) – Observations used for this plan.plan (
SkillPlan) – Validated plan after destination and lifecycle acceptance.
- Return type:
None
- skill_id: ClassVar[str] = 'pick_up'
Stable registry identifier for this skill.
- class embodichain.lab.sim.atomic_skills.PickUpOptions[source]
Per-invocation pickup behavior.
Methods:
__init__([hand_interp_steps, ...])Attributes:
approach_alignment_max_angleOptional maximum TCP z-axis deviation from the approach direction.
approach_along_grasp_axisUse the realized calibrated TCP +Z for native pre-grasp translation.
approach_directionWorld approach direction, shared
(3,)or per-environment(B,3).cartesian_liftPreserve a straight world-Z lift with IK interpolation and native limits.
downstream_object_target_posesFuture object poses that must be reachable with the selected grasp.
fixed_object_to_eefOptional object-frame to end-effector SE(3) grasp calibration.
grasp_commit_fractionApproach fraction after which contact motion no longer invalidates grasp.
grasp_frame_to_eefCanonical grasp-frame to robot end-effector SE(3) calibration.
grasp_settle_stepsFully closed hold frames before lifting the end-effector.
grasp_variantSymmetric TCP-roll variant to select after feasibility screening.
hand_interp_stepsNumber of waypoints for the gripper-close interpolation segment.
initial_lift_heightInitial world-Z clearance (m) from the current TCP pose before approach.
lift_heightHeight (m) to lift the end-effector after closing the gripper.
obj_upright_directionOptional object local direction used to choose the upright grasp rotation.
pick_object_partName of the object part to pick up (used for grasp pose generation).
pre_grasp_distanceDistance to offset back from the grasp pose along the approach direction.
rotate_uprightOptional rotation (radians) about the grasp x-axis to apply after grasp selection.
- __init__(hand_interp_steps=5, grasp_settle_steps=0, pick_object_part='center', lift_height=0.1, pre_grasp_distance=0.15, grasp_commit_fraction=1.0, approach_direction=tensor([0., 0., -1.]), approach_alignment_max_angle=None, downstream_object_target_poses=(), obj_upright_direction=None, rotate_upright=None, grasp_frame_to_eef=tensor([[1., 0., 0., 0.], [0., 1., 0., 0.], [0., 0., 1., 0.], [0., 0., 0., 1.]]), fixed_object_to_eef=None, grasp_variant='closest', approach_along_grasp_axis=False, cartesian_lift=False, *, initial_lift_height=0.0)
-
approach_alignment_max_angle:
float|None Optional maximum TCP z-axis deviation from the approach direction.
-
approach_along_grasp_axis:
bool Use the realized calibrated TCP +Z for native pre-grasp translation.
Requires
fixed_object_to_eef. The approach then follows the object’s observed rotation instead of a shared world vector.
-
approach_direction:
Tensor World approach direction, shared
(3,)or per-environment(B,3).
-
cartesian_lift:
bool Preserve a straight world-Z lift with IK interpolation and native limits.
Mutually exclusive with explicit
MotionPolicy.phase_paths.
-
downstream_object_target_poses:
tuple[Tensor|SceneEntityPose,...] Future object poses that must be reachable with the selected grasp.
-
fixed_object_to_eef:
Tensor|None Optional object-frame to end-effector SE(3) grasp calibration.
When no explicit goal grasp is supplied, this transform bypasses affordance sampling and the sampled-grasp orientation/calibration adjustments.
-
grasp_commit_fraction:
float Approach fraction after which contact motion no longer invalidates grasp.
-
grasp_frame_to_eef:
Tensor Canonical grasp-frame to robot end-effector SE(3) calibration.
-
grasp_settle_steps:
int Fully closed hold frames before lifting the end-effector.
-
grasp_variant:
str Symmetric TCP-roll variant to select after feasibility screening.
The default
"closest"preserves selection of the feasible original or mirrored grasp with the smallest rotation error from the current TCP."original"and"mirrored"force one side and report an infeasible pickup when that side cannot pass the kinematic checks. Explicit goal grasps andfixed_object_to_eefbypass this sampled-grasp selection.
-
hand_interp_steps:
int Number of waypoints for the gripper-close interpolation segment.
-
initial_lift_height:
float Initial world-Z clearance (m) from the current TCP pose before approach.
-
lift_height:
float Height (m) to lift the end-effector after closing the gripper.
-
obj_upright_direction:
Tensor|None Optional object local direction used to choose the upright grasp rotation.
-
pick_object_part:
str Name of the object part to pick up (used for grasp pose generation). Currently support [center | top | bottom].
-
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.
- class embodichain.lab.sim.atomic_skills.Place[source]
Lower the held object to a place pose, open the gripper, retract.
The
PlaceGoalmay carry either a single waypoint(num_envs, 4, 4)(or a broadcastable(4, 4)) or a multi-waypoint trajectory(num_envs, n_waypoint, 4, 4). In the multi-waypoint case the approach segment 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 fromPlanningContext.An
AssembleGoalreplaces the explicit EEF pose with an assembly affordance: the place pose is derived from the base object’s snapshot pose andassemble_to_base_pose, converted to an EEF pose through the held object’sobject_to_eef(read fromPlanningContext).Attributes:
GoalTypeConcrete goal dataclass or dataclasses accepted by this skill.
binding_contractExplicit robot-independent requirements for semantic discovery.
skill_idStable registry identifier for this skill.
Classes:
OptionsTypealias of
PlaceOptionsMethods:
continue_plan(request, context, plan, ...)Plan a later chunk without beginning another logical skill.
on_plan_installed(request, context, plan)Publish bookkeeping only after an execution plan was accepted.
- GoalType: ClassVar[type | tuple[type, ...]] = (<class 'embodichain.lab.sim.atomic_skills.primitives.place.PlaceGoal'>, <class 'embodichain.lab.sim.atomic_skills.primitives.place.AssembleGoal'>, <class 'embodichain.lab.sim.atomic_skills.primitives.contact.ContactPlaceGoal'>)
Concrete goal dataclass or dataclasses accepted by this skill.
- OptionsType
alias of
PlaceOptions
- binding_contract: ClassVar[SkillBindingContract] = SkillBindingContract(slots=(SkillResourceSlot(slot_id='primary', endpoints=(SkillEndpointRequirement(endpoint_id='motion', capabilities=frozenset({'motion.cartesian_pose', 'kinematics.forward'}), required_commands=mappingproxy({})), SkillEndpointRequirement(endpoint_id='grasp', capabilities=frozenset({'interaction.grasp'}), required_commands=mappingproxy({'open': <class 'embodichain.lab.sim.atomic_skills.control.JointPositionCommand'>, 'grasp': <class 'embodichain.lab.sim.atomic_skills.control.JointPositionCommand'>}))), constraints=(DisjointSlotEndpoints(endpoint_ids=('motion', 'grasp')),)),), constraints=())
Explicit robot-independent requirements for semantic discovery.
Concrete action classes must declare this attribute in their own class body to opt into the semantic catalog. Inheriting another action’s contract does not silently expose a new skill identifier.
- continue_plan(request, context, plan, active_mask)[source]
Plan a later chunk without beginning another logical skill.
- Parameters:
request (
ResolvedSkillRequest) – The unchanged resolved invocation.context (
PlanningContext) – Fresh observations with authoritative row identity and timing.plan (
SkillPlan) – Completed chunk and its owned continuation cursor.active_mask (
Tensor) – Eligible rows that executed the completed chunk.
- Return type:
- Returns:
Physical row acceptance and an optional later plan.
- on_plan_installed(request, context, plan)[source]
Publish bookkeeping only after an execution plan was accepted.
- Parameters:
request (
ResolvedSkillRequest) – The installed plan’s resolved invocation.context (
PlanningContext) – Observations used for this plan.plan (
SkillPlan) – Validated plan after destination and lifecycle acceptance.
- Return type:
None
- skill_id: ClassVar[str] = 'place'
Stable registry identifier for this skill.
- class embodichain.lab.sim.atomic_skills.PlaceGoal[source]
End-effector release-pose target used by
Place.Methods:
__init__(xpos[, tcp_symmetry])Attributes:
tcp_symmetryOptional TCP-frame symmetry allowed by the placement semantics.
xposTarget end-effector release pose.
- __init__(xpos, tcp_symmetry='none')
-
tcp_symmetry:
Literal['none','z_roll_180'] Optional TCP-frame symmetry allowed by the placement semantics.
"none"preserves the pose exactly."z_roll_180"lets placement choose between the pose and its TCP z-roll 180 equivalent, which flips TCP x/y while preserving TCP z and translation.
-
xpos:
Tensor|SceneEntityPose Target end-effector release pose.
Accepts
(4, 4),(num_envs, 4, 4), or(num_envs, n_waypoint, 4, 4).
- class embodichain.lab.sim.atomic_skills.PlaceOptions[source]
Per-invocation placement behavior.
Methods:
__init__([hand_interp_steps, ...])Attributes:
approach_lift_heightHeight (m) above the first place pose during approach.
cartesian_approachFollow the approach with sampled Cartesian poses under joint motion limits.
cartesian_waypoint_countNumber of fixed-orientation Cartesian keyframes per translation segment.
hand_interp_stepsNumber of waypoints for the gripper-open interpolation segment.
lift_heightHeight (m) to retract the end-effector after opening the gripper.
max_approach_retract_zOptional maximum world-frame TCP z for approach and retract poses (m).
preserve_current_object_orientationKeep the held object's observed world orientation at the place target.
release_settle_durationMinimum physical seconds to hold open in a newly planned native Place.
release_settle_stepsFully open hold frames before retracting the end-effector.
- __init__(hand_interp_steps=5, release_settle_steps=0, lift_height=0.1, max_approach_retract_z=None, cartesian_waypoint_count=1, preserve_current_object_orientation=False, *, release_settle_duration=0.0, approach_lift_height=None, cartesian_approach=False)
-
approach_lift_height:
float|None Height (m) above the first place pose during approach. Defaults to lift_height.
-
cartesian_approach:
bool Follow the approach with sampled Cartesian poses under joint motion limits.
Mutually exclusive with explicit
MotionPolicy.phase_paths.
-
cartesian_waypoint_count:
int Number of fixed-orientation Cartesian keyframes per translation segment.
-
hand_interp_steps:
int Number of waypoints for the gripper-open interpolation segment.
-
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).
-
preserve_current_object_orientation:
bool Keep the held object’s observed world orientation at the place target.
-
release_settle_duration:
float Minimum physical seconds to hold open in a newly planned native Place.
Rounded upward to control intervals and combined with release_settle_steps using the larger hold. This is actuation time, not an acceptance tolerance. External nominal sources retain their authored release timing unchanged.
-
release_settle_steps:
int Fully open hold frames before retracting the end-effector.
- class embodichain.lab.sim.atomic_skills.PlanQualification[source]
Read-only final-plan qualification that may only reject planning rows.
- Parameters:
valid_mask (
Tensor) – Boolean(B,)mask on the plan device. The engine intersects it with existing success; a true value cannot revive a failed row.diagnostics (
PlannerDiagnostics|None) – Optional qualification diagnostics. They never replace the plan’s trajectory, timing, goals, commands or symbolic effects.
Methods:
__init__(valid_mask[, diagnostics])- __init__(valid_mask, diagnostics=None)
- class embodichain.lab.sim.atomic_skills.PlannerDiagnostics[source]
Planner metadata retained for debugging and recovery decisions.
Methods:
__init__(backend[, messages, metadata, failure])- __init__(backend, messages=(), metadata=<factory>, failure=None)
- class embodichain.lab.sim.atomic_skills.PlanningBudget[source]
Explicit complete-request measurements and optional cooperative deadline.
- Parameters:
wall_seconds (
float|None) – Positive wall-clock seconds for one outer planning request, including its sampling retries and nested previews. None enables measurements without a deadline. Native operations are not preempted.
Methods:
__init__([wall_seconds])- __init__(wall_seconds=None)
- class embodichain.lab.sim.atomic_skills.PlanningContext[source]
Complete side-effect-free input to
AtomicSkill.plan().Methods:
__init__(robot, task, scene, env_ids[, ...])Return verified state for one canonical articulation joint.
get_coordinated_held_object(first_resource, ...)Return a coordinated held-object relation, if any.
get_held_object(resource)Return the object held by
resource, if any.project(*, qpos, task)Create the hypothetical context used to compile a following action.
Return the explicit command period required for interpolation.
Attributes:
Optional immutable Affordance sampling stream supplied by the host.
Verified articulation-joint states.
Number of environments in this planning request.
Explicit command period used by action-owned interpolation.
Coordinated held-object relations.
Single-resource held-object relations.
Explicit look-ahead planning role, independent of measured/projected state.
Measured joint positions used as the planning start state.
Original host observation retained across projection, never its planned start.
Eligible planning rows; inactive rows cannot determine path duration.
Optional native-world source stamp; projected joint states keep this world scope.
- __init__(robot, task, scene, env_ids, control_dt=None, affordance_sampling=None, *, planning_mask=None, observed_robot=None, is_preview=False, world_source_stamp=None)
-
affordance_sampling:
AffordanceSamplingContext|None Optional immutable Affordance sampling stream supplied by the host.
- property articulation_joints: Mapping[tuple[str, str], ArticulationJointState]
Verified articulation-joint states.
- property batch_size: int
Number of environments in this planning request.
-
control_dt:
float|None Explicit command period used by action-owned interpolation.
- property coordinated_held_objects: Mapping[tuple[str, str], CoordinatedHeldObjectState]
Coordinated held-object relations.
- get_articulation_joint_state(articulation_id, joint_id)[source]
Return verified state for one canonical articulation joint.
- Return type:
ArticulationJointState|None
- get_coordinated_held_object(first_resource, second_resource)[source]
Return a coordinated held-object relation, if any.
- Return type:
CoordinatedHeldObjectState|None
- get_held_object(resource)[source]
Return the object held by
resource, if any.- Return type:
HeldObjectState|None
- property held_objects: Mapping[str, HeldObjectState]
Single-resource held-object relations.
-
is_preview:
bool Explicit look-ahead planning role, independent of measured/projected state.
- property last_qpos: Tensor
Measured joint positions used as the planning start state.
-
observed_robot:
RobotObservation|None Original host observation retained across projection, never its planned start.
-
planning_mask:
Tensor|None Eligible planning rows; inactive rows cannot determine path duration.
- project(*, qpos, task)[source]
Create the hypothetical context used to compile a following action.
- Parameters:
qpos (
Tensor) – Projected terminal joint positions.task (
TaskState) – Task state after applying expected effects.
- Return type:
- Returns:
New context. No measured state or simulator state is mutated.
- require_control_dt()[source]
Return the explicit command period required for interpolation.
- Raises:
ValueError – If the caller did not provide
control_dt.- Return type:
float
-
world_source_stamp:
PhysicalObservationStamp|None Optional native-world source stamp; projected joint states keep this world scope.
- class embodichain.lab.sim.atomic_skills.PlanningContextTrackingFeedbackProvider[source]
Built-in provider backed by
PlanningContext.robot.
- class embodichain.lab.sim.atomic_skills.PlanningFailure[source]
Stable planning-failure classification used by recovery policy.
- Parameters:
code (
str) – Exact machine-readable failure code.retryable (
bool) – Whether action-level recovery may replan failed rows.
Methods:
__init__(code[, retryable])- __init__(code, retryable=True)
- class embodichain.lab.sim.atomic_skills.PlanningRecovery[source]
Immutable, callable-free declaration owned by one concrete skill.
- Parameters:
kind (
str) – Stable declaration kind selected by an allowlisted decoder.skill_id (
str) – Exact Atomic skill allowed to consume this declaration.revision (
int) – Positive declaration revision included in its fingerprint.
Subclasses contain only immutable scalar/tuple values. Runtime services, solver objects and callable configuration do not belong in this value.
Methods:
__init__(kind, skill_id, revision)- __init__(kind, skill_id, revision)
- class embodichain.lab.sim.atomic_skills.PlanningRecoveryOutcome[source]
Immutable logical-planning proposal, never physical-effect evidence.
- Parameters:
skill_id (
str) – Exact skill producing this proposal.invocation_id (
str) – Exact invocation whose planning attempt produced it.invocation_revision (
int) – Revision of that invocation.plan_id (
str) – Fresh opaque identity for this particular planning attempt.
Host integrations explicitly commit supported outcomes after a real planning attempt, including a failed plan when its skill contract requires that. Inspecting or snapshotting a plan never commits the proposal. Concrete outcomes own their operation/episode/environment scope and compare-and-set cursor version; no live cursor or callback belongs in this value.
Methods:
__init__(skill_id, invocation_id, ...)snapshot()Return an independently owned proposal without committing it.
- __init__(skill_id, invocation_id, invocation_revision, plan_id)
- snapshot()[source]
Return an independently owned proposal without committing it.
- Return type:
PlanningRecoveryOutcome- Returns:
Detached immutable proposal retaining its exact invocation identity.
- class embodichain.lab.sim.atomic_skills.PoseTrackingEvaluator[source]
Evaluator for
PoseTrackingMetric.Classes:
metric_typealias of
PoseTrackingMetric- metric_type
alias of
PoseTrackingMetric
- class embodichain.lab.sim.atomic_skills.PoseTrackingMetric[source]
Independent translation and rotation tolerances for base pose.
Methods:
__init__([translation_tolerance, ...])- __init__(translation_tolerance=0.02, rotation_tolerance=0.05)
- class embodichain.lab.sim.atomic_skills.PoseTrackingState[source]
Batched homogeneous poses with shape
(B, 4, 4).Methods:
__init__(poses)snapshot()Return an independently owned state snapshot.
Attributes:
batch_sizeReturn the represented environment count.
deviceReturn the tensor device.
- __init__(poses)
- property batch_size: int
Return the represented environment count.
- property device: device
Return the tensor device.
- snapshot()[source]
Return an independently owned state snapshot.
- Return type:
PoseTrackingState
- class embodichain.lab.sim.atomic_skills.Pour[source]
Rotate and return an exclusively held object about its internal axis.
Classes:
GoalTypealias of
PourGoalOptionsTypealias of
PourOptionsAttributes:
binding_contractExplicit robot-independent requirements for semantic discovery.
open_loopWhether the skill intentionally declares no verified physical effect.
skill_idStable registry identifier for this skill.
- GoalType
alias of
PourGoal
- OptionsType
alias of
PourOptions
- binding_contract: ClassVar[SkillBindingContract] = SkillBindingContract(slots=(SkillResourceSlot(slot_id='primary', endpoints=(SkillEndpointRequirement(endpoint_id='motion', capabilities=frozenset({'motion.cartesian_pose', 'kinematics.forward'}), required_commands=mappingproxy({})), SkillEndpointRequirement(endpoint_id='grasp', capabilities=frozenset({'interaction.grasp'}), required_commands=mappingproxy({'grasp': <class 'embodichain.lab.sim.atomic_skills.control.JointPositionCommand'>}))), constraints=(DisjointSlotEndpoints(endpoint_ids=('motion', 'grasp')),)),), constraints=())
Explicit robot-independent requirements for semantic discovery.
Concrete action classes must declare this attribute in their own class body to opt into the semantic catalog. Inheriting another action’s contract does not silently expose a new skill identifier.
- open_loop: ClassVar[bool] = True
Whether the skill intentionally declares no verified physical effect.
- skill_id: ClassVar[str] = 'pour'
Stable registry identifier for this skill.
- class embodichain.lab.sim.atomic_skills.PourGoal[source]
Pour toward an opening, or rotate in place when no target is supplied.
- Parameters:
target (
PourTarget|None) – Receiving and source-mouth geometry. Omitting it retains the original signed rotation about the source’s internal axis.reference_object_pose (
Tensor|SceneEntityPose|None) – Optional authored upright object pose for local-axis tilt and return, exclusive withtarget. Omission uses the held pose at the actual start joints.
Methods:
__init__([target, reference_object_pose])- __init__(target=None, *, reference_object_pose=None)
- class embodichain.lab.sim.atomic_skills.PourOptions[source]
Per-invocation pouring behavior.
Methods:
__init__([rotate_angle, dwell_duration, ...])Attributes:
approach_distanceExtra lateral clearance outside the receiving opening before tilt.
clearanceSource bounding-box clearance above the receiver plane, in metres.
dwell_durationMinimum time to remain at the poured orientation, in seconds.
max_mouth_heightMaximum mouth height considered for a targeted pour, in metres.
max_rotation_stepMaximum angular spacing of mouth-compensated Cartesian keyframes.
mouth_heightPreferred mouth height above the receiver opening plane, in metres.
rotate_angleSigned rotation about the held object's local internal axis, in radians.
rotation_durationMinimum time allocated to each outward and return rotation, in seconds.
- __init__(rotate_angle=0.7853981633974483, dwell_duration=0.5, rotation_duration=None, mouth_height=0.08, max_mouth_height=0.25, clearance=0.025, approach_distance=0.04, max_rotation_step=0.08726646259971647)
-
approach_distance:
float Extra lateral clearance outside the receiving opening before tilt.
-
clearance:
float Source bounding-box clearance above the receiver plane, in metres.
-
dwell_duration:
float Minimum time to remain at the poured orientation, in seconds.
-
max_mouth_height:
float Maximum mouth height considered for a targeted pour, in metres.
-
max_rotation_step:
float Maximum angular spacing of mouth-compensated Cartesian keyframes.
-
mouth_height:
float Preferred mouth height above the receiver opening plane, in metres.
-
rotate_angle:
float Signed rotation about the held object’s local internal axis, in radians.
-
rotation_duration:
float|None Minimum time allocated to each outward and return rotation, in seconds.
- class embodichain.lab.sim.atomic_skills.PourTarget[source]
Geometry of a receiving opening and the held object’s mouth.
- Parameters:
receiver_pose (
Tensor|SceneEntityPose) – World opening pose, optionally a live scene reference. Its +Z is the outward opening normal.source_mouth_pose (
Tensor) – Mouth frame relative to the held object. Its +Z points out of the mouth when the source is upright.receiver_radius (
float) – Usable circular opening radius, in metres.mouth_radius (
float) – Conservative source mouth radius, in metres.
Methods:
__init__(receiver_pose, source_mouth_pose, ...)- __init__(receiver_pose, source_mouth_pose, receiver_radius, mouth_radius)
- class embodichain.lab.sim.atomic_skills.Press[source]
Open-loop motion primitive that approaches, presses, and retracts.
Classes:
GoalTypealias of
PressGoalOptionsTypealias of
PressOptionsPlanningRecoveryTypealias of
PressPlanningRecoveryAttributes:
binding_contractExplicit robot-independent requirements for semantic discovery.
open_loopWhether the skill intentionally declares no verified physical effect.
skill_idStable registry identifier for this skill.
- GoalType
alias of
PressGoal
- OptionsType
alias of
PressOptions
- PlanningRecoveryType
alias of
PressPlanningRecovery
- binding_contract: ClassVar[SkillBindingContract] = SkillBindingContract(slots=(SkillResourceSlot(slot_id='primary', endpoints=(SkillEndpointRequirement(endpoint_id='motion', capabilities=frozenset({'motion.cartesian_pose', 'kinematics.forward'}), required_commands=mappingproxy({})), SkillEndpointRequirement(endpoint_id='grasp', capabilities=frozenset({'interaction.grasp'}), required_commands=mappingproxy({'grasp': <class 'embodichain.lab.sim.atomic_skills.control.JointPositionCommand'>}))), constraints=(DisjointSlotEndpoints(endpoint_ids=('motion', 'grasp')),)),), constraints=())
Explicit robot-independent requirements for semantic discovery.
Concrete action classes must declare this attribute in their own class body to opt into the semantic catalog. Inheriting another action’s contract does not silently expose a new skill identifier.
- open_loop: ClassVar[bool] = True
Whether the skill intentionally declares no verified physical effect.
- skill_id: ClassVar[str] = 'press'
Stable registry identifier for this skill.
- class embodichain.lab.sim.atomic_skills.PressAffordance[source]
Target-local contact point and parent-joint pressing geometry.
Methods:
__init__([object_label, custom_config, ...])get_press_pose(target_pose[, press_position])Construct a press pose at the configured surface point.
resolve_from_object_geometry(geometry)Resolve the target-local prismatic axis, sign, and contact point.
sample_press_pose(target_pose[, ...])Sample contact-frame roll while preserving point and forward axis.
Attributes:
custom_configUser-defined configuration payload.
press_axisParent prismatic-joint axis, signed toward articulation geometry.
press_positionLocal contact point; inferred from articulation geometry when omitted.
- __init__(object_label='', custom_config=<factory>, press_axis=<factory>, *, press_position=None)
-
custom_config:
dict[str,Any] User-defined configuration payload.
- get_press_pose(target_pose, press_position=None)[source]
Construct a press pose at the configured surface point.
The end-effector z-axis follows
press_axisin world space. An adaptive reference produces an orthonormal, right-handed frame.- Parameters:
target_pose (
Tensor) – Current target world pose with shape(B, 4, 4).press_position (
tuple[float,float,float] |None) – Optional per-call exact local-frame press position. It overridespress_position.
- Return type:
Tensor- Returns:
Batched world-frame press poses with shape
(B, 4, 4).- Raises:
ValueError – If an input has an invalid shape or value.
-
press_axis:
Tensor Parent prismatic-joint axis, signed toward articulation geometry.
-
press_position:
tuple[float,float,float] |None= None Local contact point; inferred from articulation geometry when omitted.
- resolve_from_object_geometry(geometry)[source]
Resolve the target-local prismatic axis, sign, and contact point.
- Return type:
None
- sample_press_pose(target_pose, press_position=None, *, sampling, env_ids, key='press_roll')[source]
Sample contact-frame roll while preserving point and forward axis.
- Parameters:
target_pose (
Tensor) – Target world poses with shape(B, 4, 4).press_position (
tuple[float,float,float] |None) – Optional exact local contact position.sampling (
AffordanceSamplingContext|None) – Optional reproducible branch stream.env_ids (
Tensor) – Stable environment identities matching target rows.key (
str) – Sampling operation identity.
- Return type:
AffordanceSample- Returns:
Sampled press poses and roll metadata.
- class embodichain.lab.sim.atomic_skills.PressGoal[source]
Target object described by a press affordance.
Methods:
__init__(semantics, target_pose)Attributes:
target_poseTarget pose snapshot or late-bound stable scene-entity reference.
- __init__(semantics, target_pose)
-
target_pose:
Tensor|SceneEntityPose Target pose snapshot or late-bound stable scene-entity reference.
- class embodichain.lab.sim.atomic_skills.PressOptions[source]
Per-invocation pressing behavior.
Methods:
__init__([hand_interp_steps, ...])Attributes:
approach_distanceDistance from the press position opposite the press direction.
contact_roll_alternativesAllowed extra contact-frame rolls in radians; point and press axis stay fixed.
hand_interp_stepsNumber of waypoints used to close the hand.
press_distanceDistance traveled into the target along its press axis.
press_positionOptional local-frame position overriding the affordance press position.
- __init__(hand_interp_steps=5, approach_distance=0.1, press_distance=0.05, press_position=None, contact_roll_alternatives=())
-
approach_distance:
float Distance from the press position opposite the press direction.
-
contact_roll_alternatives:
tuple[float,...] Allowed extra contact-frame rolls in radians; point and press axis stay fixed.
Planning these alternatives requires an explicit PressPlanningRecovery. The source-compatible declaration supplies only
(pi / 2,).
-
hand_interp_steps:
int Number of waypoints used to close the hand.
-
press_distance:
float Distance traveled into the target along its press axis.
-
press_position:
tuple[float,float,float] |None Optional local-frame position overriding the affordance press position.
- class embodichain.lab.sim.atomic_skills.PressPlanningRecovery[source]
Failure-only B1 Press planning rules with the fixed source attempt budget.
The two complete plans include the nominal plan and at most one declared contact-roll alternative. Failed Cartesian phases may use the shared bounded IK continuation on unchanged targets and time. Inner IK search limits remain owned by the motion service. Separate dense-grid engine attempts each get a fresh local scope; this declaration does not change their RNG boundary.
Methods:
__init__()- __init__()
- class embodichain.lab.sim.atomic_skills.PrototypeMotionProvider[source]
Instantiate a prototype with an explicit motion authority.
qposrequires the source object and target poses.eef_poseretargets tabletop XY/yaw changes through IK, andhybriduses the authority declared for every phase. The host must independently establish that robot and object geometry are compatible: entity poses and joint names alone do not prove asset identity. Environment lifecycle and persistence remain host-owned.- Parameters:
prototype (
SkillMotionPrototype) – Prepared, normalized source prototype.object_entity_id (
str) – Scene entity carrying the source object pose.target_entity_id (
str|None) – Scene entity carrying the source target pose when one is declared by the prototype.target_entity_to_reference (
ndarray|None) – Optional rigid transform from that entity to the prototype’s target reference frame.pose_tolerance (
float) – Absolute matrix tolerance for fixed scene references.gripper_mode (
Literal['recorded','semantic']) – Use recorded values or reconstruct semantic commands.authority (
Literal['qpos','eef_pose','hybrid']) – Authoritative joint or TCP path, globally or by phase.motion_generator (
object|None) – Robot motion services for IK and collision checking.require_collision_validation (
bool) – Require the backend’s sampled checker.prototype_sha256 (
str|None) – Optional content-addressed source identity.object_support_validator (
Callable[[PlanningContext],bool] |None) – Optional trusted host check for regrasping an object currently resting on the target support.ik_smoothing_trigger_fraction (
float|None) – Optional fraction of the motion policy’s acceleration limit at which to seek a lower-acceleration nominal path without changing protected samples or the TCP error tube.joint_acceleration_limits (
tuple[float,...] |None) – Optional full-robot joint limits supplied by the host. Nominal feasibility uses the tighter of these limits and the motion policy; final plan and observed-effect checks still run.refinement (
MotionRefinementCfg|None) – Optional bounded Cartesian interaction repair before the expansion baseline. Only expliciteef_poseauthority supports it.grasp_pose_generators (
Mapping[str,GraspPoseGenerator] |None) – Existing runtime gripper services keyed by the configured grasp control part; required for Pick refinement.refinement_release_validator (
Callable[[PlanningContext,ndarray,MotionRefinementCfg],Mapping[str,object]] |None) – Host-owned physical support check for refined Place targets. It must verify footprint and release gap.
A required acceleration-feasibility pass can adjust Cartesian-authoritative hold interiors before the nominal geometry baseline is frozen. Its FK error is checked and its iterations are recorded. Optional headroom smoothing never changes contact or hold samples.
Methods:
__init__(prototype, object_entity_id[, ...])instantiate(request, context)Build a fixed-scene nominal motion for the active invocation.
- __init__(prototype, object_entity_id, target_entity_id=None, target_entity_to_reference=None, pose_tolerance=1e-05, gripper_mode='recorded', authority='qpos', motion_generator=None, require_collision_validation=True, prototype_sha256=None, object_support_validator=None, ik_smoothing_trigger_fraction=None, joint_acceleration_limits=None, refinement=None, grasp_pose_generators=None, refinement_release_validator=None)
- instantiate(request, context)[source]
Build a fixed-scene nominal motion for the active invocation.
- Return type:
InstantiatedSkillMotion
- class embodichain.lab.sim.atomic_skills.PushObject[source]
Close the end effector, contact a rigid object, and push it in-plane.
Classes:
GoalTypealias of
PushObjectGoalOptionsTypealias of
PushObjectOptionsAttributes:
binding_contractExplicit robot-independent requirements for semantic discovery.
open_loopWhether the skill intentionally declares no verified physical effect.
skill_idStable registry identifier for this skill.
- GoalType
alias of
PushObjectGoal
- OptionsType
alias of
PushObjectOptions
- binding_contract: ClassVar[SkillBindingContract] = SkillBindingContract(slots=(SkillResourceSlot(slot_id='primary', endpoints=(SkillEndpointRequirement(endpoint_id='motion', capabilities=frozenset({'motion.cartesian_pose'}), required_commands=mappingproxy({})), SkillEndpointRequirement(endpoint_id='grasp', capabilities=frozenset({'interaction.grasp'}), required_commands=mappingproxy({'grasp': <class 'embodichain.lab.sim.atomic_skills.control.JointPositionCommand'>}))), constraints=(DisjointSlotEndpoints(endpoint_ids=('motion', 'grasp')),)),), constraints=())
Explicit robot-independent requirements for semantic discovery.
Concrete action classes must declare this attribute in their own class body to opt into the semantic catalog. Inheriting another action’s contract does not silently expose a new skill identifier.
- open_loop: ClassVar[bool] = True
Whether the skill intentionally declares no verified physical effect.
- skill_id: ClassVar[str] = 'push_object'
Stable registry identifier for this skill.
- class embodichain.lab.sim.atomic_skills.PushObjectGoal[source]
Push one rigid object toward a target pose on the target support plane.
Methods:
__init__(semantics, target_pose)Attributes:
target_poseDesired object pose or a late-bound scene-entity target reference.
- __init__(semantics, target_pose)
- target_pose: PoseGoalValue
Desired object pose or a late-bound scene-entity target reference.
- class embodichain.lab.sim.atomic_skills.PushObjectOptions[source]
Per-invocation planar pushing behavior.
Methods:
__init__([hand_interp_steps, ...])Attributes:
approach_heightDistance above the contact pose used for the free-space approach.
completion_tolerancePlanar target distance at which the action succeeds without moving.
contact_distanceInitial planar clearance behind the object along the push direction.
contact_frame_to_eefContact-frame to robot end-effector SE(3) calibration.
hand_interp_stepsNumber of waypoints used to close the end effector before approach.
object_contact_offsetObject-local point used as the center of the planar contact frame.
push_overshootAdditional end-effector travel beyond the object's target displacement.
retract_heightDistance above the pushed pose used for the final retraction.
support_frame_planar_contact_offsetOptional target-support-frame override for the contact's planar offset.
tool_calibrationsPer-control-part tool-frame overrides for asymmetric robot arms.
- __init__(hand_interp_steps=5, approach_height=0.1, retract_height=0.1, contact_distance=0.03, push_overshoot=0.0, completion_tolerance=0.0, object_contact_offset=tensor([0., 0., 0.]), support_frame_planar_contact_offset=None, contact_frame_to_eef=tensor([[1., 0., 0., 0.], [0., 1., 0., 0.], [0., 0., 1., 0.], [0., 0., 0., 1.]]), tool_calibrations=())
-
approach_height:
float Distance above the contact pose used for the free-space approach.
-
completion_tolerance:
float Planar target distance at which the action succeeds without moving.
-
contact_distance:
float Initial planar clearance behind the object along the push direction.
-
contact_frame_to_eef:
Tensor Contact-frame to robot end-effector SE(3) calibration.
-
hand_interp_steps:
int Number of waypoints used to close the end effector before approach.
-
object_contact_offset:
Tensor Object-local point used as the center of the planar contact frame.
-
push_overshoot:
float Additional end-effector travel beyond the object’s target displacement.
-
retract_height:
float Distance above the pushed pose used for the final retraction.
-
support_frame_planar_contact_offset:
Tensor|None Optional target-support-frame override for the contact’s planar offset.
-
tool_calibrations:
tuple[PushObjectToolCalibration,...] Per-control-part tool-frame overrides for asymmetric robot arms.
- class embodichain.lab.sim.atomic_skills.PushObjectToolCalibration[source]
End-effector calibration selected by a bound motion control part.
- Parameters:
control_part (
str) – Exact motion control-part identifier that selects this calibration.contact_frame_to_eef (
Tensor) – Contact-frame to robot end-effector SE(3) calibration.contact_distance (
float|None) – Optional tool-specific planar clearance behind the object.NoneusesPushObjectOptions’ default.
Methods:
__init__(control_part, contact_frame_to_eef)Attributes:
contact_distanceOptional tool-specific planar clearance behind the object.
contact_frame_to_eefContact-frame to robot end-effector SE(3) calibration.
control_partExact motion control-part identifier that selects this calibration.
- __init__(control_part, contact_frame_to_eef, contact_distance=None)
-
contact_distance:
float|None Optional tool-specific planar clearance behind the object.
-
contact_frame_to_eef:
Tensor Contact-frame to robot end-effector SE(3) calibration.
-
control_part:
str Exact motion control-part identifier that selects this calibration.
- class embodichain.lab.sim.atomic_skills.RecoveryPolicy[source]
Bounded local recovery policy used by the execution runtime.
Methods:
__init__([max_replans, max_skill_retries, ...])validate_skill(skill_id)Reject a planning declaration selected for a different Atomic skill.
Attributes:
Dynamic-goal rotation threshold in radians (five degrees by default).
Dynamic-goal translation threshold in metres.
Maximum replans within one action attempt.
Maximum whole-action retries after planning, execution, or effect failure.
Optional outer planning ledger/deadline; None preserves shared defaults.
Optional skill-owned planning declaration; None enables no new recovery.
Allow ordinary action retries when a complete plan has no successful row.
Maximum time for one action attempt, including terminal effect verification.
- __init__(max_replans=3, max_skill_retries=2, goal_translation_threshold=0.02, goal_rotation_threshold=0.0872664626, skill_timeout=30.0, *, retry_all_failed_plans=True, planning_budget=None, planning_recovery=None)
-
goal_rotation_threshold:
float Dynamic-goal rotation threshold in radians (five degrees by default).
-
goal_translation_threshold:
float Dynamic-goal translation threshold in metres.
-
max_replans:
int Maximum replans within one action attempt.
-
max_skill_retries:
int Maximum whole-action retries after planning, execution, or effect failure.
-
planning_budget:
PlanningBudget|None Optional outer planning ledger/deadline; None preserves shared defaults.
An already-active parent ledger owns nested requests and their deadline. This is separate from skill_timeout, which governs execution/verification.
-
planning_recovery:
PlanningRecovery|None Optional skill-owned planning declaration; None enables no new recovery.
Its complete immutable contents participate in policy/registration identity. This scope is separate from execution replans and whole-action retries.
-
retry_all_failed_plans:
bool Allow ordinary action retries when a complete plan has no successful row.
False preserves its failure code but makes the all-failed result terminal. Candidate searches inside the complete planning boundary retain their own bounded recovery; partial successes keep their existing classification.
-
skill_timeout:
float Maximum time for one action attempt, including terminal effect verification.
- validate_skill(skill_id)[source]
Reject a planning declaration selected for a different Atomic skill.
- Parameters:
skill_id (
str) – Skill selected by the invocation or static descriptor.- Raises:
ValueError – The declaration belongs to another skill.
- Return type:
None
- embodichain.lab.sim.atomic_skills.ResolvedActionRequest
alias of
ResolvedSkillRequest
- class embodichain.lab.sim.atomic_skills.ResolvedSkillRequest[source]
Engine-owned immutable planning snapshot for one invocation revision.
Recovery replans reuse this object verbatim and vary only the
PlanningContext. Deep-copying goal value payloads, policies, and skill options severs caller-owned mutable data before planning starts while retaining simulator-backed entity handles and private runtime caches.Methods:
__init__(skill_id, goal, binding, ...[, ...])snapshot()Return an independently owned resolved-request snapshot.
- __init__(skill_id, goal, binding, motion_policy, tracking_policy, recovery_policy, skill_options, phase_effect_gates=(), invocation_id=None, revision=0)
- snapshot()[source]
Return an independently owned resolved-request snapshot.
- Return type:
ResolvedSkillRequest[TypeVar(GoalT),TypeVar(OptionsT, bound=SkillOptions)]
- class embodichain.lab.sim.atomic_skills.RigidObjectSceneProvider[source]
Observe simulation rigid objects and maintain scene revisions.
The provider increments the general scene version when any tracked entity moves materially. For IDs declared as collision entities it additionally increments a per-environment collision-world revision, allowing one batch row to invalidate its trajectory without failing unrelated rows.
- Parameters:
entities (
Mapping[str,SceneEntity]) – Stable entity IDs mapped to live simulation rigid objects.collision_entity_ids (
Sequence[str]) – Tracked IDs consumed as dynamic planner obstacles.cfg (
RigidObjectSceneProviderCfg|None) – Optional material-change thresholds.
Methods:
__init__(entities, *[, ...])snapshot(*, timestamp, env_ids)Capture object poses and advance material-change revisions.
- __init__(entities, *, collision_entity_ids=(), cfg=None)[source]
- snapshot(*, timestamp, env_ids)[source]
Capture object poses and advance material-change revisions.
- Parameters:
timestamp (
float) – Current simulation observation time.env_ids (
Tensor) – Stable correlation IDs whose order matches object rows.
- Return type:
- Returns:
Versioned scene snapshot with per-environment collision revisions.
- class embodichain.lab.sim.atomic_skills.RigidObjectSceneProviderCfg[source]
Material-pose thresholds used to advance scene revisions.
Methods:
__init__([translation_threshold, ...])copy(**kwargs)Return a new object replacing specified fields with new values.
replace(**kwargs)Return a new object replacing specified fields with new values.
to_dict()Convert an object into dictionary recursively.
validate([prefix])Check the validity of configclass object.
Attributes:
rotation_thresholdMinimum rotation in radians considered a scene change.
translation_thresholdMinimum translation in metres considered a scene change.
- __init__(translation_threshold=<factory>, rotation_threshold=<factory>)
- copy(**kwargs)
Return a new object replacing specified fields with new values.
This is especially useful for frozen classes. Example usage:
@configclass(frozen=True) class C: x: int y: int c = C(1, 2) c1 = c.replace(x=3) assert c1.x == 3 and c1.y == 2
- Parameters:
obj (
object) – The object to replace.**kwargs – The fields to replace and their new values.
- Return type:
object- Returns:
The new object.
- replace(**kwargs)
Return a new object replacing specified fields with new values.
This is especially useful for frozen classes. Example usage:
@configclass(frozen=True) class C: x: int y: int c = C(1, 2) c1 = c.replace(x=3) assert c1.x == 3 and c1.y == 2
- Parameters:
obj (
object) – The object to replace.**kwargs – The fields to replace and their new values.
- Return type:
object- Returns:
The new object.
-
rotation_threshold:
float Minimum rotation in radians considered a scene change.
- to_dict()
Convert an object into dictionary recursively.
Note
Ignores string names starting with “__” (i.e. built-in methods). Non-string mapping keys retain their original type.
- Parameters:
obj (
object) – An instance of a class to convert.- Raises:
ValueError – When input argument is not an object.
- Return type:
dict[Any,Any]- Returns:
Converted dictionary mapping.
-
translation_threshold:
float Minimum translation in metres considered a scene change.
- 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.
- class embodichain.lab.sim.atomic_skills.RobotObservation[source]
Measured robot state used as the start of planning or replanning.
Optional
command_qposandcommand_qvelare independently owned snapshots of controller references at the same control boundary. They are not physical measurements and never replaceqposorqvel. Projection advances available references to the projected terminal position and rest.Methods:
__init__(timestamp, qpos, qvel[, qeffort, ...])with_qpos(qpos)Create a projected observation with a new position and zero velocity.
Attributes:
Number of represented vectorized environments.
Number of robot joint-position columns.
- __init__(timestamp, qpos, qvel, qeffort=None, root_pose=None, root_twist=None, command_qpos=None, command_qvel=None)
- property batch_size: int
Number of represented vectorized environments.
- property robot_dof: int
Number of robot joint-position columns.
- with_qpos(qpos)[source]
Create a projected observation with a new position and zero velocity.
- Parameters:
qpos (
Tensor) – Projected joint positions with the same shape as this observation.- Return type:
- Returns:
New observation suitable for compiling the next action.
- class embodichain.lab.sim.atomic_skills.RunnerStatus[source]
Lifecycle status owned by an
ExecutionRunner.Methods:
__new__(value)- __new__(value)
- class embodichain.lab.sim.atomic_skills.RunnerStep[source]
Result of one non-blocking execution-runner update.
Methods:
__init__(status, timestamp, wait_duration, ...)Attributes:
Fresh physical evidence collected for this observation tick, if enabled.
Whether no session tick was due during this update.
Terminal or failure diagnostic, when available.
- __init__(status, timestamp, wait_duration, context, tick, dispatches, command_count, message=None, evidence=None)
-
evidence:
PhysicalEvidenceFrame|None Fresh physical evidence collected for this observation tick, if enabled.
- property is_waiting: bool
Whether no session tick was due during this update.
-
message:
str|None Terminal or failure diagnostic, when available.
- class embodichain.lab.sim.atomic_skills.RuntimeCommandFrame[source]
Synchronized endpoint commands for one batched runtime instant.
- Parameters:
commands (
tuple[EndpointCommand,...]) – Commands dispatched together for this frame.active_mask (
Tensor) – Boolean environment rows allowed to execute commands. Transports must actively neutralize addressed targets for false rows rather than leaving a previously persistent command running.env_ids (
Tensor) – Stable environment identifiers for the batch rows.hold_duration (
Tensor) – Per-row delay before advancing to the next frame.
Methods:
__init__(commands, active_mask, env_ids, ...)snapshot()Return an independently owned command frame.
with_active_mask(active_mask)Return a frame snapshot with a replacement active-row mask.
Attributes:
Return the number of environment rows.
Return the shared frame device.
Return owned targets in command order.
- __init__(commands, active_mask, env_ids, hold_duration)
- property batch_size: int
Return the number of environment rows.
- property device: device
Return the shared frame device.
- snapshot()[source]
Return an independently owned command frame.
- Return type:
- property targets: tuple[RuntimeEndpointTarget, ...]
Return owned targets in command order.
- with_active_mask(active_mask)[source]
Return a frame snapshot with a replacement active-row mask.
- Parameters:
active_mask (
Tensor) – Boolean mask with one value per environment row.- Return type:
- Returns:
Independently owned frame with unchanged commands and timing.
- class embodichain.lab.sim.atomic_skills.RuntimeCommandPayload[source]
Immutable-by-ownership payload submitted to one runtime transport.
Attributes:
Return the number of environment rows in this payload.
Return the device shared by this payload's batched values.
Return the transport kind that accepts this payload.
Methods:
snapshot()Return an independently owned payload snapshot.
- abstract property batch_size: int
Return the number of environment rows in this payload.
- abstract property device: device
Return the device shared by this payload’s batched values.
- abstract snapshot()[source]
Return an independently owned payload snapshot.
- Return type:
- abstract property transport_id: str
Return the transport kind that accepts this payload.
- class embodichain.lab.sim.atomic_skills.RuntimeEndpointTarget[source]
Stable controller destination produced by an endpoint adapter.
Targets contain immutable addressing data only. Live controllers, sockets, simulator entities, and other process-owned handles belong to an endpoint-command transport rather than this value.
Attributes:
Return the stable controller-address and safe-hold fingerprint.
Return the destination identifier within its transport.
Return the registered transport kind used by this target.
Methods:
snapshot()Return an independently owned target snapshot.
- property address_fingerprint: Hashable
Return the stable controller-address and safe-hold fingerprint.
The default covers the exact target type and transport-scoped destination. Target types whose hold footprint depends on additional immutable addressing fields must override this property and include those fields. Replans and explicit revisions may replace payloads, but they may not change this fingerprint in place.
- snapshot()[source]
Return an independently owned target snapshot.
- Return type:
- abstract property target_id: str
Return the destination identifier within its transport.
- abstract property transport_id: str
Return the registered transport kind used by this target.
- class embodichain.lab.sim.atomic_skills.SceneEntity[source]
Structural contract a scene provider requires of an observed entity.
Grounding needs an identity and one pose; it never needs the rest of a rigid-body API. Declaring that explicitly lets an articulation stand in as one compound object without relying on incidental duck typing, and keeps the requirement visible to callers instead of buried in an attribute lookup.
Methods:
__init__(*args, **kwargs)get_local_pose([to_matrix])Return the entity pose that defines its object frame.
Attributes:
Stable scene identifier of the entity.
- __init__(*args, **kwargs)
- get_local_pose(to_matrix=False)[source]
Return the entity pose that defines its object frame.
- Return type:
Tensor
- property uid: str
Stable scene identifier of the entity.
- class embodichain.lab.sim.atomic_skills.SceneEntityPose[source]
Late-bound pose derived from a versioned scene entity.
The semantic request remains stable while each call to
AtomicSkill.plan()resolves the latest scene pose. This is the bridge used by an execution session to replan moving goals.Methods:
__init__(entity_id[, relative_pose, ...])snapshot()Return an independently owned late-bound pose value.
Attributes:
Stable scene entity identifier.
Minimum accepted perception confidence.
Optional transform applied as
entity_pose @ relative_pose.Optional world-frame translation applied after
relative_pose.Optional world-frame orientation applied before
relative_pose.- __init__(entity_id, relative_pose=None, minimum_confidence=0.0, world_displacement=None, world_orientation=None)
-
entity_id:
str Stable scene entity identifier.
-
minimum_confidence:
float Minimum accepted perception confidence.
-
relative_pose:
Tensor|None Optional transform applied as
entity_pose @ relative_pose.
- snapshot()[source]
Return an independently owned late-bound pose value.
- Return type:
- Returns:
Exact scene reference with an owned relative-pose tensor.
-
world_displacement:
Tensor|None Optional world-frame translation applied after
relative_pose.
-
world_orientation:
Tensor|None Optional world-frame orientation applied before
relative_pose.
- class embodichain.lab.sim.atomic_skills.SceneProvider[source]
Produce scene snapshots correlated with execution environments.
Implementations own scene-change detection and revision advancement. A snapshot’s entity rows must follow the supplied
env_idsorder. Scene and collision-world revisions must never regress for a stable environment.Methods:
__init__(*args, **kwargs)snapshot(*, timestamp, env_ids)Capture the latest versioned scene state.
- __init__(*args, **kwargs)
- snapshot(*, timestamp, env_ids)[source]
Capture the latest versioned scene state.
- Parameters:
timestamp (
float) – Observation timestamp supplied by the execution backend.env_ids (
Tensor) – Stable ordered environment correlation IDs.
- Return type:
- Returns:
Scene snapshot whose batched entities follow
env_idsorder.
- class embodichain.lab.sim.atomic_skills.SceneSnapshot[source]
Versioned scene state used to ground dynamic goals and obstacles.
Methods:
__init__(timestamp, version[, entities, ...])collision_obstacle_poses(*, batch_size, ...)Return collision obstacle poses in planning batch order.
collision_world_revisions(batch_size)Expand the collision revision to one value per environment.
empty()Create an empty initial scene snapshot.
Return an owned live joint observation for a canonical address.
Attributes:
Live physical joint observations keyed by articulation and joint ID.
Entity IDs whose poses update a planner's dynamic collision world.
Global or per-environment collision-world revision.
- __init__(timestamp, version, entities=<factory>, collision_world_revision=0, collision_entity_ids=(), articulation_joints=<factory>)
-
articulation_joints:
Mapping[tuple[str,str],ObservedArticulationJointState] Live physical joint observations keyed by articulation and joint ID.
-
collision_entity_ids:
tuple[str,...] Entity IDs whose poses update a planner’s dynamic collision world.
- collision_obstacle_poses(*, batch_size, device, dtype)[source]
Return collision obstacle poses in planning batch order.
- Parameters:
batch_size (
int) – Number of planning environments.device (
device) – Planner tensor device.dtype (
dtype) – Planner tensor dtype.
- Return type:
Mapping[str,Tensor]- Returns:
Mapping from configured collision entity ID to
(B, 4, 4)pose.
-
collision_world_revision:
int|tuple[int,...] Global or per-environment collision-world revision.
- collision_world_revisions(batch_size)[source]
Expand the collision revision to one value per environment.
- Parameters:
batch_size (
int) – Number of environments represented by the planning context.- Return type:
tuple[int,...]- Returns:
Per-environment monotonic revision tuple.
- Raises:
ValueError – If an explicit revision tuple does not match the batch.
- classmethod empty()[source]
Create an empty initial scene snapshot.
- Return type:
- get_articulation_joint_state(articulation_id, joint_id)[source]
Return an owned live joint observation for a canonical address.
- Return type:
ObservedArticulationJointState|None
- class embodichain.lab.sim.atomic_skills.SimulationExecutionAdapter[source]
Adapt a simulation robot to observation, command, and clock protocols.
The adapter writes joint targets synchronously. Time advances only through
sleep(), which converts the requested runner interval to an integral number of physics updates. This makesExecutionRunner.run_until_blocked()deterministic and avoids wall-clock sleeps in headless simulation.- Parameters:
simulation (
SimulationManager) – Simulation manager advanced by the execution clock.robot (
Robot) – Robot observed and commanded by the adapter.physics_dt (
float|None) – Optional physics period. Defaults to the simulation config.control_dt (
float|None) – Optional command period exposed to action interpolation. Defaults tophysics_dtbecause that is the adapter’s minimum executable command cadence.env_ids (
Tensor|None) – Optional stable correlation IDs matching every robot row. They are not used as simulator indices; row order maps to robot instances.scene_provider (
SceneProvider|None) – Optional provider for versioned scene observations.scene_supplier (
Callable[[float],SceneSnapshot] |None) – Optional callback for versioned scene observations. It is mutually exclusive withscene_provider.initial_time (
float) – Initial elapsed simulation time in seconds.
Methods:
__init__(simulation, robot, *[, physics_dt, ...])cancel(targets, *, timeout)Acknowledge cancellation of synchronous simulation target writes.
hold(targets, context, *, timeout)Set every represented joint endpoint to an observed-position hold.
now()Return elapsed simulation time in seconds.
observe(task_state)Capture full-robot state and the latest supplied scene snapshot.
send(command, *, timeout)Write joint endpoint targets and neutralize inactive rows.
sleep(duration)Advance physics by exactly the requested grid-aligned duration.
Classes:
alias of
JointPositionPayloadAttributes:
Return the smallest representable simulated sleep duration.
- __init__(simulation, robot, *, physics_dt=None, control_dt=None, env_ids=None, scene_provider=None, scene_supplier=None, initial_time=0.0)[source]
- cancel(targets, *, timeout)[source]
Acknowledge cancellation of synchronous simulation target writes.
- Parameters:
targets (
tuple[RuntimeEndpointTarget,...]) – Joint-position destinations whose queued work is cancelled.timeout (
float) – Positive acknowledgement deadline.
- Return type:
- Returns:
Accepted acknowledgement. The following
holdcall installs the actual safe target.
- hold(targets, context, *, timeout)[source]
Set every represented joint endpoint to an observed-position hold.
- Parameters:
targets (
tuple[RuntimeEndpointTarget,...]) – Joint-position destinations to place in a safe hold.context (
PlanningContext) – Latest observed positions and stable environment IDs.timeout (
float) – Positive acknowledgement deadline.
- Return type:
- Returns:
Accepted acknowledgement or a rejected diagnostic.
- now()[source]
Return elapsed simulation time in seconds.
- Return type:
float- Returns:
Elapsed simulation time in seconds.
- observe(task_state)[source]
Capture full-robot state and the latest supplied scene snapshot.
- Parameters:
task_state (
TaskState) – Verified symbolic state owned by the execution session.- Return type:
- Returns:
Planning context timestamped with elapsed simulation time.
- payload_type
alias of
JointPositionPayload
- send(command, *, timeout)[source]
Write joint endpoint targets and neutralize inactive rows.
- Parameters:
command (
RuntimeCommandFrame) – Joint-position endpoint frame. Inactive rows are replaced with observed positions by this transport.timeout (
float) – Positive acknowledgement deadline. Simulation writes are synchronous, so this is validated but otherwise unused.
- Return type:
- Returns:
Accepted acknowledgement or a rejected diagnostic.
- sleep(duration)[source]
Advance physics by exactly the requested grid-aligned duration.
- Parameters:
duration (
float) – Requested simulated duration in seconds.- Return type:
None
- property sleep_quantum: float
Return the smallest representable simulated sleep duration.
- class embodichain.lab.sim.atomic_skills.SkillBinding[source]
Engine-owned generic endpoint bindings for one atomic skill call.
Methods:
__init__(owner_id[, endpoints])endpoint(slot_id, endpoint_id)Return one action-local resolved endpoint.
with_command_overrides(overrides)Return a binding snapshot with endpoint-scoped command overrides.
Attributes:
Return action-local endpoint keys in binding order.
Return unique owned runtime targets in binding order.
- __init__(owner_id, endpoints=())
- endpoint(slot_id, endpoint_id)[source]
Return one action-local resolved endpoint.
- Return type:
- property endpoint_keys: tuple[tuple[str, str], ...]
Return action-local endpoint keys in binding order.
- property targets: tuple[RuntimeEndpointTarget, ...]
Return unique owned runtime targets in binding order.
- with_command_overrides(overrides)[source]
Return a binding snapshot with endpoint-scoped command overrides.
- Return type:
- class embodichain.lab.sim.atomic_skills.SkillBindingContract[source]
Complete robot-independent binding contract for one atomic skill.
slots=()explicitly declares that a skill consumes no robot resource.NoneonSkillDescriptorinstead means that no semantic binding contract was declared.Methods:
__init__([slots, constraints])Attributes:
Return required slot identifiers in declaration order.
- __init__(slots=(), constraints=())
- property slot_ids: tuple[str, ...]
Return required slot identifiers in declaration order.
- class embodichain.lab.sim.atomic_skills.SkillControlOverrides[source]
Per-invocation semantic commands keyed by slot and endpoint.
The first two keys match a skill’s
(slot_id, endpoint_id)contract. The innermost mapping contains semantic command names. Overrides are captured in the invocation revision’s immutable planning snapshot.Methods:
__init__([endpoints])Return immutable overrides keyed by
(slot_id, endpoint_id).Attributes:
Whether this invocation defines no command overrides.
- __init__(endpoints=<factory>)
- as_flat_mapping()[source]
Return immutable overrides keyed by
(slot_id, endpoint_id).- Return type:
Mapping[tuple[str,str],Mapping[str,ControlCommand]]
- property is_empty: bool
Whether this invocation defines no command overrides.
- class embodichain.lab.sim.atomic_skills.SkillDescriptor[source]
Machine-readable metadata for one registered atomic skill.
Methods:
__init__(skill_id, goal_type, options_type)validate_motion_policy(policy)Reject unsupported segment recovery before grounding/provider work.
validate_planning_recovery(policy)Reject incompatible declarations before grounding or planning.
Attributes:
Explicit generic resource contract used by Task Program lowering.
Whether completion reports motion execution without physical-effect proof.
Exact supported declaration type(s); None rejects nonempty declarations.
Derived from the actual Atomic override; not a caller-supplied claim.
- __init__(skill_id, goal_type, options_type, agent_visible=True, open_loop=False, binding_contract=None, planning_recovery_type=None)
-
binding_contract:
SkillBindingContract|None Explicit generic resource contract used by Task Program lowering.
-
open_loop:
bool Whether completion reports motion execution without physical-effect proof.
-
planning_recovery_type:
type[PlanningRecovery] |tuple[type[PlanningRecovery],...] |None Exact supported declaration type(s); None rejects nonempty declarations.
-
supports_segment_motion_recovery:
bool Derived from the actual Atomic override; not a caller-supplied claim.
- validate_motion_policy(policy)[source]
Reject unsupported segment recovery before grounding/provider work.
- Parameters:
policy (
MotionPolicy) – Explicit motion policy selected for this exact skill.- Raises:
TypeError – The policy has an unsupported type.
ValueError – Segment recovery has no implementation for this skill.
- Return type:
None
- validate_planning_recovery(policy)[source]
Reject incompatible declarations before grounding or planning.
- Parameters:
policy (
RecoveryPolicy) – Selected immutable recovery policy.- Raises:
TypeError – The policy or concrete declaration type is unsupported.
ValueError – The declaration belongs to another skill.
- Return type:
None
- class embodichain.lab.sim.atomic_skills.SkillEndpointRequirement[source]
Capabilities and commands required from one slot-local endpoint.
Methods:
__init__(endpoint_id[, capabilities, ...])Attributes:
Open, namespaced all-of capability identifiers.
Endpoint selector local to the containing participant slot.
Semantic command names and their required typed command contracts.
- __init__(endpoint_id, capabilities=frozenset({}), required_commands=<factory>)
-
capabilities:
frozenset[str] Open, namespaced all-of capability identifiers.
-
endpoint_id:
str Endpoint selector local to the containing participant slot.
-
required_commands:
Mapping[str,type[ControlCommand]] Semantic command names and their required typed command contracts.
- class embodichain.lab.sim.atomic_skills.SkillInvocation[source]
One fully typed and endpoint-bound atomic skill request.
This is a runtime-domain object, not the JSON protocol emitted by an MLLM. An action compiler is responsible for converting a semantic
SkillCallSpecinto this grounded representation.Methods:
__init__(skill_id, goal, binding[, ...])Attributes:
Generic skill endpoint bindings owned by the selected engine.
Optional semantic control commands for this invocation revision.
Action-specific goal value object.
Optional correlation identifier propagated into execution traces.
Reusable motion-generation settings.
Physical-effect gates enforced at named trajectory-segment entries.
Bounded local execution recovery settings.
Monotonic revision used when replacing a runtime invocation.
Stable registered skill identifier.
Optional per-invocation behavior override for the selected skill.
Typed in-flight tracking and terminal-acceptance settings.
- __init__(skill_id, goal, binding, motion_policy=<factory>, tracking_policy=<factory>, recovery_policy=<factory>, phase_effect_gates=(), skill_options=None, control_overrides=<factory>, invocation_id=None, revision=0)
-
binding:
SkillBinding Generic skill endpoint bindings owned by the selected engine.
-
control_overrides:
SkillControlOverrides Optional semantic control commands for this invocation revision.
-
goal:
TypeVar(GoalT) Action-specific goal value object.
-
invocation_id:
str|None Optional correlation identifier propagated into execution traces.
-
motion_policy:
MotionPolicy Reusable motion-generation settings.
-
phase_effect_gates:
tuple[PhaseEffectGateRequirement,...] Physical-effect gates enforced at named trajectory-segment entries.
-
recovery_policy:
RecoveryPolicy Bounded local execution recovery settings.
-
revision:
int Monotonic revision used when replacing a runtime invocation.
-
skill_id:
str Stable registered skill identifier.
-
skill_options:
Optional[TypeVar(OptionsT, bound=SkillOptions)] Optional per-invocation behavior override for the selected skill.
-
tracking_policy:
TrackingPolicy Typed in-flight tracking and terminal-acceptance settings.
- class embodichain.lab.sim.atomic_skills.SkillOptions[source]
Marker base for immutable, skill-specific runtime options.
Subclasses belong to action modules and contain only behavior that may vary between invocations. Robot resources and semantic targets do not belong in this object.
Methods:
__init__()- __init__()
- class embodichain.lab.sim.atomic_skills.SkillPlan[source]
Scene-bound planning result for one grounded atomic skill invocation.
An action owns one timed command sequence and one recovery boundary. Named
TrajectorySegmentvalues describe semantic structure within that sequence without implying independent planning or recovery boundaries.- expected_effects
Terminal symbolic state changes committed only after physical-effect verification succeeds.
- effect_candidates
Nonterminal attachment baselines available to phase gates and in-flight guards without being committed to task state.
- scene_dependency_monitor_until
Optional exclusive waypoint-index upper bounds for individual
scene_dependencies. An entity is monitored while the current waypoint index is smaller than its bound;0disables monitoring immediately, while an omitted entity remains monitored for the action’s full execution. Once the bound is reached, all pose changes for that entity are ignored, regardless of whether they were caused by the action or by an external disturbance.
- scene_dependency_end_segment
Optional last segment during which scene motion may invalidate and replan the action for every dependency.
Methods:
__init__(skill_id, plan_success, commands, ...)segment(name)Return a named trajectory segment.
segment_at(waypoint_index)Return the segment containing a global action waypoint index.
snapshot()Return an independently owned inspection snapshot of this plan.
Attributes:
Next observed chunk in the same invocation and recovery scope.
Optional typed proposal for explicit host-owned planning-state commit.
Owned original full-robot samples for rows rejected from this exact plan.
Whether execution must verify a terminal physical effect.
Whether every environment row planned successfully.
- __init__(skill_id, plan_success, commands, recovery_policy, tracking_policy, planned_scene_version, planned_collision_world_revision, diagnostics, tracking=None, joint_trajectory=None, segments=(), scene_dependencies=(), scene_dependency_monitor_until=<factory>, scene_dependency_end_segment=None, collision_world_sensitive=False, replannable=True, expected_effects=<factory>, effect_candidates=<factory>, effect_verification=None, invocation_id=None, invocation_revision=0, *, rejected_candidate=None, planning_recovery_outcome=None, continuation=None)
-
continuation:
PlanContinuation|None Next observed chunk in the same invocation and recovery scope.
-
planning_recovery_outcome:
PlanningRecoveryOutcome|None Optional typed proposal for explicit host-owned planning-state commit.
A failed plan may still carry a logical selection outcome. Preview callers discard it or commit only to an independently owned preview cursor.
-
rejected_candidate:
RejectedMotionCandidate|None Owned original full-robot samples for rows rejected from this exact plan.
The batch, device, full robot columns and time grid match joint_trajectory. Rejected rows cannot become successful; this value records planned evidence and is never an executable replacement or physical-effect certificate.
- property requires_effect_verification: bool
Whether execution must verify a terminal physical effect.
- segment(name)[source]
Return a named trajectory segment.
- Parameters:
name (
str) – Exact segment name.- Return type:
TrajectorySegment- Returns:
Matching segment metadata.
- Raises:
KeyError – If the plan has no segment with that name.
- segment_at(waypoint_index)[source]
Return the segment containing a global action waypoint index.
- Return type:
TrajectorySegment
- snapshot()[source]
Return an independently owned inspection snapshot of this plan.
Runtime tracing and visualization need access to the exact plan that reached an execution boundary without being able to mutate the live session. Reconstructing the value through the public constructor also re-applies every plan invariant and snapshots all tensor-owning nested contracts.
- Return type:
- Returns:
A validated plan with independently owned tensor storage.
- property success_all: bool
Whether every environment row planned successfully.
- class embodichain.lab.sim.atomic_skills.SkillPlanTemplateAdapter[source]
Export one explicit Atomic Skill plan as a qpos template.
Canonical expansion removes zero-time joins; restoration retains the source grid. Every plan segment must declare its editable operators and phase kind; unlisted operators are rejected instead of being inferred from a skill name.
Methods:
__init__(joint_names, phase_permissions, ...)export_template(source, *, context[, row_index])Export a single-row, explicitly permissioned SkillPlan.
restore_positions(source, positions, *[, ...])Restore canonical samples to the source grid and exact protected values.
- __init__(joint_names, phase_permissions, phase_kinds, controlled_joint_indices=None, validator_id='default')
- export_template(source, *, context, row_index=None)[source]
Export a single-row, explicitly permissioned SkillPlan.
- Parameters:
source (
SkillPlan) – Validated plan retaining a joint trajectory.context (
SourceContext) – Coordinator-owned source and scene identity.row_index (
int|None) – Explicit batch row. Omission requires a single row.
- Return type:
- Returns:
A detached
TrajectoryTemplateon the CPU/device of the source plan.
- restore_positions(source, positions, *, row_index=0)[source]
Restore canonical samples to the source grid and exact protected values.
- Parameters:
source (
SkillPlan) – Original plan used byexport_template().positions (
Tensor) – Expanded canonical full-joint positions, shape(N, D).row_index (
int) – Source batch row.
- Return type:
Tensor- Returns:
Owned source-grid positions on the original dtype and device.
- class embodichain.lab.sim.atomic_skills.SkillPlanningServices[source]
Engine-scoped registry of planning services used by atomic skills.
The registry itself belongs to one engine. Grasp generators are retained by reference so a composition root can reuse an already prepared standalone service (and its geometry cache) in direct and atomic-skill call paths.
Methods:
__init__(motion_generator[, ...])Retain shared services and snapshot caller-owned calibration data.
apply_command_overrides(binding, overrides)Apply endpoint-scoped commands to an owned validated binding.
bind_control_parts(contract, endpoints, *[, ...])Build a generic binding from explicit robot control-part names.
contact_source(source_id)Resolve a still-live source from this exact engine's registry.
grasp_pose_generator(target_id)Resolve the generator installed for one grasp endpoint target.
hand_geometry_cfg(target_id)Resolve an owned hand calibration without capturing robot geometry.
joint_trajectory_source(source_id)Resolve an observed command source registered on this engine.
prepare_grasp_query(target_id, simulation, ...)Prepare and close a scoped exact-shape grasp query through shared services.
register_contact_source(source_id, source)Bind an episode-owned weak contact observation source.
register_joint_trajectory_source(source_id, ...)Own a source of observed MoveJoints commands for this engine.
validate_binding(binding, contract)Validate endpoint coverage, ownership, capabilities, and claims.
Attributes:
binding_owner_idReturn the opaque identity required by this engine's bindings.
control_profilesReturn owned direct-core command profiles by control-part name.
deviceReturn the concrete device used for planning.
grasp_pose_generatorsReturn grasp-pose services keyed by runtime endpoint target ID.
hand_geometry_cfgsReturn independently owned hand calibrations by grasp target ID.
motion_generatorReturn the single motion generator owned by the engine.
planner_nameReturn the configured planner backend name.
robotReturn the robot planned by this service set.
tracking_runtimeReturn the engine-owned typed tracking runtime.
- __init__(motion_generator, control_profiles=None, tracking_runtime=None, grasp_pose_generators=None, env_ids=None, *, hand_geometry_cfgs=None)[source]
Retain shared services and snapshot caller-owned calibration data.
- Parameters:
motion_generator (
MotionGenerator) – Motion backend and exact owning robot.control_profiles (
Mapping[str,ControlPartCommandProfile] |None) – Direct-core command profiles by control part.tracking_runtime (
TrackingRuntime|None) – Optional shared endpoint tracking services.grasp_pose_generators (
Mapping[str,GraspPoseGenerator] |None) – Existing grasp services by endpoint target ID.env_ids (
tuple[int,...] |None) – Optional ordered physical simulation rows used by planning.hand_geometry_cfgs (
Mapping[str,RobotHandGeometryCfg] |None) – Explicit Lab hand settings by grasp target ID; copied independently without capturing geometry or reading state.
- apply_command_overrides(binding, overrides)[source]
Apply endpoint-scoped commands to an owned validated binding.
- Return type:
- bind_control_parts(contract, endpoints, *, task_state_keys=None)[source]
Build a generic binding from explicit robot control-part names.
This is the advanced direct-core construction path. Higher-level binding layers may produce the same
SkillBindingthrough their own resource resolution.- Parameters:
contract (
SkillBindingContract) – Typed endpoint contract for the bound skill.endpoints (
Mapping[str,Mapping[str,str]]) – Nestedslot_id -> endpoint_id -> control_partmapping.task_state_keys (
Mapping[str,str] |None) – Optional stable task-state key for each resource slot. If omitted, a slot inherits the control part of itsmotionendpoint. A slot withoutmotioncan be inferred from its sole control part, or otherwise uses its stable direct binding resource ID.
- Return type:
- Returns:
Engine-owned generic endpoint binding.
- property binding_owner_id: str
Return the opaque identity required by this engine’s bindings.
- contact_source(source_id)[source]
Resolve a still-live source from this exact engine’s registry.
- Parameters:
source_id (
str) – Identifier registered by the episode’s composition root.- Return type:
- Returns:
Live observation adapter owned by that episode.
- Raises:
ValueError – The source expired or was not registered on this engine.
- property control_profiles: Mapping[str, ControlPartCommandProfile]
Return owned direct-core command profiles by control-part name.
- property device: device
Return the concrete device used for planning.
- grasp_pose_generator(target_id)[source]
Resolve the generator installed for one grasp endpoint target.
- Parameters:
target_id (
str) – Runtime target ID, normally a robot control-part name.- Return type:
- Returns:
The installed standalone grasp-pose generator.
- Raises:
KeyError – If no generator is installed for
target_id.
- property grasp_pose_generators: Mapping[str, GraspPoseGenerator]
Return grasp-pose services keyed by runtime endpoint target ID.
- hand_geometry_cfg(target_id)[source]
Resolve an owned hand calibration without capturing robot geometry.
- Parameters:
target_id (
str) – Runtime grasp endpoint target ID.- Return type:
- Returns:
An independent configuration whose pad-link order is preserved. Consumers sampling an invocation’s closing stroke must replace its open/closed commands with the current resolved endpoint commands.
- Raises:
KeyError – No explicit calibration is installed for the target.
- property hand_geometry_cfgs: Mapping[str, RobotHandGeometryCfg]
Return independently owned hand calibrations by grasp target ID.
- joint_trajectory_source(source_id)[source]
Resolve an observed command source registered on this engine.
- Parameters:
source_id (
str) – Identifier registered by the episode’s composition root.- Return type:
- Returns:
Live command adapter owned by the episode.
- Raises:
ValueError – The source expired or was not registered on this engine.
- property motion_generator: MotionGenerator
Return the single motion generator owned by the engine.
- property planner_name: str
Return the configured planner backend name.
- prepare_grasp_query(target_id, simulation, *, source_uid, open_qpos, grasp_qpos, observation_qpos, object_pose, scope, policy, opening=None, include_rigid_scene=False, gravity_in_object=None, identity=None, report_metadata=None)[source]
Prepare and close a scoped exact-shape grasp query through shared services.
- Parameters:
target_id (
str) – Grasp endpoint with an explicitly installed hand calibration.simulation (
SimulationManager) – Exact B1 Default simulation owning this service’s Robot.source_uid (
str) – Registered rigid target UID, selected by the caller.open_qpos (
Tensor) – Current resolved full hand-part open command, shape (1, D).grasp_qpos (
Tensor) – Current resolved close command in the same order and shape.observation_qpos (
Tensor) – Same-observation full named robot state, shape (1, J).object_pose (
Tensor) – Same-observation target-to-world pose, shape (1, 4, 4).scope (
NativeQueryScope) – Fresh preparation identity, timestamp, scene version and env0.policy (
ClosingContactPolicy) – Explicit geometric rules; experiment IDs are not interpreted.opening (
GraspOpeningTarget|None) – Optional same-scope, already-grounded release target.include_rigid_scene (
bool) – Attach ordered native rigid rest-clearance queries.gravity_in_object (
ndarray|None) – Explicit gravity for horizontal pad-line qualification.identity (
Mapping[str,object] |None) – Neutral caller labels; captured physical keys are reserved.report_metadata (
Mapping[str,object] |None) – Neutral source provenance for diagnostics only.
- Yields:
Owned GraspKit query. Exiting the context closes all query resources, including on failure or cancellation, without destroying native entities.
- Raises:
KeyError – The grasp endpoint has no declared hand calibration.
ValueError – Policy, scope, geometry, ownership or backend/batch is unsupported.
- Return type:
Iterator[NativeClosingQuery]
- register_contact_source(source_id, source)[source]
Bind an episode-owned weak contact observation source.
- Parameters:
source_id (
str) – Nonempty identifier local to this engine.source (
ContactPhaseSource) – Observation adapter; its episode host retains a strong reference.
- Raises:
ValueError – The identifier is already bound to another live source.
- Return type:
None
- register_joint_trajectory_source(source_id, source)[source]
Own a source of observed MoveJoints commands for this engine.
- Parameters:
source_id (
str) – Nonempty identifier local to this engine.source (
ObservedJointTrajectorySource) – Command adapter retained for the lifetime of this engine.
- Raises:
ValueError – The identifier is already bound to another live source.
- Return type:
None
- property robot: Robot
Return the robot planned by this service set.
- property tracking_runtime: TrackingRuntime
Return the engine-owned typed tracking runtime.
- validate_binding(binding, contract)[source]
Validate endpoint coverage, ownership, capabilities, and claims.
- Return type:
None
- class embodichain.lab.sim.atomic_skills.SkillResourceSlot[source]
One skill-local participant selected as an indivisible resource unit.
Methods:
__init__(slot_id, endpoints[, constraints])Attributes:
Physical constraints among endpoint views in this participant.
Endpoint requirements that the selected robot resource must satisfy.
Skill-local participant name, such as
primaryorsource.- __init__(slot_id, endpoints, constraints=())
-
constraints:
tuple[DisjointSlotEndpoints,...] Physical constraints among endpoint views in this participant.
-
endpoints:
tuple[SkillEndpointRequirement,...] Endpoint requirements that the selected robot resource must satisfy.
-
slot_id:
str Skill-local participant name, such as
primaryorsource.
- class embodichain.lab.sim.atomic_skills.Slide[source]
Open-loop approach, grasp, and axis-constrained sliding motion.
Classes:
GoalTypealias of
SlideGoalOptionsTypealias of
SlideOptionsAttributes:
binding_contractExplicit robot-independent requirements for semantic discovery.
open_loopWhether the skill intentionally declares no verified physical effect.
skill_idStable registry identifier for this skill.
- GoalType
alias of
SlideGoal
- OptionsType
alias of
SlideOptions
- binding_contract: ClassVar[SkillBindingContract] = SkillBindingContract(slots=(SkillResourceSlot(slot_id='primary', endpoints=(SkillEndpointRequirement(endpoint_id='motion', capabilities=frozenset({'motion.cartesian_pose'}), required_commands=mappingproxy({})), SkillEndpointRequirement(endpoint_id='grasp', capabilities=frozenset({'interaction.grasp'}), required_commands=mappingproxy({'open': <class 'embodichain.lab.sim.atomic_skills.control.JointPositionCommand'>, 'grasp': <class 'embodichain.lab.sim.atomic_skills.control.JointPositionCommand'>}))), constraints=(DisjointSlotEndpoints(endpoint_ids=('motion', 'grasp')),)),), constraints=())
Explicit robot-independent requirements for semantic discovery.
Concrete action classes must declare this attribute in their own class body to opt into the semantic catalog. Inheriting another action’s contract does not silently expose a new skill identifier.
- open_loop: ClassVar[bool] = True
Whether the skill intentionally declares no verified physical effect.
- skill_id: ClassVar[str] = 'slide'
Stable registry identifier for this skill.
- class embodichain.lab.sim.atomic_skills.SlideAffordance[source]
Target-local antipodal grasp and parent-joint translation geometry.
The positive translation-axis direction denotes approaching and pushing the articulated part closed. Pulling moves in the opposite direction. The mesh describes the actual graspable contact surface. The target pose is supplied separately by
SceneEntityPoseor a pose snapshot.Methods:
__init__([object_label, custom_config, ...])resolve_from_object_geometry(geometry)Resolve the target-local prismatic axis and neighborhood sign.
Attributes:
custom_configUser-defined configuration payload.
joint_limitsOptional lower and upper translation limits in metres.
joint_nameOptional stable prismatic-joint name associated with the link.
translation_axisParent prismatic-joint axis, signed toward articulation geometry.
- __init__(object_label='', custom_config=<factory>, mesh_scope='object', translation_axis=<factory>, joint_name=None, joint_limits=None, *, mesh_vertices, mesh_triangles)
-
custom_config:
dict[str,Any] User-defined configuration payload.
-
joint_limits:
tuple[float,float] |None= None Optional lower and upper translation limits in metres.
-
joint_name:
str|None= None Optional stable prismatic-joint name associated with the link.
- resolve_from_object_geometry(geometry)[source]
Resolve the target-local prismatic axis and neighborhood sign.
- Return type:
None
-
translation_axis:
Tensor Parent prismatic-joint axis, signed toward articulation geometry.
- class embodichain.lab.sim.atomic_skills.SlideGoal[source]
Translating articulation link described by a slide affordance.
Methods:
__init__(semantics, target_pose, *[, ...])Attributes:
joint_targetOptional absolute joint intent; otherwise preserve fixed-distance Options.
target_poseLink pose snapshot or late-bound stable scene-entity reference.
- __init__(semantics, target_pose, *, joint_target=None)
-
joint_target:
SlideJointTarget|None Optional absolute joint intent; otherwise preserve fixed-distance Options.
Joint-target mode resolves fresh row-local distances and the pull/push direction during planning. Active rows must share one direction; already satisfied rows hold their observed pose. This does not verify physical effect.
-
target_pose:
Tensor|SceneEntityPose Link pose snapshot or late-bound stable scene-entity reference.
- class embodichain.lab.sim.atomic_skills.SlideJointTarget[source]
Absolute prismatic coordinate, in metres, with a calibrated axis sign.
- Parameters:
articulation_id (
str) – Canonical articulation identity in the scene snapshot.joint_name (
str) – Exact observed prismatic joint name.position (
float) – Requested absolute joint position in metres.axis_sign (
int) – Maps increasing joint position to the affordance axis (+1/-1).tolerance (
float) – Position tolerance for an already-satisfied planning row.
Methods:
__init__(articulation_id, joint_name, position)- __init__(articulation_id, joint_name, position, tolerance=0.0001, *, axis_sign)
- class embodichain.lab.sim.atomic_skills.SlideOptions[source]
Per-invocation sliding behavior for a translating articulation link.
Methods:
__init__([direction, hand_interp_steps, ...])Attributes:
approach_along_grasp_axisApproach along grasp Z instead of the rail axis; rail motion is unchanged.
approach_distancePre-grasp distance opposite the approach/push axis.
directionWhether to pull the part open or push it closed.
hand_interp_stepsNumber of waypoints used for each close/open hand segment.
preshape_fractionFraction from the bound open to grasp command during approach and reach.
push_approach_offsetWorld XYZ offset (m) from the pre-grasp pose for an extra push waypoint.
release_retreat_distanceDistance opposite grasp Z while opening; zero holds the arm still.
translation_distanceDistance traveled along the pull or push direction.
- __init__(direction='pull', hand_interp_steps=5, approach_distance=0.1, translation_distance=0.15, preshape_fraction=0.0, approach_along_grasp_axis=False, release_retreat_distance=0.0, push_approach_offset=None)
-
approach_along_grasp_axis:
bool Approach along grasp Z instead of the rail axis; rail motion is unchanged.
-
approach_distance:
float Pre-grasp distance opposite the approach/push axis.
-
direction:
Literal['pull','push'] Whether to pull the part open or push it closed.
-
hand_interp_steps:
int Number of waypoints used for each close/open hand segment.
-
preshape_fraction:
float Fraction from the bound open to grasp command during approach and reach.
-
push_approach_offset:
tuple[float,float,float] |None World XYZ offset (m) from the pre-grasp pose for an extra push waypoint.
-
release_retreat_distance:
float Distance opposite grasp Z while opening; zero holds the arm still.
-
translation_distance:
float Distance traveled along the pull or push direction.
- class embodichain.lab.sim.atomic_skills.StateDelta[source]
Expected task-state changes that require post-execution verification.
A mapping value of
Noneremoves the corresponding relation. Planning only declares this delta; an execution runtime applies it after verifying the semantic effect for the successful environment rows.Methods:
__init__([held_object_updates, ...])apply(state, update_mask)Apply expected effects to selected environment rows.
snapshot()Return an independently owned symbolic-effect snapshot.
Attributes:
Per-articulation/joint verified state replacements or removals.
Per-resource-pair coordinated attachment replacements or removals.
Per-resource attachment replacements or removals.
Whether this delta declares no symbolic state changes.
- __init__(held_object_updates=<factory>, coordinated_held_object_updates=<factory>, articulation_joint_updates=<factory>)
- apply(state, update_mask)[source]
Apply expected effects to selected environment rows.
This operation is used for hypothetical state propagation while compiling a sequence. A runtime must apply the same delta only after effect verification.
-
articulation_joint_updates:
Mapping[tuple[str,str],ArticulationJointState|None] Per-articulation/joint verified state replacements or removals.
-
coordinated_held_object_updates:
Mapping[tuple[str,str],CoordinatedHeldObjectState|None] Per-resource-pair coordinated attachment replacements or removals.
-
held_object_updates:
Mapping[str,HeldObjectState|None] Per-resource attachment replacements or removals.
- property is_empty: bool
Whether this delta declares no symbolic state changes.
- snapshot()[source]
Return an independently owned symbolic-effect snapshot.
Live simulation entities retain identity, while semantic metadata, affordance data, and every attachment tensor are copied.
- Return type:
- Returns:
Independently owned state delta.
- class embodichain.lab.sim.atomic_skills.TaskState[source]
Symbolic task state, separate from measured robot state.
Methods:
__init__(batch_size, device[, held_objects, ...])empty(batch_size, device)Create an empty symbolic state.
exclusive_held_object_mask(resource)Return environments where only
resourceholds its object.Return verified state for one canonical articulation joint.
get_coordinated_held_object(first_resource, ...)Return the relation for an ordered resource pair, if any.
get_held_object(resource)Return the object held by
resource, if any.held_object_mask(resource)Return environments where
resourceholds an object.Attributes:
Verified articulation states keyed by canonical articulation and joint IDs.
Number of vectorized environments represented by the state.
Coordinated relations keyed by ordered logical task-state resource pairs.
Device used by per-environment masks and relation tensors.
Single-manipulator held-object relations keyed by control resource.
- __init__(batch_size, device, held_objects=<factory>, coordinated_held_objects=<factory>, articulation_joints=<factory>)
-
articulation_joints:
Mapping[tuple[str,str],ArticulationJointState] Verified articulation states keyed by canonical articulation and joint IDs.
-
batch_size:
int Number of vectorized environments represented by the state.
-
coordinated_held_objects:
Mapping[tuple[str,str],CoordinatedHeldObjectState] Coordinated relations keyed by ordered logical task-state resource pairs.
-
device:
device|str Device used by per-environment masks and relation tensors.
- classmethod empty(batch_size, device)[source]
Create an empty symbolic state.
- Parameters:
batch_size (
int) – Number of represented environments.device (
device|str) – Tensor device used by the state.
- Return type:
- Returns:
Empty task state with explicit batch metadata.
- exclusive_held_object_mask(resource)[source]
Return environments where only
resourceholds its object.Object identity is established by the exact semantic record or by a shared non-null simulation entity. Labels and structural equality are deliberately ignored because distinct physical objects may look alike.
- Parameters:
resource (
str) – Manipulator control-resource name.- Return type:
Tensor- Returns:
Owned boolean mask with shape
(batch_size,).
- get_articulation_joint_state(articulation_id, joint_id)[source]
Return verified state for one canonical articulation joint.
- Return type:
ArticulationJointState|None
- get_coordinated_held_object(first_resource, second_resource)[source]
Return the relation for an ordered resource pair, if any.
- Return type:
CoordinatedHeldObjectState|None
- get_held_object(resource)[source]
Return the object held by
resource, if any.- Return type:
HeldObjectState|None
- held_object_mask(resource)[source]
Return environments where
resourceholds an object.- Parameters:
resource (
str) – Manipulator control-resource name.- Return type:
Tensor- Returns:
Owned boolean mask with shape
(batch_size,). Missing resources produce an all-false mask.
-
held_objects:
Mapping[str,HeldObjectState] Single-manipulator held-object relations keyed by control resource.
- class embodichain.lab.sim.atomic_skills.TimedCommandSequence[source]
Ordered runtime command frames for one stable environment batch.
env_idsis authoritative even whenframesis empty, preserving the batch size and device needed by compilation and execution boundaries.- Parameters:
frames (
tuple[RuntimeCommandFrame,...]) – Ordered command frames in execution order.env_ids (
Tensor) – Stable environment identifiers retained for empty sequences.
Methods:
Attributes:
Return the preserved environment batch size.
Return the preserved batch device.
Return the number of command frames.
Return unique owned destinations in first-use order.
- __init__(frames, env_ids)
- property batch_size: int
Return the preserved environment batch size.
- property device: device
Return the preserved batch device.
- property frame_count: int
Return the number of command frames.
- snapshot()[source]
Return an independently owned timed sequence.
- Return type:
- property targets: tuple[RuntimeEndpointTarget, ...]
Return unique owned destinations in first-use order.
- class embodichain.lab.sim.atomic_skills.TimedTerminalAcceptance[source]
Explicit terminal acceptance without endpoint feedback.
Methods:
__init__([settle_duration])- __init__(settle_duration=0.0)
- class embodichain.lab.sim.atomic_skills.TimedTrackingSequence[source]
Tracking frames aligned by index with an authoritative command sequence.
Methods:
__init__(env_ids, frames)Attributes:
batch_sizeReturn the represented environment count.
deviceReturn the sequence tensor device.
frame_countReturn the number of command-aligned tracking frames.
- __init__(env_ids, frames)
- property batch_size: int
Return the represented environment count.
- property device: device
Return the sequence tensor device.
- property frame_count: int
Return the number of command-aligned tracking frames.
- class embodichain.lab.sim.atomic_skills.TimedTrajectory[source]
Full-robot joint trajectory with per-environment timing metadata.
Methods:
__init__(positions, velocities, ...)concatenate(trajectories, *[, empty_like])Concatenate trajectories along their waypoint dimension.
empty(*, batch_size, robot_dof, device, env_ids)Create an empty trajectory with explicit batch and DoF dimensions.
from_positions(positions, *, env_ids, dt[, ...])Build a trajectory from positions and explicit per-sample timing.
from_uniform_step(positions, *, env_ids, step_dt)Build an explicitly uniform-time trajectory.
hold_rows(active_mask, hold_qpos)Replace inactive rows with a fixed hold command.
snapshot()Return an independently owned copy of this trajectory.
Attributes:
Number of environment rows.
Per-waypoint arrival intervals; the first sample normally has zero dt.
Per-environment trajectory duration derived from waypoint intervals.
Number of full-robot command columns.
Number of trajectory samples.
- __init__(positions, velocities, accelerations, dt, env_ids)
- property batch_size: int
Number of environment rows.
- classmethod concatenate(trajectories, *, empty_like=None)[source]
Concatenate trajectories along their waypoint dimension.
- Parameters:
trajectories (
Sequence[TimedTrajectory]) – Compatible trajectories in execution order.empty_like (
PlanningContext|None) – Context used only whentrajectoriesis empty.
- Return type:
- Returns:
Concatenated full-robot trajectory.
-
dt:
Tensor Per-waypoint arrival intervals; the first sample normally has zero dt.
- property duration: Tensor
Per-environment trajectory duration derived from waypoint intervals.
- classmethod empty(*, batch_size, robot_dof, device, env_ids)[source]
Create an empty trajectory with explicit batch and DoF dimensions.
- Return type:
- classmethod from_positions(positions, *, env_ids, dt, velocities=None, accelerations=None)[source]
Build a trajectory from positions and explicit per-sample timing.
- Parameters:
positions (
Tensor) – Full-robot positions, shape(B, N, D).env_ids (
Tensor) – Environment identifiers, shape(B,).dt (
Tensor) – Per-sample arrival intervals, shape(B, N).velocities (
Tensor|None) – Optional joint velocities.accelerations (
Tensor|None) – Optional joint accelerations.
- Return type:
- Returns:
Validated timed trajectory.
- classmethod from_uniform_step(positions, *, env_ids, step_dt, velocities=None, accelerations=None)[source]
Build an explicitly uniform-time trajectory.
The first waypoint has zero arrival time; every following waypoint uses
step_dt. This factory is intended for interpolation algorithms whose cadence is selected by the caller, not for repairing untimed plans.- Parameters:
positions (
Tensor) – Full-robot positions, shape(B, N, D).env_ids (
Tensor) – Environment identifiers, shape(B,).step_dt (
float) – Explicit interval between consecutive waypoints.velocities (
Tensor|None) – Optional joint velocities.accelerations (
Tensor|None) – Optional joint accelerations.
- Return type:
- Returns:
Validated uniformly timed trajectory.
- hold_rows(active_mask, hold_qpos)[source]
Replace inactive rows with a fixed hold command.
- Parameters:
active_mask (
Tensor) – Rows allowed to execute this trajectory.hold_qpos (
Tensor) – Hold positions, shape(B, D).
- Return type:
- Returns:
New trajectory with inactive rows frozen and derivatives zeroed.
- property robot_dof: int
Number of full-robot command columns.
- snapshot()[source]
Return an independently owned copy of this trajectory.
- Return type:
- Returns:
A trajectory whose tensor storage can be mutated without changing the source trajectory.
- property waypoint_count: int
Number of trajectory samples.
- class embodichain.lab.sim.atomic_skills.TrackingCommandProjector[source]
Versioned pure projector from an endpoint command to desired state.
Methods:
__init__(*args, **kwargs)project(command, binding)Project one command into the binding's desired tracking channel.
- __init__(*args, **kwargs)
- project(command, binding)[source]
Project one command into the binding’s desired tracking channel.
- Return type:
TrackingState
- class embodichain.lab.sim.atomic_skills.TrackingEvaluation[source]
Per-row metric result with unit-preserving component errors.
Methods:
__init__(channel_id, accepted_mask, ...[, ...])- __init__(channel_id, accepted_mask, valid_mask, normalized_error, component_errors=<factory>)
- class embodichain.lab.sim.atomic_skills.TrackingEvaluatorRegistry[source]
Immutable exact-version metric-evaluator registry.
Methods:
__init__([evaluators])- __init__(evaluators=())[source]
- class embodichain.lab.sim.atomic_skills.TrackingFeedbackAddress[source]
Immutable address understood by one tracking-feedback provider.
Attributes:
address_fingerprintReturn a stable, hashable address identity.
Methods:
snapshot()Return an independently owned address snapshot.
- abstract property address_fingerprint: Hashable
Return a stable, hashable address identity.
- snapshot()[source]
Return an independently owned address snapshot.
- Return type:
TrackingFeedbackAddress
- class embodichain.lab.sim.atomic_skills.TrackingFeedbackBatch[source]
One synchronized typed observation from an exact feedback source.
Methods:
__init__(source, state, valid_mask, timestamp)- __init__(source, state, valid_mask, timestamp)
- class embodichain.lab.sim.atomic_skills.TrackingFeedbackProvider[source]
Versioned live port that reads one exact tracking source.
Methods:
__init__(*args, **kwargs)observe(source, context)Read one synchronized typed feedback batch.
- __init__(*args, **kwargs)
- observe(source, context)[source]
Read one synchronized typed feedback batch.
- Return type:
TrackingFeedbackBatch
- class embodichain.lab.sim.atomic_skills.TrackingFeedbackProviderRegistry[source]
Immutable exact-version feedback-provider registry.
Methods:
__init__([providers])- __init__(providers=())[source]
- class embodichain.lab.sim.atomic_skills.TrackingFeedbackSourceRef[source]
Versioned provider route plus one immutable feedback address.
Methods:
__init__(provider_id, revision, address)snapshot()Return an independently owned source reference.
Attributes:
source_fingerprintReturn the exact versioned source identity.
- __init__(provider_id, revision, address)
- snapshot()[source]
Return an independently owned source reference.
- Return type:
TrackingFeedbackSourceRef
- property source_fingerprint: Hashable
Return the exact versioned source identity.
- class embodichain.lab.sim.atomic_skills.TrackingFrame[source]
Desired endpoint states associated with one command frame.
Methods:
__init__([setpoints])- __init__(setpoints=())
- class embodichain.lab.sim.atomic_skills.TrackingMetricCfg[source]
Immutable tolerance configuration dispatched by exact metric ID/revision.
Methods:
snapshot()Return an independently owned metric configuration.
- snapshot()[source]
Return an independently owned metric configuration.
- Return type:
TrackingMetricCfg
- class embodichain.lab.sim.atomic_skills.TrackingMetricEvaluator[source]
Versioned evaluator for one exact metric configuration type.
Methods:
__init__(*args, **kwargs)evaluate(desired, observed, valid_mask, metric)Evaluate a desired and observed batch row by row.
- __init__(*args, **kwargs)
- evaluate(desired, observed, valid_mask, metric)[source]
Evaluate a desired and observed batch row by row.
- Return type:
TrackingEvaluation
- class embodichain.lab.sim.atomic_skills.TrackingPolicy[source]
Independent in-flight recovery signal and terminal acceptance contract.
- Parameters:
in_flight (
InFlightTrackingPolicy|None) – Existing motion tracking and recovery policy.terminal (
FeedbackTerminalAcceptance|TimedTerminalAcceptance) – Existing timed or feedback acceptance, retained unchanged.boundary_reference_bridge (
bool) – For supported native free entry phases, plan a bounded controller-reference prefix before the original samples. Requires independently captured position/velocity targets; external nominal sources and undeclared phases retain their existing behavior.boundary_stop (
bool) – Additionally qualify explicitly bound motion joints before completing an invocation. Hand endpoints retain their last commands.boundary_position_tolerance (
float) – Maximum terminal reference error in joint coordinates (radians for revolute, metres for prismatic joints).boundary_velocity_tolerance (
float) – Maximum measured control-grid position difference per second. Native velocity is separately checked finite.boundary_timeout (
float) – Maximum physical seconds for boundary qualification. Two distinct stable observations are required; failure is row-local.
This is a tolerance-bounded stop, not a C1/C2 blending guarantee. It never replaces original terminal, contact or effect gates.
Methods:
__init__(in_flight, terminal[, ...])joint_position(*[, in_flight_max_abs_error, ...])Create the built-in joint-position tracking and acceptance contract.
timed(*[, settle_duration])Create an explicit time-only terminal contract with no tracking.
- __init__(in_flight, terminal, boundary_stop=False, boundary_position_tolerance=0.01, boundary_velocity_tolerance=0.005, boundary_timeout=1.5, boundary_reference_bridge=False)
- classmethod joint_position(*, in_flight_max_abs_error=0.05, terminal_max_abs_error=0.05, terminal_settle_timeout=0.5, consecutive_violations=1, consecutive_acceptances=1, grace_period=0.0)[source]
Create the built-in joint-position tracking and acceptance contract.
- Return type:
TrackingPolicy
- classmethod timed(*, settle_duration=0.0)[source]
Create an explicit time-only terminal contract with no tracking.
- Return type:
TrackingPolicy
- class embodichain.lab.sim.atomic_skills.TrackingProjectorRef[source]
Exact version of a command-to-tracking-state projector.
Methods:
__init__(projector_id, revision)snapshot()Return an independently owned projector route.
- __init__(projector_id, revision)
- snapshot()[source]
Return an independently owned projector route.
- Return type:
TrackingProjectorRef
- class embodichain.lab.sim.atomic_skills.TrackingProjectorRegistry[source]
Immutable exact-version command-projector registry.
Methods:
__init__([projectors])- __init__(projectors=())[source]
- class embodichain.lab.sim.atomic_skills.TrackingRuntime[source]
Runtime facade for projecting commands and evaluating typed feedback.
Methods:
__init__(providers, projectors, evaluators)evaluate(setpoint, feedback, metric)Evaluate one observed setpoint with an exact metric implementation.
evaluate_frame(frame, metrics, context)Observe and evaluate every setpoint required by one frame.
observe(setpoint, context)Read the exact feedback source for one setpoint.
project(command, binding)Project one command through the exact binding-owned projector.
with_builtins()Create a runtime with context feedback and built-in typed metrics.
Attributes:
evaluatorsReturn the immutable exact-version evaluator registry.
projectorsReturn the immutable exact-version projector registry.
providersReturn the immutable exact-version provider registry.
- __init__(providers, projectors, evaluators)[source]
- evaluate(setpoint, feedback, metric)[source]
Evaluate one observed setpoint with an exact metric implementation.
- Return type:
TrackingEvaluation
- evaluate_frame(frame, metrics, context)[source]
Observe and evaluate every setpoint required by one frame.
- Return type:
Mapping[tuple[str,str,str],TrackingEvaluation]
- property evaluators: TrackingEvaluatorRegistry
Return the immutable exact-version evaluator registry.
- observe(setpoint, context)[source]
Read the exact feedback source for one setpoint.
- Return type:
TrackingFeedbackBatch
- project(command, binding)[source]
Project one command through the exact binding-owned projector.
- Return type:
TrackingState
- property projectors: TrackingProjectorRegistry
Return the immutable exact-version projector registry.
- property providers: TrackingFeedbackProviderRegistry
Return the immutable exact-version provider registry.
- classmethod with_builtins()[source]
Create a runtime with context feedback and built-in typed metrics.
- Return type:
TrackingRuntime
- class embodichain.lab.sim.atomic_skills.TrackingSetpoint[source]
One endpoint-local desired state and its typed feedback route.
Methods:
__init__(endpoint_key, binding, desired)- __init__(endpoint_key, binding, desired)
- class embodichain.lab.sim.atomic_skills.TrackingState[source]
Immutable-by-ownership typed desired or observed tracking state.
Attributes:
batch_sizeReturn the represented environment count.
deviceReturn the tensor device.
Methods:
snapshot()Return an independently owned state snapshot.
- abstract property batch_size: int
Return the represented environment count.
- abstract property device: device
Return the tensor device.
- abstract snapshot()[source]
Return an independently owned state snapshot.
- Return type:
TrackingState
- class embodichain.lab.sim.atomic_skills.TrajectorySegment[source]
Named half-open waypoint range inside an action trajectory.
Segments describe semantic structure for inspection, visualization, and execution tracing. They do not create independent planning or recovery boundaries; recovery continues to operate on the enclosing action plan.
Methods:
__init__(name, start, stop)contains(waypoint_index)Return whether
waypoint_indexbelongs to this segment.Attributes:
waypoint_countNumber of waypoints in this segment.
- __init__(name, start, stop)
- contains(waypoint_index)[source]
Return whether
waypoint_indexbelongs to this segment.- Return type:
bool
- property waypoint_count: int
Number of waypoints in this segment.
- class embodichain.lab.sim.atomic_skills.Twist[source]
Open-loop approach, grasp, twist, release, and retract motion.
Classes:
GoalTypealias of
TwistGoalOptionsTypealias of
TwistOptionsAttributes:
binding_contractExplicit robot-independent requirements for semantic discovery.
open_loopWhether the skill intentionally declares no verified physical effect.
skill_idStable registry identifier for this skill.
- GoalType
alias of
TwistGoal
- OptionsType
alias of
TwistOptions
- binding_contract: ClassVar[SkillBindingContract] = SkillBindingContract(slots=(SkillResourceSlot(slot_id='primary', endpoints=(SkillEndpointRequirement(endpoint_id='motion', capabilities=frozenset({'motion.cartesian_pose', 'kinematics.forward'}), required_commands=mappingproxy({})), SkillEndpointRequirement(endpoint_id='grasp', capabilities=frozenset({'interaction.grasp'}), required_commands=mappingproxy({'open': <class 'embodichain.lab.sim.atomic_skills.control.JointPositionCommand'>, 'grasp': <class 'embodichain.lab.sim.atomic_skills.control.JointPositionCommand'>}))), constraints=(DisjointSlotEndpoints(endpoint_ids=('motion', 'grasp')),)),), constraints=())
Explicit robot-independent requirements for semantic discovery.
Concrete action classes must declare this attribute in their own class body to opt into the semantic catalog. Inheriting another action’s contract does not silently expose a new skill identifier.
- open_loop: ClassVar[bool] = True
Whether the skill intentionally declares no verified physical effect.
- skill_id: ClassVar[str] = 'twist'
Stable registry identifier for this skill.
- class embodichain.lab.sim.atomic_skills.TwistAffordance[source]
Target-local grasp point and parent-joint rotation geometry.
Methods:
__init__([object_label, custom_config, ...])get_grasp_pose(target_pose)Construct a deterministic world grasp pose from local geometry.
require_axis_origin()Return the explicit or geometry-derived local rotation-axis point.
resolve_from_object_geometry(geometry)Resolve the target-local revolute axis, sign, and joint origin.
sample_grasp_pose(target_pose, *, sampling, ...)Sample explicitly declared roll symmetry around the grasp axis.
Attributes:
axis_originFallback axis point, overridden by revolute-joint origin metadata.
custom_configUser-defined configuration payload.
grasp_positionExplicit target-local center of the gripper contact region.
grasp_rollNominal contact-frame rotation about the grasp z-axis, in radians.
grasp_roll_rangeAllowed absolute grasp rolls containing
grasp_roll.joint_limitsOptional lower and upper angular limits in radians.
joint_nameOptional stable articulation-joint name associated with the axis.
twist_axisParent revolute-joint axis, signed toward articulation geometry.
- __init__(object_label='', custom_config=<factory>, twist_axis=<factory>, joint_name=None, joint_limits=None, *, grasp_position, axis_origin=None, grasp_roll=0.0, grasp_roll_range=None)
-
axis_origin:
tuple[float,float,float] |None= None Fallback axis point, overridden by revolute-joint origin metadata.
-
custom_config:
dict[str,Any] User-defined configuration payload.
- get_grasp_pose(target_pose)[source]
Construct a deterministic world grasp pose from local geometry.
The pose z-axis follows
twist_axis. The remaining axes are formed with an adaptive reference so the result is always in SO(3).- Return type:
Tensor- Returns:
Batched world-frame grasp poses with shape
(B, 4, 4).- Raises:
ValueError – If
target_poseis not a batched pose tensor.
-
grasp_position:
tuple[float,float,float] Explicit target-local center of the gripper contact region.
-
grasp_roll:
float= 0.0 Nominal contact-frame rotation about the grasp z-axis, in radians.
-
grasp_roll_range:
tuple[float,float] |None= None Allowed absolute grasp rolls containing
grasp_roll.
-
joint_limits:
tuple[float,float] |None= None Optional lower and upper angular limits in radians.
-
joint_name:
str|None= None Optional stable articulation-joint name associated with the axis.
- require_axis_origin()[source]
Return the explicit or geometry-derived local rotation-axis point.
- Return type:
tuple[float,float,float]- Returns:
Resolved target-local rotation-axis origin.
- Raises:
ValueError – If neither a fallback nor articulation geometry supplied the rotation-axis origin.
- resolve_from_object_geometry(geometry)[source]
Resolve the target-local revolute axis, sign, and joint origin.
- Return type:
None
- sample_grasp_pose(target_pose, *, sampling, env_ids, key='twist_grasp')[source]
Sample explicitly declared roll symmetry around the grasp axis.
- Parameters:
target_pose (
Tensor) – Target world poses with shape(B, 4, 4).sampling (
AffordanceSamplingContext|None) – Optional reproducible branch stream.env_ids (
Tensor) – Stable environment identities matching target rows.key (
str) – Sampling operation identity.
- Return type:
AffordanceSample- Returns:
Sampled grasp poses and roll metadata.
-
twist_axis:
Tensor Parent revolute-joint axis, signed toward articulation geometry.
- class embodichain.lab.sim.atomic_skills.TwistGoal[source]
Target object described by a twist affordance.
Methods:
__init__(semantics, target_pose)Attributes:
target_poseTarget pose snapshot or late-bound stable scene-entity reference.
- __init__(semantics, target_pose)
-
target_pose:
Tensor|SceneEntityPose Target pose snapshot or late-bound stable scene-entity reference.
- class embodichain.lab.sim.atomic_skills.TwistOptions[source]
Per-invocation twisting behavior.
Methods:
__init__([hand_interp_steps, ...])Attributes:
hand_interp_stepsNumber of waypoints used for each close/open hand segment.
pre_grasp_distanceDistance from the grasp pose along its negative z-axis.
twist_angleRequested twist rotation in radians.
twist_waypoint_countNumber of Cartesian keyframes along the target's circular twist arc.
- __init__(hand_interp_steps=5, twist_waypoint_count=8, pre_grasp_distance=0.1, twist_angle=0.7853981633974483)
-
hand_interp_steps:
int Number of waypoints used for each close/open hand segment.
-
pre_grasp_distance:
float Distance from the grasp pose along its negative z-axis.
-
twist_angle:
float Requested twist rotation in radians.
-
twist_waypoint_count:
int Number of Cartesian keyframes along the target’s circular twist arc.
- class embodichain.lab.sim.atomic_skills.WholeBodyPoseTrackingEvaluator[source]
Evaluator for
WholeBodyPoseTrackingMetric.Classes:
metric_typealias of
WholeBodyPoseTrackingMetric- metric_type
alias of
WholeBodyPoseTrackingMetric
- class embodichain.lab.sim.atomic_skills.WholeBodyPoseTrackingMetric[source]
Independent base-pose and joint-position tolerances.
Methods:
__init__([translation_tolerance, ...])- __init__(translation_tolerance=0.02, rotation_tolerance=0.05, joint_position_tolerance=0.05)
- class embodichain.lab.sim.atomic_skills.WholeBodyPoseTrackingState[source]
Batched base poses and joint positions for whole-body tracking.
Methods:
__init__(root_poses, joint_positions)snapshot()Return an independently owned state snapshot.
Attributes:
batch_sizeReturn the represented environment count.
deviceReturn the tensor device.
- __init__(root_poses, joint_positions)
- property batch_size: int
Return the represented environment count.
- property device: device
Return the tensor device.
- snapshot()[source]
Return an independently owned state snapshot.
- Return type:
WholeBodyPoseTrackingState
- embodichain.lab.sim.atomic_skills.create_rigidized_articulation_antipodal_affordance(articulation, *, grasp_link, locked_qpos, joint_position_tolerance=0.001, link_transform_tolerance=1e-05)[source]
Build root-frame, link-scoped grasp geometry for a rigidized articulation.
- Parameters:
articulation (
Articulation) – Native articulation providing named joint, link, pose, drive, limit, FK, and link-mesh queries.grasp_link (
str) – Native link whose mesh supplies the grasp geometry.locked_qpos (
Mapping[str,float]) – Exact position required for every native joint.joint_position_tolerance (
float) – Positive tolerance, no greater than1e-3, for measured positions, targets, and direct-Python lock checks.link_transform_tolerance (
float) – Positive tolerance, no greater than1e-5, for root-to-link transform agreement across arenas.
- Return type:
AntipodalAffordance- Returns:
Owned link-scoped antipodal mesh in the articulation-root frame.
- Raises:
TypeError – If a declared value or native reading has an invalid type.
ValueError – If the articulation is not consistently rigidized, the selected link is absent, or its transformed mesh is invalid.
- embodichain.lab.sim.atomic_skills.create_rigidized_articulation_antipodal_semantics(articulation, *, grasp_link, locked_qpos, label, geometry=None, properties=None, joint_position_tolerance=0.001, link_transform_tolerance=1e-05)[source]
Describe a locked articulation as one antipodal-graspable rigid object.
The articulation root is the object identity and pose; one selected link is only the source of grasp geometry.
get_link_vert_facereturns vertices in the link frame, while grounding publishes the articulation root pose, so the vertices are transformed by the root-to-link transform before they reach the affordance. Skipping that step is correct only when the two frames coincide, which is a property of one asset rather than of the abstraction.Joint locking, initial positions,
fixed_baseand drive parameters stay withArticulationCfgor the physical environment.locked_qposonly declares the configuration this geometry is valid at, and is verified against the articulation before use.One mesh describes the object for every arena, so the declared lock is verified across the whole batch rather than on one row, and the joint must be actively held rather than merely resting at the declared value.
- Parameters:
articulation (
Articulation) – Articulation treated as one compound rigid body.grasp_link (
str) – Link supplying the grasp mesh.locked_qpos (
Mapping[str,float]) – Declared position of every joint, which must all be held.label (
str) – Semantic object category.geometry (
Mapping[str,Any] |None) – Optional non-affordance geometry metadata.properties (
Mapping[str,Any] |None) – Optional physical properties such as mass and friction.joint_position_tolerance (
float) – Maximum deviation, in joint units, tolerated between a declared and an observed joint position, and the largest position-limit span still counted as a pinned joint.link_transform_tolerance (
float) – Maximum per-entry difference tolerated between two arenas’ root-to-link transforms.
- Return type:
- Returns:
Semantics whose mesh is expressed in the articulation-root frame and whose
entity_idis the articulation root UID.- Raises:
ValueError – If the link is unknown, a joint is undeclared, displaced or unheld in any arena, the arenas disagree on the root-to-link transform, or the link mesh is empty.
- embodichain.lab.sim.atomic_skills.create_simulation_atomic_action_engine(motion_generator, scene_entities, control_profiles=None, grasp_pose_generators=None, *, hand_geometry_cfgs=None, load_builtins=True, tracking_runtime=None)
Create an engine whose initial context observes selected rigid objects.
This is the direct-simulation convenience path for offline planning. Entity IDs are derived from each rigid object’s stable
uid; only explicitly supplied objects are observed. Advanced integrations that need aliases, articulation/link state, collision roles, or an external perception source should constructAtomicSkillEnginewith their ownSceneProviderinstead.- Parameters:
motion_generator (
MotionGenerator) – Motion-generation backend owned by the engine.scene_entities (
Sequence[SceneEntity]) – Non-empty sequence of simulation rigid objects to expose in automatically captured initial scene snapshots.control_profiles (
Mapping[str,ControlPartCommandProfile] |None) – Semantic commands keyed by robot control-part name.grasp_pose_generators (
Mapping[str,GraspPoseGenerator] |None) – Grasp-pose services keyed by grasp endpoint target.hand_geometry_cfgs (
Mapping[str,RobotHandGeometryCfg] |None) – Explicit hand calibrations keyed by grasp endpoint target.load_builtins (
bool) – Whether to install all built-in atomic skills.tracking_runtime (
TrackingRuntime|None) – Optional typed tracking runtime shared by action plans.
- Return type:
- Returns:
Engine configured with a rigid-object scene provider.
- Raises:
TypeError – If
scene_entitiesis not a sequence.ValueError – If an entity lacks a stable UID or UIDs are duplicated.
- embodichain.lab.sim.atomic_skills.create_simulation_atomic_skill_engine(motion_generator, scene_entities, control_profiles=None, grasp_pose_generators=None, *, hand_geometry_cfgs=None, load_builtins=True, tracking_runtime=None)[source]
Create an engine whose initial context observes selected rigid objects.
This is the direct-simulation convenience path for offline planning. Entity IDs are derived from each rigid object’s stable
uid; only explicitly supplied objects are observed. Advanced integrations that need aliases, articulation/link state, collision roles, or an external perception source should constructAtomicSkillEnginewith their ownSceneProviderinstead.- Parameters:
motion_generator (
MotionGenerator) – Motion-generation backend owned by the engine.scene_entities (
Sequence[SceneEntity]) – Non-empty sequence of simulation rigid objects to expose in automatically captured initial scene snapshots.control_profiles (
Mapping[str,ControlPartCommandProfile] |None) – Semantic commands keyed by robot control-part name.grasp_pose_generators (
Mapping[str,GraspPoseGenerator] |None) – Grasp-pose services keyed by grasp endpoint target.hand_geometry_cfgs (
Mapping[str,RobotHandGeometryCfg] |None) – Explicit hand calibrations keyed by grasp endpoint target.load_builtins (
bool) – Whether to install all built-in atomic skills.tracking_runtime (
TrackingRuntime|None) – Optional typed tracking runtime shared by action plans.
- Return type:
- Returns:
Engine configured with a rigid-object scene provider.
- Raises:
TypeError – If
scene_entitiesis not a sequence.ValueError – If an entity lacks a stable UID or UIDs are duplicated.
- embodichain.lab.sim.atomic_skills.sample_initial_articulation_geometry(provider, target_link_name, *, initial_qpos, initial_qpos_joint_names, body_scale, articulation_point_count=100000, target_point_count=5000)[source]
Sample initial articulation geometry for Atomic Skill affordances.
The adapter evaluates FK at an explicitly named initial joint state, transforms every raw link mesh into the target link’s initial local frame, merges those meshes, and samples the target and merged surfaces with Open3D. It also transforms the nearest prismatic and revolute ancestor joint geometry into that frame.
- Parameters:
provider (
ArticulationGeometryProvider) – Structural source of deterministic link meshes, FK, and parent-joint topology.target_link_name (
str) – Link whose initial local frame defines the result.initial_qpos (
Tensor|Sequence[float]) – Initial joint positions with shape(J,).initial_qpos_joint_names (
Sequence[str]) – Names corresponding toinitial_qpos.body_scale (
Tensor|Sequence[float]) – Configured articulation scale. Only unit scale is currently supported because raw meshes and FK must share one metric frame.articulation_point_count (
int) – Merged-articulation surface sample count. The same count is used for the non-target merged surface when one exists.target_point_count (
int) – Target-link surface sample count.
- Return type:
- Returns:
Owned typed affordance geometry in the target link’s initial frame.
- Raises:
TypeError – If a name, joint-name sequence, or point count has the wrong type.
ValueError – If the target, initial state, scale, FK output, topology, or mesh geometry is invalid.
- embodichain.lab.sim.atomic_skills.validate_press_extra_distance(value)[source]
Validate an optional declaration-owned addition to an authored press stroke.
- Parameters:
value (
float|None) – Additional travel in metres, or None to retain the declaration’s existing selection. Exact Python integers/floats in[0, 0.010]are accepted; booleans and non-finite values are rejected.- Raises:
ValueError – The value is outside the supported declaration contract.
- Return type:
None
This does not change
PressOptionsdefaults or certify physical travel. The caller still owns the authored stroke and measured acceptance.
Articulation geometry adaptation#
The adapter converts deterministic articulation meshes, FK, and parent-joint topology into sampled Atomic Skill affordance geometry. Initial state and scale are explicit inputs; the simulation object does not own sampling or semantic geometry keys.
- class embodichain.lab.sim.atomic_skills.articulation_geometry.ArticulationGeometryProvider[source]#
Deterministic articulation facts required for geometry adaptation.
Implementations provide raw link meshes, FK, and immediate-parent-first joint topology. Initial configuration and scale are explicit adapter inputs so this protocol does not depend on an
ArticulationCfgor PK-chain API.- device#
Device on which geometry tensors are assembled.
- link_names#
Stable articulation link names.
Methods:
__init__(*args, **kwargs)compute_fk(qpos, *, link_names, qpos_joint_names)Return root-frame link poses for the supplied named joint state.
get_link_vert_face(link_name)Return one link-local triangle mesh.
get_parent_joint_chain(link_name)Return parent joints ordered from the link toward the root.
- __init__(*args, **kwargs)#
- compute_fk(qpos, *, link_names, qpos_joint_names)[source]#
Return root-frame link poses for the supplied named joint state.
- Parameters:
qpos (
Tensor) – Joint positions with shape(B, J).link_names (
Sequence[str]) – Links whose poses should be returned.qpos_joint_names (
Sequence[str]) – Names corresponding to the lastqposaxis.
- Return type:
Tensor- Returns:
Root-frame poses with shape
(B, L, 4, 4).
- get_link_vert_face(link_name)[source]#
Return one link-local triangle mesh.
- Parameters:
link_name (
str) – Stable link name.- Return type:
tuple[Tensor,Tensor]- Returns:
Link-local vertices and triangle indices.
Attention
A non-empty link mesh must contain at least one non-degenerate triangle surface.
- get_parent_joint_chain(link_name)[source]#
Return parent joints ordered from the link toward the root.
- Parameters:
link_name (
str) – Link at which to begin traversal.- Return type:
tuple[ArticulationJointGeometry,...]- Returns:
Immediate-parent-first structural joint geometry.
- class embodichain.lab.sim.atomic_skills.articulation_geometry.ArticulationJointGeometry[source]#
Structural joint geometry consumed by the articulation adapter.
- name#
Stable joint name.
- joint_type#
Normalized joint type such as
fixed,prismatic, orrevolute.
- parent_link_name#
Stable parent-link name.
- child_link_name#
Stable child-link name.
- origin_pose#
Joint-frame pose in the parent-link frame, shape
(4, 4).
- axis#
Joint axis in the joint frame, shape
(3,).
Methods:
__init__(*args, **kwargs)- __init__(*args, **kwargs)#
- class embodichain.lab.sim.atomic_skills.articulation_geometry.ArticulationAffordanceGeometry[source]#
Owned sampled geometry for articulation-link affordances.
The point clouds and optional joint data are expressed in the target link’s initial local frame. Joint axes are normalized. Use
to_object_geometry()at theObjectSemanticsboundary so the Atomic Skill-specific string-key protocol remains in this module.- Parameters:
target_link_point_cloud (
Tensor) – Sampled target-link surface, shape(N, 3).articulation_point_cloud (
Tensor) – Sampled merged-articulation surface, shape(M, 3).prismatic_joint_axis (
Tensor|None) – Optional nearest prismatic ancestor axis.revolute_joint_axis (
Tensor|None) – Optional nearest revolute ancestor axis.revolute_axis_origin (
Tensor|None) – Optional matching revolute-joint origin.non_target_articulation_point_cloud (
Tensor|None) – Sampled merged surface of every link except the target, shape(K, 3). An empty tensor records that the articulation has no non-target link surface.Noneis accepted only for geometry created without source-link provenance.
Methods:
__init__(target_link_point_cloud, ...[, ...])Return an owned
ObjectSemantics.geometrydictionary.- __init__(target_link_point_cloud, articulation_point_cloud, prismatic_joint_axis=None, revolute_joint_axis=None, revolute_axis_origin=None, non_target_articulation_point_cloud=None)#
- embodichain.lab.sim.atomic_skills.articulation_geometry.create_rigidized_articulation_antipodal_affordance(articulation, *, grasp_link, locked_qpos, joint_position_tolerance=0.001, link_transform_tolerance=1e-05)[source]#
Build root-frame, link-scoped grasp geometry for a rigidized articulation.
- Parameters:
articulation (
Articulation) – Native articulation providing named joint, link, pose, drive, limit, FK, and link-mesh queries.grasp_link (
str) – Native link whose mesh supplies the grasp geometry.locked_qpos (
Mapping[str,float]) – Exact position required for every native joint.joint_position_tolerance (
float) – Positive tolerance, no greater than1e-3, for measured positions, targets, and direct-Python lock checks.link_transform_tolerance (
float) – Positive tolerance, no greater than1e-5, for root-to-link transform agreement across arenas.
- Return type:
AntipodalAffordance- Returns:
Owned link-scoped antipodal mesh in the articulation-root frame.
- Raises:
TypeError – If a declared value or native reading has an invalid type.
ValueError – If the articulation is not consistently rigidized, the selected link is absent, or its transformed mesh is invalid.
- embodichain.lab.sim.atomic_skills.articulation_geometry.sample_initial_articulation_geometry(provider, target_link_name, *, initial_qpos, initial_qpos_joint_names, body_scale, articulation_point_count=100000, target_point_count=5000)[source]#
Sample initial articulation geometry for Atomic Skill affordances.
The adapter evaluates FK at an explicitly named initial joint state, transforms every raw link mesh into the target link’s initial local frame, merges those meshes, and samples the target and merged surfaces with Open3D. It also transforms the nearest prismatic and revolute ancestor joint geometry into that frame.
- Parameters:
provider (
ArticulationGeometryProvider) – Structural source of deterministic link meshes, FK, and parent-joint topology.target_link_name (
str) – Link whose initial local frame defines the result.initial_qpos (
Tensor|Sequence[float]) – Initial joint positions with shape(J,).initial_qpos_joint_names (
Sequence[str]) – Names corresponding toinitial_qpos.body_scale (
Tensor|Sequence[float]) – Configured articulation scale. Only unit scale is currently supported because raw meshes and FK must share one metric frame.articulation_point_count (
int) – Merged-articulation surface sample count. The same count is used for the non-target merged surface when one exists.target_point_count (
int) – Target-link surface sample count.
- Return type:
- Returns:
Owned typed affordance geometry in the target link’s initial frame.
- Raises:
TypeError – If a name, joint-name sequence, or point count has the wrong type.
ValueError – If the target, initial state, scale, FK output, topology, or mesh geometry is invalid.
Semantic resource contracts#
- class embodichain.lab.sim.atomic_skills.SkillDescriptor[source]#
Machine-readable metadata for one registered atomic skill.
Methods:
__init__(skill_id, goal_type, options_type)validate_motion_policy(policy)Reject unsupported segment recovery before grounding/provider work.
validate_planning_recovery(policy)Reject incompatible declarations before grounding or planning.
Attributes:
Explicit generic resource contract used by Task Program lowering.
Whether completion reports motion execution without physical-effect proof.
Exact supported declaration type(s); None rejects nonempty declarations.
Derived from the actual Atomic override; not a caller-supplied claim.
- __init__(skill_id, goal_type, options_type, agent_visible=True, open_loop=False, binding_contract=None, planning_recovery_type=None)#
-
binding_contract:
SkillBindingContract|None# Explicit generic resource contract used by Task Program lowering.
-
open_loop:
bool# Whether completion reports motion execution without physical-effect proof.
-
planning_recovery_type:
type[PlanningRecovery] |tuple[type[PlanningRecovery],...] |None# Exact supported declaration type(s); None rejects nonempty declarations.
-
supports_segment_motion_recovery:
bool# Derived from the actual Atomic override; not a caller-supplied claim.
- validate_motion_policy(policy)[source]#
Reject unsupported segment recovery before grounding/provider work.
- Parameters:
policy (
MotionPolicy) – Explicit motion policy selected for this exact skill.- Raises:
TypeError – The policy has an unsupported type.
ValueError – Segment recovery has no implementation for this skill.
- Return type:
None
- validate_planning_recovery(policy)[source]#
Reject incompatible declarations before grounding or planning.
- Parameters:
policy (
RecoveryPolicy) – Selected immutable recovery policy.- Raises:
TypeError – The policy or concrete declaration type is unsupported.
ValueError – The declaration belongs to another skill.
- Return type:
None
- class embodichain.lab.sim.atomic_skills.SkillBindingContract[source]#
Complete robot-independent binding contract for one atomic skill.
slots=()explicitly declares that a skill consumes no robot resource.NoneonSkillDescriptorinstead means that no semantic binding contract was declared.Methods:
__init__([slots, constraints])Attributes:
Return required slot identifiers in declaration order.
- __init__(slots=(), constraints=())#
- property slot_ids: tuple[str, ...]#
Return required slot identifiers in declaration order.
- class embodichain.lab.sim.atomic_skills.SkillResourceSlot[source]#
One skill-local participant selected as an indivisible resource unit.
Methods:
__init__(slot_id, endpoints[, constraints])Attributes:
Physical constraints among endpoint views in this participant.
Endpoint requirements that the selected robot resource must satisfy.
Skill-local participant name, such as
primaryorsource.- __init__(slot_id, endpoints, constraints=())#
-
constraints:
tuple[DisjointSlotEndpoints,...]# Physical constraints among endpoint views in this participant.
-
endpoints:
tuple[SkillEndpointRequirement,...]# Endpoint requirements that the selected robot resource must satisfy.
-
slot_id:
str# Skill-local participant name, such as
primaryorsource.
- class embodichain.lab.sim.atomic_skills.SkillEndpointRequirement[source]#
Capabilities and commands required from one slot-local endpoint.
Methods:
__init__(endpoint_id[, capabilities, ...])Attributes:
Open, namespaced all-of capability identifiers.
Endpoint selector local to the containing participant slot.
Semantic command names and their required typed command contracts.
- __init__(endpoint_id, capabilities=frozenset({}), required_commands=<factory>)#
-
capabilities:
frozenset[str]# Open, namespaced all-of capability identifiers.
-
endpoint_id:
str# Endpoint selector local to the containing participant slot.
-
required_commands:
Mapping[str,type[ControlCommand]]# Semantic command names and their required typed command contracts.
- class embodichain.lab.sim.atomic_skills.DisjointSlotEndpoints[source]#
Require selected endpoints within one participant to be disjoint.
Methods:
__init__(endpoint_ids)- __init__(endpoint_ids)#
- class embodichain.lab.sim.atomic_skills.DisjointResourceSlots[source]#
Require selected slots to have pairwise-disjoint physical claims.
Methods:
__init__(slots)- __init__(slots)#
Standard capability identifiers#
- embodichain.lab.sim.atomic_skills.JOINT_POSITION_CAPABILITY = 'motion.joint_position'#
str(object=’’) -> str str(bytes_or_buffer[, encoding[, errors]]) -> str
Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.__str__() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to ‘strict’.
- embodichain.lab.sim.atomic_skills.CARTESIAN_POSE_CAPABILITY = 'motion.cartesian_pose'#
str(object=’’) -> str str(bytes_or_buffer[, encoding[, errors]]) -> str
Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.__str__() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to ‘strict’.
- embodichain.lab.sim.atomic_skills.FORWARD_KINEMATICS_CAPABILITY = 'kinematics.forward'#
str(object=’’) -> str str(bytes_or_buffer[, encoding[, errors]]) -> str
Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.__str__() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to ‘strict’.
- embodichain.lab.sim.atomic_skills.INVERSE_KINEMATICS_CAPABILITY = 'kinematics.inverse'#
str(object=’’) -> str str(bytes_or_buffer[, encoding[, errors]]) -> str
Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.__str__() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to ‘strict’.
- embodichain.lab.sim.atomic_skills.BATCH_INVERSE_KINEMATICS_CAPABILITY = 'kinematics.batch_inverse'#
str(object=’’) -> str str(bytes_or_buffer[, encoding[, errors]]) -> str
Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.__str__() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to ‘strict’.
- embodichain.lab.sim.atomic_skills.GRASP_CAPABILITY = 'interaction.grasp'#
str(object=’’) -> str str(bytes_or_buffer[, encoding[, errors]]) -> str
Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.__str__() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to ‘strict’.
Planning and state#
- class embodichain.lab.sim.atomic_skills.SkillBinding[source]#
Engine-owned generic endpoint bindings for one atomic skill call.
Methods:
__init__(owner_id[, endpoints])endpoint(slot_id, endpoint_id)Return one action-local resolved endpoint.
with_command_overrides(overrides)Return a binding snapshot with endpoint-scoped command overrides.
Attributes:
Return action-local endpoint keys in binding order.
Return unique owned runtime targets in binding order.
- __init__(owner_id, endpoints=())#
- property endpoint_keys: tuple[tuple[str, str], ...]#
Return action-local endpoint keys in binding order.
- property targets: tuple[RuntimeEndpointTarget, ...]#
Return unique owned runtime targets in binding order.
- class embodichain.lab.sim.atomic_skills.EndpointBinding[source]#
One action-local endpoint resolved to a runtime controller target.
Methods:
__init__(slot_id, endpoint_id, resource_id, ...)command(name)Return one owned semantic-command snapshot.
joint_positions(name, *, num_envs, device[, ...])Resolve a named joint-position command for a planning batch.
require_target(target_type)Return the runtime target after an explicit type check.
snapshot()Return an independently owned endpoint-binding snapshot.
tracking_channel(channel_id)Return one independently owned typed tracking-channel binding.
with_commands(overrides)Return an endpoint snapshot with semantic-command overrides.
Attributes:
Return the transport-scoped physical destination key.
Return the action-local
(slot, endpoint)key.Symbolic task-state key; defaults to
target.target_id.- __init__(slot_id, endpoint_id, resource_id, adapter_id, target, task_state_key=None, tracking_channels=<factory>, capabilities=frozenset({}), commands=<factory>, claim_tokens=frozenset({}), joint_ids=())#
- property destination_key: tuple[str, str]#
Return the transport-scoped physical destination key.
- joint_positions(name, *, num_envs, device, dtype=None)[source]#
Resolve a named joint-position command for a planning batch.
- Return type:
Tensor
- property key: tuple[str, str]#
Return the action-local
(slot, endpoint)key.
- require_target(target_type)[source]#
Return the runtime target after an explicit type check.
- Return type:
TypeVar(TargetT, bound=RuntimeEndpointTarget)
-
task_state_key:
str|None# Symbolic task-state key; defaults to
target.target_id.
- tracking_channel(channel_id)[source]#
Return one independently owned typed tracking-channel binding.
- Return type:
EndpointTrackingChannelBinding
- class embodichain.lab.sim.atomic_skills.RuntimeEndpointTarget[source]#
Stable controller destination produced by an endpoint adapter.
Targets contain immutable addressing data only. Live controllers, sockets, simulator entities, and other process-owned handles belong to an endpoint-command transport rather than this value.
Attributes:
Return the stable controller-address and safe-hold fingerprint.
Return the destination identifier within its transport.
Return the registered transport kind used by this target.
Methods:
snapshot()Return an independently owned target snapshot.
- property address_fingerprint: Hashable#
Return the stable controller-address and safe-hold fingerprint.
The default covers the exact target type and transport-scoped destination. Target types whose hold footprint depends on additional immutable addressing fields must override this property and include those fields. Replans and explicit revisions may replace payloads, but they may not change this fingerprint in place.
- abstract property target_id: str#
Return the destination identifier within its transport.
- abstract property transport_id: str#
Return the registered transport kind used by this target.
- class embodichain.lab.sim.atomic_skills.JointPositionTarget[source]#
Joint-position destination backed by one robot control part.
Methods:
Attributes:
Return the destination plus the joints that must remain holdable.
Return the robot control-part destination.
Return the built-in joint-position transport identifier.
- __init__(control_part, joint_ids)#
- property address_fingerprint: Hashable#
Return the destination plus the joints that must remain holdable.
- snapshot()[source]#
Return an independently owned target.
Standard immutable fields are reconstructed and validated; subclasses and extended scalar types retain generic deep-snapshot semantics.
- Return type:
- Returns:
A new target of the same concrete type.
- property target_id: str#
Return the robot control-part destination.
- property transport_id: str#
Return the built-in joint-position transport identifier.
- class embodichain.lab.sim.atomic_skills.ControlCommand[source]#
Immutable-by-ownership command associated with one control part.
Command subclasses own their payload and must return another owned value from
snapshot(). This keeps engine profiles and resolved invocation requests isolated from caller-owned mutable tensors.Methods:
equivalent_to(other)Return whether
otherhas exactly the same command semantics.snapshot()Return an independently owned copy of this command.
- abstract equivalent_to(other)[source]#
Return whether
otherhas exactly the same command semantics.- Return type:
bool
- class embodichain.lab.sim.atomic_skills.JointPositionCommand[source]#
A semantic command represented by one or batched joint positions.
positionshas shape(control_dof,)or(num_envs, control_dof). A one-dimensional command is broadcast to the planning batch when resolved.Methods:
__init__(positions)equivalent_to(other)Return whether
otherowns identical joint positions.resolve(*, num_envs, control_dof, device[, ...])Validate, move, and broadcast this command for a planning batch.
snapshot()Return an independently owned command snapshot.
Attributes:
Return an owned copy of the command payload.
- equivalent_to(other)[source]#
Return whether
otherowns identical joint positions.- Return type:
bool
- property positions: Tensor#
Return an owned copy of the command payload.
- resolve(*, num_envs, control_dof, device, dtype=None)[source]#
Validate, move, and broadcast this command for a planning batch.
- Parameters:
num_envs (
int) – Number of selected environments.control_dof (
int) – Joint count of the resolved control part.device (
device|str) – Target planning device.dtype (
dtype|None) – Optional target dtype.
- Return type:
Tensor- Returns:
Independently owned tensor with shape
(num_envs, control_dof).- Raises:
ValueError – If the command shape does not match the control part or selected environment batch.
- class embodichain.lab.sim.atomic_skills.ControlPartCommandProfile[source]#
Reusable semantic commands for one named robot control part.
Profiles are registered once on
AtomicSkillEngine, keyed by names fromRobot.control_parts. They describe embodiment-specific meanings such asopen,grasporreadywithout coupling those values to an action implementation.Methods:
__init__([commands])joint_positions(**commands)Build a profile whose entries are joint-position commands.
snapshot()Return an independently owned profile snapshot.
- __init__(commands=<factory>)#
- classmethod joint_positions(**commands)[source]#
Build a profile whose entries are joint-position commands.
- Return type:
- class embodichain.lab.sim.atomic_skills.SkillControlOverrides[source]#
Per-invocation semantic commands keyed by slot and endpoint.
The first two keys match a skill’s
(slot_id, endpoint_id)contract. The innermost mapping contains semantic command names. Overrides are captured in the invocation revision’s immutable planning snapshot.Methods:
__init__([endpoints])Return immutable overrides keyed by
(slot_id, endpoint_id).Attributes:
Whether this invocation defines no command overrides.
- __init__(endpoints=<factory>)#
- as_flat_mapping()[source]#
Return immutable overrides keyed by
(slot_id, endpoint_id).- Return type:
Mapping[tuple[str,str],Mapping[str,ControlCommand]]
- property is_empty: bool#
Whether this invocation defines no command overrides.
- class embodichain.lab.sim.atomic_skills.SkillInvocation[source]#
One fully typed and endpoint-bound atomic skill request.
This is a runtime-domain object, not the JSON protocol emitted by an MLLM. An action compiler is responsible for converting a semantic
SkillCallSpecinto this grounded representation.Methods:
__init__(skill_id, goal, binding[, ...])Attributes:
Generic skill endpoint bindings owned by the selected engine.
Optional semantic control commands for this invocation revision.
Action-specific goal value object.
Optional correlation identifier propagated into execution traces.
Reusable motion-generation settings.
Physical-effect gates enforced at named trajectory-segment entries.
Bounded local execution recovery settings.
Monotonic revision used when replacing a runtime invocation.
Stable registered skill identifier.
Optional per-invocation behavior override for the selected skill.
Typed in-flight tracking and terminal-acceptance settings.
- __init__(skill_id, goal, binding, motion_policy=<factory>, tracking_policy=<factory>, recovery_policy=<factory>, phase_effect_gates=(), skill_options=None, control_overrides=<factory>, invocation_id=None, revision=0)#
-
binding:
SkillBinding# Generic skill endpoint bindings owned by the selected engine.
-
control_overrides:
SkillControlOverrides# Optional semantic control commands for this invocation revision.
-
goal:
TypeVar(GoalT)# Action-specific goal value object.
-
invocation_id:
str|None# Optional correlation identifier propagated into execution traces.
-
motion_policy:
MotionPolicy# Reusable motion-generation settings.
-
phase_effect_gates:
tuple[PhaseEffectGateRequirement,...]# Physical-effect gates enforced at named trajectory-segment entries.
-
recovery_policy:
RecoveryPolicy# Bounded local execution recovery settings.
-
revision:
int# Monotonic revision used when replacing a runtime invocation.
-
skill_id:
str# Stable registered skill identifier.
-
skill_options:
Optional[TypeVar(OptionsT, bound=SkillOptions)]# Optional per-invocation behavior override for the selected skill.
-
tracking_policy:
TrackingPolicy# Typed in-flight tracking and terminal-acceptance settings.
- class embodichain.lab.sim.atomic_skills.ResolvedSkillRequest[source]#
Engine-owned immutable planning snapshot for one invocation revision.
Recovery replans reuse this object verbatim and vary only the
PlanningContext. Deep-copying goal value payloads, policies, and skill options severs caller-owned mutable data before planning starts while retaining simulator-backed entity handles and private runtime caches.Methods:
__init__(skill_id, goal, binding, ...[, ...])snapshot()Return an independently owned resolved-request snapshot.
- __init__(skill_id, goal, binding, motion_policy, tracking_policy, recovery_policy, skill_options, phase_effect_gates=(), invocation_id=None, revision=0)#
- snapshot()[source]#
Return an independently owned resolved-request snapshot.
- Return type:
ResolvedSkillRequest[TypeVar(GoalT),TypeVar(OptionsT, bound=SkillOptions)]
- class embodichain.lab.sim.atomic_skills.SkillOptions[source]#
Marker base for immutable, skill-specific runtime options.
Subclasses belong to action modules and contain only behavior that may vary between invocations. Robot resources and semantic targets do not belong in this object.
Methods:
__init__()- __init__()#
- class embodichain.lab.sim.atomic_skills.MotionPolicy[source]#
Immutable motion-generation policy for one action invocation.
The policy is a runtime value object rather than application configuration.
plan_optsis copied on construction so a caller-owned planner config cannot change an invocation after it has been created.Attributes:
Scalar acceleration budget in joint units per second squared.
How this invocation consumes live scene-snapshot collision entities.
Represent rejected final-velocity rows as holds or retain their proposal.
Select batched IK or previous-valid-posture waypoint seeding.
Cartesian sampling distance in metres, forwarded to motion generation.
Select adaptive interpolation or an unchanged count/interval grid.
Explicit primitive phase paths; empty preserves each skill's defaults.
Optional typed planner-specific options.
Require authored/runtime speed validity of final full-robot commands.
Minimum trajectory sample count when the backend does not preserve samples.
Explicit denser whole-plan alternatives after successful-row overspeed.
Try unchanged-target/time continuous IK after segment samples fail.
Ordered denser alternatives within one sampled Cartesian segment request.
motion_genorik_interp.Optional scalar speed request, capped by effective Robot joint limits.
Use trajectory velocities or explicit zero velocity targets.
Methods:
to_motion_gen_options(*, start_qpos, ...[, ...])Translate this atomic policy into motion-generator options.
-
acceleration_limit:
float|None# Scalar acceleration budget in joint units per second squared.
For
motion_gen,Noneretains the selected backend’s configured budget. Adaptiveik_interprequires a positive scalar budget; explicitfixed_gridrequiresNoneand does not certify acceleration.
-
dynamic_collision_mode:
DynamicCollisionMode# How this invocation consumes live scene-snapshot collision entities.
-
final_velocity_rejection:
Literal['hold','mask_only']# Represent rejected final-velocity rows as holds or retain their proposal.
holdpreserves shared command authorization and rejected-candidate storage. Explicitmask_onlywaits for the complete action request, including its owned candidate recovery and continuations, then changes validity/classification without changing public command or trajectory tensors. Candidate masks stay untouched until that boundary; execution still cannot dispatch failed rows.
-
ik_seed_mode:
Literal['batched','sequential']# Select batched IK or previous-valid-posture waypoint seeding.
-
interpolate_position_step:
float# Cartesian sampling distance in metres, forwarded to motion generation.
PickUp contact motions also use this distance to sample their lift on the control grid. Joint-limit qualification can lengthen the resulting path.
-
interpolation_mode:
Literal['adaptive','fixed_grid']# Select adaptive interpolation or an unchanged count/interval grid.
-
phase_paths:
Mapping[str,Literal['joint','cartesian']]# Explicit primitive phase paths; empty preserves each skill’s defaults.
PickUp reads pre_grasp/grasp/lift (and optional initial_lift); Place reads pre_place/place/retreat. Other primitives retain their own declared paths. Placement translation keyframes all retain their original phase’s path.
-
plan_opts:
PlanOptions|None# Optional typed planner-specific options.
-
require_final_velocity:
bool# Require authored/runtime speed validity of final full-robot commands.
This separate opt-in gate runs after any declared sampling retries and plan transforms. Unknown command-only qualification is unsupported. Rejected rows cannot dispatch; their representation is explicit. This is planned evidence, not physical success.
-
sample_count:
int# Minimum trajectory sample count when the backend does not preserve samples.
-
sample_count_retries:
tuple[int,...]# Explicit denser whole-plan alternatives after successful-row overspeed.
The engine tries only counts above the current count, in declared order, after action composition and any plan transform. This best-effort retry policy alone retains the original plan when alternatives are exhausted; it does not certify final velocity or enable external nominal motion.
-
segment_continuous_ik_recovery:
bool# Try unchanged-target/time continuous IK after segment samples fail.
Dense attempts advance the existing random stream. The continuous resolver retains its own Torch-only fork; no outer action counter is reused.
-
segment_sample_count_retries:
tuple[int,...]# Ordered denser alternatives within one sampled Cartesian segment request.
These counts are independent of complete-action retries. The first count also bounds eligibility of the original request, preserving the source coarse-grid boundary. Only the explicit Cartesian segment helper consumes them; ordinary
generatecalls reject non-default segment recovery.
-
strategy:
Literal['motion_gen','ik_interp']# motion_genorik_interp.- Type:
Motion strategy
- to_motion_gen_options(*, start_qpos, control_part, sample_count=None, interpolation_dt=None, cartesian_linear=False, cartesian_keyframes=False, cartesian_path_sampler=None)[source]#
Translate this atomic policy into motion-generator options.
- Parameters:
start_qpos (
Tensor) – Observed controlled-joint start positions.control_part (
str) – Bound robot control-part name.sample_count (
int|None) – Optional segment-local sample-count override.interpolation_dt (
float|None) – Explicit waypoint interval used only by deterministic interpolation.cartesian_linear (
bool) – Whether every supplied Cartesian keyframe is a required linear-path sample rather than a sparse endpoint.cartesian_keyframes (
bool) – Supply unsampled linear keyframes to the public MotionGenerator sampling/recovery path. This is distinct from already sampledcartesian_linearinput; the two selections cannot be combined.cartesian_path_sampler (
Callable[[Tensor],Tensor] |None) – Optional exact-path sampler receiving normalized progress values. Use this for constrained curves such as rotations about an external hinge.
- Return type:
- Returns:
Independently owned options for
MotionGenerator.- Raises:
ValueError – If a fixed Cartesian path is requested with a planner strategy that does not guarantee those exact samples.
-
velocity_limit:
float|None# Optional scalar speed request, capped by effective Robot joint limits.
-
velocity_targets:
Literal['auto','zero']# Use trajectory velocities or explicit zero velocity targets.
-
acceleration_limit:
- class embodichain.lab.sim.atomic_skills.RecoveryPolicy[source]#
Bounded local recovery policy used by the execution runtime.
Attributes:
Dynamic-goal rotation threshold in radians (five degrees by default).
Dynamic-goal translation threshold in metres.
Maximum replans within one action attempt.
Maximum whole-action retries after planning, execution, or effect failure.
Optional outer planning ledger/deadline; None preserves shared defaults.
Optional skill-owned planning declaration; None enables no new recovery.
Allow ordinary action retries when a complete plan has no successful row.
Maximum time for one action attempt, including terminal effect verification.
Methods:
validate_skill(skill_id)Reject a planning declaration selected for a different Atomic skill.
-
goal_rotation_threshold:
float# Dynamic-goal rotation threshold in radians (five degrees by default).
-
goal_translation_threshold:
float# Dynamic-goal translation threshold in metres.
-
max_replans:
int# Maximum replans within one action attempt.
-
max_skill_retries:
int# Maximum whole-action retries after planning, execution, or effect failure.
-
planning_budget:
PlanningBudget|None# Optional outer planning ledger/deadline; None preserves shared defaults.
An already-active parent ledger owns nested requests and their deadline. This is separate from skill_timeout, which governs execution/verification.
-
planning_recovery:
PlanningRecovery|None# Optional skill-owned planning declaration; None enables no new recovery.
Its complete immutable contents participate in policy/registration identity. This scope is separate from execution replans and whole-action retries.
-
retry_all_failed_plans:
bool# Allow ordinary action retries when a complete plan has no successful row.
False preserves its failure code but makes the all-failed result terminal. Candidate searches inside the complete planning boundary retain their own bounded recovery; partial successes keep their existing classification.
-
skill_timeout:
float# Maximum time for one action attempt, including terminal effect verification.
-
goal_rotation_threshold:
- class embodichain.lab.sim.atomic_skills.PlanningContext[source]#
Complete side-effect-free input to
AtomicSkill.plan().Methods:
__init__(robot, task, scene, env_ids[, ...])Return verified state for one canonical articulation joint.
get_coordinated_held_object(first_resource, ...)Return a coordinated held-object relation, if any.
get_held_object(resource)Return the object held by
resource, if any.project(*, qpos, task)Create the hypothetical context used to compile a following action.
Return the explicit command period required for interpolation.
Attributes:
Optional immutable Affordance sampling stream supplied by the host.
Verified articulation-joint states.
Number of environments in this planning request.
Explicit command period used by action-owned interpolation.
Coordinated held-object relations.
Single-resource held-object relations.
Explicit look-ahead planning role, independent of measured/projected state.
Measured joint positions used as the planning start state.
Original host observation retained across projection, never its planned start.
Eligible planning rows; inactive rows cannot determine path duration.
Optional native-world source stamp; projected joint states keep this world scope.
- __init__(robot, task, scene, env_ids, control_dt=None, affordance_sampling=None, *, planning_mask=None, observed_robot=None, is_preview=False, world_source_stamp=None)#
-
affordance_sampling:
AffordanceSamplingContext|None# Optional immutable Affordance sampling stream supplied by the host.
- property articulation_joints: Mapping[tuple[str, str], ArticulationJointState]#
Verified articulation-joint states.
- property batch_size: int#
Number of environments in this planning request.
-
control_dt:
float|None# Explicit command period used by action-owned interpolation.
- property coordinated_held_objects: Mapping[tuple[str, str], CoordinatedHeldObjectState]#
Coordinated held-object relations.
- get_articulation_joint_state(articulation_id, joint_id)[source]#
Return verified state for one canonical articulation joint.
- Return type:
ArticulationJointState|None
- get_coordinated_held_object(first_resource, second_resource)[source]#
Return a coordinated held-object relation, if any.
- Return type:
CoordinatedHeldObjectState|None
- get_held_object(resource)[source]#
Return the object held by
resource, if any.- Return type:
HeldObjectState|None
- property held_objects: Mapping[str, HeldObjectState]#
Single-resource held-object relations.
-
is_preview:
bool# Explicit look-ahead planning role, independent of measured/projected state.
- property last_qpos: Tensor#
Measured joint positions used as the planning start state.
-
observed_robot:
RobotObservation|None# Original host observation retained across projection, never its planned start.
-
planning_mask:
Tensor|None# Eligible planning rows; inactive rows cannot determine path duration.
- project(*, qpos, task)[source]#
Create the hypothetical context used to compile a following action.
- Parameters:
qpos (
Tensor) – Projected terminal joint positions.task (
TaskState) – Task state after applying expected effects.
- Return type:
- Returns:
New context. No measured state or simulator state is mutated.
- require_control_dt()[source]#
Return the explicit command period required for interpolation.
- Raises:
ValueError – If the caller did not provide
control_dt.- Return type:
float
-
world_source_stamp:
PhysicalObservationStamp|None# Optional native-world source stamp; projected joint states keep this world scope.
- class embodichain.lab.sim.atomic_skills.RobotObservation[source]#
Measured robot state used as the start of planning or replanning.
Optional
command_qposandcommand_qvelare independently owned snapshots of controller references at the same control boundary. They are not physical measurements and never replaceqposorqvel. Projection advances available references to the projected terminal position and rest.Methods:
__init__(timestamp, qpos, qvel[, qeffort, ...])with_qpos(qpos)Create a projected observation with a new position and zero velocity.
Attributes:
Number of represented vectorized environments.
Number of robot joint-position columns.
- __init__(timestamp, qpos, qvel, qeffort=None, root_pose=None, root_twist=None, command_qpos=None, command_qvel=None)#
- property batch_size: int#
Number of represented vectorized environments.
- property robot_dof: int#
Number of robot joint-position columns.
- class embodichain.lab.sim.atomic_skills.TaskState[source]#
Symbolic task state, separate from measured robot state.
Methods:
__init__(batch_size, device[, held_objects, ...])empty(batch_size, device)Create an empty symbolic state.
exclusive_held_object_mask(resource)Return environments where only
resourceholds its object.Return verified state for one canonical articulation joint.
get_coordinated_held_object(first_resource, ...)Return the relation for an ordered resource pair, if any.
get_held_object(resource)Return the object held by
resource, if any.held_object_mask(resource)Return environments where
resourceholds an object.Attributes:
Verified articulation states keyed by canonical articulation and joint IDs.
Number of vectorized environments represented by the state.
Coordinated relations keyed by ordered logical task-state resource pairs.
Device used by per-environment masks and relation tensors.
Single-manipulator held-object relations keyed by control resource.
- __init__(batch_size, device, held_objects=<factory>, coordinated_held_objects=<factory>, articulation_joints=<factory>)#
-
articulation_joints:
Mapping[tuple[str,str],ArticulationJointState]# Verified articulation states keyed by canonical articulation and joint IDs.
-
batch_size:
int# Number of vectorized environments represented by the state.
-
coordinated_held_objects:
Mapping[tuple[str,str],CoordinatedHeldObjectState]# Coordinated relations keyed by ordered logical task-state resource pairs.
-
device:
device|str# Device used by per-environment masks and relation tensors.
- classmethod empty(batch_size, device)[source]#
Create an empty symbolic state.
- Parameters:
batch_size (
int) – Number of represented environments.device (
device|str) – Tensor device used by the state.
- Return type:
- Returns:
Empty task state with explicit batch metadata.
- exclusive_held_object_mask(resource)[source]#
Return environments where only
resourceholds its object.Object identity is established by the exact semantic record or by a shared non-null simulation entity. Labels and structural equality are deliberately ignored because distinct physical objects may look alike.
- Parameters:
resource (
str) – Manipulator control-resource name.- Return type:
Tensor- Returns:
Owned boolean mask with shape
(batch_size,).
- get_articulation_joint_state(articulation_id, joint_id)[source]#
Return verified state for one canonical articulation joint.
- Return type:
ArticulationJointState|None
- get_coordinated_held_object(first_resource, second_resource)[source]#
Return the relation for an ordered resource pair, if any.
- Return type:
CoordinatedHeldObjectState|None
- get_held_object(resource)[source]#
Return the object held by
resource, if any.- Return type:
HeldObjectState|None
- held_object_mask(resource)[source]#
Return environments where
resourceholds an object.- Parameters:
resource (
str) – Manipulator control-resource name.- Return type:
Tensor- Returns:
Owned boolean mask with shape
(batch_size,). Missing resources produce an all-false mask.
-
held_objects:
Mapping[str,HeldObjectState]# Single-manipulator held-object relations keyed by control resource.
- class embodichain.lab.sim.atomic_skills.SceneSnapshot[source]#
Versioned scene state used to ground dynamic goals and obstacles.
Methods:
__init__(timestamp, version[, entities, ...])collision_obstacle_poses(*, batch_size, ...)Return collision obstacle poses in planning batch order.
collision_world_revisions(batch_size)Expand the collision revision to one value per environment.
empty()Create an empty initial scene snapshot.
Return an owned live joint observation for a canonical address.
Attributes:
Live physical joint observations keyed by articulation and joint ID.
Entity IDs whose poses update a planner's dynamic collision world.
Global or per-environment collision-world revision.
- __init__(timestamp, version, entities=<factory>, collision_world_revision=0, collision_entity_ids=(), articulation_joints=<factory>)#
-
articulation_joints:
Mapping[tuple[str,str],ObservedArticulationJointState]# Live physical joint observations keyed by articulation and joint ID.
-
collision_entity_ids:
tuple[str,...]# Entity IDs whose poses update a planner’s dynamic collision world.
- collision_obstacle_poses(*, batch_size, device, dtype)[source]#
Return collision obstacle poses in planning batch order.
- Parameters:
batch_size (
int) – Number of planning environments.device (
device) – Planner tensor device.dtype (
dtype) – Planner tensor dtype.
- Return type:
Mapping[str,Tensor]- Returns:
Mapping from configured collision entity ID to
(B, 4, 4)pose.
-
collision_world_revision:
int|tuple[int,...]# Global or per-environment collision-world revision.
- collision_world_revisions(batch_size)[source]#
Expand the collision revision to one value per environment.
- Parameters:
batch_size (
int) – Number of environments represented by the planning context.- Return type:
tuple[int,...]- Returns:
Per-environment monotonic revision tuple.
- Raises:
ValueError – If an explicit revision tuple does not match the batch.
- class embodichain.lab.sim.atomic_skills.SceneEntityPose[source]#
Late-bound pose derived from a versioned scene entity.
The semantic request remains stable while each call to
AtomicSkill.plan()resolves the latest scene pose. This is the bridge used by an execution session to replan moving goals.Methods:
__init__(entity_id[, relative_pose, ...])snapshot()Return an independently owned late-bound pose value.
Attributes:
Stable scene entity identifier.
Minimum accepted perception confidence.
Optional transform applied as
entity_pose @ relative_pose.Optional world-frame translation applied after
relative_pose.Optional world-frame orientation applied before
relative_pose.- __init__(entity_id, relative_pose=None, minimum_confidence=0.0, world_displacement=None, world_orientation=None)#
-
entity_id:
str# Stable scene entity identifier.
-
minimum_confidence:
float# Minimum accepted perception confidence.
-
relative_pose:
Tensor|None# Optional transform applied as
entity_pose @ relative_pose.
- snapshot()[source]#
Return an independently owned late-bound pose value.
- Return type:
- Returns:
Exact scene reference with an owned relative-pose tensor.
-
world_displacement:
Tensor|None# Optional world-frame translation applied after
relative_pose.
-
world_orientation:
Tensor|None# Optional world-frame orientation applied before
relative_pose.
- class embodichain.lab.sim.atomic_skills.StateDelta[source]#
Expected task-state changes that require post-execution verification.
A mapping value of
Noneremoves the corresponding relation. Planning only declares this delta; an execution runtime applies it after verifying the semantic effect for the successful environment rows.Methods:
__init__([held_object_updates, ...])apply(state, update_mask)Apply expected effects to selected environment rows.
snapshot()Return an independently owned symbolic-effect snapshot.
Attributes:
Per-articulation/joint verified state replacements or removals.
Per-resource-pair coordinated attachment replacements or removals.
Per-resource attachment replacements or removals.
Whether this delta declares no symbolic state changes.
- __init__(held_object_updates=<factory>, coordinated_held_object_updates=<factory>, articulation_joint_updates=<factory>)#
- apply(state, update_mask)[source]#
Apply expected effects to selected environment rows.
This operation is used for hypothetical state propagation while compiling a sequence. A runtime must apply the same delta only after effect verification.
-
articulation_joint_updates:
Mapping[tuple[str,str],ArticulationJointState|None]# Per-articulation/joint verified state replacements or removals.
-
coordinated_held_object_updates:
Mapping[tuple[str,str],CoordinatedHeldObjectState|None]# Per-resource-pair coordinated attachment replacements or removals.
-
held_object_updates:
Mapping[str,HeldObjectState|None]# Per-resource attachment replacements or removals.
- property is_empty: bool#
Whether this delta declares no symbolic state changes.
- class embodichain.lab.sim.atomic_skills.TimedTrajectory[source]#
Full-robot joint trajectory with per-environment timing metadata.
Methods:
__init__(positions, velocities, ...)concatenate(trajectories, *[, empty_like])Concatenate trajectories along their waypoint dimension.
empty(*, batch_size, robot_dof, device, env_ids)Create an empty trajectory with explicit batch and DoF dimensions.
from_positions(positions, *, env_ids, dt[, ...])Build a trajectory from positions and explicit per-sample timing.
from_uniform_step(positions, *, env_ids, step_dt)Build an explicitly uniform-time trajectory.
hold_rows(active_mask, hold_qpos)Replace inactive rows with a fixed hold command.
snapshot()Return an independently owned copy of this trajectory.
Attributes:
Number of environment rows.
Per-waypoint arrival intervals; the first sample normally has zero dt.
Per-environment trajectory duration derived from waypoint intervals.
Number of full-robot command columns.
Number of trajectory samples.
- __init__(positions, velocities, accelerations, dt, env_ids)#
- property batch_size: int#
Number of environment rows.
- classmethod concatenate(trajectories, *, empty_like=None)[source]#
Concatenate trajectories along their waypoint dimension.
- Parameters:
trajectories (
Sequence[TimedTrajectory]) – Compatible trajectories in execution order.empty_like (
PlanningContext|None) – Context used only whentrajectoriesis empty.
- Return type:
- Returns:
Concatenated full-robot trajectory.
-
dt:
Tensor# Per-waypoint arrival intervals; the first sample normally has zero dt.
- property duration: Tensor#
Per-environment trajectory duration derived from waypoint intervals.
- classmethod empty(*, batch_size, robot_dof, device, env_ids)[source]#
Create an empty trajectory with explicit batch and DoF dimensions.
- Return type:
- classmethod from_positions(positions, *, env_ids, dt, velocities=None, accelerations=None)[source]#
Build a trajectory from positions and explicit per-sample timing.
- Parameters:
positions (
Tensor) – Full-robot positions, shape(B, N, D).env_ids (
Tensor) – Environment identifiers, shape(B,).dt (
Tensor) – Per-sample arrival intervals, shape(B, N).velocities (
Tensor|None) – Optional joint velocities.accelerations (
Tensor|None) – Optional joint accelerations.
- Return type:
- Returns:
Validated timed trajectory.
- classmethod from_uniform_step(positions, *, env_ids, step_dt, velocities=None, accelerations=None)[source]#
Build an explicitly uniform-time trajectory.
The first waypoint has zero arrival time; every following waypoint uses
step_dt. This factory is intended for interpolation algorithms whose cadence is selected by the caller, not for repairing untimed plans.- Parameters:
positions (
Tensor) – Full-robot positions, shape(B, N, D).env_ids (
Tensor) – Environment identifiers, shape(B,).step_dt (
float) – Explicit interval between consecutive waypoints.velocities (
Tensor|None) – Optional joint velocities.accelerations (
Tensor|None) – Optional joint accelerations.
- Return type:
- Returns:
Validated uniformly timed trajectory.
- hold_rows(active_mask, hold_qpos)[source]#
Replace inactive rows with a fixed hold command.
- Parameters:
active_mask (
Tensor) – Rows allowed to execute this trajectory.hold_qpos (
Tensor) – Hold positions, shape(B, D).
- Return type:
- Returns:
New trajectory with inactive rows frozen and derivatives zeroed.
- property robot_dof: int#
Number of full-robot command columns.
- snapshot()[source]#
Return an independently owned copy of this trajectory.
- Return type:
- Returns:
A trajectory whose tensor storage can be mutated without changing the source trajectory.
- property waypoint_count: int#
Number of trajectory samples.
- class embodichain.lab.sim.atomic_skills.PlanningFailure[source]#
Stable planning-failure classification used by recovery policy.
- Parameters:
code (
str) – Exact machine-readable failure code.retryable (
bool) – Whether action-level recovery may replan failed rows.
Methods:
__init__(code[, retryable])- __init__(code, retryable=True)#
- class embodichain.lab.sim.atomic_skills.RuntimeCommandPayload[source]#
Immutable-by-ownership payload submitted to one runtime transport.
Attributes:
Return the number of environment rows in this payload.
Return the device shared by this payload's batched values.
Return the transport kind that accepts this payload.
Methods:
snapshot()Return an independently owned payload snapshot.
- abstract property batch_size: int#
Return the number of environment rows in this payload.
- abstract property device: device#
Return the device shared by this payload’s batched values.
- abstract property transport_id: str#
Return the transport kind that accepts this payload.
- class embodichain.lab.sim.atomic_skills.JointPositionPayload[source]#
Batched joint-position targets for the built-in robot transport.
- Parameters:
positions (
Tensor) – Joint positions with shape(batch_size, control_dof).velocities (
Tensor|None) – Optional joint velocities with the same shape and device. Missing velocities mean a zero velocity target in simulation.
Methods:
Attributes:
Return the number of environment rows.
Return the tensor device.
Return the number of controlled joints.
Return the built-in joint-position transport identifier.
- __init__(positions, velocities=None)#
- property batch_size: int#
Return the number of environment rows.
- property device: device#
Return the tensor device.
- property dof: int#
Return the number of controlled joints.
- property transport_id: str#
Return the built-in joint-position transport identifier.
- class embodichain.lab.sim.atomic_skills.EndpointCommand[source]#
One transport-compatible payload addressed to one runtime target.
- Parameters:
target (
RuntimeEndpointTarget) – Immutable destination resolved from an action endpoint.payload (
RuntimeCommandPayload) – Batched command value accepted by the target transport.
Methods:
Attributes:
Return the payload batch size.
Return the transport-scoped destination identifier.
Return the payload device.
Return the common target and payload transport identifier.
- __init__(target, payload)#
- property batch_size: int#
Return the payload batch size.
- property destination_key: tuple[str, str]#
Return the transport-scoped destination identifier.
- property device: device#
Return the payload device.
- property transport_id: str#
Return the common target and payload transport identifier.
- class embodichain.lab.sim.atomic_skills.RuntimeCommandFrame[source]#
Synchronized endpoint commands for one batched runtime instant.
- Parameters:
commands (
tuple[EndpointCommand,...]) – Commands dispatched together for this frame.active_mask (
Tensor) – Boolean environment rows allowed to execute commands. Transports must actively neutralize addressed targets for false rows rather than leaving a previously persistent command running.env_ids (
Tensor) – Stable environment identifiers for the batch rows.hold_duration (
Tensor) – Per-row delay before advancing to the next frame.
Methods:
__init__(commands, active_mask, env_ids, ...)snapshot()Return an independently owned command frame.
with_active_mask(active_mask)Return a frame snapshot with a replacement active-row mask.
Attributes:
Return the number of environment rows.
Return the shared frame device.
Return owned targets in command order.
- __init__(commands, active_mask, env_ids, hold_duration)#
- property batch_size: int#
Return the number of environment rows.
- property device: device#
Return the shared frame device.
- property targets: tuple[RuntimeEndpointTarget, ...]#
Return owned targets in command order.
- class embodichain.lab.sim.atomic_skills.TimedCommandSequence[source]#
Ordered runtime command frames for one stable environment batch.
env_idsis authoritative even whenframesis empty, preserving the batch size and device needed by compilation and execution boundaries.- Parameters:
frames (
tuple[RuntimeCommandFrame,...]) – Ordered command frames in execution order.env_ids (
Tensor) – Stable environment identifiers retained for empty sequences.
Methods:
Attributes:
Return the preserved environment batch size.
Return the preserved batch device.
Return the number of command frames.
Return unique owned destinations in first-use order.
- __init__(frames, env_ids)#
- property batch_size: int#
Return the preserved environment batch size.
- property device: device#
Return the preserved batch device.
- property frame_count: int#
Return the number of command frames.
- property targets: tuple[RuntimeEndpointTarget, ...]#
Return unique owned destinations in first-use order.
- class embodichain.lab.sim.atomic_skills.SkillPlan[source]#
Scene-bound planning result for one grounded atomic skill invocation.
An action owns one timed command sequence and one recovery boundary. Named
TrajectorySegmentvalues describe semantic structure within that sequence without implying independent planning or recovery boundaries.- expected_effects#
Terminal symbolic state changes committed only after physical-effect verification succeeds.
- effect_candidates#
Nonterminal attachment baselines available to phase gates and in-flight guards without being committed to task state.
- scene_dependency_monitor_until#
Optional exclusive waypoint-index upper bounds for individual
scene_dependencies. An entity is monitored while the current waypoint index is smaller than its bound;0disables monitoring immediately, while an omitted entity remains monitored for the action’s full execution. Once the bound is reached, all pose changes for that entity are ignored, regardless of whether they were caused by the action or by an external disturbance.
- scene_dependency_end_segment#
Optional last segment during which scene motion may invalidate and replan the action for every dependency.
Methods:
__init__(skill_id, plan_success, commands, ...)segment(name)Return a named trajectory segment.
segment_at(waypoint_index)Return the segment containing a global action waypoint index.
snapshot()Return an independently owned inspection snapshot of this plan.
Attributes:
Next observed chunk in the same invocation and recovery scope.
Optional typed proposal for explicit host-owned planning-state commit.
Owned original full-robot samples for rows rejected from this exact plan.
Whether execution must verify a terminal physical effect.
Whether every environment row planned successfully.
- __init__(skill_id, plan_success, commands, recovery_policy, tracking_policy, planned_scene_version, planned_collision_world_revision, diagnostics, tracking=None, joint_trajectory=None, segments=(), scene_dependencies=(), scene_dependency_monitor_until=<factory>, scene_dependency_end_segment=None, collision_world_sensitive=False, replannable=True, expected_effects=<factory>, effect_candidates=<factory>, effect_verification=None, invocation_id=None, invocation_revision=0, *, rejected_candidate=None, planning_recovery_outcome=None, continuation=None)#
-
continuation:
PlanContinuation|None# Next observed chunk in the same invocation and recovery scope.
-
planning_recovery_outcome:
PlanningRecoveryOutcome|None# Optional typed proposal for explicit host-owned planning-state commit.
A failed plan may still carry a logical selection outcome. Preview callers discard it or commit only to an independently owned preview cursor.
-
rejected_candidate:
RejectedMotionCandidate|None# Owned original full-robot samples for rows rejected from this exact plan.
The batch, device, full robot columns and time grid match joint_trajectory. Rejected rows cannot become successful; this value records planned evidence and is never an executable replacement or physical-effect certificate.
- property requires_effect_verification: bool#
Whether execution must verify a terminal physical effect.
- segment(name)[source]#
Return a named trajectory segment.
- Parameters:
name (
str) – Exact segment name.- Return type:
TrajectorySegment- Returns:
Matching segment metadata.
- Raises:
KeyError – If the plan has no segment with that name.
- segment_at(waypoint_index)[source]#
Return the segment containing a global action waypoint index.
- Return type:
TrajectorySegment
- snapshot()[source]#
Return an independently owned inspection snapshot of this plan.
Runtime tracing and visualization need access to the exact plan that reached an execution boundary without being able to mutate the live session. Reconstructing the value through the public constructor also re-applies every plan invariant and snapshots all tensor-owning nested contracts.
- Return type:
- Returns:
A validated plan with independently owned tensor storage.
- property success_all: bool#
Whether every environment row planned successfully.
- class embodichain.lab.sim.atomic_skills.SkillPlanTemplateAdapter[source]#
Export one explicit Atomic Skill plan as a qpos template.
Canonical expansion removes zero-time joins; restoration retains the source grid. Every plan segment must declare its editable operators and phase kind; unlisted operators are rejected instead of being inferred from a skill name.
Methods:
__init__(joint_names, phase_permissions, ...)export_template(source, *, context[, row_index])Export a single-row, explicitly permissioned SkillPlan.
restore_positions(source, positions, *[, ...])Restore canonical samples to the source grid and exact protected values.
- __init__(joint_names, phase_permissions, phase_kinds, controlled_joint_indices=None, validator_id='default')#
- export_template(source, *, context, row_index=None)[source]#
Export a single-row, explicitly permissioned SkillPlan.
- Parameters:
source (
SkillPlan) – Validated plan retaining a joint trajectory.context (
SourceContext) – Coordinator-owned source and scene identity.row_index (
int|None) – Explicit batch row. Omission requires a single row.
- Return type:
- Returns:
A detached
TrajectoryTemplateon the CPU/device of the source plan.
- restore_positions(source, positions, *, row_index=0)[source]#
Restore canonical samples to the source grid and exact protected values.
- Parameters:
source (
SkillPlan) – Original plan used byexport_template().positions (
Tensor) – Expanded canonical full-joint positions, shape(N, D).row_index (
int) – Source batch row.
- Return type:
Tensor- Returns:
Owned source-grid positions on the original dtype and device.
Export one explicit Atomic Skill plan as a qpos template. |
Engine and execution#
- class embodichain.lab.sim.atomic_skills.AtomicSkill[source]#
Side-effect-free planner for one semantically meaningful robot skill.
Actions own only typed default runtime options. An
AtomicSkillEnginebinds its shared planning services before an action is invoked.Attributes:
Concrete goal dataclass or dataclasses accepted by this skill.
Exact opt-in planning declarations supported by this skill.
Whether an Action Agent should expose this skill by default.
Explicit robot-independent requirements for semantic discovery.
Return an owned copy of the action's default runtime options.
Return the concrete runtime device associated with the engine.
Whether an engine has supplied this action's planning resources.
Return the engine-owned motion generator borrowed by this action.
Number of environments owned by the bound robot.
Whether the skill intentionally declares no verified physical effect.
Return the engine-owned services borrowed by this action.
Return the robot associated with the owning engine.
Number of full-robot degrees of freedom.
Stable registry identifier for this skill.
Classes:
alias of
SkillOptionsMethods:
__init__([default_options])build_command_plan(request, context, *, ...)Build a plan from transport-neutral runtime command frames.
build_plan(request, context, *, success, ...)Build a validated action plan for a primitive implementation.
continue_plan(request, context, plan, ...)Plan a later chunk without beginning another logical skill.
Return stable metadata used by registries and Action Agent adapters.
failed_plan(request, context, *[, message, ...])Build a failed empty plan without changing task state.
on_plan_installed(request, context, plan)Publish bookkeeping only after an execution plan was accepted.
plan(request, context, *[, nominal_source, ...])Bind the current collision scene and invoke the skill planner.
plan_complete_request(request, context, *, build)Delegate one complete request, optionally specialized by a typed skill.
require_goal(request)Validate a resolved request and return its concrete goal.
resolve_request(invocation)Validate and snapshot an invocation through engine-owned resources.
Return execution-independent reward recipes without binding a planner.
-
GoalType:
ClassVar[type[Any] |tuple[type[Any],...]]# Concrete goal dataclass or dataclasses accepted by this skill.
- OptionsType#
alias of
SkillOptions
-
PlanningRecoveryType:
ClassVar[type[PlanningRecovery] |tuple[type[PlanningRecovery],...] |None] = None# Exact opt-in planning declarations supported by this skill.
-
agent_visible:
ClassVar[bool] = True# Whether an Action Agent should expose this skill by default.
-
binding_contract:
ClassVar[SkillBindingContract|None] = None# Explicit robot-independent requirements for semantic discovery.
Concrete action classes must declare this attribute in their own class body to opt into the semantic catalog. Inheriting another action’s contract does not silently expose a new skill identifier.
- build_command_plan(request, context, *, success, commands, expected_effects=None, effect_candidates=None, effect_verification=None, replannable=True, diagnostics=None, segment_lengths=None, scene_dependency_monitor_until=None, scene_dependency_end_segment=None, joint_trajectory=None)[source]#
Build a plan from transport-neutral runtime command frames.
Tracking targets are projected from the command payloads through the typed channels declared by each bound endpoint. Semantic effects remain externally verified through the execution session.
- Parameters:
request (
ResolvedSkillRequest[TypeVar(GoalT),TypeVar(OptionsT, bound=SkillOptions)]) – Resolved invocation snapshot being planned.context (
PlanningContext) – Planning input used for the plan.success (
bool|Tensor) – Per-environment planning success or scalar planner result.commands (
TimedCommandSequence) – Transport-neutral command sequence for the action.expected_effects (
StateDelta|None) – Symbolic effects to verify after execution.effect_candidates (
StateDelta|None) – Planned attachment baselines used by phase gates and in-flight held-object guards without committing task state.effect_verification (
EffectVerificationRequirement|None) – Optional explicit physical-effect boundary.replannable (
bool) – Whether the execution runtime may replan this action.diagnostics (
PlannerDiagnostics|None) – Optional retained planner diagnostics.segment_lengths (
Mapping[str,int] |None) – Optional ordered mapping from semantic segment names to command-frame counts. Zero-length entries are omitted.scene_dependency_monitor_until (
Mapping[str,int] |None) – Optional per-entity exclusive command-frame-index upper bound for scene-motion invalidation. An entity is monitored while the current frame index is smaller than its bound.0disables monitoring immediately; omitted dependencies remain monitored for the full action. Once the bound is reached, all pose changes for that entity are ignored.scene_dependency_end_segment (
str|None) – Optional last segment during which scene motion may invalidate and replan the action for every dependency.joint_trajectory (
TimedTrajectory|None) – Optional joint trajectory retained for offline compilation and inspection.
- Return type:
- Returns:
Side-effect-free action plan.
- build_plan(request, context, *, success, trajectory, expected_effects=None, effect_candidates=None, effect_verification=None, replannable=True, preserve_velocity_samples=False, diagnostics=None, segment_lengths=None, scene_dependency_monitor_until=None, scene_dependency_end_segment=None)[source]#
Build a validated action plan for a primitive implementation.
- Parameters:
request (
ResolvedSkillRequest[TypeVar(GoalT),TypeVar(OptionsT, bound=SkillOptions)]) – Resolved invocation snapshot being planned.context (
PlanningContext) – Planning input used for the plan.success (
bool|Tensor) – Per-environment planning success or scalar planner result.trajectory (
TimedTrajectory) – Full-robot trajectory with explicit timing.expected_effects (
StateDelta|None) – Symbolic effects to verify after execution.effect_candidates (
StateDelta|None) – Planned attachment baselines used by phase gates and in-flight held-object guards without committing task state.effect_verification (
EffectVerificationRequirement|None) – Optional explicit physical-effect boundary. Use this when verification is required without a symbolic task- state delta.preserve_velocity_samples (
bool) – Keep explicitly authored arrival velocities across consecutive timed segments. Derived velocity targets retain their usual boundary and stationary treatment.replannable (
bool) – Whether the execution runtime may replan this action.diagnostics (
PlannerDiagnostics|None) – Optional retained planner diagnostics.segment_lengths (
Mapping[str,int] |None) – Optional ordered mapping from semantic segment names to waypoint counts. Zero-length entries are omitted.scene_dependency_monitor_until (
Mapping[str,int] |None) – Optional per-entity exclusive waypoint-index upper bound for scene-motion invalidation. An entity is monitored while the current waypoint index is smaller than its bound.0disables monitoring immediately; omitted dependencies remain monitored for the full action. Once the bound is reached, all pose changes for that entity are ignored.scene_dependency_end_segment (
str|None) – Optional last segment during which scene motion may invalidate and replan the action for every dependency.
- Return type:
- Returns:
Side-effect-free action plan.
- continue_plan(request, context, plan, active_mask)[source]#
Plan a later chunk without beginning another logical skill.
- Parameters:
request (
ResolvedSkillRequest) – The unchanged resolved invocation.context (
PlanningContext) – Fresh observations with authoritative row identity and timing.plan (
SkillPlan) – Completed chunk and its owned continuation cursor.active_mask (
Tensor) – Eligible rows that executed the completed chunk.
- Return type:
- Returns:
Physical row acceptance and an optional later plan.
- property default_options: OptionsT#
Return an owned copy of the action’s default runtime options.
- classmethod descriptor()[source]#
Return stable metadata used by registries and Action Agent adapters.
- Return type:
- property device: device#
Return the concrete runtime device associated with the engine.
- failed_plan(request, context, *, message=None, failure_code='planning_failed', retryable=True)[source]#
Build a failed empty plan without changing task state.
- Parameters:
request (
ResolvedSkillRequest[TypeVar(GoalT),TypeVar(OptionsT, bound=SkillOptions)]) – Resolved invocation that failed to plan.context (
PlanningContext) – Planning input used for the attempt.message (
str|None) – Optional diagnostic message.failure_code (
str) – Stable machine-readable planning failure code.retryable (
bool) – Whether execution may spend action-retry budget on the failed rows.
- Return type:
- Returns:
Failed action plan with an empty trajectory.
- property is_bound: bool#
Whether an engine has supplied this action’s planning resources.
- property motion_generator: MotionGenerator#
Return the engine-owned motion generator borrowed by this action.
- property num_envs: int#
Number of environments owned by the bound robot.
- on_plan_installed(request, context, plan)[source]#
Publish bookkeeping only after an execution plan was accepted.
- Parameters:
request (
ResolvedSkillRequest) – The installed plan’s resolved invocation.context (
PlanningContext) – Observations used for this plan.plan (
SkillPlan) – Validated plan after destination and lifecycle acceptance.
- Return type:
None
-
open_loop:
ClassVar[bool] = False# Whether the skill intentionally declares no verified physical effect.
- plan(request, context, *, nominal_source=None, planner=None)[source]#
Bind the current collision scene and invoke the skill planner.
- Parameters:
request (
ResolvedSkillRequest[TypeVar(GoalT),TypeVar(OptionsT, bound=SkillOptions)]) – Immutable, typed, and embodiment-resolved action request.context (
PlanningContext) – Latest observed robot, task, and scene state.
- Return type:
- Returns:
Scene-bound action plan with expected, uncommitted effects.
- plan_complete_request(request, context, *, build, external_nominal=False)[source]#
Delegate one complete request, optionally specialized by a typed skill.
- Parameters:
request (
ResolvedSkillRequest[TypeVar(GoalT),TypeVar(OptionsT, bound=SkillOptions)]) – Already-resolved immutable invocation and selected policies.context (
PlanningContext) – Actual planning observation; no execution is permitted.build (
CompletePlanBuilder) – Engine-owned builder retaining generic retry/transform/final qualification boundaries. A skill may select only its declared bounded alternatives; it cannot modify the builder or registry.external_nominal (
bool) – Whether the caller supplied an external nominal motion source. Unsupported explicit recovery combinations reject.
- Return type:
- Returns:
One complete action plan. The default delegates exactly once and performs no reads, snapshots, retries or state changes.
- property planning_services: SkillPlanningServices#
Return the engine-owned services borrowed by this action.
- Raises:
RuntimeError – If the action has not been registered or planned by an
AtomicSkillEngine.
- require_goal(request)[source]#
Validate a resolved request and return its concrete goal.
- Return type:
TypeVar(GoalT)
- resolve_request(invocation)[source]#
Validate and snapshot an invocation through engine-owned resources.
- Parameters:
invocation (
SkillInvocation[TypeVar(GoalT),TypeVar(OptionsT, bound=SkillOptions)]) – Caller-owned invocation to resolve.- Return type:
ResolvedSkillRequest[TypeVar(GoalT),TypeVar(OptionsT, bound=SkillOptions)]- Returns:
Immutable request reused by planning and recovery replans.
- Raises:
ValueError – If the stable skill identifier does not match.
TypeError – If the goal or options type is incompatible.
KeyError – If a required binding role is missing.
- classmethod reward_profiles()[source]#
Return execution-independent reward recipes without binding a planner.
- Return type:
dict[str,SkillRewardProfile]
- property robot_dof: int#
Number of full-robot degrees of freedom.
-
skill_id:
ClassVar[str]# Stable registry identifier for this skill.
-
GoalType:
- class embodichain.lab.sim.atomic_skills.AtomicSkillEngine[source]#
Own planning resources and coordinate side-effect-free atomic skills.
Methods:
__init__(motion_generator[, ...])Initialize one engine and bind its built-in action implementations.
bind_control_parts(skill_id, endpoints, *[, ...])Build an advanced direct-core binding from control-part names.
compile(invocations[, context, plan_transform])Compile a static sequence of grounded invocations.
continue_request(request, context, previous, ...)Prepare another bounded observed chunk of the current invocation.
initial_context(*[, task, scene, timestamp, ...])Capture the robot state needed to start offline compilation.
make_invocation(skill_id, goal, *[, ...])Construct a grounded invocation while naming the skill only once.
plan(invocation[, context, plan_transform, ...])Plan one registered invocation through the engine-owned backend.
plan_request(request[, context, ...])Plan an already-resolved request without rebuilding its snapshot.
rebuild_plan_from_mapped_trajectory(request, ...)Rebuild a B=1 plan after explicit, protected control-grid retiming.
rebuild_plan_from_trajectory(request, ...)Rebuild a complete plan from a same-grid full-joint trajectory.
register(action, *[, replace])Register one action instance using its descriptor.
resolve(invocation)Resolve a registered invocation into an engine-owned snapshot.
start(invocations[, context, eligible_mask, ...])Start incremental execution for a grounded invocation sequence.
Attributes:
Deprecated alias for
skill_implementations.Return the opaque owner identity required by action bindings.
Semantic command profiles registered for robot control parts.
Return the concrete planning device used by this engine.
Standalone grasp-pose services installed for endpoint targets.
Return independently owned explicit hand calibrations by target ID.
Return the single motion generator owned by this engine.
Engine-owned resources shared by every bound atomic skill.
Return the robot controlled by this engine.
Return explicitly declared, agent-visible installed skill metadata.
Return the monotonic installed Atomic Skill catalog revision.
Registered action instances keyed by stable skill identifier.
Deprecated alias for
skill_catalog.Typed endpoint-feedback runtime used by plans and sessions.
- __init__(motion_generator, control_profiles=None, grasp_pose_generators=None, *, hand_geometry_cfgs=None, load_builtins=True, tracking_runtime=None, scene_provider=None, env_ids=None, profiler=None)[source]#
Initialize one engine and bind its built-in action implementations.
- Parameters:
motion_generator (
MotionGenerator) – Engine-owned motion-generation backend.control_profiles (
Optional[Mapping[str,ControlPartCommandProfile]]) – Semantic commands keyed by robot control-part name.grasp_pose_generators (
Optional[Mapping[str,GraspPoseGenerator]]) – Standalone grasp-pose services keyed by the runtime target ID of each grasp endpoint, normally its robot control-part name.hand_geometry_cfgs (
Optional[Mapping[str,RobotHandGeometryCfg]]) – Explicit hand calibrations keyed by grasp endpoint target ID. Settings are copied; construction performs no hand FK.load_builtins (
bool) – Whether to instantiate and register every built-in action. Disable this for isolated tests or fully custom engines.tracking_runtime (
TrackingRuntime|None) – Optional exact-version feedback, projector, and metric registries. Built-in joint tracking is installed when omitted.scene_provider (
SceneProvider|None) – Optional default scene-observation source used byinitial_context()when the caller does not supply an explicit scene snapshot. The provider is borrowed by reference.env_ids (
tuple[int,...] |None) – Optional environment subset bound to planning services.profiler (
object|None) – Optional owner-provided profiler exposingsection. Planning is recorded underatomic_planningwithout taking ownership of the profiler or looking up a simulation World.
- property actions: dict[str, AtomicSkill]#
Deprecated alias for
skill_implementations.
- bind_control_parts(skill_id, endpoints, *, task_state_keys=None)[source]#
Build an advanced direct-core binding from control-part names.
- Parameters:
skill_id (
str) – Installed skill ID.endpoints (
Mapping[str,Mapping[str,str]]) – Nestedslot_id -> endpoint_id -> control_partmapping.task_state_keys (
Optional[Mapping[str,str]]) – Optional explicit stable task-state key for each resource slot. SeeSkillPlanningServices.bind_control_parts()for inference rules when omitted.
- Return type:
- Returns:
Engine-owned generic endpoint binding.
- property binding_owner_id: str#
Return the opaque owner identity required by action bindings.
- compile(invocations, context=None, *, plan_transform=None)[source]#
Compile a static sequence of grounded invocations.
Planning is side-effect free. Expected effects are applied only to the returned hypothetical
projected_contextso following actions can be checked against the expected state. No simulator or observed task state is mutated.- Parameters:
invocations (
Iterable[SkillInvocation]) – Grounded action requests in execution order.context (
PlanningContext|None) – Optional initial planning context captured by the caller.plan_transform (
Optional[Callable[[ResolvedSkillRequest,PlanningContext,SkillPlan],SkillPlan]]) – Optional same-grid transform applied to each plan before concatenation and projected-state propagation.
- Return type:
CompiledTrajectory- Returns:
Concatenated timed trajectory, individual plans, and projected state.
- Raises:
KeyError – If an invocation references an unregistered skill.
ValueError – If context, plan, or trajectory dimensions are incompatible.
- continue_request(request, context, previous, active_mask)[source]#
Prepare another bounded observed chunk of the current invocation.
- Return type:
- property control_profiles: Mapping[str, ControlPartCommandProfile]#
Semantic command profiles registered for robot control parts.
- property device: device#
Return the concrete planning device used by this engine.
- property grasp_pose_generators: Mapping[str, GraspPoseGenerator]#
Standalone grasp-pose services installed for endpoint targets.
- property hand_geometry_cfgs: Mapping[str, RobotHandGeometryCfg]#
Return independently owned explicit hand calibrations by target ID.
- initial_context(*, task=None, scene=None, timestamp=0.0, control_dt=None, affordance_sampling=None)[source]#
Capture the robot state needed to start offline compilation.
- Parameters:
task (
TaskState|None) – Optional symbolic task state; an empty state is used otherwise.scene (
SceneSnapshot|None) – Optional explicit scene snapshot. It overrides the engine’s configured scene provider; an empty snapshot is used when both are absent.timestamp (
float) – Timestamp assigned to the captured robot observation.control_dt (
float|None) – Explicit command period for action-owned interpolation.affordance_sampling (
AffordanceSamplingContext|None) – Optional reproducible Affordance sampling stream.
- Return type:
- Returns:
Planning context containing owned robot tensors.
- make_invocation(skill_id, goal, *, control_parts=None, motion_policy=None, tracking_policy=None, recovery_policy=None, skill_options=None, control_overrides=None, invocation_id=None, revision=0)[source]#
Construct a grounded invocation while naming the skill only once.
control_partsuses the advanced direct-core binding path. Profile- based integrations resolve anSkillBindingin the semantic layer and constructSkillInvocationdirectly.- Parameters:
skill_id (
str) – Stable identifier of an installed atomic skill.goal (
TypeVar(GoalT)) – Action-specific typed goal.control_parts (
Optional[Mapping[str,Mapping[str,str]]]) – Directslot -> endpoint -> control_partmapping.motion_policy (
MotionPolicy|None) – Optional invocation motion policy.tracking_policy (
TrackingPolicy|None) – Optional typed tracking and terminal-acceptance policy.recovery_policy (
RecoveryPolicy|None) – Optional invocation recovery policy.skill_options (
Optional[TypeVar(OptionsT, bound=SkillOptions)]) – Optional action-specific invocation options.control_overrides (
SkillControlOverrides|None) – Optional endpoint-scoped command overrides.invocation_id (
str|None) – Optional correlation identifier.revision (
int) – Monotonic invocation revision.
- Return type:
SkillInvocation[TypeVar(GoalT),TypeVar(OptionsT, bound=SkillOptions)]- Returns:
A standard
SkillInvocationaccepted byplan,compile, andstart.- Raises:
ValueError – If
control_partsis omitted.KeyError – If the skill or control part is unknown.
TypeError – If an invocation field or binding input has an invalid type.
- property motion_generator: MotionGenerator#
Return the single motion generator owned by this engine.
- plan(invocation, context=None, *, plan_transform=None, nominal_source=None)[source]#
Plan one registered invocation through the engine-owned backend.
- Parameters:
invocation (
SkillInvocation) – Grounded request for a registered skill.context (
PlanningContext|None) – Optional latest planning state; captured when omitted.
- Return type:
- Returns:
Validated action plan.
- Raises:
KeyError – If the invocation references an unregistered skill.
- plan_request(request, context=None, *, plan_transform=None, nominal_source=None)[source]#
Plan an already-resolved request without rebuilding its snapshot.
- Parameters:
request (
ResolvedSkillRequest) – Immutable request previously returned byresolve().context (
PlanningContext|None) – Optional latest planning state; captured when omitted.plan_transform (
Optional[Callable[[ResolvedSkillRequest,PlanningContext,SkillPlan],SkillPlan]]) – Optional callback scoped to this planning call. The callback receives and must return independently owned plan values.
- Return type:
- Returns:
Validated side-effect-free action plan.
- property planning_services: SkillPlanningServices#
Engine-owned resources shared by every bound atomic skill.
- rebuild_plan_from_mapped_trajectory(request, context, plan, reference, result, *, joint_limits, velocity_limits, acceleration_limits)[source]#
Rebuild a B=1 plan after explicit, protected control-grid retiming.
The mapping must retain every protected phase sample and scene dependency boundary. Skills’ declared free phases remain authoritative; a reference can narrow but never broaden those permissions. Commands, tracking and effect information are rebuilt together. This does not certify collision freedom or physical task success.
- Parameters:
request (
ResolvedSkillRequest) – Resolved request used for the original plan.context (
PlanningContext) – Original planning context.plan (
SkillPlan) – Original validated action plan.reference (
TrajectoryTemplate) – Its exact full-joint expansion template.result (
MappedRetimeResult) – Retimed trajectory with source brackets and hard events.joint_limits (
Tensor) – Full-layout joint limits with shape(D, 2).velocity_limits (
Tensor) – Positive full-layout joint speed limits(D,).acceleration_limits (
Tensor) – Positive full-layout acceleration limits(D,).
- Return type:
- Returns:
A validated complete plan on the new control grid.
- Raises:
ValueError – Mapping, phase permissions or protected samples differ.
- rebuild_plan_from_trajectory(request, context, plan, trajectory)[source]#
Rebuild a complete plan from a same-grid full-joint trajectory.
This is the execution-side boundary for trajectory expansion. The caller supplies a trajectory with the same frame count as the original plan; timing-grid remapping and phase-index changes remain the responsibility of a later adapter.
- Parameters:
request (
ResolvedSkillRequest) – Resolved request that producedplan.context (
PlanningContext) – Planning context used for the original plan.plan (
SkillPlan) – Original validated action plan.trajectory (
TimedTrajectory) – Replacement full-joint trajectory on the same grid.
- Return type:
- Returns:
A newly lowered and validated action plan with commands, tracking, segments, and effect metadata rebuilt together.
- register(action, *, replace=False)[source]#
Register one action instance using its descriptor.
- Parameters:
action (
AtomicSkill) – Configured action instance.replace (
bool) – Whether to replace an implementation already registered under the same stable skill identifier. Replacement is always explicit so extensions cannot silently shadow built-ins.
- Raises:
TypeError – If
actionis not an AtomicSkill.ValueError – If it belongs to another engine or its skill identifier conflicts with an existing action.
- Return type:
None
- resolve(invocation)[source]#
Resolve a registered invocation into an engine-owned snapshot.
- Return type:
- property skill_catalog: Mapping[str, SkillDescriptor]#
Return explicitly declared, agent-visible installed skill metadata.
Process-wide type discovery, engine installation, and semantic exposure are separate boundaries. Only an action installed in this engine whose concrete class explicitly declares a generic binding contract appears here. Direct-core callers may continue to use every entry in
skill_implementations.
- property skill_catalog_revision: int#
Return the monotonic installed Atomic Skill catalog revision.
Installing or replacing an agent-visible implementation advances the revision even when its public descriptor is equal. External binding and compilation layers can therefore reject stale implementation snapshots.
- property skill_implementations: dict[str, AtomicSkill]#
Registered action instances keyed by stable skill identifier.
- property skills: Mapping[str, SkillDescriptor]#
Deprecated alias for
skill_catalog.
- start(invocations, context=None, *, eligible_mask=None, plan_transform=None, nominal_source=None, plan_lifecycle=None)[source]#
Start incremental execution for a grounded invocation sequence.
- Parameters:
invocations (
Iterable[SkillInvocation]) – Grounded action requests in execution order.context (
PlanningContext|None) – Initial measured state and scene snapshot. The engine captures one when omitted.eligible_mask (
Tensor|None) – Optional per-environment cohort allowed to execute. Ineligible rows remain excluded for the whole session. All rows are eligible when omitted.plan_transform (
Optional[Callable[[ResolvedSkillRequest,PlanningContext,SkillPlan],SkillPlan]]) – Optional transform scoped to every planning call in the returned execution session.plan_lifecycle (
ExecutionPlanLifecycle|None) – Optional host-owned plan/adoption lifecycle, called after complete validation and before dispatch.
- Return type:
- Returns:
Stateful execution session advanced by
session.tick(...).
- property tracking_runtime: TrackingRuntime#
Typed endpoint-feedback runtime used by plans and sessions.
- embodichain.lab.sim.atomic_skills.PlanTransform(*args, **kwargs)#
alias of
Callable[[ResolvedSkillRequest,PlanningContext,SkillPlan],SkillPlan]
- class embodichain.lab.sim.atomic_skills.ExecutionSession[source]#
Execute grounded invocations incrementally with bounded local recovery.
The session never steps a simulator itself. Each
tick()consumes the latest observation and scene snapshot and emits at most one synchronized endpoint-command frame. A declared physical-effect boundary resolves only after the caller supplies a correlatedEffectVerificationResult, and non-empty expected symbolic effects are committed for accepted rows only. Higher-level runtimes decide how to produce that result from their configured monitor selection.Environment eligibility and recovery budgets are tracked per row. The waypoint cursor is batch-synchronized: a recoverable row replans the active cohort from the latest observation and restarts the action trajectory. Calls that mutate the session must be serialized by its owner; the session does not provide thread synchronization. A rejected installation blocks further ticks and revisions until the host completes its normal safe stop and invalidates the lifecycle; catching that rejection cannot resume commands.
Methods:
__init__(engine, invocations, context, *[, ...])abort_plan_lifecycle(reason)Invalidate an explicit lifecycle once and stop its further execution.
deactivate_rows(env_mask, *, reason)Permanently remove selected rows from this invocation sequence.
revise_current(invocation, *[, context])Replace and replan the current invocation with a newer revision.
tick(context, *[, effect_result, ...])Advance execution by one observation/command cycle.
trajectory_segment(name)Return named segment metadata for the active action plan.
Attributes:
Return an owned snapshot of the active action command sequence.
Return owned effect candidates for frequent physical monitoring.
Return owned active effects without copying trajectory commands.
Return an independently owned snapshot of the active action plan.
Whether the current physical effect still requires verification.
Rows still eligible to complete the full invocation sequence.
Describe the phase that must be checked before the next command.
Return the source plan and waypoint for the latest command tick.
Latest validated context with the session's verified task state.
Return the optional source-owned measured-execution monitor.
Owned snapshot of the current effect boundary, when present.
Return the blocking gate at the next trajectory-segment entry.
Return every installed plan in deterministic recovery order.
Current session status.
Verified symbolic task state accumulated by this session.
- __init__(engine, invocations, context, *, eligible_mask=None, plan_transform=None, nominal_source=None, plan_lifecycle=None)[source]#
- abort_plan_lifecycle(reason)[source]#
Invalidate an explicit lifecycle once and stop its further execution.
The runner calls this after cancel/hold; construction-error hosts may call it before any runner exists. This method never issues commands or steps physics. No lifecycle retains the existing default session behavior.
- Parameters:
reason (
str) – Failure or cancellation context retained by the host owner.- Return type:
str|None- Returns:
A cleanup diagnostic if the owner raised, otherwise None. Cleanup failure does not reactivate the session or permit another dispatch.
- property active_commands: TimedCommandSequence#
Return an owned snapshot of the active action command sequence.
This inspection surface is intended for diagnostics and visualization. Mutating the returned tensors cannot affect execution state.
- property active_effect_candidates: StateDelta#
Return owned effect candidates for frequent physical monitoring.
- Returns:
Independently owned candidate updates for the current plan.
- property active_expected_effects: StateDelta#
Return owned active effects without copying trajectory commands.
- Returns:
Independently owned expected symbolic updates for the current plan.
- property active_plan: SkillPlan#
Return an independently owned snapshot of the active action plan.
This is a read-only diagnostics boundary for runtime metadata, visualization, and tests. Planning and recovery remain session-owned; mutating any tensor in the returned value cannot affect execution.
- deactivate_rows(env_mask, *, reason)[source]#
Permanently remove selected rows from this invocation sequence.
Deactivation is sticky across action barriers and recovery replans. The next emitted command frame marks those rows inactive so the command sink can apply target-specific safe hold behavior.
- Parameters:
env_mask (
Tensor) – Rows requested for deactivation.reason (
str) – Human-readable event message.
- Return type:
Tensor- Returns:
Owned mask of rows that changed from eligible to inactive.
- Raises:
RuntimeError – If the session is already terminal.
ValueError – If
reasonis empty or the mask shape is invalid.
- property effect_verification_pending: bool#
Whether the current physical effect still requires verification.
- property eligible_mask: Tensor#
Rows still eligible to complete the full invocation sequence.
This is deliberately not named
success_mask: while the session is running, eligibility does not imply that execution or semantic effects have succeeded.
- property held_object_guard_request: HeldObjectGuardRequest | None#
Describe the phase that must be checked before the next command.
The request remains available while terminal acceptance is settling, using the final waypoint and segment identity. Once terminal physical effect verification begins, that verifier owns the boundary and this property returns
None.- Returns:
Owned phase-aware guard request, or
Nonewhen no command-phase guard is active.
- property last_commanded_plan_sample: tuple[str | None, int] | None#
Return the source plan and waypoint for the latest command tick.
The value is cleared at each tick and does not imply that a host has consumed the command; controller acknowledgements and Gym steps remain separate boundaries.
- property latest_context: PlanningContext#
Latest validated context with the session’s verified task state.
- property nominal_motion_monitor: MonitoredNominalMotionSource | None#
Return the optional source-owned measured-execution monitor.
- property pending_effect: EffectVerificationRequest | None#
Owned snapshot of the current effect boundary, when present.
- property phase_effect_gate_request: PhaseEffectGateRequest | None#
Return the blocking gate at the next trajectory-segment entry.
- Returns:
Owned request snapshot, or
Nonewhen the next command is not blocked by a physical-effect gate.
- property plan_attempts: tuple[ExecutionPlanAttempt, ...]#
Return every installed plan in deterministic recovery order.
The initial plan has generation zero. Each invocation revision, recovery replan, or whole-action retry appends a new generation instead of replacing earlier scene/collision evidence.
- revise_current(invocation, *, context=None)[source]#
Replace and replan the current invocation with a newer revision.
The replacement is resolved into a new immutable request snapshot from
contextor the session’s latest observation. Retry and replan budgets restart for the new revision, while verified task state, the current batch barrier, and per-environment eligibility are preserved. Ordinary recovery replans continue to reuse this snapshot until another explicit revision. Once the action owns runtime destinations, the replacement must preserve their exact address fingerprints; changing controllers or safe-hold footprints requires a new invocation.- Parameters:
invocation (
SkillInvocation) – Grounded replacement for the currently active skill. Itsrevisionmust be strictly greater than the active one, and itsskill_idandinvocation_idmust identify the same logical call.context (
PlanningContext|None) – Optional fresh observation used to ground the replacement. A manually ticked caller may omit it to reuselatest_context. Runner-driven code stages revisions onExecutionRunner, which supplies a due-time observation.
- Raises:
TypeError – If
invocationis not an SkillInvocation.RuntimeError – If the session is no longer running or a physical effect is awaiting verification.
ValueError – If the replacement identifies another invocation or does not advance the revision, or if its plan changes the active runtime target addresses.
- Return type:
None
- property status: ExecutionStatus#
Current session status.
- tick(context, *, effect_result=None, phase_effect_gate_result=None, held_object_guard_result=None)[source]#
Advance execution by one observation/command cycle.
- Parameters:
context (
PlanningContext) – Latest measured robot and versioned scene state. Its task state is replaced by the session’s verified task state.effect_result (
EffectVerificationResult|None) – Optional correlated semantic-effect result for an action waiting at its terminal waypoint.phase_effect_gate_result (
PhaseEffectGateResult|None) – Optional correlated physical-effect decision for a blocked trajectory-segment entry.held_object_guard_result (
HeldObjectGuardResult|None) – Optional correlated in-flight held-object loss result for the current waypoint phase.Nonemeans the verifier found no applicable guard for this phase or no result was supplied.
- Return type:
- Returns:
Status, optional command, events, and current verified task state.
- class embodichain.lab.sim.atomic_skills.ExecutionRunner[source]#
Connect an execution session to observation, controller, and time ports.
step()is non-blocking. It observes and advances the session only when the next command is due according toRuntimeCommandFrame.hold_duration.run_until_blocked()supplies the blocking loop for tutorials and simple applications. Controller rejection, timeout, observation failure, and session exceptions all trigger a best-effort cancel-then-hold sequence. Runner methods are designed for serialized event-loop use and are not thread-safe.- Parameters:
session (
ExecutionSession) – Stateful atomic-skill execution session.observation_provider (
ObservationProvider) – Source of fresh robot and scene observations.command_sink (
CommandSink) – Controller or simulation command boundary.clock (
ExecutionClock|None) – Optional scheduler clock. Defaults to monotonic wall time.cfg (
ExecutionRunnerCfg|None) – Optional acknowledgement, scheduling, and completion policy.physical_evidence_provider (
PhysicalEvidenceProvider|None) – Optional synchronized evidence source used by evidence-aware verifiers.
Methods:
__init__(session, observation_provider, ...)cancel([reason])Cancel controller work and hold the latest observed position.
deactivate_rows(env_mask, *, reason)Permanently deactivate environment rows owned by this runner.
revise_current(invocation)Stage a newer revision for the next scheduled observation boundary.
run_until_blocked(*[, effect_verifier, ...])Run with clock-driven waiting until terminal or effect verification blocks.
step(*[, effect_result, effect_verifier, ...])Perform one due observation/session/controller update without sleeping.
Attributes:
Number of active commands accepted by the sink.
Whether execution is waiting for an external semantic-effect result.
Return the latest collected evidence snapshot, if available.
Return the optional runtime physical-evidence provider.
Execution session advanced by this runner.
Current runner lifecycle status.
- __init__(session, observation_provider, command_sink, *, clock=None, cfg=None, physical_evidence_provider=None)[source]#
- cancel(reason='Execution cancelled by caller.')[source]#
Cancel controller work and hold the latest observed position.
- Parameters:
reason (
str) – Human-readable cancellation reason.- Return type:
- Returns:
Terminal runner step. The status is
cancelledonly when both cancel and hold are acknowledged; otherwise it isfailed.
- property command_count: int#
Number of active commands accepted by the sink.
- deactivate_rows(env_mask, *, reason)[source]#
Permanently deactivate environment rows owned by this runner.
The runner refreshes its cached effect boundary so a verifier cannot submit a result correlated with a request that deactivation replaced. In-flight controller work is neutralized for those rows by the next due command frame according to the
CommandSinkcontract.- Parameters:
env_mask (
Tensor) – Rows requested for deactivation.reason (
str) – Human-readable event message.
- Return type:
Tensor- Returns:
Owned mask of rows that changed from eligible to inactive.
- Raises:
RuntimeError – If the runner is already terminal.
TypeError – If
env_maskis not a tensor.ValueError – If the mask or reason is invalid.
- property effect_verification_pending: bool#
Whether execution is waiting for an external semantic-effect result.
- property last_evidence: PhysicalEvidenceFrame | None#
Return the latest collected evidence snapshot, if available.
- property physical_evidence_provider: PhysicalEvidenceProvider | None#
Return the optional runtime physical-evidence provider.
- revise_current(invocation)[source]#
Stage a newer revision for the next scheduled observation boundary.
Staging preserves the active frame deadline. When that deadline is due,
step()observes fresh state, atomically plans and installs the replacement, and dispatches its first command. The submitted invocation is resolved into an owned snapshot immediately, so later caller mutation cannot alter the staged revision.- Parameters:
invocation (
SkillInvocation) – Strictly newer revision of the active logical call.- Raises:
TypeError – If
invocationis not an SkillInvocation.RuntimeError – If this runner or its session is no longer running, or if a physical effect is awaiting verification.
ValueError – If session-level revision invariants are violated.
- Return type:
None
- run_until_blocked(*, effect_verifier=None, physical_effect_verifier=None, phase_effect_gate_verifier=None, physical_phase_effect_gate_verifier=None, held_object_guard_verifier=None, physical_held_object_guard_verifier=None, on_step=None, max_steps=100000)[source]#
Run with clock-driven waiting until terminal or effect verification blocks.
- Parameters:
effect_verifier (
Callable[[PlanningContext,EffectVerificationRequest],EffectVerificationResult] |None) – Optional synchronous callback used on fresh due-cycle observations while effect verification is pending. Without one, the method returns the running boundary so the caller can verify externally.physical_effect_verifier (
Callable[[PlanningContext,PhysicalEvidenceFrame,EffectVerificationRequest],EffectVerificationResult] |None) – Evidence-aware alternative toeffect_verifier, receiving the synchronized evidence frame.phase_effect_gate_verifier (
Callable[[PlanningContext,PhaseEffectGateRequest],PhaseEffectGateResult] |None) – Optional synchronous callback used on fresh observations while a trajectory-segment entry is gated.physical_phase_effect_gate_verifier (
Callable[[PlanningContext,PhysicalEvidenceFrame,PhaseEffectGateRequest],PhaseEffectGateResult] |None) – Evidence-aware alternative tophase_effect_gate_verifier.held_object_guard_verifier (
Callable[[PlanningContext,HeldObjectGuardRequest],HeldObjectGuardResult|None] |None) – Optional synchronous phase-aware held-object verifier used before every due command cycle.physical_held_object_guard_verifier (
Callable[[PlanningContext,PhysicalEvidenceFrame,HeldObjectGuardRequest],HeldObjectGuardResult|None] |None) – Evidence-aware alternative toheld_object_guard_verifier.on_step (
Callable[[RunnerStep],None] |None) – Optional callback for tracing or tutorial visualization.max_steps (
int) – Hard bound on loop iterations.
- Return type:
- Returns:
Terminal step, or a running step blocked on external verification.
- property session: ExecutionSession#
Execution session advanced by this runner.
Call
revise_current()ordeactivate_rows()on the runner, rather than mutating the session directly, while this runner owns scheduling.
- property status: RunnerStatus#
Current runner lifecycle status.
- step(*, effect_result=None, effect_verifier=None, physical_effect_verifier=None, phase_effect_gate_result=None, phase_effect_gate_verifier=None, physical_phase_effect_gate_verifier=None, held_object_guard_verifier=None, physical_held_object_guard_verifier=None)[source]#
Perform one due observation/session/controller update without sleeping.
- Parameters:
effect_result (
EffectVerificationResult|None) – Optional correlated effect result. If this call occurs before the next cycle is due, it is not consumed and must be supplied again on a later call. A monitored nominal source must also approve this result. Once an explicit result is supplied, unresolved rows continue waiting for a host update.effect_verifier (
Callable[[PlanningContext,EffectVerificationRequest],EffectVerificationResult] |None) – Optional synchronous verifier for the current pending request. It runs after a fresh due-cycle observation and before the session consumes the result. It is not called after the request deadline. Mutually exclusive witheffect_resultandphysical_effect_verifier.physical_effect_verifier (
Callable[[PlanningContext,PhysicalEvidenceFrame,EffectVerificationRequest],EffectVerificationResult] |None) – Evidence-aware alternative toeffect_verifier. It receives the fresh evidence frame collected by this runner and is mutually exclusive witheffect_result.phase_effect_gate_result (
PhaseEffectGateResult|None) – Optional externally produced result for the current blocking trajectory-segment entry gate.phase_effect_gate_verifier (
Callable[[PlanningContext,PhaseEffectGateRequest],PhaseEffectGateResult] |None) – Optional synchronous verifier for the current gate. It runs on a fresh due-cycle observation and is mutually exclusive withphase_effect_gate_resultandphysical_phase_effect_gate_verifier.physical_phase_effect_gate_verifier (
Callable[[PlanningContext,PhysicalEvidenceFrame,PhaseEffectGateRequest],PhaseEffectGateResult] |None) – Evidence-aware alternative tophase_effect_gate_verifier. It is mutually exclusive withphase_effect_gate_result.held_object_guard_verifier (
Callable[[PlanningContext,HeldObjectGuardRequest],HeldObjectGuardResult|None] |None) – Optional synchronous phase-aware verifier. It receives a fresh observation and the current command-phase request beforeExecutionSession.tick()and command dispatch. ReturningNonemeans the current phase has no applicable held-object guard.physical_held_object_guard_verifier (
Callable[[PlanningContext,PhysicalEvidenceFrame,HeldObjectGuardRequest],HeldObjectGuardResult|None] |None) – Evidence-aware alternative toheld_object_guard_verifier.
- Return type:
- Returns:
Runner status, optional session tick, controller acknowledgements, and time remaining before another update is due.
- class embodichain.lab.sim.atomic_skills.ExecutionRunnerCfg[source]#
Transport and scheduling policy for an
ExecutionRunner.Attributes:
Maximum time allowed for a command acknowledgement.
Whether to hold observed state while terminal effects are pending.
Whether to issue a final hold after the session completes.
Minimum delay between feedback cycles, including passive hold cycles.
Maximum time allowed for each cancel or hold acknowledgement.
Methods:
validate([prefix])Check the validity of configclass object.
-
command_timeout:
float# Maximum time allowed for a command acknowledgement.
-
hold_during_effect_verification:
bool# Whether to hold observed state while terminal effects are pending.
Disable this only for persistent transports whose last accepted command remains active without refresh, such as a position-controlled gripper that must retain contact preload. Failure and cancellation still perform the normal cancel-then-observed-hold safe stop.
-
hold_on_completion:
bool# Whether to issue a final hold after the session completes.
-
minimum_cycle_time:
float# Minimum delay between feedback cycles, including passive hold cycles.
-
safe_stop_timeout:
float# Maximum time allowed for each cancel or hold acknowledgement.
- 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.
-
command_timeout:
- class embodichain.lab.sim.atomic_skills.ObservationProvider[source]#
Source of fresh planning contexts for feedback-driven execution.
Methods:
- __init__(*args, **kwargs)#
- class embodichain.lab.sim.atomic_skills.PhysicalEvidenceProvider[source]#
Acquire synchronized physical evidence for an execution observation.
Methods:
__init__(*args, **kwargs)collect(context, request)Return evidence aligned with the supplied planning context.
- __init__(*args, **kwargs)#
- class embodichain.lab.sim.atomic_skills.PhysicalEvidenceRequest[source]#
One synchronized request for runtime physical evidence.
Methods:
__init__(timestamp, observation_revision, ...)snapshot()Return an independently owned request snapshot.
- __init__(timestamp, observation_revision, env_ids, channels=())#
- class embodichain.lab.sim.atomic_skills.PhysicalEvidenceBatch[source]#
One typed-by-convention physical channel for an environment batch.
valueskeeps the channel-specific trailing shape. The first dimension always followsenv_ids.validandacquisition_errorsdistinguish unavailable observations from measured negative evidence.Methods:
__init__(evidence_id, values, valid, ...)snapshot()Return an independently owned evidence batch.
to_dict()Return detached JSON channel values with validity and source identity.
- __init__(evidence_id, values, valid, acquisition_errors, timestamp, env_ids, observation_revision)#
- to_dict()[source]#
Return detached JSON channel values with validity and source identity.
- Return type:
dict[str,object]- Returns:
A new dictionary retaining dtype, row order, unavailable reasons and the observation timestamp/revision. This method collects no facts. Non-finite scalars in unavailable rows become JSON
null; the original tensor and the row’s validity and error remain unchanged.
- class embodichain.lab.sim.atomic_skills.PhysicalEvidenceFrame[source]#
Synchronized evidence channels from one execution observation tick.
Methods:
__init__(timestamp, observation_revision, ...)get(evidence_id)Return one channel or raise a descriptive
KeyError.snapshot()Return an independently owned frame snapshot.
to_dict()Serialize the owned channels without reading runtime state.
Attributes:
Return the number of environment rows in the frame.
- __init__(timestamp, observation_revision, env_ids, batches=<factory>)#
- property batch_size: int#
Return the number of environment rows in the frame.
- class embodichain.lab.sim.atomic_skills.CommandSink[source]#
Controller boundary used by
ExecutionRunner.Methods:
__init__(*args, **kwargs)cancel(targets, *, timeout)Cancel any controller-side command that has not completed.
hold(targets, context, *, timeout)Apply transport-specific safe state to the supplied targets.
send(command, *, timeout)Submit one synchronized endpoint-command frame.
- __init__(*args, **kwargs)#
- cancel(targets, *, timeout)[source]#
Cancel any controller-side command that has not completed.
- Parameters:
targets (
tuple[RuntimeEndpointTarget,...]) – Runtime targets whose queued work must be cancelled.timeout (
float) – Maximum acknowledgement latency in seconds.
- Return type:
- Returns:
Transport or controller acknowledgement.
- hold(targets, context, *, timeout)[source]#
Apply transport-specific safe state to the supplied targets.
- Parameters:
targets (
tuple[RuntimeEndpointTarget,...]) – Runtime targets that may retain controller state.context (
PlanningContext) – Latest observation used by position-hold transports.timeout (
float) – Maximum acknowledgement latency in seconds.
- Return type:
- Returns:
Transport or controller acknowledgement.
- send(command, *, timeout)[source]#
Submit one synchronized endpoint-command frame.
- Parameters:
command (
RuntimeCommandFrame) – Transport-neutral command frame with an active-row mask. The sink must actively neutralize inactive rows for every addressed target; omission is not a safe state for persistent controllers.timeout (
float) – Maximum acknowledgement latency in seconds.
- Return type:
- Returns:
Transport or controller acknowledgement.
- class embodichain.lab.sim.atomic_skills.EndpointCommandTransport[source]#
Backend that owns one kind of runtime endpoint command.
Implementations own live simulator entities, device clients, or controller handles. Runtime command values retain only immutable addressing and payload data, so they remain independent of those process-owned resources.
Methods:
__init__(*args, **kwargs)cancel(targets, *, timeout)Cancel outstanding commands for transport-local targets.
hold(targets, context, *, timeout)Hold transport-local targets at their observed state.
send(frame, *, timeout)Submit one transport-local command frame.
Attributes:
Return the runtime payload type accepted by
send().Return the exact identifier used to register this transport.
- __init__(*args, **kwargs)#
- cancel(targets, *, timeout)[source]#
Cancel outstanding commands for transport-local targets.
- Return type:
- hold(targets, context, *, timeout)[source]#
Hold transport-local targets at their observed state.
- Return type:
- property payload_type: type[RuntimeCommandPayload]#
Return the runtime payload type accepted by
send().
- send(frame, *, timeout)[source]#
Submit one transport-local command frame.
Implementations must actively neutralize every inactive environment row for every addressed target. Silently skipping an inactive row is unsafe for persistent controllers such as base-velocity transports.
- Return type:
- property transport_id: str#
Return the exact identifier used to register this transport.
- class embodichain.lab.sim.atomic_skills.EndpointCommandRouter[source]#
Route generic endpoint operations to exact registered transports.
The router implements
CommandSinkstructurally while avoiding a module-load dependency onrunner. Acknowledgement types are imported only when an operation is executed, which keeps the transport boundary safe to import while the runner imports this module.- Parameters:
transports (
Mapping[str,EndpointCommandTransport] |Iterable[EndpointCommandTransport]) – Either an exacttransport_id -> transportmapping or an iterable of transports from which that mapping is built. Mapping keys must exactly equal each value’s declaredtransport_id.- Raises:
TypeError – If a registration does not implement the transport contract.
ValueError – If an identifier is invalid, a mapping key is not exact, or the same transport identifier is registered more than once.
Methods:
__init__(transports)cancel(targets, *, timeout)Route cancellation by target transport.
hold(targets, context, *, timeout)Route an observed-state hold request by target transport.
send(frame, *, timeout)Route one synchronized command frame by transport identifier.
Attributes:
Return the immutable exact transport registry.
- cancel(targets, *, timeout)[source]#
Route cancellation by target transport.
- Parameters:
targets (
tuple[RuntimeEndpointTarget,...]) – Runtime destinations whose outstanding commands are cancelled.timeout (
float) – Maximum acknowledgement latency for each transport.
- Return type:
- Returns:
Aggregated acknowledgement. It is accepted only when every addressed transport accepts cancellation.
- hold(targets, context, *, timeout)[source]#
Route an observed-state hold request by target transport.
- Parameters:
targets (
tuple[RuntimeEndpointTarget,...]) – Runtime destinations to hold.context (
PlanningContext) – Fresh observation used by each transport to form its hold.timeout (
float) – Maximum acknowledgement latency for each transport.
- Return type:
- Returns:
Aggregated acknowledgement. It is accepted only when every addressed transport accepts its hold.
- send(frame, *, timeout)[source]#
Route one synchronized command frame by transport identifier.
Dispatch is preflighted before any transport is called. An unknown transport or incompatible payload therefore rejects the whole frame without creating a partially dispatched operation.
- Parameters:
frame (
RuntimeCommandFrame) – Generic runtime command frame to split by transport.timeout (
float) – Maximum acknowledgement latency for each transport.
- Return type:
- Returns:
Aggregated acknowledgement. It is accepted only when every addressed transport accepts its local frame.
- property transports: Mapping[str, EndpointCommandTransport]#
Return the immutable exact transport registry.
- class embodichain.lab.sim.atomic_skills.ExecutionClock[source]#
Clock abstraction used for deterministic and simulation scheduling.
Methods:
__init__(*args, **kwargs)now()Return a monotonic timestamp in seconds.
sleep(duration)Wait or advance the execution backend by
durationseconds.- __init__(*args, **kwargs)#
- class embodichain.lab.sim.atomic_skills.MonotonicExecutionClock[source]#
Wall-clock implementation backed by
time.Methods:
now()Return the current monotonic wall-clock time.
sleep(duration)Sleep for a non-negative wall-clock duration.
- embodichain.lab.sim.atomic_skills.create_simulation_atomic_skill_engine(motion_generator, scene_entities, control_profiles=None, grasp_pose_generators=None, *, hand_geometry_cfgs=None, load_builtins=True, tracking_runtime=None)[source]#
Create an engine whose initial context observes selected rigid objects.
This is the direct-simulation convenience path for offline planning. Entity IDs are derived from each rigid object’s stable
uid; only explicitly supplied objects are observed. Advanced integrations that need aliases, articulation/link state, collision roles, or an external perception source should constructAtomicSkillEnginewith their ownSceneProviderinstead.- Parameters:
motion_generator (
MotionGenerator) – Motion-generation backend owned by the engine.scene_entities (
Sequence[SceneEntity]) – Non-empty sequence of simulation rigid objects to expose in automatically captured initial scene snapshots.control_profiles (
Mapping[str,ControlPartCommandProfile] |None) – Semantic commands keyed by robot control-part name.grasp_pose_generators (
Mapping[str,GraspPoseGenerator] |None) – Grasp-pose services keyed by grasp endpoint target.hand_geometry_cfgs (
Mapping[str,RobotHandGeometryCfg] |None) – Explicit hand calibrations keyed by grasp endpoint target.load_builtins (
bool) – Whether to install all built-in atomic skills.tracking_runtime (
TrackingRuntime|None) – Optional typed tracking runtime shared by action plans.
- Return type:
- Returns:
Engine configured with a rigid-object scene provider.
- Raises:
TypeError – If
scene_entitiesis not a sequence.ValueError – If an entity lacks a stable UID or UIDs are duplicated.
- embodichain.lab.sim.atomic_skills.create_rigidized_articulation_antipodal_semantics(articulation, *, grasp_link, locked_qpos, label, geometry=None, properties=None, joint_position_tolerance=0.001, link_transform_tolerance=1e-05)[source]#
Describe a locked articulation as one antipodal-graspable rigid object.
The articulation root is the object identity and pose; one selected link is only the source of grasp geometry.
get_link_vert_facereturns vertices in the link frame, while grounding publishes the articulation root pose, so the vertices are transformed by the root-to-link transform before they reach the affordance. Skipping that step is correct only when the two frames coincide, which is a property of one asset rather than of the abstraction.Joint locking, initial positions,
fixed_baseand drive parameters stay withArticulationCfgor the physical environment.locked_qposonly declares the configuration this geometry is valid at, and is verified against the articulation before use.One mesh describes the object for every arena, so the declared lock is verified across the whole batch rather than on one row, and the joint must be actively held rather than merely resting at the declared value.
- Parameters:
articulation (
Articulation) – Articulation treated as one compound rigid body.grasp_link (
str) – Link supplying the grasp mesh.locked_qpos (
Mapping[str,float]) – Declared position of every joint, which must all be held.label (
str) – Semantic object category.geometry (
Mapping[str,Any] |None) – Optional non-affordance geometry metadata.properties (
Mapping[str,Any] |None) – Optional physical properties such as mass and friction.joint_position_tolerance (
float) – Maximum deviation, in joint units, tolerated between a declared and an observed joint position, and the largest position-limit span still counted as a pinned joint.link_transform_tolerance (
float) – Maximum per-entry difference tolerated between two arenas’ root-to-link transforms.
- Return type:
- Returns:
Semantics whose mesh is expressed in the articulation-root frame and whose
entity_idis the articulation root UID.- Raises:
ValueError – If the link is unknown, a joint is undeclared, displaced or unheld in any arena, the arenas disagree on the root-to-link transform, or the link mesh is empty.
- class embodichain.lab.sim.atomic_skills.SceneEntity[source]#
Structural contract a scene provider requires of an observed entity.
Grounding needs an identity and one pose; it never needs the rest of a rigid-body API. Declaring that explicitly lets an articulation stand in as one compound object without relying on incidental duck typing, and keeps the requirement visible to callers instead of buried in an attribute lookup.
Methods:
__init__(*args, **kwargs)get_local_pose([to_matrix])Return the entity pose that defines its object frame.
Attributes:
Stable scene identifier of the entity.
- __init__(*args, **kwargs)#
- get_local_pose(to_matrix=False)[source]#
Return the entity pose that defines its object frame.
- Return type:
Tensor
- property uid: str#
Stable scene identifier of the entity.
- class embodichain.lab.sim.atomic_skills.SimulationExecutionAdapter[source]#
Adapt a simulation robot to observation, command, and clock protocols.
The adapter writes joint targets synchronously. Time advances only through
sleep(), which converts the requested runner interval to an integral number of physics updates. This makesExecutionRunner.run_until_blocked()deterministic and avoids wall-clock sleeps in headless simulation.- Parameters:
simulation (
SimulationManager) – Simulation manager advanced by the execution clock.robot (
Robot) – Robot observed and commanded by the adapter.physics_dt (
float|None) – Optional physics period. Defaults to the simulation config.control_dt (
float|None) – Optional command period exposed to action interpolation. Defaults tophysics_dtbecause that is the adapter’s minimum executable command cadence.env_ids (
Tensor|None) – Optional stable correlation IDs matching every robot row. They are not used as simulator indices; row order maps to robot instances.scene_provider (
SceneProvider|None) – Optional provider for versioned scene observations.scene_supplier (
Callable[[float],SceneSnapshot] |None) – Optional callback for versioned scene observations. It is mutually exclusive withscene_provider.initial_time (
float) – Initial elapsed simulation time in seconds.
Methods:
__init__(simulation, robot, *[, physics_dt, ...])cancel(targets, *, timeout)Acknowledge cancellation of synchronous simulation target writes.
hold(targets, context, *, timeout)Set every represented joint endpoint to an observed-position hold.
now()Return elapsed simulation time in seconds.
observe(task_state)Capture full-robot state and the latest supplied scene snapshot.
send(command, *, timeout)Write joint endpoint targets and neutralize inactive rows.
sleep(duration)Advance physics by exactly the requested grid-aligned duration.
Classes:
alias of
JointPositionPayloadAttributes:
Return the smallest representable simulated sleep duration.
- __init__(simulation, robot, *, physics_dt=None, control_dt=None, env_ids=None, scene_provider=None, scene_supplier=None, initial_time=0.0)[source]#
- cancel(targets, *, timeout)[source]#
Acknowledge cancellation of synchronous simulation target writes.
- Parameters:
targets (
tuple[RuntimeEndpointTarget,...]) – Joint-position destinations whose queued work is cancelled.timeout (
float) – Positive acknowledgement deadline.
- Return type:
- Returns:
Accepted acknowledgement. The following
holdcall installs the actual safe target.
- hold(targets, context, *, timeout)[source]#
Set every represented joint endpoint to an observed-position hold.
- Parameters:
targets (
tuple[RuntimeEndpointTarget,...]) – Joint-position destinations to place in a safe hold.context (
PlanningContext) – Latest observed positions and stable environment IDs.timeout (
float) – Positive acknowledgement deadline.
- Return type:
- Returns:
Accepted acknowledgement or a rejected diagnostic.
- now()[source]#
Return elapsed simulation time in seconds.
- Return type:
float- Returns:
Elapsed simulation time in seconds.
- observe(task_state)[source]#
Capture full-robot state and the latest supplied scene snapshot.
- Parameters:
task_state (
TaskState) – Verified symbolic state owned by the execution session.- Return type:
- Returns:
Planning context timestamped with elapsed simulation time.
- payload_type#
alias of
JointPositionPayload
- send(command, *, timeout)[source]#
Write joint endpoint targets and neutralize inactive rows.
- Parameters:
command (
RuntimeCommandFrame) – Joint-position endpoint frame. Inactive rows are replaced with observed positions by this transport.timeout (
float) – Positive acknowledgement deadline. Simulation writes are synchronous, so this is validated but otherwise unused.
- Return type:
- Returns:
Accepted acknowledgement or a rejected diagnostic.
- sleep(duration)[source]#
Advance physics by exactly the requested grid-aligned duration.
- Parameters:
duration (
float) – Requested simulated duration in seconds.- Return type:
None
- property sleep_quantum: float#
Return the smallest representable simulated sleep duration.
- class embodichain.lab.sim.atomic_skills.CommandAcknowledgement[source]#
Synchronous acknowledgement returned by a
CommandSink.Methods:
__init__(status[, message])accepted_ack([message])Build an accepted acknowledgement.
Attributes:
Whether the controller accepted the requested operation.
Human-readable diagnostic intended for logs, not policy branching.
Transport/controller acknowledgement status.
- __init__(status, message='')#
- property accepted: bool#
Whether the controller accepted the requested operation.
- classmethod accepted_ack(message='')[source]#
Build an accepted acknowledgement.
- Parameters:
message (
str) – Optional controller diagnostic.- Return type:
- Returns:
Accepted acknowledgement.
-
message:
str# Human-readable diagnostic intended for logs, not policy branching.
-
status:
CommandAckStatus# Transport/controller acknowledgement status.
- class embodichain.lab.sim.atomic_skills.CommandAckStatus[source]#
Outcome reported by a command transport or controller.
Methods:
__new__(value)- __new__(value)#
- class embodichain.lab.sim.atomic_skills.CommandDispatch[source]#
Auditable record of one controller operation and acknowledgement.
Methods:
__init__(operation, acknowledgement)- __init__(operation, acknowledgement)#
- class embodichain.lab.sim.atomic_skills.CommandOperation[source]#
Command-sink operation recorded by an execution runner.
Methods:
__new__(value)- __new__(value)#
- class embodichain.lab.sim.atomic_skills.RunnerStep[source]#
Result of one non-blocking execution-runner update.
Methods:
__init__(status, timestamp, wait_duration, ...)Attributes:
Fresh physical evidence collected for this observation tick, if enabled.
Whether no session tick was due during this update.
Terminal or failure diagnostic, when available.
- __init__(status, timestamp, wait_duration, context, tick, dispatches, command_count, message=None, evidence=None)#
-
evidence:
PhysicalEvidenceFrame|None# Fresh physical evidence collected for this observation tick, if enabled.
- property is_waiting: bool#
Whether no session tick was due during this update.
-
message:
str|None# Terminal or failure diagnostic, when available.
- class embodichain.lab.sim.atomic_skills.RunnerStatus[source]#
Lifecycle status owned by an
ExecutionRunner.Methods:
__new__(value)- __new__(value)#
- class embodichain.lab.sim.atomic_skills.ExecutionTick[source]#
Result returned after one closed-loop execution update.
Methods:
__init__(status, eligible_mask, command, ...)- __init__(status, eligible_mask, command, hold_targets, events, task_state, pending_effect=None, pending_phase_effect_gate=None)#
- class embodichain.lab.sim.atomic_skills.ExecutionEvent[source]#
One timestamped execution or recovery event.
Methods:
__init__(kind, timestamp, skill_id, ...[, ...])- __init__(kind, timestamp, skill_id, invocation_id, invocation_revision, invocation_index, env_mask, message='', segment_name=None, failure_code=None, retryable=None)#
- class embodichain.lab.sim.atomic_skills.ExecutionEventKind[source]#
Structured event categories emitted by
ExecutionSession.tick().Methods:
__new__(value)- __new__(value)#
- class embodichain.lab.sim.atomic_skills.ExecutionStatus[source]#
Lifecycle status of an execution session.
Methods:
__new__(value)- __new__(value)#
- class embodichain.lab.sim.atomic_skills.EffectVerificationRequest[source]#
Typed boundary describing a physical effect awaiting verification.
requested_atanddeadlineuse the same timestamp domain asRobotObservation. Request-mask shrinkage retains both values; only a newly installed plan starts a new attempt deadline.attempt_generationis session-local and remains stable when partial resolution or row deactivation replaces only the request ID.failure_invalidationis a core-owned removal-only delta; verification results may select failed rows on which to apply it but cannot replace it.Methods:
__init__(verification_id, skill_id, ...[, ...])snapshot()Return a request snapshot with an independently owned row mask.
- __init__(verification_id, skill_id, invocation_id, invocation_revision, invocation_index, attempt_generation, terminal_segment, requested_at, deadline, env_mask, expected_effects, effect_verification=None, failure_invalidation=<factory>)#
- class embodichain.lab.sim.atomic_skills.EffectVerificationRequirement[source]#
Explicit physical-effect verification independent of symbolic state.
Presence of this value on an
SkillPlanforces a terminal effect boundary even when the plan declares noStateDelta. The openkindidentifier lets an external runtime select an appropriate verifier without placing backend-specific callbacks in the core plan.- Parameters:
kind (
str) – Stable, non-empty discriminator for the physical effect.
Methods:
- __init__(kind)#
- class embodichain.lab.sim.atomic_skills.EffectVerificationResult[source]#
Correlated per-environment update for one effect boundary.
Rows absent from both
success_maskandfailure_maskremain unresolved.invalidation_maskandretry_maskclassify only failed rows: the former selects the request’s core-owned removal delta, while the latter authorizes replay of the same invocation. Failed rows outside the retry mask require external recovery. This lets one shared batch barrier commit verified rows while other rows continue observing the same physical effect.Methods:
__init__(verification_id, success_mask, ...)- __init__(verification_id, success_mask, failure_mask, invalidation_mask, retry_mask, expectation_results=())#
- embodichain.lab.sim.atomic_skills.PhysicalEffectVerifier(self, *args, **kwds)#
alias of
Callable[[PlanningContext,PhysicalEvidenceFrame,EffectVerificationRequest],EffectVerificationResult]
- embodichain.lab.sim.atomic_skills.PhysicalPhaseEffectGateVerifier(self, *args, **kwds)#
alias of
Callable[[PlanningContext,PhysicalEvidenceFrame,PhaseEffectGateRequest],PhaseEffectGateResult]
- embodichain.lab.sim.atomic_skills.PhysicalHeldObjectGuardVerifier(self, *args, **kwds)#
alias of
Callable[[PlanningContext,PhysicalEvidenceFrame,HeldObjectGuardRequest],HeldObjectGuardResult|None]
- class embodichain.lab.sim.atomic_skills.ExecutionPlanAttempt[source]#
Owned inspection snapshot for one installed action plan.
Recovery can install several plans for one logical invocation. This value preserves the exact scene/collision revisions and trajectory structure of every installation, correlated with the session-local attempt generation and row-local recovery counters.
Methods:
__init__(attempt_generation, event_kind, ...)snapshot()Return an independently owned plan-attempt trace.
- __init__(attempt_generation, event_kind, planned_at, invocation_index, planned_mask, skill_retry_counts, replan_counts, request, plan)#
Semantic objects and helpers#
- class embodichain.lab.sim.atomic_skills.ObjectSemantics[source]#
Shallow-frozen semantic information about an interaction object.
Attention
Top-level fields cannot be rebound after construction. Nested affordance and metadata objects may remain mutable but never establish object identity.
Methods:
__init__(affordance, geometry, entity_id[, ...])Attributes:
Affordance data describing supported interactions.
Stable scene identifier used by snapshot grounding and object identity.
Non-affordance metadata used to resolve geometry-derived affordance data.
Semantic object category.
Physical properties such as mass and friction.
- __init__(affordance, geometry, entity_id, properties=<factory>, label='none')#
-
affordance:
Affordance# Affordance data describing supported interactions.
-
entity_id:
str# Stable scene identifier used by snapshot grounding and object identity.
-
geometry:
dict[str,Any]# Non-affordance metadata used to resolve geometry-derived affordance data.
-
label:
str# Semantic object category.
-
properties:
dict[str,Any]# Physical properties such as mass and friction.
- class embodichain.lab.sim.atomic_skills.HeldObjectState[source]#
Observed or projected relation between an object and one manipulator.
Methods:
__init__(semantics, object_to_eef, grasp_xpos)Attributes:
Environments in which the relation is active.
End-effector grasp pose.
Object-to-end-effector transform.
Semantics of the held object.
- __init__(semantics, object_to_eef, grasp_xpos, env_mask=None)#
-
env_mask:
Tensor|None# Environments in which the relation is active.
-
grasp_xpos:
Tensor# End-effector grasp pose.
-
object_to_eef:
Tensor# Object-to-end-effector transform.
-
semantics:
ObjectSemantics# Semantics of the held object.
Verification implementation module#
|
One typed-by-convention physical channel for an environment batch. |
|
Synchronized evidence channels from one execution observation tick. |
Acquire synchronized physical evidence for an execution observation. |
|
|
One synchronized request for runtime physical evidence. |
|
Effect verifier that consumes a synchronized physical-evidence frame. |
|
Phase-effect gate verifier backed by a synchronized evidence frame. |
|
Held-object guard verifier backed by a synchronized evidence frame. |
Evidence-backed execution keeps acquisition separate from the existing symbolic effect verifier. The runner collects one aligned frame after each fresh observation and passes it only to the explicitly selected evidence-aware verifier.
|
Current-observation outcome for one physical state expectation. |
Typed boundary describing a physical effect awaiting verification. |
|
Correlated per-environment update for one effect boundary. |
|
|
Describe the next in-flight command boundary for held-object checks. |
|
Correlated in-flight held-object loss and recovery decision. |
|
Correlate a blocking physical-effect check with a segment entry. |
|
Current-observation decision for one blocking segment-entry gate. |
Named held-object transport#
HeldObjectPoseGoal.object_id optionally identifies the exact object already
held by the bound resource. A named goal validates that identity before native
or external nominal planning and declares the unchanged attachment as its
terminal effect. The execution owner verifies this effect before committing it;
planning does not establish physical attachment. Motion and timing use the same
path as an unnamed goal. Omitting the field preserves the existing effectless
MoveHeldObject behavior. Task Program’s routed transport uses named goals
and additionally selects a verified input-hold guard for its transport segment.
Scoped grasp preparation#
SkillPlanningServices.prepare_grasp_query() resolves the declared hand
calibration by endpoint target ID and binds Scene capture to GraspKit’s explicit
ClosingContactPolicy and the existing isolated Newton backend. It accepts no
experiment revision selector and installs no alternate skill registration.
Ordinary PickUp defaults remain unchanged. Source-compatible capture uses the
caller’s explicit 65-sample hand declaration.
Use this service as a context manager. Closing, optional release-opening and
rigid-scene query resources close together on normal exit, failure or cancellation;
borrowed simulation entities are never destroyed. GraspOpeningTarget carries
already-grounded poses from the same observation scope. An undeclared hand
calibration fails before capture. Diagnostic metadata never selects policy.
|
Already-grounded support and object poses from the closing observation. |
- class embodichain.lab.sim.atomic_skills.runtime.GraspOpeningTarget[source]
Already-grounded support and object poses from the closing observation.
- Parameters:
support_uid (
str) – Exact native rigid support UID selected by the caller.reference_pose (
ndarray|Tensor) – Support-to-world pose, shape (4, 4), copied to CPU float64.object_target_pose (
ndarray|Tensor) – Final placed-object-to-world pose, shape (4, 4), copied to CPU float64. Tensor inputs are detached without changing the input.scope (
NativeQueryScope) – Must equal the closing query’s fresh preparation scope.identity (
Mapping[str,object]) – Optional neutral diagnostic IDs; never runtime or program objects.
Methods:
__init__(support_uid, reference_pose, ...[, ...])- __init__(support_uid, reference_pose, object_target_pose, scope, identity=<factory>)
- SkillPlanningServices.prepare_grasp_query(target_id, simulation, *, source_uid, open_qpos, grasp_qpos, observation_qpos, object_pose, scope, policy, opening=None, include_rigid_scene=False, gravity_in_object=None, identity=None, report_metadata=None)[source]#
Prepare and close a scoped exact-shape grasp query through shared services.
- Parameters:
target_id (
str) – Grasp endpoint with an explicitly installed hand calibration.simulation (
SimulationManager) – Exact B1 Default simulation owning this service’s Robot.source_uid (
str) – Registered rigid target UID, selected by the caller.open_qpos (
Tensor) – Current resolved full hand-part open command, shape (1, D).grasp_qpos (
Tensor) – Current resolved close command in the same order and shape.observation_qpos (
Tensor) – Same-observation full named robot state, shape (1, J).object_pose (
Tensor) – Same-observation target-to-world pose, shape (1, 4, 4).scope (
NativeQueryScope) – Fresh preparation identity, timestamp, scene version and env0.policy (
ClosingContactPolicy) – Explicit geometric rules; experiment IDs are not interpreted.opening (
GraspOpeningTarget|None) – Optional same-scope, already-grounded release target.include_rigid_scene (
bool) – Attach ordered native rigid rest-clearance queries.gravity_in_object (
ndarray|None) – Explicit gravity for horizontal pad-line qualification.identity (
Mapping[str,object] |None) – Neutral caller labels; captured physical keys are reserved.report_metadata (
Mapping[str,object] |None) – Neutral source provenance for diagnostics only.
- Yields:
Owned GraspKit query. Exiting the context closes all query resources, including on failure or cancellation, without destroying native entities.
- Raises:
KeyError – The grasp endpoint has no declared hand calibration.
ValueError – Policy, scope, geometry, ownership or backend/batch is unsupported.
- Return type:
Iterator[NativeClosingQuery]
Explicit source contact-policy composition#
The shared GraspOpeningTarget definition lives in grasp_geometry;
atomic_skills and runtime retain the same public class identity. Its
poses and metadata stay owned and bound to one preparation scope.
Neutral declared release target shared by source and standard grasp services.
Classes:
Already-grounded support and object poses from the closing observation. |
- class embodichain.lab.sim.atomic_skills.grasp_geometry.GraspOpeningTarget[source]#
Already-grounded support and object poses from the closing observation.
- Parameters:
support_uid (
str) – Exact native rigid support UID selected by the caller.reference_pose (
ndarray|Tensor) – Support-to-world pose, shape (4, 4), copied to CPU float64.object_target_pose (
ndarray|Tensor) – Final placed-object-to-world pose, shape (4, 4), copied to CPU float64. Tensor inputs are detached without changing the input.scope (
NativeQueryScope) – Must equal the closing query’s fresh preparation scope.identity (
Mapping[str,object]) – Optional neutral diagnostic IDs; never runtime or program objects.
Methods:
__init__(support_uid, reference_pose, ...[, ...])- __init__(support_uid, reference_pose, object_target_pose, scope, identity=<factory>)#
source_native_contact maps the explicitly selected preserved source revision
to GraspKit’s existing typed ClosingContactPolicy and the shared Newton collision
pipeline. Closing, opening and rigid-clearance algorithms remain solely in
GraspKit. Source builders consume the existing Default/B1 native capture API,
retain the explicit hand sampling grid and original contact thresholds, and never step
physics or infer a Task Program policy. Missing Newton fails explicitly; this is
geometric qualification, not physical acquisition/release evidence.
Close each query with its context manager or a finally block. It releases
only owned query resources, never borrowed simulation entities. Ordinary
prepare_grasp_query keeps its existing Newton backend and defaults.
Explicit source-policy composition of shared native capture and GraspKit queries.
This module selects the preserved experimental policy over the shared Newton backend. Closing, opening and rigid-clearance algorithms are implemented only in GraspKit.
Classes:
Bind the original explicit source policy to the sole GraspKit algorithm. |
Functions:
|
Capture and assemble one source query without stepping or writing simulation. |
|
Attach ordered, same-arena captured obstacles using the explicit source backend. |
- class embodichain.lab.sim.atomic_skills.source_native_contact.NativeClosingQuery[source]#
Bind the original explicit source policy to the sole GraspKit algorithm.
revisionis source policy provenance and never selects a Scene algorithm. Captured native owners are retained only for the open query lifetime.Methods:
__init__(parts, target_meshes, ...[, ...])Compose source rules without changing the ordered geometry or thresholds.
close()Release collision resources and the borrowed native ownership token.
Attributes:
Return the immutable source policy provenance.
- __init__(parts, target_meshes, target_rest_offset, *, scope, revision=1, target_contact_offset=None, gravity_in_object=None)[source]#
Compose source rules without changing the ordered geometry or thresholds.
- Parameters:
parts (
Sequence[NativeContactPart]) – Captured enabled link collision meshes and closing FK.target_meshes (
tuple[Trimesh,...]) – Exact target-local cooked collision meshes.target_rest_offset (
float) – Native target rest offset in metres.scope (
NativeQueryScope) – Explicit preparation and observation identity.revision (
int) – Explicit preserved source policy, from one through nine.target_contact_offset (
float|None) – Native contact offset for policies using halos.gravity_in_object (
ndarray|None) – Object-frame gravity for horizontal pad-line checks.
- close()[source]#
Release collision resources and the borrowed native ownership token.
- Return type:
None
- property revision: int#
Return the immutable source policy provenance.
- embodichain.lab.sim.atomic_skills.source_native_contact.build_native_closing_query(robot, simulation, *, source_uid, hand_geometry_cfg, open_qpos, grasp_qpos, observation_qpos, object_pose, scope, revision, gravity_in_object=None, opening=None, identity=None)[source]#
Capture and assemble one source query without stepping or writing simulation.
- Parameters:
robot (
Robot) – Exact simulation-owned Robot.simulation (
SimulationManager) – The supported Default/B1 simulation.source_uid (
str) – Explicit registered native target identity.hand_geometry_cfg (
RobotHandGeometryCfg) – Declared topology and stroke sampling. Source-qualified callers explicitly retainsample_count=65.open_qpos (
Tensor) – Current full hand-part open command, shape(1, D).grasp_qpos (
Tensor) – Current close command in the same order.observation_qpos (
Tensor) – Same-observation full named robot state.object_pose (
Tensor) – Same-observation object pose, shape(1, 4, 4).scope (
NativeQueryScope) – Fresh preparation and observation identity.revision (
int) – Explicit preserved source policy, from one through nine.gravity_in_object (
ndarray|None) – Same-observation gravity for horizontal pad qualification.opening (
GraspOpeningTarget|None) – Optional same-scope, already-grounded release target.identity (
Mapping[str,object] |None) – Neutral caller provenance; captured physical keys are reserved.
- Return type:
- Returns:
Fresh owned query. Close it in a context manager or finally block.
- embodichain.lab.sim.atomic_skills.source_native_contact.build_native_rigid_rest_scene(simulation, closing)[source]#
Attach ordered, same-arena captured obstacles using the explicit source backend.
- Parameters:
simulation (
SimulationManager) – Exact simulation that owns the closing query geometry.closing (
NativeClosingQuery) – Open source query with a captured native owner token.
- Return type:
- Returns:
Owned rigid rest-clearance query excluding only the captured target.
Explicit Press planning recovery#
PressPlanningRecovery selects the existing Press skill’s failure-only B1
recovery. Nominal planning and at most one declared contact-roll alternative share
the original two-complete-plan budget and RNG progression. Failed Cartesian
phases may retry through the shared unchanged-target, unchanged-time IK resolver.
The final emitted full-robot trajectory retains velocity qualification after
resampling and transforms. Missing motion or excessive velocity remains failure.
Default PressOptions enables no contact-roll alternatives or recovery.
validate_press_extra_distance accepts only an optional finite addition in
[0, 0.010] metres. It does not alter the authored stroke or determine physical
contact, release or task success. Configured recovery accepts only
{kind: press_bounded, revision: 1}; budgets and callbacks cannot be supplied
through that declaration.
Failure-only B1 Press planning rules with the fixed source attempt budget. |
|
Validate an optional declaration-owned addition to an authored press stroke. |
- class embodichain.lab.sim.atomic_skills.PressPlanningRecovery[source]#
Failure-only B1 Press planning rules with the fixed source attempt budget.
The two complete plans include the nominal plan and at most one declared contact-roll alternative. Failed Cartesian phases may use the shared bounded IK continuation on unchanged targets and time. Inner IK search limits remain owned by the motion service. Separate dense-grid engine attempts each get a fresh local scope; this declaration does not change their RNG boundary.
Methods:
__init__()- __init__()#
- embodichain.lab.sim.atomic_skills.validate_press_extra_distance(value)[source]#
Validate an optional declaration-owned addition to an authored press stroke.
- Parameters:
value (
float|None) – Additional travel in metres, or None to retain the declaration’s existing selection. Exact Python integers/floats in[0, 0.010]are accepted; booleans and non-finite values are rejected.- Raises:
ValueError – The value is outside the supported declaration contract.
- Return type:
None
This does not change
PressOptionsdefaults or certify physical travel. The caller still owns the authored stroke and measured acceptance.