embodichain.lab.sim.common#

Overview#

BatchEntity is the abstract base class for every batched scene entity in EmbodiChain. Rigid objects, articulations (and therefore robots), cameras, lights, and sensors all derive from it. A BatchEntity wraps a list of underlying DexSim entities and exposes their state as batched tensors with a leading B = num_envs dimension, so a single instance represents one entity replicated across all parallel environments.

Classes

BatchEntity

Abstract base class for batch entity in the simulation engine.

class embodichain.lab.sim.common.BatchEntity[source]#

Bases: ABC

Abstract base class for batch entity in the simulation engine.

This class defines the interfaces for managing and manipulating a batch of entity. A single entity could be one of the following assets: - actor (eg. rigid object) - articulation (eg. robot) - camera - light - sensor (eg. force sensor)

Methods:

__init__(cfg[, entities, device])

destroy()

Destroy all entities managed by this batch entity.

get_local_pose([to_matrix])

reset([env_ids])

Reset the entity to its initial state.

set_local_pose(pose[, env_ids])

Attributes:

__init__(cfg, entities=None, device=device(type='cpu'))[source]#
cfg: ObjectBaseCfg = None#
destroy()[source]#

Destroy all entities managed by this batch entity.

Return type:

None

device: device = None#
abstract get_local_pose(to_matrix=False)[source]#
Return type:

Tensor

property num_instances: int#
property pose: Tensor#
abstract reset(env_ids=None)[source]#

Reset the entity to its initial state.

Parameters:

env_ids (Sequence[int] | None) – The environment IDs to reset. If None, reset all environments.

Return type:

None

abstract set_local_pose(pose, env_ids=None)[source]#
Return type:

None

uid: str | None = None#