Robotics and Asset Utilities¶
Helpers for actuator math, meshes and point clouds, contact aggregation, terrain generation, procedural meshes and asset download.
Actuators¶
Reflected inertia, RPM conversions and the Raibert heuristic that the actuator presets use to derive armature and PD gains.
Actuator math helpers (reflected inertia, RPM conversions, Raibert heuristic).
Attributes¶
Classes¶
Functions:¶
reflected_inertia
¶
reflected_inertia_from_two_stage_planetary
¶
reflected_inertia_from_two_stage_planetary(rotor_inertia: tuple[float, float, float], gear_ratio: tuple[float, float, float]) -> float
Compute reflected inertia of a two-stage planetary gearbox.
Source code in eden/utils/actuator.py
rpm_to_rad_per_sec
¶
rad_per_sec_to_rpm
¶
raibert_heuristic_kp
¶
raibert_heuristic_kp(actuator: type[ActuatorSpecOptions], natural_freq: float = NATURAL_FREQ) -> float
Compute ideal stiffness for a given actuator and natural frequency.
raibert_heuristic_kd
¶
raibert_heuristic_kd(actuator: type[ActuatorSpecOptions], natural_freq: float = NATURAL_FREQ, damping_ratio: float = 2.0) -> float
Compute ideal damping for a given actuator and natural frequency. Defaults to over-damped damping ratio of 2.0.
Source code in eden/utils/actuator.py
raibert_heuristic_action_scale
¶
raibert_heuristic_action_scale(actuator: type[ActuatorSpecOptions], natural_freq: float = NATURAL_FREQ) -> float
0.25 * effort_limit / kp, where kp is computed using the Raibert Heuristic.
Source code in eden/utils/actuator.py
Meshes and point clouds¶
Mesh helpers: link meshes, polygon sampling, support-surface extraction.
Classes¶
SupportData
dataclass
¶
ExtendedSupportData
dataclass
¶
ExtendedSupportData(polygon: Polygon, transform: Tensor | None = None, clearance: float = inf, normal: Tensor | None = None, valid_mask: Tensor | None = None, sample_points: Tensor | None = None, num_sample_points: int = 0)
Bases: SupportData
Functions:¶
get_link_mesh
¶
get_link_mesh(link: RigidLink, use_visual_mesh: bool = False) -> Trimesh
Get the mesh of a link.
| PARAMETER | DESCRIPTION |
|---|---|
link
|
Link to get the mesh of
TYPE:
|
use_visual_mesh
|
Whether to use the visual mesh or the collision mesh
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
trimesh.Trimesh:
|
Combined mesh of the link |
Source code in eden/utils/mesh.py
rejection_sample_uniform
¶
rejection_sample_uniform(polygon: Polygon, num_points: int, scale: ndarray, bias: ndarray) -> tuple[ndarray, int]
Random sample points within the polygon.
Only the candidates that land inside the polygon are kept, so the returned count varies.
| PARAMETER | DESCRIPTION |
|---|---|
polygon
|
Polygon to sample from
TYPE:
|
num_points
|
Number of points to sample
TYPE:
|
scale
|
Scale for the randomly generated points
TYPE:
|
bias
|
Bias for the randomly generated points
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
tuple[np.ndarray, int]:
|
Points sampled from the polygon and the number of points |
Source code in eden/utils/mesh.py
rejection_sample_gaussian
¶
rejection_sample_gaussian(polygon: Polygon, num_points: int, offset: float | ndarray = 0.0, std: float = 1.0) -> tuple[ndarray, int]
Random sample points within the polygon.
Only the candidates that land inside the polygon are kept, so the returned count varies.
| PARAMETER | DESCRIPTION |
|---|---|
polygon
|
Polygon to sample from
TYPE:
|
num_points
|
Number of points to sample
TYPE:
|
offset
|
Offset for the randomly generated points
TYPE:
|
std
|
Standard deviation for the randomly generated points
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
tuple[np.ndarray, int]:
|
Points sampled from the polygon and the number of points |
Source code in eden/utils/mesh.py
sample_polygon_grid
¶
sample_polygon_grid(polygon: Polygon, grid_size: float, holes: Sequence[Polygon] | None = None) -> ndarray
Sample points from a polygon using a grid.
| PARAMETER | DESCRIPTION |
|---|---|
polygon
|
Polygon to sample from
TYPE:
|
grid_size
|
Size of the grid
TYPE:
|
holes
|
Holes in the polygon
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
np.ndarray:
|
Points sampled from the polygon |
Source code in eden/utils/mesh.py
sample_polygon_uniform
¶
sample_polygon_uniform(polygon: Polygon, count: int, holes: Sequence[Polygon] | None = None, factor: float = 1.5, max_iter: int = 10) -> ndarray
Use rejection sampling to generate random points inside a polygon.
| PARAMETER | DESCRIPTION |
|---|---|
polygon
|
Polygon that will contain points
TYPE:
|
count
|
Number of points to return
TYPE:
|
holes
|
Holes to carve out of the polygon before sampling.
TYPE:
|
factor
|
Increase the initial count by this factor for rejection sampling
TYPE:
|
max_iter
|
Maximum number of extra sampling rounds after the first, so at most
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
np.ndarray:
|
Random points inside polygon where n <= count |
Source code in eden/utils/mesh.py
sample_polygon_gaussian
¶
sample_polygon_gaussian(polygon: Polygon, count: int, holes: Sequence[Polygon] | None = None, factor: float = 1.5, max_iter: int = 10, offset: float | ndarray = 0.0, std: float = 1.0) -> ndarray
Use rejection sampling to generate Gaussian-distributed points inside a polygon.
| PARAMETER | DESCRIPTION |
|---|---|
polygon
|
Polygon that will contain points
TYPE:
|
count
|
Number of points to return
TYPE:
|
holes
|
Holes to carve out of the polygon before sampling.
TYPE:
|
factor
|
Increase the initial count by this factor for rejection sampling
TYPE:
|
max_iter
|
Maximum number of extra sampling rounds after the first, so at most
TYPE:
|
offset
|
Offset added to the polygon centroid to center the Gaussian.
TYPE:
|
std
|
Standard deviation of the Gaussian used for sampling.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
np.ndarray:
|
Random points inside polygon where n <= count |
Source code in eden/utils/mesh.py
extrude_surface
¶
extrude_surface(polygon: Polygon, polygon_transform: ndarray, mesh: Trimesh, rays_per_area: int = 100, extrude_direction: ndarray = array([0, 0, 1]), distance_above_support: float = 0.001) -> tuple[list[ndarray], list[ndarray]]
Extrudes a support polygon until collision.
| PARAMETER | DESCRIPTION |
|---|---|
polygon
|
polygon to extrude
TYPE:
|
polygon_transform
|
4x4 transformation matrix of the polygon
TYPE:
|
mesh
|
Mesh the extrusion rays are cast against.
TYPE:
|
rays_per_area
|
Rays per unit polygon area used to test for collisions.
TYPE:
|
extrude_direction
|
Direction to extrude
TYPE:
|
distance_above_support
|
Support polyhedra are above the support polygon by this amount.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
ndarray
|
|
ndarray
|
|
Source code in eden/utils/mesh.py
get_exposed_support_surfaces
¶
get_exposed_support_surfaces(mesh: Trimesh, local_gravity: ndarray = array([0, 0, -1]), precision: int = 3, gravity_tolerance: float = 0.1, min_area: float = 0.01, erosion_distance: float = 0.0) -> list[SupportData]
Get the polygons representing the support surface in the local gravity direction.
| PARAMETER | DESCRIPTION |
|---|---|
mesh
|
Mesh to get the support surfaces of
TYPE:
|
local_gravity
|
Local gravity direction
TYPE:
|
precision
|
Precision for the polygon conversion
TYPE:
|
gravity_tolerance
|
Absolute tolerance on
TYPE:
|
min_area
|
Minimum area for the support surfaces
TYPE:
|
erosion_distance
|
Distance to erode the support surfaces
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
list[SupportData]:
|
List of support surfaces |
Source code in eden/utils/mesh.py
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 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 | |
AABB_to_polygon
¶
Convert an AABB to a polygon.
| PARAMETER | DESCRIPTION |
|---|---|
AABB
|
AABB to convert
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
shapely.geometry.Polygon:
|
Polygon representing the AABB |
Source code in eden/utils/mesh.py
Point-cloud surface-sampling helpers for entities and links.
Functions:¶
distribute_points_proportionally
¶
Distribute a total number of points among links in proportion to their surface area.
This function uses the largest remainder method (Hamilton method) to ensure the
total number of distributed points is exactly n_points.
| PARAMETER | DESCRIPTION |
|---|---|
n_points
|
The total number of points to be distributed.
TYPE:
|
link_areas
|
A list of the surface areas of the links.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
list of int
|
The number of points to sample from each link. |
| RAISES | DESCRIPTION |
|---|---|
ValueError
|
If |
Source code in eden/utils/pc.py
get_entity_surface_points
¶
get_entity_surface_points(entity: RigidEntity, n_points: int = 100, radius=None, use_visual_mesh=False)
Sample surface points from every link of an entity, in each link's canonical (local) frame.
| PARAMETER | DESCRIPTION |
|---|---|
entity
|
entity to sample points from
TYPE:
|
n_points
|
total number of points, split across the links in proportion to their mesh surface area
TYPE:
|
radius
|
minimum distance between samples (
DEFAULT:
|
use_visual_mesh
|
whether to use the visual mesh or the collision mesh
DEFAULT:
|
| RETURNS | DESCRIPTION |
|---|---|
points_list
|
per link, its sampled surface points [n_points_per_link, 3], or None for a zero-area link.
TYPE:
|
Source code in eden/utils/pc.py
update_entity_surface_points
¶
update_entity_surface_points(entity: RigidEntity, points_list: list[Tensor])
Transform per-link canonical surface points into world space and concatenate them.
| PARAMETER | DESCRIPTION |
|---|---|
entity
|
entity to update points from
TYPE:
|
points_list
|
per-link canonical points from :func:
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
points
|
the points in world space, [B, n_points, 3] for a batched scene, [n_points, 3] otherwise
TYPE:
|
Source code in eden/utils/pc.py
get_link_surface_points
¶
get_link_surface_points(link: RigidLink, n_points: int = 100, radius=None, use_visual_mesh=False)
Sample surface points from a single link, in canonical space.
| PARAMETER | DESCRIPTION |
|---|---|
link
|
link to sample points from
TYPE:
|
n_points
|
number of points to sample on the link
TYPE:
|
radius
|
minimum distance between samples (
DEFAULT:
|
use_visual_mesh
|
whether to use the visual mesh or the collision mesh
DEFAULT:
|
| RETURNS | DESCRIPTION |
|---|---|
points
|
sampled points on the surface of the link in canonical space [n_points, 3]
TYPE:
|
Note
Apply the link's current pose to move the points to world space::
link_points = get_link_surface_points(link, 100) # [n_points, 3]
update_sampled_points(link, link_points) # [B, n_points, 3] or [n_points, 3]
Source code in eden/utils/pc.py
update_sampled_points
¶
Transform canonical sampled points into world space using the link's current pose.
| PARAMETER | DESCRIPTION |
|---|---|
link
|
link whose current world pose is applied
TYPE:
|
sampled_points
|
sampled points from
|
| RETURNS | DESCRIPTION |
|---|---|
Tensor
|
the points in world space, [B, n_points_per_link, 3] for a batched scene, [n_points_per_link, 3] otherwise |
Source code in eden/utils/pc.py
chamfer_distance
¶
chamfer_distance(pts_a: Tensor, pts_b: Tensor, valid_a: Tensor | None = None, valid_b: Tensor | None = None, *, bidirectional: bool = True, empty_distance: float = 0.0) -> Tensor
Masked, batched Chamfer distance between two point clouds.
| PARAMETER | DESCRIPTION |
|---|---|
pts_a
|
TYPE:
|
pts_b
|
TYPE:
|
valid_a
|
TYPE:
|
valid_b
|
TYPE:
|
bidirectional
|
TYPE:
|
empty_distance
|
Returned per-direction when one side has zero valid points and the
other is non-empty.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
Tensor with shape ``pts_a.shape[:-2]`` — i.e. the leading batch
|
|
dimensions of the inputs are preserved (a 1-D batch yields a
|
|
``(B,)`` output, a 2-D batch yields ``(B1, B2)``, etc.). Both-empty
|
|
samples are always ``0.0``; one-empty samples take
|
|
``empty_distance``; otherwise the standard masked Chamfer.
|
|
Notes
Uses Euclidean distance (p=2) — not squared, matching the
DexMachina formulation in reward_utils.chamfer_distance. Per-side
means divide by the number of valid points (not the cloud capacity),
so reductions stay invariant to padding width.
Source code in eden/utils/pc.py
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 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 | |
Procedural simulation meshes for deformable bodies, written once to Eden's cache and loaded by path.
An entity takes its mesh as a file= path, so a structured mesh a task generates (a towel sheet, a
sponge lattice) is written to ~/.cache/eden/procedural_meshes/ under a name that spells out every
parameter, and the path goes into the options. A second call with the same parameters reuses the file.
Tetgen meshes a box primitive into a handful of tetrahedra (nine vertices for a sponge), far too coarse to
deform; :func:box_tet_lattice_file builds a regular lattice instead.
Functions:¶
write_atomically
¶
Write text to path (creating its directory) so no reader ever sees a partial file.
Several processes (DDP ranks, parallel tests) may generate the same cached file at once: each writes its own temporary file and the rename makes whichever lands last the (identical) result.
Source code in eden/utils/procedural_meshes.py
derived_file_path
¶
Where Eden caches a file derived from the file source: one path per source file, named name.
A derived file (an asset with parts stripped, a mesh rescaled) often names the source's own files by absolute
path, so it is keyed on the source's real path: two checkouts never share one. Put any parameter the derivation
takes in name. Callers rewrite the file (with :func:write_atomically) on every call, which costs
milliseconds and keeps it following both the source and the code that derives it.
Source code in eden/utils/procedural_meshes.py
box_tet_lattice
¶
box_tet_lattice(size: tuple[float, float, float], cells: tuple[int, int, int]) -> tuple[ndarray, ndarray]
Vertices (n, 3) and positively oriented tetrahedra (m, 4) of a box centred at the origin.
| PARAMETER | DESCRIPTION |
|---|---|
size
|
Box extents along x, y, z (m). |
cells
|
Hexahedral cells along x, y, z; each holds five tetrahedra. |
Source code in eden/utils/procedural_meshes.py
box_tet_lattice_file
¶
Path of a legacy ASCII VTK file holding :func:box_tet_lattice (a MochiElasticMaterialOptions mesh).
Source code in eden/utils/procedural_meshes.py
grid_sheet
¶
Vertices (n, 3) and consistently wound triangles (m, 3) of a flat sheet in z = 0, centred.
Source code in eden/utils/procedural_meshes.py
grid_sheet_file
¶
Path of a Wavefront OBJ holding :func:grid_sheet (a MochiShellMaterialOptions mesh).
Source code in eden/utils/procedural_meshes.py
swept_tube
¶
Vertices and outward-wound triangles of a closed tube of circular section swept along a planar polyline.
The ends are capped, so the mesh is watertight (a signed-distance collider needs an inside). The path must
lie in a plane; the section turns with the path, one ring of sides vertices per path point, and a bend
made of short segments reads as a smooth elbow.
| PARAMETER | DESCRIPTION |
|---|---|
path
|
Points
TYPE:
|
radius
|
Section radius (m).
TYPE:
|
sides
|
Vertices per ring.
TYPE:
|
Source code in eden/utils/procedural_meshes.py
swept_tube_file
¶
Path of a Wavefront OBJ holding :func:swept_tube, cached under name (which must spell out the path).
Source code in eden/utils/procedural_meshes.py
Contacts¶
The tensor backend of RigidEntity.get_grouped_contacts.
Pure-tensor contact-aggregation helpers (backend of RigidEntity.get_grouped_contacts).
These have no dependency on the entity abstraction, so they live with the other
math-only helpers (next to :mod:eden.utils.pc) and can be unit-tested without
importing :mod:eden.entities.rigid (which pulls in the support-surface mixin
and triggers genesis.utils.array_class top-level code that requires
gs.init()).
Scaling note: the (B, C, n_a, n_b) broadcast in
:func:aggregate_grouped_contacts is fine at link-level pair counts (≤ ~30 per
side) but must become a scatter_add before geom-level use (~900 pairs).
Functions:¶
resolve_local_link_idx
¶
Normalise a local-link-index argument into a 1-D long tensor on device.
| PARAMETER | DESCRIPTION |
|---|---|
idx
|
Local link indices; |
num_links
|
Exclusive upper bound for valid indices.
TYPE:
|
device
|
Device the returned tensor must live on.
TYPE:
|
Hot
|
|
Callers
|
|
should
|
|
cached
|
|
Source code in eden/utils/contacts.py
aggregate_grouped_contacts
¶
aggregate_grouped_contacts(*, link_a: Tensor, link_b: Tensor, position: Tensor, force: Tensor, valid_mask: Tensor, a_global: Tensor, b_global: Tensor) -> dict[str, Tensor]
Force-norm-weighted per-link-pair contact aggregation.
| PARAMETER | DESCRIPTION |
|---|---|
link_a
|
TYPE:
|
link_b
|
TYPE:
|
position
|
TYPE:
|
force
|
TYPE:
|
valid_mask
|
TYPE:
|
a_global
|
1-D global link indices selecting which links populate axes 1 and 2 of the output. Must be disjoint (see Raises). Both Genesis orderings (a→A, b→B) and (a→B, b→A) are folded into the same pair so the caller never has to care which side Genesis labelled "a".
TYPE:
|
b_global
|
1-D global link indices selecting which links populate axes 1 and 2 of the output. Must be disjoint (see Raises). Both Genesis orderings (a→A, b→B) and (a→B, b→A) are folded into the same pair so the caller never has to care which side Genesis labelled "a".
TYPE:
|
Genesis
|
|
contact
|
|
this
|
|
| RETURNS | DESCRIPTION |
|---|---|
dict with:
|
|
- ``position`` : ``(B, n_a, n_b, 3)`` — force-norm-weighted mean
|
contact position; zero where |
- ``valid`` : ``(B, n_a, n_b)`` bool — True iff at least one
|
contact pair contributed a non-zero force-norm sum
(computed as |
- ``force_norm_sum`` : ``(B, n_a, n_b)`` — Σ ||f_i|| over contacts
|
contributing to the pair (the denominator used to weight the position mean). Note this is the sum of magnitudes, not the magnitude of the summed force vector — opposing-direction contacts do not cancel here. |
| RAISES | DESCRIPTION |
|---|---|
ValueError
|
If |
Source code in eden/utils/contacts.py
92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 | |
Terrains¶
Terrain generators register in TERRAIN_GENERATOR_REGISTRY and compose into a TerrainOptions
(entity options). See the scenes and terrains guide.
Base terrain generator and flat terrain.
Attributes¶
TERRAIN_GENERATOR_REGISTRY
module-attribute
¶
TERRAIN_GENERATOR_REGISTRY = Registry('TERRAIN_GENERATOR')
Classes¶
TerrainFields
dataclass
¶
TerrainFields(height_field: ndarray, goals: ndarray | None, goals_count: ndarray | None, slope_vectors: ndarray | None)
Outputs of a terrain-grid generation pass.
Beyond the stitched height field, goal-producing generators (the Parkour* course
generators) contribute per-cell waypoint goals; HalfSlopedTerrain contributes a
slope_vector. Both are optional side channels: grids built from plain generators leave
them None.
Attributes¶
height_field
instance-attribute
¶
(X, Y) stitched height field in vertical_scale units (dim0 = x, dim1 = y).
goals
instance-attribute
¶
(rows, cols, max_goals, 3) float32 — per-cell waypoints in subterrain-local meters
(xy from the cell's [0, 0] corner; z from the stitched height field, in meters).
Cells with fewer goals are padded by repeating their last real goal. None when no
generator in the grid produced goals.
goals_count
instance-attribute
¶
(rows, cols) int64 — number of real (unpadded) goals per cell; None with goals.
slope_vectors
instance-attribute
¶
(rows, cols, 3) float32 — normalized slope direction per cell, zeros where a generator
set none; None when no generator in the grid produced one.
Methods:¶
TerrainGenerator
¶
TerrainGenerator(options: TerrainTermOptions)
Bases: ConfigurableMixin
Terrain generator for Eden, wrapping Genesis' terrain utils.
Note: Uses unparameterized ConfigurableMixin to avoid a circular import with eden.options.entities. options_class is resolved lazily.
Source code in eden/utils/terrains/base.py
FlatTerrain
¶
FlatTerrain(options: TerrainTermOptions)
Functions:¶
generate_terrain_fields
¶
generate_terrain_fields(terrain_generators: list[list[TerrainTermOptions]], subterrain_size: Vec2FType, n_subterrains: Vec2IType, horizontal_scale: float, vertical_scale: float, randomize: bool) -> TerrainFields
Generate the height field plus goal/slope side channels for the terrain grid.
terrain_generators must be a non-empty rectangular grid whose shape
equals n_subterrains (rows x cols).
Source code in eden/utils/terrains/base.py
generate_height_field
¶
generate_height_field(terrain_generators: list[list[TerrainTermOptions]], subterrain_size: Vec2FType, n_subterrains: Vec2IType, horizontal_scale: float, vertical_scale: float, randomize: bool) -> ndarray
Generate only the stitched height field (see :func:generate_terrain_fields).
Source code in eden/utils/terrains/base.py
Height-field terrain generators (fractal, sloped, obstacles, ...).
Attributes¶
Classes¶
FractalTerrain
¶
FractalTerrain(options: TerrainTermOptions)
Bases: TerrainGenerator
Fractal terrain generator.
| PARAMETER | DESCRIPTION |
|---|---|
levels
|
Granularity of the fractal terrain. Defaults to 8.
TYPE:
|
scale
|
Scales vertical variation. Defaults to 1.0.
TYPE:
|
Source code in eden/utils/terrains/base.py
RandomUniformTerrain
¶
RandomUniformTerrain(options: TerrainTermOptions)
Bases: TerrainGenerator
Source code in eden/utils/terrains/base.py
SlopedTerrain
¶
SlopedTerrain(options: TerrainTermOptions)
PyramidSlopedTerrain
¶
PyramidSlopedTerrain(options: TerrainTermOptions)
DiscreteObstaclesTerrain
¶
DiscreteObstaclesTerrain(options: TerrainTermOptions)
WaveTerrain
¶
WaveTerrain(options: TerrainTermOptions)
Bases: TerrainGenerator
Sinusoidal waves along BOTH axes — not a one-dimensional corrugation.
The height field is (amplitude / 2) * (cos(y / div) + sin(x / div)) (isaacgym-legacy
formula), so the surface undulates along x and y with peak deviation of about amplitude
meters, and there are side-slopes everywhere — a robot traversing along +x is continuously
perturbed laterally, so a consistent sideways drift on this terrain is geometry, not a policy
or porting error. div is derived from the subterrain length only (length /
(num_waves * 2 * pi)) and applied to both axes, so on a non-square subterrain the wave count
along x differs from num_waves.
Source code in eden/utils/terrains/base.py
StairsTerrain
¶
StairsTerrain(options: TerrainTermOptions)
PyramidStairsTerrain
¶
PyramidStairsTerrain(options: TerrainTermOptions)
SteppingStonesTerrain
¶
SteppingStonesTerrain(options: TerrainTermOptions)
Bases: TerrainGenerator
Source code in eden/utils/terrains/base.py
Procedural box/Perlin terrain generators.
Attributes¶
Classes¶
PerlinNoiseTerrain
¶
PerlinNoiseTerrain(options: TerrainTermOptions)
Bases: TerrainGenerator
Fractal Perlin noise terrain with layered octaves for natural-looking surfaces.
| PARAMETER | DESCRIPTION |
|---|---|
octaves
|
Number of noise octaves to layer. More octaves add finer detail.
TYPE:
|
persistence
|
Amplitude multiplier per octave (controls roughness).
TYPE:
|
lacunarity
|
Frequency multiplier per octave (controls detail density).
TYPE:
|
scale
|
Base period of the noise in height-field cells (larger = smoother features).
TYPE:
|
amplitude
|
Overall height amplitude in meters (the octave sum is normalized by its total amplitude first).
TYPE:
|
seed
|
Random seed for reproducible noise. Use -1 for random.
TYPE:
|
Source code in eden/utils/terrains/base.py
Attributes¶
Methods:¶
compute
¶
Source code in eden/utils/terrains/procedural_terrains.py
GapTerrain
¶
GapTerrain(options: TerrainTermOptions)
Bases: TerrainGenerator
Terrain with parallel gaps (chasms) across the surface.
| PARAMETER | DESCRIPTION |
|---|---|
gap_width
|
Width of each gap in meters.
TYPE:
|
gap_depth
|
Depth of each gap in meters.
TYPE:
|
platform_width
|
Width of flat platform between gaps in meters.
TYPE:
|
num_gaps
|
Number of gaps to place across the terrain.
TYPE:
|
Source code in eden/utils/terrains/base.py
Attributes¶
Methods:¶
compute
¶
Source code in eden/utils/terrains/procedural_terrains.py
PitTerrain
¶
PitTerrain(options: TerrainTermOptions)
Bases: TerrainGenerator
Terrain with rectangular pits at random positions.
| PARAMETER | DESCRIPTION |
|---|---|
pit_depth
|
Depth of each pit in meters.
TYPE:
|
pit_size_range
|
Min and max side length of pits in meters.
TYPE:
|
num_pits
|
Number of pits to place on the terrain.
TYPE:
|
platform_size
|
Size of a safe flat zone in the center in meters. Set 0 to disable.
TYPE:
|
Source code in eden/utils/terrains/base.py
Attributes¶
Methods:¶
compute
¶
Source code in eden/utils/terrains/procedural_terrains.py
RidgeTerrain
¶
RidgeTerrain(options: TerrainTermOptions)
Bases: TerrainGenerator
Terrain with parallel sharp ridges.
| PARAMETER | DESCRIPTION |
|---|---|
ridge_height
|
Height of each ridge in meters.
TYPE:
|
ridge_width
|
Width of each ridge in meters.
TYPE:
|
ridge_spacing
|
Spacing between ridges in meters.
TYPE:
|
Source code in eden/utils/terrains/base.py
Attributes¶
Methods:¶
compute
¶
Source code in eden/utils/terrains/procedural_terrains.py
CraterTerrain
¶
CraterTerrain(options: TerrainTermOptions)
Bases: TerrainGenerator
Terrain with smooth circular crater depressions.
| PARAMETER | DESCRIPTION |
|---|---|
crater_depth
|
Maximum depth of craters in meters.
TYPE:
|
crater_radius_range
|
Min and max radius of craters in meters.
TYPE:
|
num_craters
|
Number of craters to place on the terrain.
TYPE:
|
Source code in eden/utils/terrains/base.py
Attributes¶
crater_radius_range
class-attribute
instance-attribute
¶
Methods:¶
compute
¶
Source code in eden/utils/terrains/procedural_terrains.py
NarrowBeamsTerrain
¶
NarrowBeamsTerrain(options: TerrainTermOptions)
Bases: TerrainGenerator
Radial beams extending from a central platform across a pit.
Inspired by mjlab's BoxNarrowBeamsTerrainCfg.
| PARAMETER | DESCRIPTION |
|---|---|
num_beams
|
Number of beams radiating from the center.
TYPE:
|
beam_width
|
Width of each beam in meters.
TYPE:
|
beam_height
|
Height of the beams and central platform above the zero level in meters (the pit floor is at
TYPE:
|
platform_width
|
Side length of the central platform in meters.
TYPE:
|
floor_depth
|
Depth of the surrounding pit in meters.
TYPE:
|
Source code in eden/utils/terrains/base.py
Attributes¶
Methods:¶
compute
¶
Source code in eden/utils/terrains/procedural_terrains.py
RandomGridTerrain
¶
RandomGridTerrain(options: TerrainTermOptions)
Bases: TerrainGenerator
Grid of cells with random heights, creating a blocky uneven surface.
Inspired by mjlab's BoxRandomGridTerrainCfg.
| PARAMETER | DESCRIPTION |
|---|---|
grid_width
|
Side length of each grid cell in meters.
TYPE:
|
grid_height_range
|
Min and max height of grid cells in meters.
TYPE:
|
platform_width
|
Side length of the central flat platform in meters.
TYPE:
|
Source code in eden/utils/terrains/base.py
Attributes¶
Methods:¶
compute
¶
Source code in eden/utils/terrains/procedural_terrains.py
RandomBoxesTerrain
¶
RandomBoxesTerrain(options: TerrainTermOptions)
Bases: TerrainGenerator
Randomly scattered raised boxes on a flat surface.
Inspired by mjlab's BoxRandomSpreadTerrainCfg.
| PARAMETER | DESCRIPTION |
|---|---|
num_boxes
|
Number of boxes to scatter.
TYPE:
|
box_size_range
|
Min and max side length of boxes in meters.
TYPE:
|
box_height_range
|
Min and max height of boxes in meters.
TYPE:
|
platform_width
|
Side length of the safe central platform in meters.
TYPE:
|
Source code in eden/utils/terrains/base.py
Attributes¶
Methods:¶
compute
¶
Source code in eden/utils/terrains/procedural_terrains.py
TiltedGridTerrain
¶
TiltedGridTerrain(options: TerrainTermOptions)
Bases: TerrainGenerator
Grid of cells with tilted surfaces creating uneven, sloped patches.
Inspired by mjlab's BoxTiltedGridTerrainCfg.
| PARAMETER | DESCRIPTION |
|---|---|
grid_width
|
Side length of each grid cell in meters.
TYPE:
|
tilt_range
|
Maximum tilt angle in degrees.
TYPE:
|
height_range
|
Additional height variation in meters.
TYPE:
|
platform_width
|
Side length of the central flat platform in meters.
TYPE:
|
Source code in eden/utils/terrains/base.py
Attributes¶
Methods:¶
compute
¶
Source code in eden/utils/terrains/procedural_terrains.py
NestedRingsTerrain
¶
NestedRingsTerrain(options: TerrainTermOptions)
Bases: TerrainGenerator
Concentric rectangular rings forming a nested obstacle pattern.
Inspired by mjlab's BoxNestedRingsTerrainCfg.
| PARAMETER | DESCRIPTION |
|---|---|
num_rings
|
Number of concentric rings.
TYPE:
|
ring_width
|
Thickness of each ring in meters.
TYPE:
|
gap_width
|
Space between rings in meters.
TYPE:
|
height_range
|
Min and max height of rings in meters.
TYPE:
|
platform_width
|
Side length of the central platform in meters.
TYPE:
|
Source code in eden/utils/terrains/base.py
Attributes¶
Methods:¶
compute
¶
Source code in eden/utils/terrains/procedural_terrains.py
Parkour / locomotion-obstacle terrain generators (ported from extreme-parkour).
These height-field generators carve corridor-style courses (stepping stones, gaps, hurdles, steps) plus a few standalone obstacles.
Conventions: height_field_raw is indexed (x, y) where dim0 is the course
(forward) direction and dim1 is lateral; generators are shape-aware, so
non-square subterrains (e.g. 16 x 4 m lanes) place features correctly. The course
generators attach goals — an (N, 2) float array of waypoints in
subterrain-local meters (measured from the cell's [0, 0] corner) — and
HalfSlopedTerrain attaches a normalized slope_vector. Both are collected
by :func:eden.utils.terrains.base.generate_terrain_fields and surfaced world-frame
on the :class:~eden.entities.terrain.Terrain entity for goal-following command
terms.
goals come out strictly ordered along the course axis and inside the walkable strip
(clear of the far-end :func:_pad_borders wall). The walk itself is not bounded by the
subterrain, so :func:_fit_final_goal_x pulls the last waypoint back when it overruns the
lane — preferring the course corridor over the bare far-end limit — and raises once the lane is
too short to hold an ordered sequence. :func:_validate_goals then checks the assembled array,
so the guarantee holds even for option values that make the walk step backwards rather than
being inferred from goals[-2] alone.
Three things it deliberately does not police:
- Obstacle relief. Height-field writes that overrun the strip are clipped (see
:func:
_set_height_block), so a short lane can still drop its last obstacle silently. A relocated final goal prefers the corridor but is not guaranteed it — see :func:_pull_back_onto_corridorfor the lane shape that defeats the search. - Spacing between interior goals, which is the generator's own layout, set by its
x_rangeand stone/gap counts.tests/utils/terrains/test_parkour_terrains.pypins the minimum each generator actually produces at its shortest supported subterrain, andtests/tasks/extreme_parkour/teacher/test_config.pypins it for the shipped teacher lanes. - Lateral placement. Only the course axis is bounded; a course whose
y_rangeoutruns a narrow lane can still put a waypoint in — or past — the lateral wall.
Attributes¶
Classes¶
RoughTerrainGenerator
¶
RoughTerrainGenerator(options: TerrainTermOptions)
Bases: TerrainGenerator
Base for course generators with difficulty-scaled surface roughness (not registered).
Source code in eden/utils/terrains/base.py
Attributes¶
Methods:¶
corridor_height_raw
¶
corridor_height_raw(subterrain: SubTerrain) -> int
Raw height of the flat ground this course walks along between its obstacles.
The corridor generators (gap, hurdle, step, demo) carve their relief into a field that
starts at zero and only paint platform_height onto the start platform, so zero is
what the robot walks on and what the lane runs out onto. ParkourTerrain inverts that
and overrides this.
Used by :func:_pull_back_onto_corridor to place a relocated final goal on ground the
robot can stop on. Declared by the generator rather than read off the height field
because no single reading is right for all five courses.
Source code in eden/utils/terrains/parkour_terrains.py
GapParkourTerrain
¶
GapParkourTerrain(options: TerrainTermOptions)
Bases: TerrainGenerator
Source code in eden/utils/terrains/base.py
Attributes¶
Methods:¶
compute
¶
Source code in eden/utils/terrains/parkour_terrains.py
ParkourTerrain
¶
ParkourTerrain(options: TerrainTermOptions)
Bases: RoughTerrainGenerator
Source code in eden/utils/terrains/base.py
Attributes¶
Methods:¶
corridor_height_raw
¶
corridor_height_raw(subterrain: SubTerrain) -> int
This course floods the lane with pit_depth and paints platforms on top of it.
So unlike its siblings the walkable ground is platform_height, not the field's initial
value — the start platform and the run-out platform past the last stone are both painted
there, and a goal pulled back onto the pit would be at the bottom of it.
Source code in eden/utils/terrains/parkour_terrains.py
compute
¶
Source code in eden/utils/terrains/parkour_terrains.py
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 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 | |
ParkourGapTerrain
¶
ParkourGapTerrain(options: TerrainTermOptions)
Bases: RoughTerrainGenerator
Source code in eden/utils/terrains/base.py
Attributes¶
half_valid_width
class-attribute
instance-attribute
¶
Methods:¶
compute
¶
Source code in eden/utils/terrains/parkour_terrains.py
ParkourHurdleTerrain
¶
ParkourHurdleTerrain(options: TerrainTermOptions)
Bases: RoughTerrainGenerator
Source code in eden/utils/terrains/base.py
Attributes¶
half_valid_width
class-attribute
instance-attribute
¶
hurdle_height_range
class-attribute
instance-attribute
¶
Methods:¶
compute
¶
Source code in eden/utils/terrains/parkour_terrains.py
ParkourStepTerrain
¶
ParkourStepTerrain(options: TerrainTermOptions)
Bases: RoughTerrainGenerator
Source code in eden/utils/terrains/base.py
Attributes¶
half_valid_width
class-attribute
instance-attribute
¶
Methods:¶
compute
¶
Source code in eden/utils/terrains/parkour_terrains.py
ParkourDemoTerrain
¶
ParkourDemoTerrain(options: TerrainTermOptions)
Bases: RoughTerrainGenerator
Source code in eden/utils/terrains/base.py
Methods:¶
compute
¶
Source code in eden/utils/terrains/parkour_terrains.py
672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 | |
HalfSlopedTerrain
¶
HalfSlopedTerrain(options: TerrainTermOptions)
Bases: TerrainGenerator
Source code in eden/utils/terrains/base.py
Attributes¶
Methods:¶
compute
¶
Source code in eden/utils/terrains/parkour_terrains.py
HalfPlatformTerrain
¶
HalfPlatformTerrain(options: TerrainTermOptions)
Bases: TerrainGenerator
Source code in eden/utils/terrains/base.py
Attributes¶
Methods:¶
compute
¶
Source code in eden/utils/terrains/parkour_terrains.py
CustomSteppingStonesTerrain
¶
CustomSteppingStonesTerrain(options: TerrainTermOptions)
Bases: TerrainGenerator
Source code in eden/utils/terrains/base.py
Attributes¶
Methods:¶
compute
¶
Source code in eden/utils/terrains/parkour_terrains.py
Terrain generator that loads an exported height-field .npz verbatim.
Closes the loop on :mod:eden.utils.terrains.io: a terrain exported via
:func:~eden.utils.terrains.io.export_height_field can be rebuilt as a scene
entity, so offline tools (e.g. the TCRS motion adapter) and the simulated
scene share exactly one surface. Use
:func:~eden.utils.terrains.io.terrain_options_from_height_field_file to get
matching TerrainOptions in one call.
Attributes¶
Classes¶
HeightFieldFileTerrain
¶
HeightFieldFileTerrain(options: TerrainTermOptions)
Bases: TerrainGenerator
Fill the subterrain with the grid from an exported height-field .npz.
The enclosing TerrainOptions must match the file: the same
horizontal_scale, vertical_scale=1.0 (the stored grid is already
in meters), and subterrain_size = ((H-1)*hs, (W-1)*hs). The file's
origin is not applied here — set default_root_pos to it (or build
the options via terrain_options_from_height_field_file).
Source code in eden/utils/terrains/base.py
Attributes¶
Methods:¶
compute
¶
Source code in eden/utils/terrains/height_field_file_terrain.py
Height-field export and import¶
Height-field terrain export/import.
Eden terrains are generated in memory (:func:generate_height_field) and
normally live only inside the Genesis morph. This module defines a small
on-disk .npz format so a terrain's height field can be exported once and
re-used by offline tools (e.g. the TCRS terrain-adaptive motion retargeter)
without re-running the generators.
Format (version 1)
height_field
float32 [H, W] grid of heights in meters (vertical_scale is
already applied). Axis 0 maps to world +x, axis 1 to world +y — the same
convention as :func:generate_height_field and
:class:~eden.entities.terrain.Terrain.
horizontal_scale
float64 cell size in meters: x = origin[0] + i * horizontal_scale.
origin
float64 [3] world position of grid corner [0, 0].
_format_version
Integer format tag; loaders must reject unknown versions.
Attributes¶
Classes¶
HeightFieldData
dataclass
¶
HeightFieldData(height_field_m: ndarray, horizontal_scale: float, origin: tuple[float, float, float] = (0.0, 0.0, 0.0))
A height-field grid in meters plus the metadata needed to query it.
Functions:¶
export_height_field
¶
export_height_field(path: str, height_field_m: ndarray, horizontal_scale: float, origin: tuple[float, float, float] = (0.0, 0.0, 0.0)) -> None
Save a height field (in meters) to path in the versioned .npz format.
Source code in eden/utils/terrains/io.py
load_height_field
¶
load_height_field(path: str) -> HeightFieldData
Load a height field previously written by :func:export_height_field.
Source code in eden/utils/terrains/io.py
terrain_options_from_height_field_file
¶
terrain_options_from_height_field_file(path: str) -> 'TerrainOptions'
Build a TerrainOptions that reconstructs an exported height field verbatim.
The returned options place the terrain at the file's origin and reproduce
the stored grid exactly (float raw field, vertical_scale=1.0), so a
scene built from them matches what the TCRS
HeightFieldTerrain queried during adaptation.
Source code in eden/utils/terrains/io.py
height_field_from_terrain_options
¶
height_field_from_terrain_options(options: 'TerrainOptions') -> HeightFieldData
Materialize the height field a :class:TerrainOptions would build, in meters.
Runs the same :func:generate_height_field call as
:meth:eden.entities.terrain.Terrain._create_morph_from_options, applies
vertical_scale, and stamps options.default_root_pos as the origin.
Source code in eden/utils/terrains/io.py
Plane grids¶
A grid of square cells over a plane: the layout of a task's per-env marks on a flat surface.
A whiteboard's ink (eden.tasks.whiteboard) and a sheet's (eden.tasks.art.calligraphy) are kept on one, and a
camera paints them through a :class:~eden.entities.camera_overlays.PaintedPlane, which carries the grid.
Classes¶
PlaneGrid
dataclass
¶
A rows x cols grid of cell-metre cells over a plane's (u, v) frame, row 0 at the top.
Cell (r, c) covers u in [u0 + c cell, u0 + (c + 1) cell] and v in [v0 - (r + 1) cell, v0 - r cell]:
(u0, v0) is the grid's top-left corner.
Attributes¶
Methods:¶
cell_of
¶
(row, col) of the cell holding each point uv (..., 2); may lie outside the grid.
Source code in eden/utils/plane_grid.py
centers
¶
(u, v) of every cell's centre, (rows, cols, 2).
Source code in eden/utils/plane_grid.py
Assets¶
Assets download on first use into eden.utils.misc.get_assets_dir(): $EDEN_ASSETS_DIR when it is set (it must
be absolute), otherwise $XDG_CACHE_HOME/eden/assets, by default ~/.cache/eden/assets. Fetch an
entity's or a policy's file through its owner (options.fetch_asset(file), MyPolicy.fetch_asset(file)) rather than
calling get_asset_path with a local_dir yourself. See the assets page.
Asset download (local-first, lock-serialized) and dependency extraction from model files.
Attributes¶
Functions:¶
get_asset_path
¶
get_asset_path(file: str, registry: str | None = 'Kashu7100', dataset: str | None = 'eden_assets', local_dir: str | None = None) -> str
Resolve an asset to a local file, fetching it and its dependencies from the Hub if needed.
file is one of:
- a path inside
local_dir, cached or not: the repo path belowlocal_dir, resolved as that repo path is (so a missing dependency of a cached file is fetched too); - any other existing local path, returned as is (an absolute one that does not exist raises, without a fetch);
- the file's full path in the
registry/datasetHub repo, e.g.models/eggplant/object.urdf.
local_dir defaults to :func:eden.utils.misc.get_assets_dir, the download root EDEN_ASSETS_DIR
moves. A repo path is matched exactly, never by its tail. local_dir can hold other datasets' caches
(the download root holds ycb/, simpler/, ...), so a bare name or a path suffix could name
another dataset's file; the error for one lists the repo paths that end in it.
With registry or dataset set to None nothing is fetched: file is returned if it exists
locally, else None.
Source code in eden/utils/assets.py
454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 | |
sample_data_path
¶
Resolve one of task's sample files, fetching it from HuggingFace on first use.
The one way in to the shared example-data repo, so a checkout and an installed wheel behave identically. The task name is the directory holding that task's files, which stops a task widening its fetch to another's.
| PARAMETER | DESCRIPTION |
|---|---|
task
|
Registered task name, and the directory holding that task's files in the repo.
TYPE:
|
filename
|
File to resolve, relative to that directory. Only this one file is downloaded.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
str
|
Local path to the file. |
Source code in eden/utils/assets.py
find_latest_checkpoint
¶
Source code in eden/utils/assets.py
resolve_run_dir
¶
Resolve a --resume reference to a run directory under runs_root.
runs_root is a task's run root (logs/<task>); each child is a run directory
named <timestamp>[-<run_name>]-<id>. ref selects one of them:
"latest"— the most recently modified run directory;- an exact run id — the trailing
-<id>segment of a run's basename; - a substring — matched against the whole basename (e.g. part of a run_name).
Fails loud, listing the available runs, when nothing matches or a substring is
ambiguous, so a typo never silently resumes the wrong run. This is the run-directory
analogue of :func:find_latest_checkpoint (which selects a checkpoint within one
run); callers chain the two: find_latest_checkpoint(resolve_run_dir(root, ref)).
| PARAMETER | DESCRIPTION |
|---|---|
runs_root
|
The task's run root, e.g.
TYPE:
|
ref
|
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
str
|
Path (joined onto |
| RAISES | DESCRIPTION |
|---|---|
FileNotFoundError
|
If |
ValueError
|
If |
Source code in eden/utils/assets.py
load_text
¶
Source code in eden/utils/assets.py
Kinematics-only robot envs¶
Genesis runtime helpers — transient kinematics envs for preprocessing.
Shared infrastructure for any Eden preprocessing code that needs to spin up a Genesis scene just to run forward kinematics or query a Jacobian, without the full training-loop machinery. Callers include:
- :meth:
eden.datasets.base.DatasetBase._forward_velocity_kinematics— fills in per-link velocity fields after dataset prepare. - :class:
eden.datasets.modifiers.smooth_start_end.SmoothStartTransition— builds a single-env scene for the smooth-start IK. - :class:
eden.datasets.modifiers.ground.GroundFirstFrame— FK of each clip's first frame to put the robot on the floor. - :class:
eden.extensions.teleop.sonic.g1_fk.G1KeyFrameFk— a scene held open for the process's FK queries.
Classes¶
Functions:¶
transient_robot_env
¶
transient_robot_env(robot_options: 'EntityOptions', *, num_envs: int = 1, sim_dt: float = 0.005) -> 'Iterator[tuple[EnvBase, RigidEntity]]'
Yield (env, robot) for a single-shot kinematics scene.
Destroys the env on exit. Use for preprocessing code that needs FK / Jacobian queries but doesn't run physics simulation.
| PARAMETER | DESCRIPTION |
|---|---|
robot_options
|
Eden
TYPE:
|
num_envs
|
Scene env count. Most preprocessing wants 1;
TYPE:
|
sim_dt
|
Doesn't affect kinematics queries, only matters for the constraint solver warmup. Set to the clip's dt when relevant, otherwise leave at the small default.
TYPE:
|
Wall
|
|
compile
|
|
compile
|
|
Source code in eden/utils/genesis_runtime.py
clear_rigid_query_caches
¶
Drop the rigid solver's per-step query caches, so the next query of the step is answered afresh.
The part of Genesis' RigidSolver._restart that Eden needs, and only that part: _restart also re-arms
every drone's once-per-step propeller guard, which a mid-step call must not do. Genesis exposes no public
call for this, so the cache attributes are named here, in one place, and a Genesis that renamed one raises
rather than leaving a cache that would be served stale.