Entities¶
Entities are Eden's wrappers over Genesis entities: robots, rigid objects, deformables, terrain, cameras and
sensors. An env creates one per entry in its scene options and exposes them as env.entities["<name>"]. This page
is the class reference; the entities guide covers pose frames, the two DOF index spaces,
armature, contacts and the other behaviour you need before writing a term against an entity.
The class an entry gets is chosen from its options (rigid, particle, FEM, terrain, Mochi). Setters take
envs_idx= to touch a subset of environments, and quaternions are wxyz everywhere.
Base and rigid entities¶
Entity
¶
Entity(env: EnvBase, options: EntityOptions)
Bases: ConfigurableMixin[EntityOptions]
Entity class for Eden, wrapping Genesis' Entity class.
| PARAMETER | DESCRIPTION |
|---|---|
default_root_pos
|
The default position of the entity's root link.
|
default_root_quat
|
The default orientation of the entity's root link (w, x, y, z).
|
Source code in eden/entities/base.py
Attributes¶
is_heterogeneous
instance-attribute
¶
is_heterogeneous = isinstance(self._options, GroupedEntityOptions)
forward_vec
class-attribute
instance-attribute
¶
forward_vec: Vec3FType = torch.tensor(self.forward_vec, dtype=gs.tc_float, device=self.device).unsqueeze(0)
default_root_pos
class-attribute
instance-attribute
¶
default_root_pos: Vec3FType = torch.tensor(self.default_root_pos, dtype=gs.tc_float, device=self.device).unsqueeze(0)
default_root_quat
class-attribute
instance-attribute
¶
default_root_quat: UnitVec4FType = torch.tensor(self.default_root_quat, dtype=gs.tc_float, device=self.device).unsqueeze(0)
num_variants
property
¶
num_variants: int
How many variants a heterogeneous (GroupedEntityOptions) entity was built from.
env_variant_idx
property
¶
The variant each env holds, (num_envs,) long, indexing GroupedEntityOptions.grouped_entities.
Fixed at build: a reset re-poses an env's variant but never swaps it. This is the mapping Genesis itself distributes the variants by (contiguous, balanced env blocks), not an inference from the built geometry.
is_attached
property
¶
is_attached: bool
Whether this entity is welded onto a link of another entity.
Genesis attach merges the pair into one kinematic tree and removes the
child's root joint, so an attached entity has no base DOFs of its own even when
is_fixed_base is False — see :attr:has_immobile_base. (Mirrors the
is_attached property on Camera / Sensor.)
attachment_parent
property
¶
attachment_parent: Entity | None
Entity whose link carries this welded entity, or None when it is not attached.
has_immobile_base
property
¶
has_immobile_base: bool
Whether the entity's base link carries no DOFs of its own.
True for a fixed-base entity and for an attached one (its base link is carried by
the parent link). Prefer this over is_fixed_base wherever the question is "are
there base DOFs to read or write", since is_fixed_base alone reports False for
a welded gripper / dexterous hand.
Methods:¶
get_default_root_pose
¶
get_default_root_pose() -> tuple[Tensor, Tensor]
Get the default root pose for all environments, (num_envs, 3) / (num_envs, 4).
For a heterogeneous entity, each env's variant default pose is composed onto the GroupedEntityOptions default root pose as an additional offset.
Source code in eden/entities/base.py
pre_build
¶
Add the entity to the Genesis scene before the scene is built.
Genesis' asset-level warnings repeat once per mesh (a G1 has nine non-watertight collision meshes), so the load collapses identical ones into a single counted line.
Source code in eden/entities/base.py
post_build
¶
get_pos
¶
get_pos(envs_idx=None, *, relative: bool = False)
Return the position of the entity's base link in world frame.
| PARAMETER | DESCRIPTION |
|---|---|
envs_idx
|
The environment indices. If None, all environments are considered. Defaults to None.
TYPE:
|
relative
|
Must be False for this entity kind (see :meth:
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
pos
|
The base-link position.
TYPE:
|
Source code in eden/entities/base.py
get_quat
¶
get_quat(envs_idx=None, *, relative: bool = False)
Return the quaternion of the entity's base link in world frame.
| PARAMETER | DESCRIPTION |
|---|---|
envs_idx
|
The environment indices. If None, all environments are considered. Defaults to None.
TYPE:
|
relative
|
Must be False for this entity kind (see :meth:
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
quat
|
The base-link quaternion in
TYPE:
|
Source code in eden/entities/base.py
get_heading
¶
get_T
¶
Return the entity's base-link pose as a 4x4 homogeneous transform matrix.
| PARAMETER | DESCRIPTION |
|---|---|
envs_idx
|
The indices of the environments. If None, all environments are considered. Defaults to None.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
transform
|
The base-link homogeneous transform.
TYPE:
|
Source code in eden/entities/base.py
get_vel
¶
get_vel(envs_idx=None, *, frame: Literal['world', 'body'] = 'world')
Return the linear velocity of the entity's base link.
| PARAMETER | DESCRIPTION |
|---|---|
envs_idx
|
The indices of the environments. If None, all environments will be considered. Defaults to None.
TYPE:
|
frame
|
Coordinate frame for the returned linear velocity. Valid options: - "world": linear velocity expressed in world coordinates (default) - "body": linear velocity expressed in the body (base link) frame
TYPE:
|
Source code in eden/entities/base.py
get_ang
¶
get_ang(envs_idx=None, *, frame: Literal['world', 'body'] = 'world')
Return the angular velocity of the entity's base link.
| PARAMETER | DESCRIPTION |
|---|---|
envs_idx
|
The indices of the environments. If None, all environments will be considered. Defaults to None.
TYPE:
|
frame
|
Coordinate frame for the returned angular velocity. Valid options: - "world": angular velocity expressed in world coordinates (default) - "body": angular velocity expressed in the body (base link) frame
TYPE:
|
Source code in eden/entities/base.py
set_pos
¶
Require concrete entity classes to define position-setter semantics.
set_quat
¶
Require concrete entity classes to define orientation-setter semantics.
attach_to
¶
attach_to(entity: Entity, link_name: str, attach_offset: Vec3FType | None = None, attach_quat: UnitVec4FType | None = None) -> None
Reject attachment for entity kinds that cannot be welded to a parent link.
Overridden by :class:~eden.entities.rigid.RigidEntity (a weld) and
:class:~eden.entities.mochi.MochiSoftEntity (a soft body tied to the link). Declared
here — taking the mounting-transform kwargs that EnvBase always passes — so
attachments_dict naming a deformable/particle child fails with an explanatory error
instead of a bare AttributeError/TypeError.
Source code in eden/entities/base.py
get_mass
¶
Return the total mass of the entity, in kg.
For rigid entities this sums the links that are not fixed to the world, and returns
a 0-dim tensor — or a (num_envs,) tensor when link info is batched
(EnvOptions.batch_links_info or a heterogeneous entity).
Source code in eden/entities/base.py
RigidEntity
¶
RigidEntity(env: EnvBase, options: EntityOptions)
Bases: Entity, SupportSurfaceMixin, DofDefaultsMixin
Entity subclass for rigid and kinematic materials.
Provides DOF/link/geom access, FK/IK, Jacobians, contacts,
and support-surface utilities on top of the base :class:Entity.
Notes
DOF ordering. Every *_dofs_* accessor below indexes DOFs in dofs_name
order — the entity's configured dofs_name list, a pattern expanding in Genesis' joint
order, not the asset's declaration order — because the default dofs_idx_local is
:attr:dofs_idx_local, which is name-resolved in that order.
:meth:find_named_dofs_idx_local returns indices in Genesis' kinematic-tree order
instead: that is what Genesis-level APIs want, but it is not a column index into
:meth:get_jacobian, which already permutes its columns back to dofs_name order.
Passing an explicit dofs_idx_local returns values in the order you supplied.
DOF defaults. The configured per-DOF tensors (default_dofs_*, soft_dofs_pos_limits)
are laid out in dofs_name order too, which no find_named_dofs_idx_local index addresses.
Read them by name with get_default_dofs_* / :meth:get_soft_dofs_pos_limits; to slice or
write one, resolve once with :meth:find_named_dofs, whose selection carries the columns and the
matching dofs_idx_local — see :class:~eden.entities.dofs_default_mixin.DofDefaultsMixin.
Quaternions are (w, x, y, z).
Batching. Shapes below are written with the leading n_envs axis they carry; where
an accessor takes envs_idx (int / slice / index tensor / bool mask), that axis is
narrowed to the selection. (:meth:get_mass is the exception that proves the rule — it
reports the entity's total mass, which is not a per-DOF or per-link quantity at all.)
For the info getters that axis is Eden's contract, not Genesis'. Genesis splits per-DOF data in two: state
(position, velocity, force) is always env-batched, while info — the nine
model-parameter reads :meth:get_dofs_kp, :meth:get_dofs_kd,
:meth:get_dofs_stiffness, :meth:get_dofs_damping, :meth:get_dofs_armature,
:meth:get_dofs_frictionloss, :meth:get_dofs_invweight, :meth:get_dofs_limit
and :meth:get_dofs_force_range — is batched only when EnvOptions.batch_dofs_info
is set, and rejects envs_idx outright when it is not. Since the shape a caller
got would otherwise depend on the task config (and Eden ships tasks on both
settings), the info getters normalize: when DOF info is unbatched every environment
shares the one stored row, so broadcasting it over environments is exact.
Note that EnvOptions.batch_dofs_info only reaches the rigid solver.
KinematicSolver keeps unbatched DOF info unless it holds a heterogeneous entity,
so a kinematic entity's info reads are otherwise broadcast however the env is configured.
Either solver batches by itself once it holds one (:attr:has_batched_dofs_info).
Source code in eden/entities/base.py
Attributes¶
default_dofs_stiffness
class-attribute
instance-attribute
¶
default_dofs_damping
class-attribute
instance-attribute
¶
default_dofs_armature
class-attribute
instance-attribute
¶
default_dofs_frictionloss
class-attribute
instance-attribute
¶
default_dofs_spring_ref
class-attribute
instance-attribute
¶
default_dofs_pos_limits
class-attribute
instance-attribute
¶
soft_dofs_pos_limits
class-attribute
instance-attribute
¶
default_dofs_force_limits
class-attribute
instance-attribute
¶
default_equalities_sol_params
class-attribute
instance-attribute
¶
default_geoms_sol_params
class-attribute
instance-attribute
¶
default_geoms_friction
class-attribute
instance-attribute
¶
default_geoms_friction_torsional
class-attribute
instance-attribute
¶
default_geoms_friction_rolling
class-attribute
instance-attribute
¶
support_sample_method
class-attribute
instance-attribute
¶
support_sample_method: Literal['uniform', 'grid'] = 'uniform'
support_minimum_clearance
class-attribute
instance-attribute
¶
support_minimum_clearance: float = 0.05
is_kinematic
property
¶
is_kinematic: bool
Whether this entity is kinematic: not simulated, and owning no collision geometry.
A kinematic material puts the entity in Genesis' kinematic solver, which builds
visual geoms only — KinematicEntity exposes vgeoms and has no geoms
attribute at all. Anything that reaches for collision geometry has nothing to work
with on such an entity.
root_qpos_is_authored_pose
cached
property
¶
root_qpos_is_authored_pose: bool
Whether the free base's 7 root coordinates are its authored pose (get_pos/get_quat(relative=True)).
They are whenever Genesis moves the root link by no morph offset or inertial alignment, so a
relative=True pose can be written straight into qpos with :meth:set_qpos — Genesis' bool-mask
path, no GPU->CPU sync — where set_pos / set_quat would go through the offset composition.
Read once, comparing Genesis' own relative and solver-frame getters (one sync, on first use).
False for an entity with no free base, and under IPC coupling, where Genesis refuses a qpos
write to an IPC-articulated entity that its pose setters may still take.
joints_name
property
¶
Every joint's name, in Genesis' joint order (not the asset's): the free root and any fixed or passive
joints as well as the controlled ones in dofs_name.
joints
property
¶
joints: list[RigidJoint]
Every Genesis joint of this entity, in declaration order: free, fixed and DOF-carrying alike.
Each joint's name, type, n_dofs, dofs_idx_local and qs_idx_local together describe
the whole simulated state. :attr:dofs_name does not: it is the controlled subset, and it leaves out
passive DOFs such as a Robotiq 2F85's followers. Read this for a full state snapshot.
free_joints
property
¶
free_joints: list[RigidJoint]
All free joints, detected by joint type — never by name.
num_dofs
property
¶
Return the number of controllable DOFs specified by dofs_name.
This may differ from the total number of DOFs of the entity; uncontrollable DOFs such as free base joints are not included.
geoms
property
¶
This entity's collision geoms, as an entity-local list.
The list is local but each geom.idx is scene-global — a Genesis RigidGeom has
no idx_local (unlike a link, which carries both idx and idx_local). So
entity.geoms[geom.idx] is wrong on any entity with geoms before it in the scene
(geom_start != 0); the local index is geom.idx - entity.geom_start.
geom_start
property
¶
Scene-global index of this entity's first geom: geom.idx - geom_start indexes :attr:geoms.
geom_end
property
¶
Scene-global index one past this entity's last geom (geoms spans geom_start:geom_end).
base_link_name
property
¶
base_link_name: str
Name of this entity's root link (the base of its kinematic tree).
The frame a mounted entity's pose is expressed in, and the link an asset is rooted
at — so a caller can reference it without hard-coding an asset-specific name
("base", "right_hand_C_MC", …) or reaching through _entity. Note that
for an attached entity Genesis reparents this link under the parent, so it is no
longer a free root.
has_batched_dofs_info
property
¶
has_batched_dofs_info: bool
Whether the solver holding this entity stores per-environment DOF info.
The solver's flag, not EnvOptions.batch_dofs_info: that option configures the rigid solver only,
and Genesis turns it on by itself in either solver once it holds a heterogeneous entity, whose variants
each bring their own joint parameters (https://github.com/Genesis-Embodied-AI/Genesis/pull/3497).
has_batched_links_info
property
¶
has_batched_links_info: bool
Whether the solver holding this entity stores per-environment link info.
The solver's flag, not EnvOptions.batch_links_info: Genesis turns it on by itself for a scene that
holds a heterogeneous entity, whose variants differ in mass and inertia.
setters_take_every_row
property
¶
setters_take_every_row: bool
Whether set_dofs_vel / set_qpos take every env's row alongside a bool envs_idx.
On Genesis' zero-copy path they write the masked rows through torch.where, on the device,
as long as the DOF (q) argument is a range (:func:eden.utils.misc.contiguous_range) —
no nonzero() sync to turn the mask into indices. The selected rows are accepted in every
case, so pass those otherwise. Not under hibernation: set_dofs_velocity first wakes the
entities it touches, which turns the mask into indices and then rejects the unselected envs'
rows. Reads the solver's own flag rather than EnvOptions.use_hibernation: a
rigid_options handed to the env constructor can switch hibernation on behind that option,
and Genesis switches it off under requires_grad. set_dofs_pos takes every row too when
its DOFs are hinges or slides (it writes them through set_qpos); the control_dofs_*
setters never do. A kinematic entity's solver never hibernates.
Methods:¶
pre_build
¶
post_build
¶
Source code in eden/entities/rigid.py
attach_to
¶
attach_to(entity: Entity, link_name: str, attach_offset: Vec3FType | None = None, attach_quat: UnitVec4FType | None = None) -> None
Attach this entity to another entity.
The mounting transform — this entity's base link pose relative to the parent link —
defaults to the entity's default_root_pos / default_root_quat. Pass
attach_offset / attach_quat to override it: after attachment the base link's world
pose is parent_link_pose ∘ (attach_offset, attach_quat). Genesis composes the transform
with the morph frame offset (up/front alignment) exactly as it does for the morph pose at
load time. (Mirrors the attach_offset / attach_quat naming on CameraOptions.)
| PARAMETER | DESCRIPTION |
|---|---|
entity
|
The entity to attach to.
TYPE:
|
link_name
|
The name of the link to attach this entity to.
TYPE:
|
attach_offset
|
Mounting position of this entity's base link in the parent link frame.
Defaults to the entity's
TYPE:
|
attach_quat
|
Mounting orientation (w, x, y, z) of this entity's base link in the parent link
frame. Defaults to the entity's
TYPE:
|
Source code in eden/entities/rigid.py
1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 | |
find_named_dofs_idx_local
¶
find_named_dofs_idx_local(dofs_name: list[str] | str, name_scope: list[str] | None = None, preserve_order: bool = True) -> tuple[list[str], list[int]]
Find DOF indices by DOF/joint names or patterns.
Returns local indices, Genesis' own: hand them to a dofs_idx_local= argument and nowhere
else. For the controlled joints, :meth:find_named_dofs resolves the same query into these and
the matching columns of the property tensors at once.
Supports:
- Exact names: "joint_1", taken literally even when they contain a pattern character
("pin.1" selects pin.1 alone, not also pin_1). Judged against every joint of the
entity, so the exact name of a joint outside name_scope selects nothing rather than a
neighbour inside it
- Glob patterns: "joint_", "arm?[LR]_" (fnmatch semantics)
- Regex patterns: any valid regex (uses fullmatch). If a pattern isn't an exact
match or glob, we attempt to treat it as a regex.
| PARAMETER | DESCRIPTION |
|---|---|
dofs_name
|
The names of the DOFs to find. |
name_scope
|
The names of the joints to search within. If None, all joints will be searched; an empty list searches none, so any key raises. |
preserve_order
|
Whether to preserve the order of the DOFs. If True, the DOFs are returned in the order of the keys in
TYPE:
|
Source code in eden/entities/rigid.py
find_free_base_dofs_idx_local
¶
Find the six local DOF indices of the floating base's free joint.
With joint_name=None (the default) the free joint is detected by joint
type — the only convention-free spelling: an MJCF <freejoint> can carry
any name (Unitree's G1 uses floating_base_joint) while Genesis synthesizes
root_joint for a URDF floating base, so any fixed name default breaks one
of the two formats. Raises unless exactly one free joint exists. Pass an
explicit joint_name to pick one on the rare multi-free-joint entity; it
must name a free joint, so a hinge that happens to match a naming convention
can never silently receive base-DOF writes.
| PARAMETER | DESCRIPTION |
|---|---|
joint_name
|
Exact name of the free joint to select, or
TYPE:
|
Source code in eden/entities/rigid.py
find_named_links_idx_local
¶
find_named_links_idx_local(links_name: list[str] | str, name_scope: list[str] | None = None, preserve_order: bool = True) -> tuple[list[str], list[int]]
Find link indices by link names or patterns.
Supports: - Exact names: "link_1" - Glob patterns: "link_", "arm?[LR]_" (fnmatch semantics) - Regex patterns: any valid regex (uses fullmatch). If a pattern isn't an exact match or glob, we attempt to treat it as a regex.
| PARAMETER | DESCRIPTION |
|---|---|
links_name
|
The names of the links to find. |
name_scope
|
The names of the links to search within. If None, all links will be searched; an empty list searches none, so any key raises. |
preserve_order
|
Whether to preserve the order of the links. If True, the links are returned in the order of the keys in
TYPE:
|
Source code in eden/entities/rigid.py
forward_kinematics
¶
Compute forward kinematics for a single link or multiple links.
inverse_kinematics
¶
inverse_kinematics(links_name, poss=None, quats=None, local_points=None, init_qpos=None, respect_joint_limit=True, max_samples=50, max_solver_iters=20, damping=0.01, pos_tol=0.0005, rot_tol=0.005, pos_mask=[True, True, True], rot_mask=[True, True, True], max_step_size=0.5, dofs_idx_local=None, return_error=False, envs_idx=None)
Compute inverse kinematics for a single link or multiple links.
| PARAMETER | DESCRIPTION |
|---|---|
links_name
|
The name of the link to compute inverse kinematics for.
|
poss
|
The target position of each link. If None, position error is not considered. Defaults to None.
DEFAULT:
|
quats
|
The target orientation (w, x, y, z) of each link. If None, orientation error is not considered. Defaults to None.
DEFAULT:
|
local_points
|
The point in each link's local frame that
DEFAULT:
|
init_qpos
|
Initial joint positions used to seed the solver. Defaults to None.
DEFAULT:
|
respect_joint_limit
|
Whether to clamp the solution to the joint limits. Defaults to True.
DEFAULT:
|
max_samples
|
Maximum number of random restarts attempted by the solver. Defaults to 50.
DEFAULT:
|
max_solver_iters
|
Maximum number of iterations per sample. Defaults to 20.
DEFAULT:
|
damping
|
Damping factor for the damped least-squares update. Defaults to 0.01.
DEFAULT:
|
pos_tol
|
Position tolerance for convergence, in meters. Defaults to 5e-4.
DEFAULT:
|
rot_tol
|
Rotation tolerance for convergence, in radians. Defaults to 5e-3.
DEFAULT:
|
pos_mask
|
Per-axis
DEFAULT:
|
rot_mask
|
Per-axis
DEFAULT:
|
max_step_size
|
Maximum joint update applied per iteration. Defaults to 0.5.
DEFAULT:
|
dofs_idx_local
|
Local indices of the DOFs the solver is allowed to move. If None, all DOFs are used. Defaults to None.
DEFAULT:
|
return_error
|
If True, also return the final residual error alongside the solution. Defaults to False.
DEFAULT:
|
envs_idx
|
The indices of the environments to solve for. If None, all environments are used. Defaults to None.
DEFAULT:
|
| RETURNS | DESCRIPTION |
|---|---|
qpos
|
Solver qpos (the entity's generalized coordinates).
TYPE:
|
error_pose
|
Pose error
TYPE:
|
Source code in eden/entities/rigid.py
2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 | |
get_jacobian
¶
Get the spatial Jacobian for a point on a target link.
Columns are returned in dofs_name order (matching set_qpos /
get_dofs_limit), not the Genesis kinematic-tree order.
| PARAMETER | DESCRIPTION |
|---|---|
link
|
The target link.
TYPE:
|
local_point
|
Coordinates of the point in the link's local frame. If None, the link origin is used.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
jacobian
|
The Jacobian matrix of shape (n_envs, 6, entity.n_dofs) or (6, entity.n_dofs) if n_envs == 0.
TYPE:
|
Source code in eden/entities/rigid.py
get_AABB
¶
get_qpos
¶
Get the entity's generalized coordinates.
These are q-coordinates, not DOFs: a floating base contributes 7 root qs
(position + (w, x, y, z) quaternion) against 6 root DOFs, so n_qs and
n_dofs differ for a free-base entity. A welded (attached) child has no root
qs at all.
| PARAMETER | DESCRIPTION |
|---|---|
qs_idx_local
|
Local q indices to read. If None, reads the entity's own q range in dofs_name order (root qs first for a floating base). Defaults to None.
TYPE:
|
envs_idx
|
The indices of the environments. If None, all environments will be considered. Defaults to None.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
qpos
|
The entity's generalized coordinates. |
Source code in eden/entities/rigid.py
get_dofs_control_force
¶
Get the force the controller applied to the entity's dofs over the last physics step.
This is the actuator/PD contribution only, already clipped to the force range —
use :meth:get_dofs_force for the total internal force. A target set since that step
shows in the force of the next one.
| PARAMETER | DESCRIPTION |
|---|---|
dofs_idx_local
|
Local DOF indices. If None, all of the entity's dofs in dofs_name order. Defaults to None.
TYPE:
|
envs_idx
|
The indices of the environments. If None, all environments will be considered. Defaults to None.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
force
|
The control force on the entity's dofs. |
Source code in eden/entities/rigid.py
get_dofs_force
¶
Get the total internal force acting on the entity's dofs.
| PARAMETER | DESCRIPTION |
|---|---|
dofs_idx_local
|
Local DOF indices. If None, all of the entity's dofs in dofs_name order. Defaults to None.
TYPE:
|
envs_idx
|
The indices of the environments. If None, all environments will be considered. Defaults to None.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
force
|
The total force on the entity's dofs. |
Source code in eden/entities/rigid.py
get_dofs_vel
¶
Get the entity's dofs' velocity.
| PARAMETER | DESCRIPTION |
|---|---|
dofs_idx_local
|
Local DOF indices. If None, all of the entity's dofs in dofs_name order. Defaults to None.
TYPE:
|
envs_idx
|
The indices of the environments. If None, all environments will be considered. Defaults to None.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
velocity
|
The entity's dofs' velocity. |
Source code in eden/entities/rigid.py
get_dofs_pos
¶
Get the entity's dofs' position.
| PARAMETER | DESCRIPTION |
|---|---|
dofs_idx_local
|
Local DOF indices. If None, all of the entity's dofs in dofs_name order. Defaults to None.
TYPE:
|
envs_idx
|
The indices of the environments. If None, all environments will be considered. Defaults to None.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
position
|
The entity's dofs' position. |
Source code in eden/entities/rigid.py
get_dofs_kp
¶
Get the positional (proportional) gain of the entity's PD controllers.
| PARAMETER | DESCRIPTION |
|---|---|
dofs_idx_local
|
Local DOF indices. If None, all of the entity's dofs in dofs_name order. Defaults to None.
TYPE:
|
envs_idx
|
The environment indices (int / slice / index tensor / bool mask). If None, all environments will be considered. Defaults to None.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
kp
|
The positional gain of the entity's dofs. Carries the environment axis in either
TYPE:
|
Source code in eden/entities/rigid.py
get_dofs_kd
¶
Get the velocity (derivative) gain of the entity's PD controllers.
Genesis names this gain kv; Eden exposes it as kd throughout.
| PARAMETER | DESCRIPTION |
|---|---|
dofs_idx_local
|
Local DOF indices. If None, all of the entity's dofs in dofs_name order. Defaults to None.
TYPE:
|
envs_idx
|
The environment indices (int / slice / index tensor / bool mask). If None, all environments will be considered. Defaults to None.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
kd
|
The velocity gain of the entity's dofs. Carries the environment axis in either
TYPE:
|
Source code in eden/entities/rigid.py
get_dofs_force_range
¶
get_dofs_force_range(dofs_idx_local=None, envs_idx=None) -> tuple[Tensor, Tensor]
Get the force range (min and max limits) for the entity's dofs.
| PARAMETER | DESCRIPTION |
|---|---|
dofs_idx_local
|
Local DOF indices. If None, all of the entity's dofs in dofs_name order. Defaults to None.
TYPE:
|
envs_idx
|
The environment indices (int / slice / index tensor / bool mask). If None, all environments will be considered. Defaults to None.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
lower_limit
|
The lower limit of the force range for the entity's dofs.
TYPE:
|
upper_limit
|
The upper limit of the force range for the entity's dofs.
TYPE:
|
Source code in eden/entities/rigid.py
get_dofs_limit
¶
Get the positional limits of the entity's dofs.
Returns the two bounds as a tuple of tensors, not one stacked tensor —
unpack it as lower, upper = entity.get_dofs_limit(). Unlimited dofs report
-inf / +inf. Both tensors carry the environment axis.
| PARAMETER | DESCRIPTION |
|---|---|
dofs_idx_local
|
Local DOF indices. If None, all of the entity's dofs in dofs_name order. Defaults to None.
TYPE:
|
envs_idx
|
The environment indices (int / slice / index tensor / bool mask). If None, all environments will be considered. Defaults to None.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
lower_limit
|
The lower positional limit of the entity's dofs.
TYPE:
|
upper_limit
|
The upper positional limit of the entity's dofs.
TYPE:
|
Source code in eden/entities/rigid.py
get_qpos_limit
¶
Get the positional limits of the entity's generalized coordinates, in :meth:get_qpos order.
A hinge / slide coordinate takes its DOF's limit and a free joint's position its translational
DOFs'. A free or ball joint's (w, x, y, z) quaternion takes the unit bounds [-1, 1], since
it is normalized rather than limited. The limits are read off the solver, so each environment
reports those of the heterogeneous variant it carries.
| PARAMETER | DESCRIPTION |
|---|---|
envs_idx
|
The environment indices. If None, all environments will be considered. Defaults to None.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
lower_limit
|
The lower positional limit of the entity's generalized coordinates.
TYPE:
|
upper_limit
|
The upper positional limit of the entity's generalized coordinates.
TYPE:
|
Source code in eden/entities/rigid.py
get_dofs_stiffness
¶
Get the joint-spring stiffness of the entity's dofs.
| PARAMETER | DESCRIPTION |
|---|---|
dofs_idx_local
|
Local DOF indices. If None, all of the entity's dofs in dofs_name order. Defaults to None.
TYPE:
|
envs_idx
|
The environment indices (int / slice / index tensor / bool mask). If None, all environments will be considered. Defaults to None.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
stiffness
|
The spring stiffness of the entity's dofs. Carries the environment axis in either
TYPE:
|
Source code in eden/entities/rigid.py
get_dofs_invweight
¶
Get the inverse effective inertia (invweight) of the entity's dofs.
| PARAMETER | DESCRIPTION |
|---|---|
dofs_idx_local
|
Local DOF indices. If None, all of the entity's dofs in dofs_name order. Defaults to None.
TYPE:
|
envs_idx
|
The environment indices (int / slice / index tensor / bool mask). If None, all environments will be considered. Defaults to None.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
invweight
|
The inverse effective inertia of the entity's dofs. Carries the environment axis in either
TYPE:
|
Source code in eden/entities/rigid.py
get_dofs_armature
¶
Get the armature (added rotor inertia) of the entity's dofs.
For an actuated entity under EnvOptions.integrator="euler" this is not the configured
value: post_build folds kd * substep_dt into the armature for implicit-damping
stability. Under approximate_implicitfast (the default) and implicitfast it is.
| PARAMETER | DESCRIPTION |
|---|---|
dofs_idx_local
|
Local DOF indices. If None, all of the entity's dofs in dofs_name order. Defaults to None.
TYPE:
|
envs_idx
|
The environment indices (int / slice / index tensor / bool mask). If None, all environments will be considered. Defaults to None.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
armature
|
The armature of the entity's dofs. Carries the environment axis in either
TYPE:
|
Source code in eden/entities/rigid.py
get_dofs_damping
¶
Get the viscous damping of the entity's dofs.
| PARAMETER | DESCRIPTION |
|---|---|
dofs_idx_local
|
Local DOF indices. If None, all of the entity's dofs in dofs_name order. Defaults to None.
TYPE:
|
envs_idx
|
The environment indices (int / slice / index tensor / bool mask). If None, all environments will be considered. Defaults to None.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
damping
|
The damping of the entity's dofs. Carries the environment axis in either
TYPE:
|
Source code in eden/entities/rigid.py
get_dofs_frictionloss
¶
Get the dry-friction loss (stick band) of the entity's dofs.
| PARAMETER | DESCRIPTION |
|---|---|
dofs_idx_local
|
Local DOF indices. If None, all of the entity's dofs in dofs_name order. Defaults to None.
TYPE:
|
envs_idx
|
The environment indices (int / slice / index tensor / bool mask). If None, all environments will be considered. Defaults to None.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
frictionloss
|
The dry-friction loss of the entity's dofs. Carries the environment axis in either
TYPE:
|
Source code in eden/entities/rigid.py
get_mass_mat
¶
get_pos
¶
get_pos(envs_idx=None, *, relative: bool = False)
Return the position of the entity's base link.
| PARAMETER | DESCRIPTION |
|---|---|
envs_idx
|
The environment indices. If None, all environments are considered. Defaults to None.
TYPE:
|
relative
|
Whether to report the Genesis user-frame position with the morph pose offset and inertial alignment stripped. Defaults to False, which returns the solver/world-frame position.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
pos
|
The base-link position.
TYPE:
|
Source code in eden/entities/rigid.py
get_quat
¶
get_quat(envs_idx=None, *, relative: bool = False)
Return the quaternion of the entity's base link.
| PARAMETER | DESCRIPTION |
|---|---|
envs_idx
|
The environment indices. If None, all environments are considered. Defaults to None.
TYPE:
|
relative
|
Whether to report the Genesis user-frame orientation with the morph pose offset and inertial alignment stripped. Defaults to False, which returns the solver/world-frame orientation.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
quat
|
The base-link quaternion in
TYPE:
|
Source code in eden/entities/rigid.py
get_T
¶
get_T(envs_idx=None, *, relative: bool = False)
Return the entity's base-link pose as a 4x4 homogeneous transform matrix.
| PARAMETER | DESCRIPTION |
|---|---|
envs_idx
|
The indices of the environments. If None, all environments are considered. Defaults to None.
TYPE:
|
relative
|
Whether to use Genesis's user-frame pose with the morph pose offset and inertial alignment stripped. Defaults to False, which returns the solver/world-frame transform.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
transform
|
The base-link homogeneous transform.
TYPE:
|
Source code in eden/entities/rigid.py
get_links_pos
¶
get_links_pos(ls_idx_local=None, envs_idx=None, *, ref='link_origin', relative: bool = False)
Return the positions of the entity's links.
| PARAMETER | DESCRIPTION |
|---|---|
ls_idx_local
|
The local link indices. If None, all links are considered. Defaults to None.
TYPE:
|
envs_idx
|
The environment indices. If None, all environments are considered. Defaults to None.
TYPE:
|
ref
|
Point on each link whose position is reported: the link frame origin, or the link's center of mass. Defaults to "link_origin".
TYPE:
|
relative
|
Whether to report Genesis user-frame positions with the morph pose offset stripped. Defaults to False,
which returns solver/world-frame positions. Only affects
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
pos
|
The link positions.
TYPE:
|
Source code in eden/entities/rigid.py
get_links_quat
¶
get_links_quat(ls_idx_local=None, envs_idx=None, *, relative: bool = False)
Return the orientations of the entity's links.
| PARAMETER | DESCRIPTION |
|---|---|
ls_idx_local
|
The local link indices. If None, all links are considered. Defaults to None.
TYPE:
|
envs_idx
|
The environment indices. If None, all environments are considered. Defaults to None.
TYPE:
|
relative
|
Whether to report Genesis user-frame orientations with the morph pose offset stripped. Defaults to False, which returns solver/world-frame orientations.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
quat
|
The link quaternions in
TYPE:
|
Source code in eden/entities/rigid.py
get_links_vel
¶
get_links_vel(ls_idx_local=None, envs_idx=None, *, ref='link_origin', relative: bool = False)
Return the linear velocities of the entity's links, in world coordinates.
| PARAMETER | DESCRIPTION |
|---|---|
ls_idx_local
|
The local link indices. If None, all links are considered. Defaults to None.
TYPE:
|
envs_idx
|
The environment indices. If None, all environments are considered. Defaults to None.
TYPE:
|
ref
|
Point on each link at which the velocity is expressed. A rotating link gives different answers at its origin and its center of mass. Defaults to "link_origin".
TYPE:
|
relative
|
Whether to report the velocity of the Genesis user-frame link origin, with the morph pose offset and
inertial alignment stripped. Defaults to False, which returns the velocity of the solver/world-frame
origin :meth:
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
vel
|
The link linear velocities.
TYPE:
|
Source code in eden/entities/rigid.py
get_links_ang
¶
Return the angular velocities of the entity's links, in world coordinates.
| PARAMETER | DESCRIPTION |
|---|---|
ls_idx_local
|
The local link indices. If None, all links are considered. Defaults to None.
TYPE:
|
envs_idx
|
The environment indices. If None, all environments are considered. Defaults to None.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
ang
|
The link angular velocities, as rotation vectors in rad/s.
TYPE:
|
Source code in eden/entities/rigid.py
get_links_acc
¶
get_links_acc(ls_idx_local=None, envs_idx=None, *, relative: bool = False)
Return the linear accelerations of the entity's link origins, in world coordinates.
| PARAMETER | DESCRIPTION |
|---|---|
ls_idx_local
|
The local link indices. If None, all links are considered. Defaults to None.
TYPE:
|
envs_idx
|
The environment indices. If None, all environments are considered. Defaults to None.
TYPE:
|
relative
|
Whether to report the acceleration of the Genesis user-frame link origin, with the morph pose offset and
inertial alignment stripped. Defaults to False, which returns the acceleration of the solver/world-frame
origin :meth:
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
acc
|
The link linear accelerations.
TYPE:
|
Source code in eden/entities/rigid.py
get_links_acc_ang
¶
Return the angular accelerations of the entity's links, in world coordinates.
| PARAMETER | DESCRIPTION |
|---|---|
ls_idx_local
|
The local link indices. If None, all links are considered. Defaults to None.
TYPE:
|
envs_idx
|
The environment indices. If None, all environments are considered. Defaults to None.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
acc_ang
|
The link angular accelerations, in rad/s^2.
TYPE:
|
Source code in eden/entities/rigid.py
get_links_inertial_mass
¶
Return the per-link mass the solver currently uses.
This is each link's own mass — unrelated to :meth:get_mass, which returns the
entity's total mass. Genesis holds a single per-link mass channel, so
mass-randomization events write here too: :meth:set_mass_shift moves this value,
and the pre-randomization nominal is what :meth:get_mass_shift subtracts.
The leading environment dimension is always present, and envs_idx always
works. Genesis, underneath, stores link info unbatched unless
EnvOptions.batch_links_info is set and then refuses envs_idx outright; in
that mode every environment shares the one stored value, so broadcasting it is
exact and callers get the same shape either way — the one the per-link DR readback
getters (:meth:get_mass_shift and friends) return.
| PARAMETER | DESCRIPTION |
|---|---|
ls_idx_local
|
The local link indices. If None, all links are considered. Defaults to None.
TYPE:
|
envs_idx
|
The environment indices (int / slice / index tensor / bool mask). If None, all environments are considered. Defaults to None.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
inertial_mass
|
The mass of each requested link, in kg. Always a copy, never a live view into the solver.
TYPE:
|
Source code in eden/entities/rigid.py
get_links_invweight
¶
Return the inverse effective inertia (invweight) of the entity's links.
Two numbers per link — translational and rotational — giving the acceleration
response of the link to a unit force / torque applied at its center of mass with
the rest of the articulated body attached. Genesis derives them from link masses,
poses, inertia matrices, joint placements and DOF armatures, so they are read-only:
the per-link counterpart of :meth:get_dofs_invweight.
Carries a leading environment dimension and accepts envs_idx in either
EnvOptions.batch_links_info mode — see :meth:get_links_inertial_mass for why.
| PARAMETER | DESCRIPTION |
|---|---|
ls_idx_local
|
The local link indices. If None, all links are considered. Defaults to None.
TYPE:
|
envs_idx
|
The environment indices (int / slice / index tensor / bool mask). If None, all environments are considered. Defaults to None.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
invweight
|
The translational and rotational inverse effective inertia of each requested link. Always a copy, never a live view into the solver.
TYPE:
|
Source code in eden/entities/rigid.py
get_links_net_contact_force
¶
Return the net contact force on each of the entity's links, in world coordinates.
Covers direct external contacts only — constraint and actuator forces are not
included. Values come from the most recent scene.step(). Unlike the other
link accessors this one takes no indices: it always returns every link, for
every environment.
| RETURNS | DESCRIPTION |
|---|---|
force
|
The net contact force on each link, in N.
TYPE:
|
Source code in eden/entities/rigid.py
get_contacts
¶
get_contacts(with_entity: Entity | None = None, exclude_self_contact: bool = False, *, is_padded: bool = False)
Return contact information computed during the most recent scene.step().
If with_entity is provided, only returns contact information involving the caller and the specified entity.
Otherwise, returns all contact information involving the caller entity.
When with_entity is self, it will return the self-collision only.
The returned dict contains the following keys (a contact pair consists of two geoms: A and B):
- 'geom_a' : The global geom index of geom A in the contact pair. (actual geom object can be obtained by scene.rigid_solver.geoms[geom_a])
- 'geom_b' : The global geom index of geom B in the contact pair. (actual geom object can be obtained by scene.rigid_solver.geoms[geom_b])
- 'link_a' : The global link index of link A (that contains geom A) in the contact pair. (actual link object can be obtained by scene.rigid_solver.links[link_a])
- 'link_b' : The global link index of link B (that contains geom B) in the contact pair. (actual link object can be obtained by scene.rigid_solver.links[link_b])
- 'position' : The contact position in world frame.
- 'force_a' : The contact force applied to geom A.
- 'force_b' : The contact force applied to geom B.
- 'valid_mask' : A boolean mask indicating whether the contact information is valid. (Only when scene is parallelized)
The shape of each entry is (n_envs, n_contacts, ...) for scene with parallel envs and (n_contacts, ...) for non-parallelized scene.
| PARAMETER | DESCRIPTION |
|---|---|
with_entity
|
The entity to check contact with. Defaults to None.
TYPE:
|
exclude_self_contact
|
Exclude the self collision from the returning contacts. Defaults to False.
TYPE:
|
is_padded
|
Return every contact slot of each env, invalid ones masked out by
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
contact_info
|
The contact information.
TYPE:
|
Source code in eden/entities/rigid.py
get_grouped_contacts
¶
get_grouped_contacts(other_entity: 'RigidEntity', *, links_a_idx_local: Tensor | list[int] | None = None, links_b_idx_local: Tensor | list[int] | None = None) -> dict[str, Tensor]
Force-weighted contact aggregation per (self link, other link) pair.
Layered on top of :meth:get_contacts: per (link_a, link_b) pair,
compute the contact-force-norm-weighted mean of contact positions
across every contact between this entity (self) and
other_entity in the most recent scene.step().
The output canonicalises orientation: axis 1 always indexes
self's links and axis 2 always indexes other_entity's
links, regardless of which side Genesis happened to label "a" or
"b" for any given contact.
Port of dexmachina/envs/contacts.get_grouped_contact_pos.
| PARAMETER | DESCRIPTION |
|---|---|
other_entity
|
The contact partner. Must be a different entity (
TYPE:
|
links_a_idx_local
|
Local link indices on |
links_b_idx_local
|
Local link indices on |
| RETURNS | DESCRIPTION |
|---|---|
dict with:
|
|
- ``position`` : ``(num_envs, n_a, n_b, 3)`` — contact-force-norm
|
weighted mean position in world frame; zero where |
- ``valid`` : ``(num_envs, n_a, n_b)`` bool — True iff the pair's
|
aggregate force-norm is strictly positive ( |
- ``force_norm_sum`` : ``(num_envs, n_a, n_b)`` — sum of contact
|
force magnitudes ( |
Notes
Requires a parallelised scene (num_envs >= 1); the
non-parallelised path is not implemented since the only consumers
— RL reward / observation terms — always run parallelised.
Source code in eden/entities/rigid.py
2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 | |
detect_collision
¶
set_pos
¶
set_pos(pos, envs_idx=None, *, relative: bool = False) -> None
Set the position of the entity's base link.
| PARAMETER | DESCRIPTION |
|---|---|
pos
|
The position to set.
TYPE:
|
envs_idx
|
The environment indices. If None, all environments are considered. Defaults to None.
TYPE:
|
relative
|
Whether
TYPE:
|
Source code in eden/entities/rigid.py
set_quat
¶
set_quat(quat, envs_idx=None, *, relative: bool = True) -> None
Set the entity's orientation.
| PARAMETER | DESCRIPTION |
|---|---|
quat
|
The orientation to set in
TYPE:
|
envs_idx
|
The indices of the environments. If None, all environments are considered. Defaults to None.
TYPE:
|
relative
|
If True,
TYPE:
|
Source code in eden/entities/rigid.py
set_qpos
¶
Teleport the entity by setting its generalized coordinates.
| PARAMETER | DESCRIPTION |
|---|---|
qpos
|
The generalized coordinates to write, ordered to match |
qs_idx_local
|
Local q indices to write. If None, writes the entity's own q range in dofs_name order (root qs first for a floating base). Defaults to None.
TYPE:
|
envs_idx
|
The indices of the environments. If None, all environments will be considered. Defaults to None.
TYPE:
|
zero_velocity
|
Whether to zero the entity's velocities after the write, so the teleport does not leave stale momentum behind. Defaults to True.
TYPE:
|
skip_forward
|
Whether to skip the forward-kinematics pass that refreshes link poses. Set True only when a later setter in the same reset will trigger it anyway. Defaults to False.
TYPE:
|
Source code in eden/entities/rigid.py
set_friction
¶
set_friction(friction: float) -> None
Set the friction coefficient for all of the entity's geoms.
The friction coefficient must be in range [1e-2, 5.0] for simulation stability.
| PARAMETER | DESCRIPTION |
|---|---|
friction
|
The friction coefficient to set for all the entity's links.
TYPE:
|
Source code in eden/entities/rigid.py
set_friction_ratio
¶
Set per-link friction ratio (Genesis).
| PARAMETER | DESCRIPTION |
|---|---|
friction_ratio
|
Follows the Genesis contract — shaped
TYPE:
|
ls_idx_local
|
Local link indices whose geoms receive the ratio.
TYPE:
|
envs_idx
|
Environments to write;
TYPE:
|
Source code in eden/entities/rigid.py
links_with_anchored_inertials
¶
Names of the selected links whose quantity Genesis refuses to write after build.
Genesis anchors the frame of an aligned free body (EntityOptions.align, on by default
for one free rigid body with nothing articulated under it, and always for a primitive) on the
centre of mass and principal axes of all its links, and then rejects a runtime write that
would move the anchor: any COM write, and a mass write unless the body is that one link.
Mirrors the guard in genesis' RigidSolver._set_links_info so a randomization event can
refuse at build() rather than on its first write. That guard also skips a link index held
on a GPU outside gs.debug (reading it back would stall the device), which is how Eden's
events pass it, so on GPU the unsupported write would otherwise go through unchecked.
| PARAMETER | DESCRIPTION |
|---|---|
ls_idx_local
|
Local link indices the caller will write.
TYPE:
|
quantity
|
Which inertial property will be written.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
list[str]
|
The offending link names, in |
Source code in eden/entities/rigid.py
set_mass_shift
¶
Set per-link mass shift, in kg, relative to the nominal (unrandomized) mass.
The resulting mass (nominal + mass_shift) must stay strictly positive — neither
Eden nor Genesis checks it here, since a device-side check would synchronize every
write. The mass-randomization event terms validate their ranges at build().
A link fixed to the world (links[i].is_fixed: every joint from it to the root is
fixed, as on a fixed-base arm's base link, a mounted hand's palm or a fixed=True
prop) is written like any other, whatever form ls_idx_local takes, and
:meth:get_mass_shift reads the value back — but the solver never reads that link's
mass, so the shift changes no dynamics. The mass-randomization event terms reject such
a link at build().
| PARAMETER | DESCRIPTION |
|---|---|
mass_shift
|
Shaped
TYPE:
|
ls_idx_local
|
Local link indices to shift.
TYPE:
|
envs_idx
|
Environments to write;
TYPE:
|
Source code in eden/entities/rigid.py
set_COM_shift
¶
Set per-link COM shift, in meters in the link frame, relative to the nominal COM.
As with :meth:set_mass_shift, a link fixed to the world is written and reads back, but
its COM changes no dynamics; :class:~eden.managers.terms.events.domain_rand.RandomizeComShift
rejects such a link at build().
| PARAMETER | DESCRIPTION |
|---|---|
com_shift
|
Shaped
TYPE:
|
ls_idx_local
|
Local link indices to shift.
TYPE:
|
envs_idx
|
Environments to write;
TYPE:
|
Source code in eden/entities/rigid.py
get_mass_shift
¶
Per-env link mass shift (kg) vs the nominal (unrandomized) mass; 0 if none.
Reads the live Genesis solver value and subtracts the nominal, so the result always reflects the randomization currently in effect.
| PARAMETER | DESCRIPTION |
|---|---|
ls_idx_local
|
Local link indices to read;
TYPE:
|
envs_idx
|
Environments to read (int / slice / index tensor / bool mask);
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
Tensor
|
Copy shaped |
Source code in eden/entities/rigid.py
get_friction_ratio
¶
Per-env link friction ratio applied by friction-randomization events; 1.0 if none.
Reads the live Genesis solver state (per link, via the link's first geom).
| PARAMETER | DESCRIPTION |
|---|---|
ls_idx_local
|
Local link indices to read;
TYPE:
|
envs_idx
|
Environments to read (int / slice / index tensor / bool mask);
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
Tensor
|
Copy shaped |
Source code in eden/entities/rigid.py
get_COM_shift
¶
Per-env link COM shift (m, link frame) vs the nominal (unrandomized) COM; 0 if none.
Reads the live Genesis solver value and subtracts the nominal, so the result always reflects the randomization currently in effect.
| PARAMETER | DESCRIPTION |
|---|---|
ls_idx_local
|
Local link indices to read;
TYPE:
|
envs_idx
|
Environments to read (int / slice / index tensor / bool mask);
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
Tensor
|
Copy shaped |
Source code in eden/entities/rigid.py
set_dofs_force_range
¶
Set the force range (the drive's saturation cap) of the entity's dofs.
| PARAMETER | DESCRIPTION |
|---|---|
lower
|
The lower force limit, ordered to match
TYPE:
|
upper
|
The upper force limit, ordered to match
TYPE:
|
dofs_idx_local
|
Local DOF indices. If None, all of the entity's dofs in dofs_name order. Defaults to None.
TYPE:
|
envs_idx
|
The indices of the environments. If None, all environments will be considered. Defaults to None.
TYPE:
|
Source code in eden/entities/rigid.py
set_dofs_stiffness
¶
Set the joint-spring stiffness of the entity's dofs.
| PARAMETER | DESCRIPTION |
|---|---|
stiffness
|
The spring stiffness, ordered to match
TYPE:
|
dofs_idx_local
|
Local DOF indices. If None, all of the entity's dofs in dofs_name order. Defaults to None.
TYPE:
|
envs_idx
|
The indices of the environments. If None, all environments will be considered. Defaults to None.
TYPE:
|
Source code in eden/entities/rigid.py
set_dofs_armature
¶
Set the armature (added rotor inertia) of the entity's dofs.
Under EnvOptions.integrator="euler", post_build already folded kd * substep_dt
into the armature of actuated entities; overwriting it here discards that implicit-damping
term. Under the implicit integrators there is no fold to lose.
| PARAMETER | DESCRIPTION |
|---|---|
armature
|
The armature, ordered to match
TYPE:
|
dofs_idx_local
|
Local DOF indices. If None, all of the entity's dofs in dofs_name order. Defaults to None.
TYPE:
|
envs_idx
|
The indices of the environments. If None, all environments will be considered. Defaults to None.
TYPE:
|
Source code in eden/entities/rigid.py
set_dofs_damping
¶
Set the viscous damping of the entity's dofs.
| PARAMETER | DESCRIPTION |
|---|---|
damping
|
The damping, ordered to match
TYPE:
|
dofs_idx_local
|
Local DOF indices. If None, all of the entity's dofs in dofs_name order. Defaults to None.
TYPE:
|
envs_idx
|
The indices of the environments. If None, all environments will be considered. Defaults to None.
TYPE:
|
Source code in eden/entities/rigid.py
set_dofs_kp
¶
Set the positional (proportional) gain of the entity's PD controllers.
| PARAMETER | DESCRIPTION |
|---|---|
kp
|
The positional gain, ordered to match
TYPE:
|
dofs_idx_local
|
Local DOF indices. If None, all of the entity's dofs in dofs_name order. Defaults to None.
TYPE:
|
envs_idx
|
The indices of the environments. If None, all environments will be considered. Defaults to None.
TYPE:
|
Source code in eden/entities/rigid.py
set_dofs_kd
¶
Set the velocity (derivative) gain of the entity's PD controllers.
Genesis names this gain kv; Eden exposes it as kd throughout.
| PARAMETER | DESCRIPTION |
|---|---|
kd
|
The velocity gain, ordered to match
TYPE:
|
dofs_idx_local
|
Local DOF indices. If None, all of the entity's dofs in dofs_name order. Defaults to None.
TYPE:
|
envs_idx
|
The indices of the environments. If None, all environments will be considered. Defaults to None.
TYPE:
|
Source code in eden/entities/rigid.py
set_dofs_vel
¶
Set the entity's dofs' velocity.
| PARAMETER | DESCRIPTION |
|---|---|
velocity
|
The velocity to write, ordered to match
TYPE:
|
dofs_idx_local
|
Local DOF indices. If None, all of the entity's dofs in dofs_name order. Defaults to None.
TYPE:
|
envs_idx
|
The indices of the environments. If None, all environments will be considered. Defaults to None.
TYPE:
|
skip_forward
|
Whether to skip the forward pass that propagates the new velocities. Set True only when a later setter in the same reset will trigger it anyway. Defaults to False.
TYPE:
|
Source code in eden/entities/rigid.py
set_dofs_frictionloss
¶
Set the dry-friction loss (stick band) of the entity's dofs.
| PARAMETER | DESCRIPTION |
|---|---|
frictionloss
|
The dry-friction loss, ordered to match
TYPE:
|
dofs_idx_local
|
Local DOF indices. If None, all of the entity's dofs in dofs_name order. Defaults to None.
TYPE:
|
envs_idx
|
The indices of the environments. If None, all environments will be considered. Defaults to None.
TYPE:
|
Source code in eden/entities/rigid.py
set_dofs_pos
¶
Teleport the entity's dofs to a position.
This writes state directly. To command a PD target instead, use
:meth:control_dofs_pos.
| PARAMETER | DESCRIPTION |
|---|---|
position
|
The positions to write, ordered to match
TYPE:
|
dofs_idx_local
|
Local DOF indices. If None, all of the entity's dofs in dofs_name order. Defaults to None.
TYPE:
|
envs_idx
|
The indices of the environments. If None, all environments will be considered. Defaults to None.
TYPE:
|
zero_velocity
|
Whether to zero the entity's velocities after the write, so the teleport does not leave stale momentum behind. Defaults to True.
TYPE:
|
Notes
Hinge and slide DOFs are written as their coordinates, qpos0 + position, through
set_qpos (which takes a bool mask without a GPU->CPU sync); a selection that reaches a
free or ball joint's DOFs goes through Genesis set_dofs_position. Either way the entity's
DOF positions read back as position.
Source code in eden/entities/rigid.py
control_dofs_force
¶
Command a feed-forward force on the entity's dofs for the next step.
Bypasses the PD controller: the commanded force is applied directly, still clipped to the force range. The command persists until it is overwritten.
| PARAMETER | DESCRIPTION |
|---|---|
force
|
The force to command, ordered to match
TYPE:
|
dofs_idx_local
|
Local DOF indices. If None, all of the entity's dofs in dofs_name order. A
:class:
TYPE:
|
envs_idx
|
The indices of the environments. If None, all environments will be considered. Defaults to None.
TYPE:
|
Source code in eden/entities/rigid.py
control_dofs_vel
¶
Command a velocity target for the entity's PD controllers.
Sets a target, not state — the solver drives toward it through the kd gain,
clipped to the force range. Use :meth:set_dofs_vel to write velocity directly.
| PARAMETER | DESCRIPTION |
|---|---|
velocity
|
The velocity target, ordered to match
TYPE:
|
dofs_idx_local
|
Local DOF indices. If None, all of the entity's dofs in dofs_name order. A
:class:
TYPE:
|
envs_idx
|
The indices of the environments. If None, all environments will be considered. Defaults to None.
TYPE:
|
Source code in eden/entities/rigid.py
control_dofs_pos
¶
Command a position target for the entity's PD controllers.
Sets a target, not state — the solver drives toward it through the kp/kd
gains, clipped to the force range. Use :meth:set_dofs_pos to teleport instead.
This is the setter behind the joint-position action terms.
| PARAMETER | DESCRIPTION |
|---|---|
position
|
The position target, ordered to match
TYPE:
|
dofs_idx_local
|
Local DOF indices. If None, all of the entity's dofs in dofs_name order. A
:class:
TYPE:
|
envs_idx
|
The indices of the environments. If None, all environments will be considered. Defaults to None.
TYPE:
|
Source code in eden/entities/rigid.py
zero_all_dofs_velocity
¶
zero_all_dofs_velocity(envs_idx=None, *, skip_forward: bool = False) -> None
Zero the velocity of every one of the entity's dofs, including a floating base.
| PARAMETER | DESCRIPTION |
|---|---|
envs_idx
|
The indices of the environments. If None, all environments will be considered. Defaults to None.
TYPE:
|
skip_forward
|
Skip the forward-kinematics pass. Only when a later write to the same envs runs one (for example a
TYPE:
|
Source code in eden/entities/rigid.py
place_on_to
¶
place_on_to(entity: RigidEntity, sampler: Callable, envs_idx: slice | Tensor | None = None)
Place this entity onto the support surface of another entity.
| PARAMETER | DESCRIPTION |
|---|---|
entity
|
the entity on which this object will be placed
TYPE:
|
sampler
|
the sampler to use for location sampling
TYPE:
|
envs_idx
|
The indices of the environments. If None, all environments will be considered. Defaults to None.
TYPE:
|
Source code in eden/entities/rigid.py
3800 3801 3802 3803 3804 3805 3806 3807 3808 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824 3825 3826 3827 3828 3829 3830 3831 3832 3833 3834 3835 3836 3837 3838 3839 3840 3841 3842 3843 3844 3845 3846 3847 3848 3849 3850 3851 3852 3853 3854 3855 3856 3857 3858 3859 3860 3861 3862 3863 3864 3865 3866 3867 3868 3869 3870 3871 3872 3873 3874 3875 3876 3877 3878 3879 3880 3881 3882 3883 3884 3885 3886 3887 3888 3889 3890 3891 3892 3893 3894 | |
Rigid (articulated/actuated) entity wrapper with DOF, IK, and contact helpers.
DOF-ordering gotcha: set_qpos / get_dofs_limit / get_jacobian all use
dofs_name order (the configured dofs_name list, a pattern expanding in Genesis' joint
order; not the asset's declaration order), whereas find_named_dofs_idx_local
returns indices in Genesis kinematic-tree order (breadth-first in genesis 1.1.x,
depth-first in 1.2.0) — use the latter for Genesis-level API calls, not for indexing
into get_jacobian columns or the default_dofs_* property tensors. get_jacobian
already reorders its columns Genesis->dofs_name, so no manual reordering is needed. find_named_dofs
resolves names into both spaces at once, and get_default_dofs_* reads the property tensors by name
(eden.entities.dofs_default_mixin).
For actuated entities under the explicit Euler integrator, post_build adds
kd * substep_dt to the armature for numerical stability, so the effective armature
differs from the configured value. Genesis' default approximate_implicitfast and MuJoCo's
implicitfast both integrate the PD controller's damping implicitly and get no bump —
_needs_explicit_damping_armature is the gate. Read get_dofs_armature for what the
solver actually holds. "The PD controller" is Genesis' own (position/velocity control): a
torque-mode action term (control_dofs_force) computes its damping in Python, which is
explicit under every integrator.
Attributes¶
LINK_REF_FRAMES
module-attribute
¶
LINK_REF_FRAMES: dict[str, link_ref_frame] = {'link_origin': gs.link_ref_frame.link_origin, 'link_com': gs.link_ref_frame.link_COM}
Classes¶
StagedStateWrite
¶
Several rigid entities' state writes on one envs_idx, applied as one Genesis call per kind.
Why. Every Genesis state setter resets the selected envs' collider and constraint state and, unless told to skip it, runs forward kinematics over every link of those envs, whichever entity it wrote. N entities written one by one pay N of each where one would do.
What. set_dofs_pos / set_dofs_vel / set_qpos stand in for the
:class:RigidEntity setters of the same names: each only records its entity's values, and
:meth:apply writes them all. The values mean what they mean to those setters (set_dofs_pos
writes a DOF's state as Genesis holds it, set_qpos the coordinate itself), but nothing here zeroes a
velocity on the side: stage the zeros where the entity setter's zero_velocity=True would. A free
or ball joint's rotation DOFs are Euler angles, so set_dofs_pos takes all three of them or none.
Order. :meth:apply writes per solver (a kinematic-material entity lives in its own):
- velocities,
skip_forward=True, so the forward pass after them sees the fresh ones; - positions, as one qpos write and its forward pass. A staged DOF position becomes the qpos
Genesis
set_dofs_positionwould make of it (qpos0 + valuefor a hinge or slide, the quaternion of a free or ball joint's Euler angles), placed before the staged qpos, so a qpos staged on the same coordinate wins.
Nothing goes through Genesis set_dofs_position. That setter re-derives every entity's qpos in
the selected envs from its DOF state, which holds a free joint's orientation as Euler angles, so a
quaternion written earlier, by this write or by any before it, would come back as -q. Here only
the joints a set_dofs_pos names are converted.
Envs. envs_idx is int env ids or the bool mask they come from; a staged value has one row
per selected env, in ascending env order for a mask — or, with a mask, every env's row, the mask
picking which are written (stage every value of the write that way, then). A mask is what Genesis'
setters take on the device (masked_scatter_, or torch.where for every env's row): handed ids
they would write their error flag through them, a GPU->CPU sync per setter. Every env's row
needs no nonzero() at all, so a write that may select no env can run unconditionally (the
motion-end resync); where Genesis cannot take the rows on the device (hibernation, an index tensor
selection) the selected ones are gathered here.
Indices are entity-local and on the host (a range or ints), since they are read in Python on
every call: resolve them once, in build(). An index staged twice keeps the later value.
Source code in eden/entities/rigid.py
Methods:¶
check_dofs_pos
staticmethod
¶
check_dofs_pos(entity: RigidEntity, dofs_idx_local) -> None
Raise what :meth:set_dofs_pos would raise for dofs_idx_local; call it in build().
set_dofs_pos
¶
set_dofs_pos(entity: RigidEntity, position: Tensor, dofs_idx_local) -> None
Stage :meth:RigidEntity.set_dofs_pos (zero_velocity=False) for entity.
Source code in eden/entities/rigid.py
set_dofs_vel
¶
set_dofs_vel(entity: RigidEntity, velocity: Tensor, dofs_idx_local) -> None
Stage :meth:RigidEntity.set_dofs_vel for entity; :meth:apply skips its forward pass.
Source code in eden/entities/rigid.py
set_qpos
¶
set_qpos(entity: RigidEntity, qpos: Tensor, qs_idx_local) -> None
Stage :meth:RigidEntity.set_qpos (zero_velocity=False) for entity.
Source code in eden/entities/rigid.py
apply
¶
Write everything staged to envs_idx (int env ids or a bool mask), in the class docstring's order.
Empties the stage.
Source code in eden/entities/rigid.py
Functions:¶
resolve_link_ref_frame
¶
resolve_link_ref_frame(ref: str | link_ref_frame) -> link_ref_frame
Resolve a reference-frame name (or an already-resolved member) to gs.link_ref_frame.
| PARAMETER | DESCRIPTION |
|---|---|
ref
|
One of
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
link_ref_frame
|
The resolved enum member. |
Source code in eden/entities/rigid.py
Named DOF access¶
find_named_dofs(names) returns a DofSelection: hand its .columns to tensors indexed in the entity's
configured DOF order and its .dofs_idx_local to Genesis calls.
Name-based access to a rigid entity's DOFs and its configured per-DOF properties.
Two index spaces address an entity's DOFs, and only one of them indexes the property tensors:
- column — position in the entity's
dofs_name. The configured property tensors (default_dofs_pos,default_dofs_kp,soft_dofs_pos_limits, …) are laid out this way, and so is every full-widthget_dofs_*()read. - local — Genesis' DOF index within the entity: what
find_named_dofs_idx_localreturns and what everydofs_idx_local=argument takes. A floating base offsets it by six, an uncontrolled joint shifts it, and the kinematic tree can permute it. A local index used as a column therefore reads another joint's value, or, once it passes the last column, out of bounds (an asynchronous CUDA assert, far from the call site).
:meth:DofDefaultsMixin.find_named_dofs resolves names into both spaces at once, as a :class:DofSelection
whose fields say which space they belong to, and the get_default_dofs_* getters read the property
tensors by name — so no bare index from either space passes through the caller's hands.
Classes¶
DofSelection
dataclass
¶
Some of an entity's controlled DOFs, resolved into both index spaces at once.
Made by :meth:DofDefaultsMixin.find_named_dofs, in build(), and kept. The three fields list the
same DOFs in the same order, one entry per DOF (a ball joint's name repeats once per DOF):
.. code-block:: python
dofs = robot.find_named_dofs([".*_knee_joint"]) # in build()
robot.soft_dofs_pos_limits[:, dofs.columns] # a property tensor: columns
robot.get_dofs_pos(dofs_idx_local=dofs.dofs_idx_local) # a Genesis-level call: local indices
robot.get_default_dofs_kp(dofs) # a getter takes the selection itself
Both tensors live on the entity's device; len(dofs) is the number of DOFs.
| ATTRIBUTE | DESCRIPTION |
|---|---|
entity_name |
The entity it was resolved on; a getter refuses a selection from another one, whose columns would address that entity's layout.
TYPE:
|
names |
The joint each DOF belongs to. |
columns |
TYPE:
|
dofs_idx_local |
Genesis' local indices of the same DOFs. Pass it as
TYPE:
|
DofDefaultsMixin
¶
Name-based access to the controlled DOFs and the configured per-DOF property tensors.
:meth:find_named_dofs resolves names once, into a :class:DofSelection that carries the DOFs'
columns and local indices together. get_default_dofs_<property> (and
:meth:get_soft_dofs_pos_limits) is get_ plus the config field it reads. It takes names, or a
selection, where the get_dofs_* getters take dofs_idx_local, and the same envs_idx:
.. code-block:: python
robot.get_default_dofs_kp() # (num_envs, num_dofs), dofs_name order
robot.get_default_dofs_kp(["left_knee_joint"]) # (num_envs, 1)
robot.get_default_dofs_pos(envs_idx=[0]) # (1, num_dofs)
robot.get_default_dofs_pos_limits(".*_knee_joint") # (num_envs, 2, 2): lower, upper
The default_* value is what the entity was configured with, resolved at build; the
get_dofs_* getter beside it reads what the solver holds now. They differ wherever something
writes the solver afterwards: domain randomization, the explicit-integrator armature bump, a
deployment.
Selection. dofs_name takes names, globs or regexes (None for every DOF), matched
against the joints in the entity's dofs_name — the controlled ones, which are the only
joints that have a column. A free base or a passive joint is not one of them, and raises. A key
that is exactly a joint's name — any joint's, controlled or not — selects that joint literally,
metacharacters and all, so a passive pin.1 never selects a controlled pin_1. The result
follows the query's order, and a joint with several DOFs (a ball joint) selects all of them, in
order; name each joint once.
Shape. Always (n_envs, n_selected[, 2]), with envs_idx narrowing the env axis
exactly as it does for the get_dofs_* info getters. The stored tensors are not that
uniform: one row or one per env, depending on the property, whether the config set it,
EnvOptions.batch_dofs_info and whether the entity is heterogeneous; and the rows can differ
(a heterogeneous entity, RandomizeStartupDofsPosBias) — so a caller that read row 0 of
one was reading env 0 without saying so.
Ownership. Every read is a copy, never a view of the stored tensor.
Hot paths and writes. A getter allocates its (n_envs, n) copy on every call, so it is for
build(). To write into a property tensor, or to read one every step while keeping its stored
layout (one broadcast row stays one row), index it with a :meth:find_named_dofs selection's
columns.
The host class provides dofs_name (resolved: one entry per DOF), dofs_idx_local,
dofs_idx_map, find_named_dofs_idx_local, joints, device, is_built, name, the property
attributes, and _dof_defaults_num_envs.
Methods:¶
find_named_dofs
¶
find_named_dofs(dofs_name: str | Sequence[str] | None = None) -> DofSelection
Resolve names to a :class:DofSelection: the selected DOFs' columns and local indices.
One resolution feeds both, so the two always describe the same DOFs, in the same order.
Selection follows the class note: only the controlled joints (those in :attr:dofs_name) can
be selected, through the same simulator-side resolver find_named_dofs_idx_local uses, so a
query selects the same joints in both. Resolve in build(), not every step.
| PARAMETER | DESCRIPTION |
|---|---|
dofs_name
|
Names, globs or regexes of joints in :attr: |
| RETURNS | DESCRIPTION |
|---|---|
DofSelection
|
One name, column and local index per selected DOF. |
Source code in eden/entities/dofs_default_mixin.py
get_default_dofs_pos
¶
get_default_dofs_pos(dofs_name: str | Sequence[str] | DofSelection | None = None, envs_idx=None) -> Tensor
Configured default joint positions, (n_envs, n_dofs). See the class note.
Source code in eden/entities/dofs_default_mixin.py
get_default_dofs_vel
¶
get_default_dofs_vel(dofs_name: str | Sequence[str] | DofSelection | None = None, envs_idx=None) -> Tensor
Configured default joint velocities, (n_envs, n_dofs). See the class note.
Source code in eden/entities/dofs_default_mixin.py
get_default_dofs_kp
¶
get_default_dofs_kp(dofs_name: str | Sequence[str] | DofSelection | None = None, envs_idx=None) -> Tensor
Configured PD position gains, (n_envs, n_dofs); actuated entities only. See the class note.
Source code in eden/entities/dofs_default_mixin.py
get_default_dofs_kd
¶
get_default_dofs_kd(dofs_name: str | Sequence[str] | DofSelection | None = None, envs_idx=None) -> Tensor
Configured PD velocity gains, (n_envs, n_dofs); actuated entities only. See the class note.
Source code in eden/entities/dofs_default_mixin.py
get_default_dofs_stiffness
¶
get_default_dofs_stiffness(dofs_name: str | Sequence[str] | DofSelection | None = None, envs_idx=None) -> Tensor
Configured joint stiffness, (n_envs, n_dofs). See the class note.
Source code in eden/entities/dofs_default_mixin.py
get_default_dofs_damping
¶
get_default_dofs_damping(dofs_name: str | Sequence[str] | DofSelection | None = None, envs_idx=None) -> Tensor
Configured joint damping, (n_envs, n_dofs). See the class note.
Source code in eden/entities/dofs_default_mixin.py
get_default_dofs_armature
¶
get_default_dofs_armature(dofs_name: str | Sequence[str] | DofSelection | None = None, envs_idx=None) -> Tensor
Configured armature, (n_envs, n_dofs), before any explicit-integrator bump. See the class note.
Source code in eden/entities/dofs_default_mixin.py
get_default_dofs_frictionloss
¶
get_default_dofs_frictionloss(dofs_name: str | Sequence[str] | DofSelection | None = None, envs_idx=None) -> Tensor
Configured joint friction loss, (n_envs, n_dofs). See the class note.
Source code in eden/entities/dofs_default_mixin.py
get_default_dofs_pos_limits
¶
get_default_dofs_pos_limits(dofs_name: str | Sequence[str] | DofSelection | None = None, envs_idx=None) -> Tensor
Configured hard position limits, (n_envs, n_dofs, 2) as (lower, upper). See the class note.
Source code in eden/entities/dofs_default_mixin.py
get_soft_dofs_pos_limits
¶
get_soft_dofs_pos_limits(dofs_name: str | Sequence[str] | DofSelection | None = None, envs_idx=None) -> Tensor
Soft position limits, (n_envs, n_dofs, 2) as (lower, upper); unbounded DOFs keep their hard range.
See the class note.
Source code in eden/entities/dofs_default_mixin.py
get_default_dofs_force_limits
¶
get_default_dofs_force_limits(dofs_name: str | Sequence[str] | DofSelection | None = None, envs_idx=None) -> Tensor
Configured symmetric effort limits, (n_envs, n_dofs). See the class note.
Source code in eden/entities/dofs_default_mixin.py
Support surfaces¶
The support-surface queries (current_support and the kernels behind it) that RigidEntity.place_on_to and the
placement events use. RigidEntity inherits them.
SupportSurfaceMixin
¶
Mixin for support surface preparation. Used for penetration free object placement.
Attributes¶
Methods:¶
current_support
¶
current_support(minimum_clearance: float = 0.1, require_roof: bool = False, gravity: Tensor | None = None, gravity_tolerance: float = 0.1, envs_idx: slice | Tensor | None = None) -> list[ExtendedSupportData]
Get the valid current support data at the entity's current pose.
| PARAMETER | DESCRIPTION |
|---|---|
minimum_clearance
|
minimum clearance to consider for support surface
TYPE:
|
require_roof
|
if the support has to be covered (e.g., inside shelf, microwave, etc.)
TYPE:
|
gravity
|
a normalized gravity vector indicating the gravity direction in world coordinate system
that the support surface is holding against.
TYPE:
|
gravity_tolerance
|
tolerance for gravity direction alignment
TYPE:
|
envs_idx
|
the indices of the environments to query. If None, all environments are considered. Defaults to None.
TYPE:
|
Source code in eden/entities/support_mixin.py
Terrain¶
Terrain
¶
Bases: RigidEntity
A special Entity that represents the terrain.
Source code in eden/entities/terrain.py
Attributes¶
subterrain_origins
property
¶
(rows, cols, 3) world-frame subterrain cell centers (z from the height field).
goals
property
¶
(rows, cols, max_goals, 3) world-frame course waypoints per subterrain cell.
Cells with fewer goals are padded by repeating their last real goal (see
:attr:goals_count).
goals_count
property
¶
(rows, cols) number of real (unpadded) goals per subterrain cell.
slope_vectors
property
¶
(rows, cols, 3) normalized per-cell slope directions (zeros where not applicable).
height_field_units
property
¶
The stitched (X, Y) height field in vertical_scale units (numpy, dim0 = x).
bounds
property
¶
Methods:¶
pre_build
¶
Source code in eden/entities/terrain.py
post_build
¶
Source code in eden/entities/terrain.py
export_height_field
¶
export_height_field(path: str) -> None
Export this terrain's height field (in meters) to path.
Writes the versioned .npz format defined in
:mod:eden.utils.terrains.io, usable by offline tools (e.g. the TCRS
terrain-adaptive motion retargeter) without rebuilding the scene.
Source code in eden/entities/terrain.py
get_height
¶
get_height(grid: Tensor, normalize: bool = True) -> Tensor
Get the height of the terrain at the given xy coordinates.
| PARAMETER | DESCRIPTION |
|---|---|
grid
|
The grid of xy coordinates to sample the height from: world xy (m) if
TYPE:
|
normalize
|
Whether to normalize world xy to [-1, 1] here (into a new tensor;
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
height
|
The world-frame z of the terrain surface at the given xy coordinates.
TYPE:
|
Source code in eden/entities/terrain.py
Deformables¶
set_pos() and set_quat() raise on a ParticleEntity (MPM, SPH, PBD), and set_quat() raises on a
FEMEntity: bake the pose into the morph when you create the entity.
ParticleEntity
¶
ParticleEntity(env: EnvBase, options: EntityOptions)
Bases: Entity
Entity subclass for particle-based materials (MPM, SPH, PBD).
Particle entities have no DOFs, links, or orientation control. Position and rotation must be baked into the morph at creation time.
Source code in eden/entities/base.py
Methods:¶
set_pos
¶
Particle entities do not support set_pos after build.
| RAISES | DESCRIPTION |
|---|---|
NotImplementedError
|
Always. Bake position into the morph (e.g. |
Source code in eden/entities/particle.py
set_quat
¶
Particle entities do not support set_quat after build.
| RAISES | DESCRIPTION |
|---|---|
NotImplementedError
|
Always. Bake rotation into the morph (e.g. |
Source code in eden/entities/particle.py
get_mass
¶
Return the total particle mass from Genesis' get_mass.
Falls back to 0, with a warning, when the Genesis entity's get_mass raises TypeError.
Source code in eden/entities/particle.py
get_particles_in_bbox
¶
Return a mask of particles whose rest position lies in an axis-aligned box.
Thin wrapper around the Genesis MPM entity's get_particles_in_bbox. Handy
for selecting a subset of particles to constrain (see set_particle_constraints).
| PARAMETER | DESCRIPTION |
|---|---|
lower
|
Lower/upper corners of the bounding box, in world coordinates. |
upper
|
Lower/upper corners of the bounding box, in world coordinates. |
Source code in eden/entities/particle.py
set_particle_constraints
¶
Attach the masked particles to a rigid link (soft spring constraint).
Thin wrapper around the Genesis MPM entity's set_particle_constraints, so
an MPM soft body can be welded to a moving rigid body without reaching through
entity.entity.
| PARAMETER | DESCRIPTION |
|---|---|
mask
|
Boolean/index mask of particles to constrain (e.g. from
TYPE:
|
link_idx
|
Global index of the rigid link to follow (e.g.
TYPE:
|
**kwargs
|
Forwarded to Genesis (e.g.
DEFAULT:
|
Source code in eden/entities/particle.py
FEMEntity
¶
FEMEntity(env: EnvBase, options: EntityOptions)
Bases: Entity
Entity subclass for FEM-based deformable materials (Elastic, Cloth, Muscle).
FEM entities use vertex-based state (positions and velocities of mesh vertices) rather than rigid-body state. They have no DOFs, links, or joint-based control.
The Genesis FEMEntity does not expose get_pos/get_vel/get_quat/get_ang, so this class overrides those methods to provide a compatible interface (mean vertex position, mean velocity, identity quaternion, zero angular velocity).
Source code in eden/entities/base.py
Attributes¶
Methods:¶
get_pos
¶
get_pos(envs_idx=None, *, relative: bool = False)
Return mean vertex position (geometric centroid), shape (B, 3).
Note: this is the unweighted mean of vertex positions, not the
mass-weighted center of mass. relative must be False (see
:meth:~eden.entities.base.Entity._reject_relative).
Source code in eden/entities/fem.py
get_vel
¶
get_vel(envs_idx=None, *, frame: Literal['world', 'body'] = 'world')
Return mean vertex velocity, shape (B, 3). Only world frame is supported.
Source code in eden/entities/fem.py
get_quat
¶
get_quat(envs_idx=None, *, relative: bool = False)
Return identity quaternion (wxyz) for all envs, shape (B, 4).
FEM entities have no rigid-body orientation. Returns a constant identity
quaternion for interface compatibility. relative must be False (see
:meth:~eden.entities.base.Entity._reject_relative).
Source code in eden/entities/fem.py
get_ang
¶
get_ang(envs_idx=None, *, frame: Literal['world', 'body'] = 'world')
Return zero angular velocity for all envs, shape (B, 3). Only world frame is supported.
Source code in eden/entities/fem.py
set_com_offset
¶
Place the soft body's undeformed build-time shape, translated by offset.
Every vertex lands at its build-time position plus offset, so the
body is reset to its undeformed shape (any current deformation is
discarded), and the offset is always measured from the build-time pose:
repeated calls do not accumulate, like
:meth:~eden.entities.rigid.RigidEntity.set_COM_shift is measured from
the nominal COM. For an absolute centroid position use :meth:set_pos.
| PARAMETER | DESCRIPTION |
|---|---|
offset
|
TYPE:
|
envs_idx
|
Per-env addressing is unsupported by Genesis FEM entities; must be None.
TYPE:
|
| RAISES | DESCRIPTION |
|---|---|
ValueError
|
If |
Source code in eden/entities/fem.py
set_vertex_positions
¶
Set absolute per-vertex world positions of the soft body.
This is the rank-2 / rank-3 case of Genesis set_position. Prefer
this over :meth:set_pos when you have full vertex coordinates, so the
absolute-vertex (vs. centroid) semantics is explicit at the call site.
| PARAMETER | DESCRIPTION |
|---|---|
pos
|
TYPE:
|
envs_idx
|
Per-env addressing is unsupported by Genesis FEM entities; must be None.
TYPE:
|
| RAISES | DESCRIPTION |
|---|---|
ValueError
|
If |
Source code in eden/entities/fem.py
set_pos
¶
Set FEM state via Genesis set_position (shape-dispatched).
Genesis interprets the tensor rank as either a centroid position or
absolute per-vertex positions; this method only forwards. Because that dual
meaning is invisible at the call site, prefer the explicit
:meth:set_com_offset / :meth:set_vertex_positions instead. Kept for
compatibility with the generic :class:Entity interface.
Accepted shapes:
(3,)— world position of the vertex centroid, applied to all envs.(n_vertices, 3)— absolute per-vertex positions, tiled to all envs.(B, 3)— per-env world positions of the vertex centroid.(B, n_vertices, 3)— full batched per-vertex absolute positions.
(3,) and (B, 3) are absolute: they place the undeformed
build-time shape so that its vertex centroid sits at that world
position, which is what :meth:get_pos reads back. For an offset from
the build-time pose use :meth:set_com_offset.
When num_envs == n_vertices the (B, 3) and (n_vertices, 3)
shapes coincide, and Genesis checks (n_vertices, 3) first: a
per-env centroid tensor is then silently read as per-vertex positions,
collapsing the body. Use :meth:set_vertex_positions or
:meth:set_com_offset, which name their meaning, in that case.
| PARAMETER | DESCRIPTION |
|---|---|
pos
|
Position tensor (see shapes above).
TYPE:
|
envs_idx
|
Not supported by Genesis FEM entities. Must be None.
TYPE:
|
| RAISES | DESCRIPTION |
|---|---|
NotImplementedError
|
If envs_idx is not None. |
Source code in eden/entities/fem.py
set_quat
¶
FEM entities do not support set_quat.
| RAISES | DESCRIPTION |
|---|---|
NotImplementedError
|
Always. Bake rotation into the morph (e.g. |
Source code in eden/entities/fem.py
get_mass
¶
Return FEM entity mass. Falls back to 0 if Genesis does not support it.
Source code in eden/entities/fem.py
get_vertex_positions
¶
Return per-vertex positions, shape (B, n_vertices, 3).
get_vertex_velocities
¶
Return per-vertex velocities, shape (B, n_vertices, 3).
set_actuation
¶
Set muscle actuation signal (Muscle material only).
| PARAMETER | DESCRIPTION |
|---|---|
actu
|
Actuation tensor. Accepted shapes: - (): scalar for all groups - (n_groups,): per-group actuation - (B, n_groups): batched per-group actuation
TYPE:
|
Source code in eden/entities/fem.py
set_muscle
¶
Set muscle group IDs and/or fiber directions (Muscle material only).
| PARAMETER | DESCRIPTION |
|---|---|
muscle_group
|
Shape (n_elements,) — muscle group ID per element.
TYPE:
|
muscle_direction
|
Shape (n_elements, 3) — unit direction vectors for muscle forces.
TYPE:
|
Source code in eden/entities/fem.py
set_vertex_constraints
¶
Pin vertices to target positions or to a rigid link.
Thin wrapper around Genesis FEMEntity.set_vertex_constraints.
| PARAMETER | DESCRIPTION |
|---|---|
verts_idx_local
|
Local vertex indices to constrain.
TYPE:
|
target_poss
|
Target positions (len(verts_idx), 3). If None, uses current positions.
TYPE:
|
link
|
Rigid link for vertices to follow.
TYPE:
|
**kwargs
|
Additional keyword arguments forwarded to Genesis (e.g., is_soft_constraint, stiffness, envs_idx).
DEFAULT:
|
Source code in eden/entities/fem.py
Mochi entities¶
Entities simulated by the Eden-hosted MochiSolver. A Mochi scene is all-Mochi; see Engine and the physics guide.
MochiRigidEntity
¶
MochiRigidEntity(env: EnvBase, options: EntityOptions)
Bases: RigidEntity
A rigid or articulated body simulated by the MochiSolver.
Everything :class:RigidEntity offers works unchanged except what the solver never reads:
drive-force ranges, joint friction loss and constraint-solver parameters (rejected at options
validation), link mass/inertia edits after build (set_mass raises), support surfaces and
AABB queries. Contact behaviour is a material property (friction, penalty_coefficient,
...) and can be re-tuned per link with :meth:set_contact_params.
Source code in eden/entities/base.py
Methods:¶
set_mass
¶
get_contacts
¶
get_contacts(with_entity: Entity | None = None, exclude_self_contact: bool = False, is_padded: bool = False)
Contact records of this body, optionally filtered to the pair with with_entity.
Requires MochiOptions.record_contacts (the default). Each record carries both sides'
entities/links/geoms (-1 where a side is deformable), the deformable-side vertices and
barycentric weights, position, unit normal (away from side B), signed distance, force on
A and quadrature weight. Shapes are (n_envs, n_contacts, ...) when batched.
| PARAMETER | DESCRIPTION |
|---|---|
with_entity
|
Restrict to contacts with this (Eden) entity. Defaults to None (all partners).
TYPE:
|
exclude_self_contact
|
Drop contacts between two links of this entity. Defaults to False.
TYPE:
|
is_padded
|
Return fixed-size padded arrays with a
TYPE:
|
Source code in eden/entities/mochi.py
set_contact_params
¶
Re-tune the material's contact parameters after build, for all links or a named subset.
| PARAMETER | DESCRIPTION |
|---|---|
links
|
Link names or regex patterns (resolved with :meth: |
**params
|
Any of
DEFAULT:
|
Source code in eden/entities/mochi.py
set_contact_enabled
¶
Enable or disable contact between this entity and other (post-build, symmetric).
MochiSoftEntity
¶
MochiSoftEntity(env: EnvBase, options: EntityOptions)
Bases: Entity
A tetrahedral solid, thin shell or rod simulated by the MochiSolver.
Vertex-based like :class:FEMEntity: no links, DOFs or rigid pose. get_pos is the vertex
centroid, get_quat the identity, and set_quat raises — bake the orientation into
default_root_quat (the morph) instead. Four calls are pre-build only because they change
what the solver assembles: :meth:attach_to_link, :meth:set_visual_mesh,
:meth:set_contact_skin and :meth:set_rest_positions. Register them with env.register_pre_build_hook
so they run after scene.add_entity (when :attr:init_positions exists) and before scene.build()::
env.register_pre_build_hook(lambda: finger.attach_to_link(gripper, "finger_link", verts_idx))
env.build()
:meth:set_visual_mesh goes through the morph transform, so it must precede
:meth:set_rest_positions (it raises otherwise). :meth:set_contact_skin cannot be combined with
:meth:set_rest_positions in either order (both raise). :meth:attach_to_link only records indices
and can go anywhere in the hook.
Source code in eden/entities/base.py
Attributes¶
init_positions
property
¶
Rest vertex positions in the world frame, shape (n_vertices, 3) (available once added to the scene).
elems
property
¶
Element connectivity: (n, 4) tetrahedra, (n, 3) shell triangles or (n, 2) rod segments.
Methods:¶
get_pos
¶
Mean vertex position (unweighted centroid), shape (B, 3).
get_vel
¶
get_vel(envs_idx=None, *, frame: Literal['world', 'body'] = 'world')
Mean vertex velocity, shape (B, 3). Only the world frame is defined.
Source code in eden/entities/mochi.py
get_quat
¶
Identity quaternion (wxyz) for every env, shape (B, 4): a soft body has no rigid orientation.
Source code in eden/entities/mochi.py
get_ang
¶
get_ang(envs_idx=None, *, frame: Literal['world', 'body'] = 'world')
Zero angular velocity for every env, shape (B, 3).
Source code in eden/entities/mochi.py
set_pos
¶
Move the body with Genesis set_position semantics.
pos is a (3,) / (B, 3) offset of the rest positions, or full (n_vertices, 3) /
(B, n_vertices, 3) vertex positions. Because that dual meaning is invisible at the call site,
prefer the explicit :meth:set_com_offset / :meth:set_vertex_positions.
Source code in eden/entities/mochi.py
set_com_offset
¶
Translate the body by an offset of its rest positions, shape (3,) or (B, 3).
Source code in eden/entities/mochi.py
set_vertex_positions
¶
Set absolute world vertex positions, shape (n_vertices, 3) or (B, n_vertices, 3).
Source code in eden/entities/mochi.py
set_quat
¶
get_mass
¶
set_mass
¶
get_vertex_positions
¶
get_vertex_velocities
¶
get_vertex_contact_forces
¶
Net contact force on each vertex, shape (B, n_vertices, 3).
set_vertex_velocities
¶
Set one velocity for every vertex ((3,) / (B, 3)) or one per vertex ((n_vertices, 3) /
(B, n_vertices, 3)).
set_vertices_fixed
¶
set_vertices_fixed(verts_idx_local, is_fixed: bool = True, envs_idx=None) -> None
Pin (or release) vertices at their current positions (a Dirichlet condition).
Source code in eden/entities/mochi.py
set_vertices_target
¶
Drive pinned vertices to pos ((n, 3) or (B, n, 3)), reached exactly at the end of the next step.
The vertices stay fixed afterwards until :meth:set_vertices_fixed releases them.
Source code in eden/entities/mochi.py
get_contacts
¶
get_contacts(with_entity: Entity | None = None, exclude_self_contact: bool = False, is_padded: bool = False)
Contact records of this body; see :meth:MochiRigidEntity.get_contacts.
Source code in eden/entities/mochi.py
set_contact_params
¶
Re-tune the material's contact parameters after build (see :meth:MochiRigidEntity.set_contact_params).
set_contact_enabled
¶
Enable or disable contact between this entity and other (post-build, symmetric).
attach_to
¶
Mount this body on a link of a Mochi rigid entity — what SceneOptions.attachments_dict calls.
The mounting transform has the meaning it has for :meth:RigidEntity.attach_to: the body's own
frame (its default_root_pos / default_root_quat frame, in which a primitive is centred) sits
at (attach_offset, attach_quat) in the link frame, defaulting to default_root_pos /
default_root_quat. The vertices of the face nearest the link origin — those within
:data:MOUNT_FACE_TOLERANCE of the extreme along the line from the body centre to the link
origin — are tied to the link by :meth:attach_to_link; the rest of the body hangs off them and
deforms. A sponge mounted under a gripper is {"sponge": ("robot", "hand", (0, 0, 0.13), (1, 0, 0, 0))}.
Each tie is :data:MOUNT_TIE_TO_MATERIAL times as stiff as the body's material is at one vertex. Only
tetrahedral solids mount this way; a shell or a rod raises.
The solver anchors each tied vertex in the link frame of the build configuration (every joint at
zero), so the rest geometry is placed there before the build, and :meth:post_build then carries the
whole body to wherever the parent's default joint positions put the link.
Source code in eden/entities/mochi.py
post_build
¶
Carry a mounted body from the build pose of its link to the link's current pose.
Source code in eden/entities/mochi.py
attach_to_link
¶
attach_to_link(entity: MochiRigidEntity, link_name: str, verts_idx, stiffness: float = 1000000.0, damping: float = 0.0) -> None
Tie vertices rigidly to a link of a Mochi rigid entity (pre-build only).
Each vertex is bound by a stiff penalty to the point of the link it coincides with at build
time, inside the same implicit solve — so place the soft body at its mounted pose. Call from
an env.register_pre_build_hook callback, where :attr:init_positions is available to
pick verts_idx.
| PARAMETER | DESCRIPTION |
|---|---|
entity
|
The rigid/articulated entity carrying the link.
TYPE:
|
link_name
|
Name of the link to attach to.
TYPE:
|
verts_idx
|
Local indices of the vertices to attach.
TYPE:
|
stiffness
|
Penalty stiffness of the tie. Defaults to 1e6.
TYPE:
|
damping
|
Damping on the tie violation rate. Defaults to 0.0.
TYPE:
|
Source code in eden/entities/mochi.py
set_rest_positions
¶
Move the body's rest geometry before the scene is built (pre-build only).
The build reads :attr:init_positions to fill the solver, and :meth:attach_to_link anchors each
vertex in the frame of the link it coincides with at build time — so a soft body mounted on a link
whose pose is only known once the model is parsed is placed here, from a pre-build hook, rather than
through the morph. positions must have the body's own vertex count and ordering.
Call :meth:set_visual_mesh before this, not after: it places the render mesh through the morph
transform and binds it to the tetrahedra by barycentric coordinates, which then carry it along.
| PARAMETER | DESCRIPTION |
|---|---|
positions
|
World rest positions, shape
TYPE:
|
Source code in eden/entities/mochi.py
set_visual_mesh
¶
Skin a detailed render mesh onto the simulation tetrahedra (solids only, pre-build only).
pos / euler / scale place the render mesh in the simulation mesh's file frame; the
entity's morph transform is then applied to it, and each of its vertices is bound to the tetrahedron
it falls in by barycentric coordinates, so it follows the deformation. Because the placement goes
through the morph, this must run before :meth:set_rest_positions — which raises here if it
already ran, rather than leaving a render mesh embedded against geometry that has since moved away
(the visual mesh then extrapolates far outside the body, and the body renders as nothing).
| PARAMETER | DESCRIPTION |
|---|---|
file
|
Mesh file (resolved through :func:
TYPE:
|
pos
|
Offset of the render mesh in the simulation mesh's file frame. Defaults to zero.
TYPE:
|
euler
|
Rotation of the render mesh in degrees. Defaults to zero.
TYPE:
|
scale
|
Uniform scale of the render mesh. Defaults to 1.0.
TYPE:
|
Source code in eden/entities/mochi.py
set_contact_skin
¶
Carry this solid's contact samples on a detailed triangle surface (solids only, pre-build only).
The samples otherwise lie on the boundary triangles of the tetrahedral mesh, so a coarse mesh contacts
through a coarse surface. A skin (fingertip pads, the authored collision surface) places them where the
contact happens, at the cost of more samples. The skin only carries this body's samples: other bodies
still collide against its tetrahedra. Placement works as in :meth:set_visual_mesh, but the solver
embeds the skin in the tetrahedra only at build, so it cannot be combined with
:meth:set_rest_positions (it raises if the rest geometry has already moved).
| PARAMETER | DESCRIPTION |
|---|---|
file
|
Mesh file (resolved through :func:
TYPE:
|
pos
|
Offset of the skin in the simulation mesh's file frame. Defaults to zero.
TYPE:
|
euler
|
Rotation of the skin in degrees. Defaults to zero.
TYPE:
|
scale
|
Uniform scale of the skin. Defaults to 1.0.
TYPE:
|
Source code in eden/entities/mochi.py
Cameras¶
Record video with Camera.start_recording(video_path, fps) and stop_recording(), not with Genesis' own camera
recorder.
Camera
¶
Camera(env: EnvBase, options: CameraOptions, key: str = '')
Bases: ConfigurableMixin[CameraOptions]
Wrapper around a Genesis camera, configured from :class:CameraOptions.
| PARAMETER | DESCRIPTION |
|---|---|
model
|
Camera model.
|
cam_pos
|
Camera position in world frame.
|
cam_lookat
|
Camera lookat in world frame.
|
cam_resolution
|
Camera resolution in (width, height).
|
cam_up
|
Camera up vector.
|
cam_aperture
|
Camera aperture.
|
cam_fov
|
The vertical field of view of the camera in degrees.
|
cam_near
|
Near clipping plane in meters.
|
cam_far
|
Far clipping plane in meters.
|
debug
|
Whether this is a debug camera. A debug camera will use non-batch renderer.
|
follow_entity_name
|
Name of the entity to follow.
|
attach_entity_name
|
Name of the entity to attach the camera to.
|
attach_link_name
|
Name of the link to attach the camera to.
|
overlays
|
What :meth:
|
Source code in eden/entities/camera.py
184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 | |
Attributes¶
model
class-attribute
instance-attribute
¶
model: Literal['pinhole', 'thinlens', 'fisheye'] = 'pinhole'
supports_pointcloud
property
¶
supports_pointcloud: bool
Whether :meth:render_pointcloud is available (legacy backend only).
Lets a caller that depends on point clouds reject an incompatible camera up front
instead of hitting :class:NotImplementedError on the first render.
display_name
property
¶
display_name: str
How error messages name the camera: its key in EnvBase.cameras, quoted, or its uid without one.
renderer_kind
property
¶
renderer_kind: Literal['sensor', 'raytracer', 'batch_renderer', 'rasterizer']
Which renderer makes this camera's frames. A debug camera rasterizes even in a batch-rendered scene.
batch_renderer_casts_shadows
property
¶
batch_renderer_casts_shadows: bool
Whether this camera's batch renderer has a light that casts shadows; False for any other renderer.
splat_single_view
property
¶
splat_single_view: bool | None
For a splat env's camera, whether it renders the splat once for every env's image (True) or once per
env (False); None for any other camera.
sensor
property
¶
Access the underlying Genesis sensor object. Only available with sensor backend.
Methods:¶
pre_build
¶
post_build
¶
Source code in eden/entities/camera.py
set_attach_transform
¶
Replace the camera-to-link attach transform declared via attach_offset/attach_quat.
Accepts a single (4, 4) transform or a batched (n_rendered, 4, 4) stack for
per-env camera mounts (camera-extrinsics domain randomization): Genesis composes the
attached pose as link_T @ offset_T, which broadcasts over a batched offset. A
batched offset requires a batched camera (batch renderer or env_separate_rigid)
and one transform per rendered env — anything else would only crash later, deep
inside the next render, so it is rejected here.
| PARAMETER | DESCRIPTION |
|---|---|
offset_T
|
The new camera pose(s) relative to the attached link, shape
TYPE:
|
Source code in eden/entities/camera.py
get_pos
¶
Return the current position of the camera.
Source code in eden/entities/camera.py
get_quat
¶
Return the current quaternion of the camera.
Source code in eden/entities/camera.py
get_lookat
¶
Return the current lookat point of the camera.
Source code in eden/entities/camera.py
get_up
¶
Return the current up vector of the camera.
get_transform
¶
Return the current transform matrix of the camera.
Source code in eden/entities/camera.py
set_pose
¶
Set the camera pose.
| PARAMETER | DESCRIPTION |
|---|---|
transform
|
The transform matrix of the camera.
TYPE:
|
pos
|
The position of the camera.
TYPE:
|
lookat
|
The lookat point of the camera.
TYPE:
|
up
|
The up vector of the camera.
TYPE:
|
envs_idx
|
The environment indices for which to update the pose. If not provided, the camera pose will be set for the specific environment bound to the camera if any, all the environments otherwise.
TYPE:
|
Source code in eden/entities/camera.py
set_pos
¶
Set the camera position, keeping current lookat and up.
| PARAMETER | DESCRIPTION |
|---|---|
pos
|
The position of the camera.
TYPE:
|
envs_idx
|
Environment indices. If None, applies to all environments.
TYPE:
|
Source code in eden/entities/camera.py
set_quat
¶
Set the camera orientation from a quaternion (wxyz), keeping current position.
| PARAMETER | DESCRIPTION |
|---|---|
quat
|
Quaternion in (w, x, y, z) format.
TYPE:
|
envs_idx
|
Environment indices. If None, applies to all environments.
TYPE:
|
Source code in eden/entities/camera.py
start_recording
¶
Open a video file and record one frame per render() / render_rgb() call.
Frames are encoded and streamed to the file as they are rendered, so the
recording length is not bounded by memory. The output path and framerate are
fixed for the whole video, hence given here rather than at stop_recording().
One frame per render call is Eden's recording contract: a kinematic replay that
never steps the scene records exactly as a stepped rollout does. Genesis' own
camera.start_recording instead captures inside scene.step(), which would
record nothing for a replay script.
A camera that renders several environments at once (batch renderer, or
env_separate_rigid) records one video per environment, named
{stem}_{i}{ext} after the environment's position in the rendered batch.
| PARAMETER | DESCRIPTION |
|---|---|
video_path
|
Output video file path, ending in '.mp4'. Defaults to
TYPE:
|
fps
|
Framerate the video is encoded at. Must be positive. Playback speed is
TYPE:
|
Source code in eden/entities/camera.py
stop_recording
¶
Finalize the video file(s) named by :meth:start_recording.
Frames are encoded as they are recorded, so this only flushes the ones the encoders still hold and closes the files.
A recording that captured no frame writes no file at all. That is said out loud rather than passed over: it means nothing rendered while the recording was open, which is a mistake in the calling loop far more often than an intent.
Source code in eden/entities/camera.py
destroy
¶
Finalize a recording still running, as part of tearing the camera down.
This is what makes stopping a recording explicitly optional: a camera going away leaves a playable video behind rather than a file the encoder never flushed.
Source code in eden/entities/camera.py
read
¶
Read sensor data. Only available with the sensor backend.
| RETURNS | DESCRIPTION |
|---|---|
data
|
Named tuple with
TYPE:
|
Source code in eden/entities/camera.py
pick_pixel
¶
Cast a ray through pixel (x, y) and return what it hits.
Sensor backend only (e.g. Nyx). Delegates to the underlying sensor's
pick_pixel and returns its result — the hit entity / link / world
position — or None for background (sky).
Source code in eden/entities/camera.py
render
¶
render(rgb: bool = True, depth: bool = False, segmentation: bool = False, colorize_seg: bool = False, normal: bool = False)
Source code in eden/entities/camera.py
render_unshadowed_rgb
¶
This view rendered again with the scene's shadows off, (N, H, W, 3) on the env's device, which lets
:func:~eden.utils.background_shadows.background_shadow_factor compare every pixel with its own unshadowed
brightness; None when the renderer can't (the batch renderer bakes shadows in at build time, and the
factor then estimates the unshadowed brightness instead).
Source code in eden/entities/camera.py
render_rgb
¶
The camera's RGB frame, with its background composite and overlays painted on, recorded if recording.
Source code in eden/entities/camera.py
render_depth
¶
Source code in eden/entities/camera.py
render_pointcloud
¶
Render a point cloud from the camera's current view.
| PARAMETER | DESCRIPTION |
|---|---|
world_frame
|
True returns the points in the world frame, False in the camera frame. Defaults to True.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
pc
|
The point of each pixel, shape (H, W, 3) or (N, H, W, 3).
TYPE:
|
mask_arr
|
Boolean mask of the pixels with a valid depth, shape (H, W) or (N, H, W).
TYPE:
|
Source code in eden/entities/camera.py
render_segm
¶
Source code in eden/entities/camera.py
render_normal
¶
Source code in eden/entities/camera.py
SplatCamera
¶
SplatCamera(key: str, env, options: CameraOptions)
Bases: _SplatCameraBase
Renders the splat once from an env-invariant pose and uses it for every env's image.
The cheap path for a fixed camera over a shared (per_env_gaussians=False) background: the splat looks
identical from every env, so rendering it N times is waste. Only the first env's pose is rendered. The env picks
this class automatically for non-attached cameras — see :meth:~eden.envs.splat.SplatEnvBase._splat_camera_class.
Source code in eden/entities/camera.py
BatchSplatCamera
¶
BatchSplatCamera(key: str, env, options: CameraOptions)
Bases: _SplatCameraBase
Renders the splat per env — every environment's camera in one gsplat call.
Needed when the splat differs across envs: an attached/following camera (per-env pose) or
per_env_gaussians (per-env geometry). The env picks this class over the single-view
:class:SplatCamera — see :meth:~eden.envs.splat.SplatEnvBase._splat_camera_class.
Source code in eden/entities/camera.py
Camera overlays¶
Overlays paint state the scene does not render (ink, marks) or composite a background onto every RGB frame a camera
produces. Declare them in CameraOptions.overlays.
Camera overlays: paint what the simulation tracks but does not render onto every RGB frame a camera produces.
Some state a task keeps is visible in the real world but has no geometry in the scene: the ink a marker lays on a whiteboard, the strokes a brush leaves on paper. The task tracks it as a tensor, so a plain camera shows a clean surface. An overlay draws that tensor onto the camera's frames after the renderer has made them.
A camera declares its overlays in :attr:CameraOptions.overlays <eden.options.camera.CameraOptions>, by registry key,
so they survive a saved config.json. They are applied in :meth:Camera.render_rgb
<eden.entities.camera.Camera.render_rgb> and so reach everything built on it: the returned frame, the camera's
recording, :meth:~eden.entities.camera.Camera.snapshot, and an observation that reads the camera.
:meth:~eden.entities.camera.Camera.render stays the raw multi-output pass.
A background composite is an overlay too: :class:BackgroundImageComposite replaces a camera's background with an
image, :class:SplatComposite with a Gaussian splat (a splat env's cameras). Both replace the pixels where the sim
shows one of their entities or nothing at all, and report them through :meth:CameraOverlay.replaced_pixels; the
overlays after them leave those pixels as composited, since they no longer show the sim surface an overlay locates its
marks on. A camera takes at most one; declare it first, so the overlays after it paint over the composited frame. A
splat env's camera shows its splat only when it declares a SplatComposite, as a splat config's
:meth:~eden.utils.configs.EdenSplatConfig.recording_camera does.
Writing one: subclass :class:CameraOverlay, declare its parameters as class attributes, register it with
@CAMERA_OVERLAY_REGISTRY.register(), and implement :meth:CameraOverlay.paint. Set _needs_segmentation = True
to receive the frame's segmentation, which the sim pass renders with the RGB at no extra render. Set
_needs_pointcloud = True to receive the frame's world-frame point cloud; the camera renders it once per frame for
all its overlays, which costs a second render of the view (its depth). A camera that can render neither (the sensor
backend) refuses such an overlay at env construction.
Resolve whatever the overlay reads (a metric term, an entity) in :meth:CameraOverlay.build, which runs after the
managers are built. Frames rendered before then (the observation manager renders once while it loads, to size its
terms) are not painted.
:class:PlanePaintOverlay is the general one: it paints the :class:PaintedPlane a metric term returns (any
:class:PaintedPlaneSource), a weight grid on a plane, where the camera sees that plane. It shades the marks as the
surface they lie on is shaded, so they keep the shadows and the light the renderer gave that surface.
Attributes¶
Classes¶
CameraOverlay
¶
CameraOverlay(camera: Camera, options: CameraOverlayOptions)
Bases: ConfigurableMixin[CameraOverlayOptions]
Base of the camera overlays: paints onto the RGB frames of the camera it is declared on.
Constructed with the camera, at env construction; :meth:build runs once the env's managers are built.
Source code in eden/entities/camera_overlays.py
Methods:¶
check_parameters
classmethod
¶
Refuse parameter values the overlay cannot work with: ranges and rules across parameters. params holds
every parameter, defaults filled in and already of its declared type.
Runs when its :class:~eden.options.camera.CameraOverlayOptions are constructed, so a bad value fails in the
config that wrote it, and again when the overlay is constructed. Checks that need the scene belong in
:meth:build.
Source code in eden/entities/camera_overlays.py
build
¶
paint
¶
paint(rgb: Tensor, buffers: OverlayBuffers, envs_idx: Tensor) -> Tensor
Return rgb with the overlay painted on.
| PARAMETER | DESCRIPTION |
|---|---|
rgb
|
TYPE:
|
buffers
|
The extra renders of the same frame the overlay asked for.
TYPE:
|
envs_idx
|
TYPE:
|
Source code in eden/entities/camera_overlays.py
replaced_pixels
¶
replaced_pixels(buffers: OverlayBuffers) -> Tensor | None
(N, H, W) the pixels :meth:paint replaced with something other than the simulated scene (a
background image), which the overlays after this one leave as they are; None (the default) when it only
paints over the scene.
Source code in eden/entities/camera_overlays.py
OverlayBuffers
dataclass
¶
OverlayBuffers(segmentation: Tensor | None = None, pointcloud: Tensor | None = None, pointcloud_valid: Tensor | None = None)
What the camera rendered for its overlays alongside one RGB frame, one entry per image (N, ...).
segmentation (N, H, W) is each pixel's segmentation id, None unless an overlay of the camera sets
_needs_segmentation. pointcloud is each pixel's world position (N, H, W, 3) and pointcloud_valid
(N, H, W) says which pixels hit something; both are None unless an overlay sets _needs_pointcloud.
PlanePaintOverlay
¶
PlanePaintOverlay(camera: Camera, options: CameraOverlayOptions)
Bases: CameraOverlay
Paints a metric's marks, in color or in their own colours, where the camera sees the plane they lie on.
The metric term metric_name is a :class:PaintedPlaneSource: its painted_plane(envs_idx) is read at every
frame for the envs the frame shows only, so a camera over one env never computes the marks of the other thousand.
A pixel is on the plane when its world point (from the frame's point cloud, so whatever stands in front hides the
marks) lies within max_gap of it. Each pixel is looked up on a supersample x supersample grid of sub-pixels
and averaged, since a mark a few millimetres wide can be thinner than a pixel; only the pixels round the grid's
image are, so the sub-pixel buffers scale with the marks' footprint in the frame, not with the frame.
A curved surface qualifies when, over the grid, it stays within max_gap of the plane touching it, and its
distances along the surface differ from the plane's by well under a cell: the marks are then painted where they
lie. A narrow stripe round a tube's crown does (mochi_wipe_the_bar); a mark wrapping round it would not.
The marks are shaded as their surface is. A mark is a change of colour on the surface the metric names
(:attr:PaintedPlane.entity_name), so it takes the light that surface's pixel took: the shadow the brush casts
over a stroke, the falloff across the sheet, the light's tint. The renderer draws a matte surface as its colour
times the light reaching it, so a marked pixel is the rendered pixel times color / surface colour, blended by
how much of the pixel is marked: rendered * lerp(1, color / surface colour, weight). The surface colour is read
from the built entity, which therefore has to be one plain colour (an image texture is refused at build), and no
channel of it may be under :data:MIN_SURFACE_CHANNEL, below which the division amplifies the frame's 8-bit steps
into visible banding. A channel the scaling lifts past 255 is clipped.
The multiplication is in each renderer's own colour space, as measured: on the rasterizer the pixel itself is the colour times the light, while the batch renderer multiplies in linear light and encodes its pixels as sRGB, so there the tint applies to the decoded pixel. Other renderers (the ray tracer, whose colour response has not been measured) are refused at build. A surface that cannot be shaded against is refused too, with no flat-colour fallback: an image-textured or multi-coloured surface (paint marks onto a plain-coloured entity laid over it).
The one thing the ratio cannot carry is light a surface reflects on top of its colour: a highlight, or the white sheen the rasterizer's default plastic surface adds in direct light (about 20 of 255 under the default lights, whatever the colour). It is scaled with the mark's colour, so in direct light a dark mark renders without it, up to about that much darker in its dark channels than a surface of the mark's colour would. In shadow, where there is no sheen, the marks match such a surface to within a level or two.
Marks of one colour (an ink's) are painted in color, the camera's to choose, not the metric's: grading never
reads it. A task's :meth:~eden.utils.configs.EdenConfig.recording_camera fills it from wherever the task keeps
it (the whiteboard marker's ink). Marks of many colours (a painting's) come with their colours
(:attr:PaintedPlane.rgb), each shaded as color is, and color is then left out.
| PARAMETER | DESCRIPTION |
|---|---|
metric_name
|
The metric term whose
TYPE:
|
color
|
RGB in |
max_gap
|
How far (m) a pixel's world point may lie off the plane and still be painted. Covers the depth buffer's error at the camera's distance, and a curved surface's sag from its plane.
TYPE:
|
supersample
|
Sub-pixels per side each pixel is looked up on.
TYPE:
|
Source code in eden/entities/camera_overlays.py
Attributes¶
Methods:¶
check_parameters
classmethod
¶
Source code in eden/entities/camera_overlays.py
build
¶
Source code in eden/entities/camera_overlays.py
382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 | |
paint
¶
paint(rgb: Tensor, buffers: OverlayBuffers, envs_idx: Tensor) -> Tensor
Source code in eden/entities/camera_overlays.py
PaintedPlane
dataclass
¶
PaintedPlane(origin: Tensor, u_axis: Tensor, v_axis: Tensor, grid: PlaneGrid, weight: Tensor, entity_name: str, rgb: Tensor | None = None)
Marks on a plane, on a grid of square cells: what :class:PlanePaintOverlay paints.
The plane runs through origin along the orthonormal axes u_axis and v_axis (world frame). Cell
(r, c) of weight is cell (r, c) of grid in the plane's (u, v)
(:class:~eden.utils.plane_grid.PlaneGrid: row 0 at the top). A curved surface may be described by the plane
touching it, within :class:PlanePaintOverlay's rule.
| PARAMETER | DESCRIPTION |
|---|---|
origin
|
TYPE:
|
u_axis
|
TYPE:
|
v_axis
|
TYPE:
|
grid
|
Where the cells lie on the plane: the grid the metric keeps its marks on.
TYPE:
|
weight
|
TYPE:
|
entity_name
|
The entity whose surface the marks lie on (the board, the sheet). Its colour is what the overlay shades the marks against, so it has to be one plain, opaque colour: no image texture, no emission, no transparency, the same in every env, and the same on every one of its geoms (model a board's marked face apart from its frame).
TYPE:
|
rgb
|
TYPE:
|
PaintedPlaneSource
¶
Bases: Protocol
A metric term that keeps marks on a plane, as :class:PlanePaintOverlay reads them. Structural: a term qualifies
by defining the method, without subclassing this.
Methods:¶
painted_plane
¶
painted_plane(envs_idx: Tensor) -> PaintedPlane
The marks of the envs envs_idx (a (K,) long tensor), read at every frame for the envs it shows.
BackgroundComposite
¶
BackgroundComposite(camera: Camera, options: CameraOverlayOptions)
Bases: CameraOverlay
Replaces the pixels where the sim shows a background with another image: one of entities, or nothing at
all (segmentation id 0, the renderer's own background). The overlays after it leave those pixels as composited
(:meth:replaced_pixels). Subclasses say where the background comes from (:meth:background).
With shadow_strength the background is darkened where the sim pass shows shadows on entities
(:mod:eden.utils.background_shadows). The rasterizer renders the view a second time without shadows to measure
them, which needs EnvOptions.rasterizer_shadows on and a GPU-backed OpenGL context. The batch renderer bakes
shadows in, so it has them estimated, which is exact for flat, untextured entities under directional lights: an
image-textured entity is refused, and at least one BatchRendererOptions.lights entry needs castshadow=True.
Shading holds about 20 * N * H * W bytes of temporaries per frame (about 1 GB at 1024 envs of 224x224).
| PARAMETER | DESCRIPTION |
|---|---|
entities
|
Scene entities whose pixels the background replaces, every link of each ( |
shadow_strength
|
How strongly the sim's shadows on
TYPE:
|
Source code in eden/entities/camera_overlays.py
Attributes¶
Methods:¶
check_parameters
classmethod
¶
Source code in eden/entities/camera_overlays.py
build
¶
Source code in eden/entities/camera_overlays.py
background
¶
The image the background pixels of rgb take: (1, H, W, 3) for every image, or (N, H, W, 3)
one per image, on the env's device, in any dtype holding [0, 255].
Source code in eden/entities/camera_overlays.py
replaced_pixels
¶
replaced_pixels(buffers: OverlayBuffers) -> Tensor
paint
¶
paint(rgb: Tensor, buffers: OverlayBuffers, envs_idx: Tensor) -> Tensor
Source code in eden/entities/camera_overlays.py
BackgroundImageComposite
¶
BackgroundImageComposite(camera: Camera, options: CameraOverlayOptions)
Bases: BackgroundComposite
Replaces the background with the image at image_path, scaled to the camera's resolution: a SimplerEnv-style
real-image backdrop, or a green screen.
| PARAMETER | DESCRIPTION |
|---|---|
image_path
|
The background image.
TYPE:
|
entities
|
See :class:
|
shadow_strength
|
See :class:
|
Source code in eden/entities/camera_overlays.py
Attributes¶
Methods:¶
check_parameters
classmethod
¶
Source code in eden/entities/camera_overlays.py
SplatComposite
¶
SplatComposite(camera: Camera, options: CameraOverlayOptions)
Bases: BackgroundComposite
Replaces the background with the env's Gaussian splat, rendered from the camera's pose
(:class:~eden.utils.batch_splat_renderer.BatchSplatRenderer). Only a splat env's camera can carry it.
Whether the splat is rendered once and used for every env's image, or once per env, is the camera's
(Camera.splat_single_view: :class:~eden.entities.camera.SplatCamera or
:class:~eden.entities.camera.BatchSplatCamera, picked by SplatOptions.camera_mode).
| PARAMETER | DESCRIPTION |
|---|---|
entities
|
See :class:
|
shadow_strength
|
See :class:
|
Source code in eden/entities/camera_overlays.py
Methods:¶
background
¶
Source code in eden/entities/camera_overlays.py
Functions:¶
build_camera_overlay
¶
build_camera_overlay(camera: Camera, options: CameraOverlayOptions, index: int) -> CameraOverlay
The overlay options names, constructed for camera: entry index of its CameraOptions.overlays.
Source code in eden/entities/camera_overlays.py
Sensors¶
Sensor
¶
Sensor(env: EnvBase, options: SensorOptions)
Bases: ConfigurableMixin[SensorOptions]
Wrapper around a Genesis sensor, configured from :class:SensorOptions.
| PARAMETER | DESCRIPTION |
|---|---|
sensor
|
The Genesis sensor options.
|
attach_entity_name
|
Name of the entity to attach the sensor to. Empty for static sensors.
TYPE:
|
attach_link_name
|
Name of the link to attach the sensor to.
TYPE:
|
track_link_names
|
Resolved into the nested sensor's |
filter_link_names
|
Resolved into the nested sensor's |
Source code in eden/entities/sensor.py
Attributes¶
Methods:¶
pre_build
¶
Source code in eden/entities/sensor.py
get_pos
¶
Get the world position of the sensor.
For attached sensors, this computes link_pos + transform_by_quat(offset_pos, link_quat).
For static sensors, returns the initial position from sensor options.
| RETURNS | DESCRIPTION |
|---|---|
pos
|
World position of shape (num_envs, 3).
TYPE:
|
Source code in eden/entities/sensor.py
get_quat
¶
Get the world orientation of the sensor as a quaternion (wxyz).
For attached sensors, this computes quat_mul(link_quat, offset_quat).
For static sensors, returns the initial orientation from sensor options.
| RETURNS | DESCRIPTION |
|---|---|
quat
|
World orientation quaternion (wxyz) of shape (num_envs, 4).
TYPE:
|
Source code in eden/entities/sensor.py
set_pos_offset
¶
Set the positional offset of the sensor relative to the attached link.
| PARAMETER | DESCRIPTION |
|---|---|
pos_offset
|
Position offset (x, y, z) in link-local frame.
TYPE:
|
envs_idx
|
Environment indices. If None, applies to all environments.
TYPE:
|
Source code in eden/entities/sensor.py
set_quat_offset
¶
Set the rotational offset of the sensor relative to the attached link.
| PARAMETER | DESCRIPTION |
|---|---|
quat_offset
|
Quaternion offset (wxyz) in link-local frame.
TYPE:
|
envs_idx
|
Environment indices. If None, applies to all environments.
TYPE:
|
Source code in eden/entities/sensor.py
read
¶
read(envs_idx=None) -> Tensor | tuple[Tensor, ...]
Read current sensor data (with noise, delay, and other effects if configured).
| PARAMETER | DESCRIPTION |
|---|---|
envs_idx
|
Environment indices to read from. If None, reads from all environments.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
sensor_data
|
The sensor data with noise if configured. The return format depends on the sensor type.
TYPE:
|
Source code in eden/entities/sensor.py
read_ground_truth
¶
read_ground_truth(envs_idx=None) -> Tensor | tuple[Tensor, ...]
Read ground truth sensor data (without noise, delay, or other effects).
| PARAMETER | DESCRIPTION |
|---|---|
envs_idx
|
Environment indices to read from. If None, reads from all environments.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
sensor_data
|
Ground truth sensor data. The return format depends on the sensor type.
TYPE:
|