Skip to content

Constants and Types

Shared enums and type aliases. The enums configure terms: EventMode is an event's mode, MetricDirection and MetricMode describe a metric, ReferenceSource selects what an action term's target is relative to, NoiseOperation says whether a noise model adds to or scales a value, and DatasetExportMode chooses which recorded episodes the recorder manager writes.

from eden.constants import EventMode, MetricDirection, MetricMode

Enums

Shared enums and constants (event modes, metric directions, reference sources).

Classes

EventMode

Bases: StrEnum

Event mode.

Options

STARTUP: Event is only triggered at the startup of the environment. RESET: Event is triggered at the reset of the episode. INTERVAL: Event is triggered periodically, every interval_range_s seconds (resampled after each firing).

Attributes

STARTUP class-attribute instance-attribute
STARTUP = 'startup'
RESET class-attribute instance-attribute
RESET = 'reset'
INTERVAL class-attribute instance-attribute
INTERVAL = 'interval'

NoiseOperation

Bases: StrEnum

Noise operation.

Options

ADD: additive noise. SCALE: multiplicative noise.

Attributes

ADD class-attribute instance-attribute
ADD = 'add'
SCALE class-attribute instance-attribute
SCALE = 'scale'

MetricDirection

Bases: StrEnum

Metric direction.

Options

LIB: lower is better. HIB: higher is better.

Attributes

LIB class-attribute instance-attribute
LIB = 'lib'
HIB class-attribute instance-attribute
HIB = 'hib'

MetricMode

Bases: StrEnum

Metric success mode.

Options

INTERVAL: evaluates at each step. RESET: evaluates on reset.

Attributes

INTERVAL class-attribute instance-attribute
INTERVAL = 'interval'
RESET class-attribute instance-attribute
RESET = 'reset'

ReferenceSource

Bases: StrEnum

Source of the reference offset added on top of the joint PD controller setpoint.

The offset is added on top of raw_action * scale + offset by the joint PD controllers in :mod:eden.managers.terms.actions.joint_actions.

Options

ZERO: no reference offset. DEFAULT: the entity's default_dofs_pos for the controlled DOFs. MOTION_REF: per-step joint position read from the motion manager (env.motion_manager.data[entity_name].dofs_pos[:, 0, :]); used for residual policies that learn deltas on top of a retargeted demonstration. DELTA: per-step joint position captured from the entity at the start of each control step (entity.get_dofs_pos(...)); the action is then a delta on top of the previous step's DOF position. Constant across decimation substeps. ACCUMULATE: the action is integrated onto a persistent target, target_t = clamp(target_{t-1} + raw * scale, soft_pos_limits), starting from and reset to default_dofs_pos. Unlike DELTA (which re-reads the measured DOF position each step), the target accumulates across steps. The action manager keeps the raw delta, so obs/reward terms read it directly. Requires offset == 0 and a position controller.

Attributes

ZERO class-attribute instance-attribute
ZERO = 'zero'
DEFAULT class-attribute instance-attribute
DEFAULT = 'default'
MOTION_REF class-attribute instance-attribute
MOTION_REF = 'motion_ref'
DELTA class-attribute instance-attribute
DELTA = 'delta'
ACCUMULATE class-attribute instance-attribute
ACCUMULATE = 'accumulate'

DatasetExportMode

Bases: StrEnum

Dataset export mode.

Options

EXPORT_NONE: Export none of the episodes. EXPORT_ALL: Export all episodes to a single dataset file. EXPORT_SUCCEEDED_FAILED_IN_SEPARATE_FILES: Export succeeded and failed episodes in separate files. EXPORT_SUCCEEDED_ONLY: Export only succeeded episodes to a single dataset file.

Attributes

EXPORT_NONE class-attribute instance-attribute
EXPORT_NONE = 'export_none'
EXPORT_ALL class-attribute instance-attribute
EXPORT_ALL = 'export_all'
EXPORT_SUCCEEDED_FAILED_IN_SEPARATE_FILES class-attribute instance-attribute
EXPORT_SUCCEEDED_FAILED_IN_SEPARATE_FILES = 'export_succeeded_failed_in_separate_files'
EXPORT_SUCCEEDED_ONLY class-attribute instance-attribute
EXPORT_SUCCEEDED_ONLY = 'export_succeeded_only'

Type aliases

Shared type aliases used across Eden.

Attributes

MorphLike module-attribute

MorphLike: TypeAlias = Morph | list[Morph]

A morph or a list of morphs (used to seed deformable/rigid primitives).

VisMode module-attribute

VisMode: TypeAlias = Literal['visual', 'collision', 'particle', 'sdf', 'recon']

Rendering/visualization mode for an entity.

VecEnvObs module-attribute

VecEnvObs: TypeAlias = dict[str, torch.Tensor]

Observation payload returned by vectorized environments.

VecEnvReset module-attribute

VecEnvReset: TypeAlias = tuple[VecEnvObs, dict[str, Any]]

Return type of EnvBase.reset: (obs, info).

VecEnvStep module-attribute

VecEnvStep: TypeAlias = tuple[VecEnvObs, torch.Tensor | None, torch.Tensor | None, torch.Tensor | None, dict[str, Any]]

Return type of EnvBase.step / RLEnvBase.step: (obs, reward, terminated, timeouts, info).

See also