embodichain.data#

Data Package Overview#

The embodichain.data package centralizes dataset resolution and asset download helpers used by simulation tasks and training pipelines.

Submodules

constants

dataset

download

CLI tool for pre-downloading EmbodiChain data assets.

enum

Constants#

Dataset Resolution#

Classes:

Functions:

get_data_class(dataset_name[, extra_modules])

Retrieve the dataset class from the available modules.

get_data_path(data_path_in_config)

Get the absolute path of the data file.

class embodichain.data.dataset.EmbodiChainDataset[source]#

Bases: DownloadDataset

Methods:

__init__(self, prefix, data_descriptor[, ...])

calculate_md5(file_path[, chunk_size])

Calculate the MD5 checksum of a file.

check_zip(prefix, data_descriptor, path)

Check the integrity of the zip file and its extracted contents.

__init__(self: open3d.cuda.pybind.data.DownloadDataset, prefix: str, data_descriptor: open3d.cuda.pybind.data.DataDescriptor, data_root: str = '') None[source]#
calculate_md5(file_path, chunk_size=8192)[source]#

Calculate the MD5 checksum of a file.

check_zip(prefix, data_descriptor, path)[source]#

Check the integrity of the zip file and its extracted contents.

embodichain.data.dataset.get_data_class(dataset_name, extra_modules=None)[source]#

Retrieve the dataset class from the available modules.

Parameters:
  • dataset_name (str) – The name of the dataset class.

  • extra_modules (list[str] | None) – Optional list of additional module names to search for the dataset class.

Returns:

The dataset class.

Return type:

type

Raises:

AttributeError – If the dataset class is not found in any module.

embodichain.data.dataset.get_data_path(data_path_in_config)[source]#

Get the absolute path of the data file.

Resolution order:
  1. If data_path_in_config is an absolute path, return it directly.

  2. If a matching file/directory exists under EMBODICHAIN_DEFAULT_DATA_ROOT (which can be overridden via the EMBODICHAIN_DATA_ROOT environment variable), return that path.

  3. Otherwise, resolve via the registered data-class download mechanism.

Parameters:

data_path_in_config (str) – The dataset path in the format "dataset_name/subpath".

Returns:

The absolute path of the data file.

Return type:

str

Asset Download CLI#

CLI tool for pre-downloading EmbodiChain data assets.

Usage:

# List all available assets
python -m embodichain.data.download list

# List assets in a specific category
python -m embodichain.data.download list --category robot

# Download a specific asset by name
python -m embodichain.data.download download --name CobotMagicArm

# Download all assets in a category
python -m embodichain.data.download download --category robot

# Download everything
python -m embodichain.data.download download --all

Functions:

cmd_download(args)

Download assets by name, category, or everything.

cmd_list(args)

List available assets.

download_asset(cls_name, cls)

Instantiate an asset class to trigger download, then ensure extraction.

find_asset_class(name, registry)

Find an asset class by name (case-insensitive) across all categories.

get_registry()

Build {category: [(class_name, class), ...]} for every category.

main()

embodichain.data.download.cmd_download(args)[source]#

Download assets by name, category, or everything.

Return type:

None

embodichain.data.download.cmd_list(args)[source]#

List available assets.

Return type:

None

embodichain.data.download.download_asset(cls_name, cls)[source]#

Instantiate an asset class to trigger download, then ensure extraction.

Return type:

None

embodichain.data.download.find_asset_class(name, registry)[source]#

Find an asset class by name (case-insensitive) across all categories.

Return type:

tuple[str, type] | None

embodichain.data.download.get_registry()[source]#

Build {category: [(class_name, class), ...]} for every category.

Return type:

dict[str, list[tuple[str, type]]]

embodichain.data.download.main()[source]#
Return type:

None

Enums#

Classes:

ActionMode

An enumeration.

ControlParts

An enumeration.

EefExecute

An enumeration.

EefType

An enumeration.

EndEffector

An enumeration.

Hints

An enumeration.

JointType

An enumeration.

LeRobotKey

LeRobot standard field keys - official LeRobot dataset format.

SemanticMask

SemanticMask is an enumeration representing different semantic regions in an image or scene.

class embodichain.data.enum.ActionMode[source]#

Bases: Enum

An enumeration.

Attributes:

ABSOLUTE = ''#
RELATIVE = 'delta_'#
class embodichain.data.enum.ControlParts[source]#

Bases: Enum

An enumeration.

Attributes:

HEAD = 'head'#
LEFT_ARM = 'left_arm'#
LEFT_EEF = 'left_eef'#
RIGHT_ARM = 'right_arm'#
RIGHT_EEF = 'right_eef'#
WAIST = 'waist'#
class embodichain.data.enum.EefExecute[source]#

Bases: Enum

An enumeration.

Attributes:

CLOSE = 'execute_close'#
OPEN = 'execute_open'#
class embodichain.data.enum.EefType[source]#

Bases: Enum

An enumeration.

Attributes:

POSE = 'eef_pose'#
class embodichain.data.enum.EndEffector[source]#

Bases: Enum

An enumeration.

Attributes:

DEXTROUSHAND = 'hand'#
GRIPPER = 'gripper'#
class embodichain.data.enum.Hints[source]#

Bases: Enum

An enumeration.

Attributes:

ARM = ('left_arm', 'right_arm')#
EEF = ('left_eef', 'right_eef', 'gripper', 'hand')#
class embodichain.data.enum.JointType[source]#

Bases: Enum

An enumeration.

Attributes:

QPOS = 'qpos'#
class embodichain.data.enum.LeRobotKey[source]#

Bases: Enum

LeRobot standard field keys - official LeRobot dataset format.

Attributes:

ACTION = 'action'#
ACTION_PREFIX = 'action.'#
ACTION_TOKENS = 'action.tokens'#
ACTION_TOKEN_MASK = 'action.token_mask'#
DONE = 'next.done'#
INFO = 'info'#
OBS_ENV_STATE = 'observation.environment_state'#
OBS_IMAGE = 'observation.image'#
OBS_IMAGES = 'observation.images'#
OBS_LANGUAGE = 'observation.language'#
OBS_LANGUAGE_ATTENTION_MASK = 'observation.language.attention_mask'#
OBS_LANGUAGE_SUBTASK = 'observation.subtask'#
OBS_LANGUAGE_SUBTASK_ATTENTION_MASK = 'observation.subtask.attention_mask'#
OBS_LANGUAGE_SUBTASK_TOKENS = 'observation.subtask.tokens'#
OBS_LANGUAGE_TOKENS = 'observation.language.tokens'#
OBS_PREFIX = 'observation.'#
OBS_QF = 'observation.qf'#
OBS_QVEL = 'observation.qvel'#
OBS_STATE = 'observation.state'#
OBS_STR = 'observation'#
REWARD = 'next.reward'#
TRUNCATED = 'next.truncated'#
class embodichain.data.enum.SemanticMask[source]#

Bases: IntEnum

SemanticMask is an enumeration representing different semantic regions in an image or scene.

BACKGROUND#

Represents the background region (value: 0).

Type:

int

FOREGROUND#

Represents the foreground objects (value: 1).

Type:

int

ROBOT_LEFT#

Represents the left robot region (value: 2).

Type:

int

ROBOT_RIGHT#

Represents the right robot region (value: 3).

Type:

int

Attributes:

Methods:

__new__(value)

BACKGROUND = 0#
FOREGROUND = 1#
ROBOT_LEFT = 2#
ROBOT_RIGHT = 3#
__new__(value)#