Environment Options¶
EnvOptions is the env_options field of every config: the number of parallel environments, the control and
simulation time steps, the integrator, solver and contact settings, precision-dependent tolerances and the episode
length. CudaGraphOptions (its cuda_graph_options field) turns on CUDA-graph replay of the graded phase of the
step. The physics guide explains the simulation settings.
num_envs is per process: under multi-GPU training each rank builds its own num_envs environments.
EnvOptions
¶
Bases: ConfigurableOptions
Top-level environment configuration (sim, solvers, batching).
| PARAMETER | DESCRIPTION |
|---|---|
num_envs
|
Number of environments to run in parallel.
|
sim_dt
|
Simulation time step.
|
sim_substeps
|
Number of simulation substeps.
|
decimation
|
Physics steps per control (env) step. The control step is
|
requires_grad
|
Whether to enable differentiable mode. Defaults to False.
TYPE:
|
episode_length_s
|
Length of the episode in seconds.
|
use_gjk_collision
|
Whether to use GJK collision detection. Defaults to True. If False, MPR+GJK will be used.
|
solver
|
Constraint solver (Newton or conjugate gradient).
|
integrator
|
Rigid-body integrator.
|
impratio
|
Ratio of frictional to normal constraint impedance at contacts (MuJoCo's
|
constraint_timeconst
|
Time constant for the constraint solver. If None, it will be computed as max(0.01, 2 * sim_dt / sim_substeps).
|
max_collision_pairs
|
Maximum number of collision pairs.
|
iterations
|
Maximum constraint-solver iterations.
|
tolerance
|
Convergence tolerance for the constraint solver, as a ratio against the scene's free-motion cost. If None, Genesis resolves it from the floating-point precision (1e-6 for single, 1e-9 for double). Defaults to None — pinning a literal here means a Genesis release that re-scales what the ratio is quoted against (as https://github.com/Genesis-Embodied-AI/Genesis/pull/3194 did) silently moves Eden's convergence gate.
|
ls_iterations
|
Maximum line-search iterations per constraint-solver iteration.
|
ls_tolerance
|
Line-search convergence tolerance.
|
enable_self_collision
|
Whether to enable self collision detection. Defaults to True.
|
enable_neutral_collision
|
Keep self-collision pairs that already overlap in an entity's neutral configuration (qpos0). Defaults to False, where Genesis drops every such pair for good. Its overlap test is a voxel approximation, so it can drop a pair that only comes within millimetres at qpos0 -- set True to keep the MJCF's full collision set. The switch is scene-wide (a rigid-solver option, not a per-entity one): True keeps the pairs that overlap at qpos0 on every articulated entity in the scene, so a second robot whose collision meshes genuinely interpenetrate at qpos0 then fights itself from the first step.
|
batch_links_info
|
Whether to batch links information. Defaults to False.
|
batch_joints_info
|
Whether to batch joints information. Defaults to False.
|
batch_dofs_info
|
Whether to batch DOFs information. Defaults to True.
|
enable_multi_contact
|
Whether to enable multi-contact detection. Defaults to True.
|
enable_torsional_friction
|
Opt-in torsional friction: whether contacts also resist relative spin about their
normal (one extra constraint axis per contact). Defaults to False. Enable it when spin
resistance matters (e.g. a peg twisting in a hole, an object twisting inside a grasp).
This switch only adds the axis — its strength is per geom, from
|
enable_rolling_friction
|
Opt-in rolling friction: whether contacts also resist rolling about their tangent axes
(two extra constraint axes per contact). Requires
|
friction_cone
|
Shape of the friction cone.
|
contact_resolution
|
How a contact's normal force and friction force are resolved against each other.
|
noslip_iterations
|
Number of iterations for the noslip solver. Defaults to 0 (disabled). noslip is a post-processing step after the main solver to suppress slip/drift. Recommended to set this value to 5 for manipulation tasks or when slip/drift is a big problem.
|
env_spacing
|
Spacing between environments. Defaults to (0.0, 0.0).
|
center_envs_at_origin
|
Whether to center environments at the origin. Defaults to False.
|
show_link_frame
|
Whether to show link frames. Defaults to False.
|
show_world_frame
|
Whether to show world frames. Defaults to False.
|
show_camera_frustums
|
Whether to show camera frustums. Defaults to False.
|
segmentation_level
|
Level of segmentation. Defaults to "entity".
|
show_FPS
|
Whether to show FPS for profiling. Defaults to False.
|
enable_default_keybinds
|
Whether to enable the default viewer keyboard shortcuts. Defaults to True.
|
background_color
|
RGB background color (each component in [0, 1]) for the viewer/renderer. Defaults to (0.04, 0.08, 0.12).
|
rasterizer_shadows
|
Whether Rasterizer viewers and camera sensors render shadows. Defaults to True.
|
update_sensors_every_substep
|
If False (default), Genesis's The skip auto-disables on a per-step basis when any sensor declares
Genesis-level Set True to force per-sub-step updates unconditionally (mostly useful for an A/B comparison against per-sub-step updates).
|
record_final_observations
|
Snapshot pre-reset observations for done envs into Off by default. When on, No per-step GPU→CPU sync. Both the gating logic and the snapshot
copy stay on-device. Cost: one extra
rsl_rl PPO does not consume this, by design — rsl_rl 5.x reads
only the Turn it on for off-policy algorithms whose replay buffers need the
actual
|
cuda_graph_options
|
Replay the graded phase of These managers only read the post-physics state and write their own buffers, but they do it in
hundreds of small kernels, and on a host-bound step the launches are the cost: on BeyondMimic at
4096 envs the phase takes ~3 ms of host time eagerly, against ~5 µs for the replay plus ~70 µs for
the checks before it (see
|
coupler_options
|
The options configuring the coupler. Defaults to None (LegacyCouplerOptions).
TYPE:
|
fem_options
|
The options configuring the fem_solver. Defaults to None.
|
mpm_options
|
The options configuring the mpm_solver. Defaults to None.
|
sph_options
|
The options configuring the sph_solver. Defaults to None.
|
pbd_options
|
The options configuring the pbd_solver (Position-Based Dynamics: liquids, cloth, soft bodies, free particles). Defaults to None.
|
mochi_options
|
The options configuring the mochi_solver (Meta's implicit multi-physics solver:
rigid/articulated bodies, tetrahedral solids, shells and rods in one Newton system
with penalty contact). A scene with a Mochi entity may hold only Mochi and kinematic
entities, and cannot be differentiable. Leave
|
Source code in eden/options/options.py
Attributes¶
integrator
class-attribute
instance-attribute
¶
integrator: Literal['approximate_implicitfast', 'implicitfast', 'euler'] = 'approximate_implicitfast'
multiplier_collision_broad_phase
class-attribute
instance-attribute
¶
multiplier_collision_broad_phase: int = 8
enable_neutral_collision
class-attribute
instance-attribute
¶
enable_neutral_collision: bool = False
enable_torsional_friction
class-attribute
instance-attribute
¶
enable_torsional_friction: bool = False
friction_cone
class-attribute
instance-attribute
¶
friction_cone: Literal['pyramidal', 'elliptic'] = 'pyramidal'
contact_resolution
class-attribute
instance-attribute
¶
contact_resolution: Literal['convex', 'signorini'] | None = None
segmentation_level
class-attribute
instance-attribute
¶
segmentation_level: Literal['entity', 'link', 'geom'] = 'entity'
background_color
class-attribute
instance-attribute
¶
record_final_observations
class-attribute
instance-attribute
¶
record_final_observations: bool = False
update_sensors_every_substep
class-attribute
instance-attribute
¶
update_sensors_every_substep: bool = False
cuda_graph_options
class-attribute
instance-attribute
¶
cuda_graph_options: CudaGraphOptions | None = None
coupler_options
class-attribute
instance-attribute
¶
training_only_fields
class-attribute
¶
Methods:¶
reset_training_only_fields
¶
Reset every field in :attr:training_only_fields to its default; return the names of those it changed.
Source code in eden/options/envs.py
CudaGraphOptions
¶
Bases: ConfigurableOptions
How EnvOptions.cuda_graph_options captures, validates and re-captures the graded phase's CUDA graph.
The graph is captured after warmup_steps eager steps. That step and the next validation_steps are each
run eagerly too and compared bit for bit with the graph over every tensor the phase leaves behind: a term the
graph cannot reproduce raises, naming the tensors that differ, rather than training on stale values. A change
to a graded term's configured fields (a curriculum moving a termination threshold), to the env's dt,
max_episode_length or training, or a tensor the graph reads rebound to a new one, re-captures and
re-validates; reward weights are read from the device and need none. Reading env.common_step_counter
during the capture raises, naming the term's line. Not watched: any other Python value a term reads from
outside its own fields (another manager's term, a module global), which the graph replays as it was at
capture.
| PARAMETER | DESCRIPTION |
|---|---|
warmup_steps
|
Eager graded steps before the first capture. A term builds its lazy caches (index tensors, resolved link ids) on its first calls, and building one inside a capture is a host-to-device copy, which fails. These steps already read contacts padded, as the capture will, so a cache sized by the contact width fits it. Defaults to 2.
|
validation_steps
|
How many replays after each capture are checked against an eager run of the same step. A validated replay runs the graph before the eager phase, which is what catches work a capture could not record (a kernel launched outside torch's stream), so at least one is required. Each costs about one eager graded phase plus a copy of the tensors the phase writes. Defaults to 3.
|
recapture_window
|
The span, in graded steps, that
|
max_recaptures_per_window
|
Re-captures allowed within
|