> ## Documentation Index
> Fetch the complete documentation index at: https://docs.generalrobotics.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Customizing RL Training

Users can customize the core MDP components — observations, commands, actions, rewards, events, and terminations — when training RL agents using GRID.
By configuring these elements, you can tailor environment feedback and control interfaces to fit specific robotics tasks and training objectives.

## Observations

Observations list each measurable quantity the environment can return, the configuration options for specifying which asset or sensor to observe, and a description of what the measurement represents.

| Observation Function | Configurable Options | Description |
| - | - | - |
| base\_pos\_z | asset\_cfg.name | Root height in the simulation world frame. |
| base\_lin\_vel | asset\_cfg.name | Root linear velocity in the asset’s root frame. |
| base\_ang\_vel | asset\_cfg.name | Root angular velocity in the asset’s root frame. |
| projected\_gravity | asset\_cfg.name | Gravity projection on the asset’s root frame. |
| root\_pos\_w | asset\_cfg.name | Asset root position in the environment frame. |
| root\_quat\_w | make\_quat\_unique (`bool`), asset\_cfg.name | Asset root orientation (w, x, y, z) in the environment frame. |
| root\_lin\_vel\_w | asset\_cfg.name | Asset root linear velocity in the environment frame. |
| root\_ang\_vel\_w | asset\_cfg.name | Asset root angular velocity in the environment frame. |
| body\_pose\_w | asset\_cfg.name, body\_ids (`list[int]`) | Flattened body poses of the asset w\.r.t. environment origin (x, y, z, qw, qx, qy, qz) for each configured body. |
| projected\_gravity | asset\_cfg.name, body\_ids (`list[int]`) | Direction of gravity projected onto each body frame (x, y, z) for configured bodies. |
| joint\_pos | asset\_cfg.name | Joint positions of the asset. |
| joint\_pos\_rel | asset\_cfg.name | Joint positions relative to default joint positions. |
| joint\_pos\_limit\_normalized | asset\_cfg.name | Joint positions normalized by the asset’s soft position limits. |
| joint\_vel | asset\_cfg.name | Joint velocities of the asset. |
| joint\_vel\_rel | asset\_cfg.name | Joint velocities relative to default joint velocities. |
| joint\_effort | asset\_cfg.name | Joint applied effort (torque) for configured joints. |
| height\_scan | sensor\_cfg.name, offset (float) | Height scan from the sensor’s frame minus the given offset. |
| body\_incoming\_wrench | asset\_cfg.name, body\_ids (`list[int]`) | 6-D spatial wrench (force, torque) applied to each configured body link by joint forces. |
| imu\_orientation | asset\_cfg.name | IMU sensor orientation in world frame as quaternion (w, x, y, z). |
| imu\_ang\_vel | asset\_cfg.name | IMU sensor angular velocity (rad/s) in sensor frame. |
| imu\_lin\_acc | asset\_cfg.name | IMU sensor linear acceleration (m/s²) in sensor frame. |
| image | sensor\_cfg.name, data\_type (`str`), convert\_perspective\_to\_orthogonal (`bool`), normalize (`bool`) | Images from a camera or ray-caster camera (e.g., “rgb”, “depth”). Optionally normalize and orthogonalize depth. |
| image\_features | sensor\_cfg.name, data\_type (`str`), model\_zoo\_cfg (`dict`), model\_name (`str`), model\_device (`str`) | Extracted image features via a pretrained encoder (e.g., ResNet, Theia). |
| last\_action | action\_name (`str` or None) | The last input action term (or full action tensor if None). |
| velocity\_commands | params.command\_name ("base\_velocity") | Generated command tensor for base‐velocity commands. |
| ee\_pose\_commands | params.command\_name ("ee\_pose") | Generated command tensor for end‐effector pose commands. |
| base\_pose\_commands | params.command\_name ("base\_pose") | Generated command tensor for base‐pose commands. |
| target\_object\_position\_in\_robot\_root\_frame | params.command\_name ("object\_pose") | Generated command tensor for the target object’s pose in the robot’s root frame. |

#### Robot-Specific Observation Terms

| Observation Term | Robot | Configurable Options | Description |
| - | - | - | - |
| joint\_pos\_rel\_digit | Agility Digit | noise.n\_min, noise.n\_max, params.asset\_cfg.name, params.asset\_cfg.joint\_names | Digit-group joint positions relative to defaults (regex match). |
| joint\_vel\_rel\_digit | Agility Digit | noise.n\_min, noise.n\_max, params.asset\_cfg.name, params.asset\_cfg.joint\_names | Digit-group joint velocities relative to defaults. |
| joint\_pos\_rel\_left\_arm | Unitree G1 (27 DOF) | noise.n\_min, noise.n\_max, params.asset\_cfg.name, params.asset\_cfg.joint\_names | Left-arm joint positions relative to defaults (explicit list). |
| joint\_vel\_rel\_left\_arm | Unitree G1 (27 DOF) | noise.n\_min, noise.n\_max, params.asset\_cfg.name, params.asset\_cfg.joint\_names | Left-arm joint velocities relative to defaults. |

## Commands

Commands define the functions available to sample or set asset poses or velocities, along with the configurable parameters that control how those commands are generated or applied.

| Command Function | Configurable Options | Description |
| - | - | - |
| UniformPose2dCommand | asset\_name, cfg.ranges.pos\_x (`tuple`), cfg.ranges.pos\_y (`tuple`), cfg.ranges.heading (`tuple`), cfg.simple\_heading (`bool`), cfg.resampling\_time\_range (`tuple`) | Sample a random 2D position around the environment origin and a heading (either toward target or uniform). |
| TerrainBasedPose2dCommand | asset\_name, cfg.ranges.heading (`tuple`), cfg.simple\_heading (`bool`), cfg.resampling\_time\_range (`tuple`) | Sample a random 2D position from valid terrain patches and a heading (either toward target or uniform). |
| UniformPoseCommand | asset\_name, body\_name, cfg.ranges.pos\_x (`tuple`), cfg.ranges.pos\_y (`tuple`), cfg.ranges.pos\_z (`tuple`), cfg.ranges.roll (`tuple`), cfg.ranges.pitch (`tuple`), cfg.ranges.yaw (`tuple`), cfg.make\_quat\_unique (`bool`), cfg.resampling\_time\_range (`tuple`) | Sample a random 3D pose (position + quaternion) in the robot’s base frame uniformly within specified ranges. |
| UniformVelocityCommand | asset\_name, cfg.ranges.lin\_vel\_x (`tuple`), cfg.ranges.lin\_vel\_y (`tuple`), cfg.ranges.ang\_vel\_z (`tuple`), cfg.heading\_command (`bool`), cfg.ranges.heading (`tuple`), cfg.rel\_heading\_envs (`float`), cfg.rel\_standing\_envs (`float`), cfg.resampling\_time\_range (`tuple`) | Sample a random base-frame linear (x,y) and yaw velocity (either uniform or based on heading error), with optional standing/no-motion environments. |
| NormalVelocityCommand | asset\_name, cfg.ranges.mean\_vel (`tuple` of 3), cfg.ranges.std\_vel (`tuple` of 3), cfg.ranges.zero\_prob (`tuple` of 3), cfg.rel\_standing\_envs (`float`), cfg.resampling\_time\_range (`tuple`) | Sample a base-frame velocity command from a normal distribution (with element-wise zeroing and optional standing). |

## Actions

Actions enumerate the terms that transform high-level input vectors into specific joint or base control targets — such as positions, velocities, or torques—along with their associated configuration options.

| Action Term | Configurable Options | One-line Meaning |
| - | - | - |
| BinaryJointPositionAction | cfg.joint\_names (list of joint names), cfg.open\_command\_expr (`string`), cfg.close\_command\_expr (`string`) | Map a binary (open/close) action to joint position targets for specified joints. |
| BinaryJointVelocityAction | cfg.joint\_names (list of joint names), cfg.open\_command\_expr (`string`), cfg.close\_command\_expr (`string`) | Map a binary (open/close) action to joint velocity targets for specified joints. |
| JointPositionToLimitsAction | cfg.joint\_names (`list`), cfg.scale (`float` or dict mapping joint→scale), cfg.rescale\_to\_limits (`bool`) | Scale raw inputs and (optionally) rescale to joint position limits before applying as position targets. |
| EMAJointPositionToLimitsAction | cfg.joint\_names (`list`), cfg.scale (`float` or `dict`), cfg.rescale\_to\_limits (`bool`), cfg.alpha (float or dict mapping joint→EMA weight) | Like JointPositionToLimitsAction, but applies exponential moving average (α) over processed position targets. |
| JointPositionAction | cfg.joint\_names (`list`), cfg.scale (`float` or `dict`), cfg.offset (`float` or `dict`), cfg.use\_default\_offset (`bool`) | Affinely transform input actions (scale + offset) and send as joint position targets. |
| RelativeJointPositionAction | cfg.joint\_names (`list`), cfg.scale (`float` or `dict`), cfg.offset (`float` or `dict`), cfg.use\_zero\_offset (`bool`) | Affinely transform input and add to current joint positions before sending as position commands. |
| JointVelocityAction | cfg.joint\_names (`list`), cfg.scale (`float` or `dict`), cfg.offset (`float` or `dict`), cfg.use\_default\_offset (`bool`) | Affinely transform input and send as joint velocity targets. |
| JointEffortAction | cfg.joint\_names (`list`), cfg.scale (`float` or `dict`), cfg.offset (`float` or `dict`) | Affinely transform input and send as joint effort targets. |
| NonHolonomicAction | cfg.x\_joint\_name (`str`), cfg.y\_joint\_name (`str`), cfg.yaw\_joint\_name (`str`), cfg.body\_name (`str`), cfg.scale (`tuple[2]`), cfg.offset (`tuple[2]`) | Map a 2D action (forward speed, yaw rate) to dummy joint velocities (x, y, yaw) for a skid-steer base. |
| DifferentialInverseKinematicsAction | cfg.joint\_names (`list`), cfg.body\_name (`str`), cfg.scale (`list` of `floats`), cfg.controller (DifferentialIK config), cfg.body\_offset (optional pos/rot tuples) | Apply scaled end-effector pose commands through a differential IK controller to produce joint position targets. |
| PretrainedPolicyAction | cfg.asset\_name (`str`), cfg.policy\_path (`str`), cfg.low\_level\_decimation (`int`), cfg.low\_level\_actions (ActionCfg), cfg.low\_level\_observations (`ObservationCfg`) | Use a pretrained low-level policy (e.g. locomotion) to decode actions in a hierarchical setup (e.g. navigation on top). |

## Rewards

Rewards describe the available functions for assigning scalar feedback to agent behaviors, detail any options required to configure them, and explain the physical or task-related criterion they encourage or penalize.

| Reward Function | Configurable Options | Description |
| - | - | - |
| is\_alive | none | +1 if the episode is still running (not terminated). |
| is\_terminated | none | +1 if the episode just terminated (penalizes any termination). |
| is\_terminated\_term | term\_keys (`string`, list of strings or regex) | Sum of specified non-timeout termination terms. |
| lin\_vel\_z\_l2 | asset\_cfg.name | Penalize squared z-axis base linear velocity. |
| ang\_vel\_xy\_l2 | asset\_cfg.name | Penalize squared x/y components of base angular velocity. |
| flat\_orientation\_l2 | asset\_cfg.name | Penalize deviation from a flat base orientation (projected gravity). |
| base\_height\_l2 | target\_height (`float`), asset\_cfg.name | Penalize squared deviation of base height from target. |
| body\_lin\_acc\_l2 | asset\_cfg.name | Penalize summed L2 norm of all body linear accelerations. |
| joint\_torques\_l2 | asset\_cfg.name | Penalize squared torques on configured joints. |
| joint\_vel\_l1 | asset\_cfg.name | Penalize absolute joint velocities (L1). |
| joint\_vel\_l2 | asset\_cfg.name | Penalize squared joint velocities. |
| joint\_acc\_l2 | asset\_cfg.name | Penalize squared joint accelerations. |
| joint\_deviation\_l1 | asset\_cfg.name | Penalize absolute deviation from default joint positions. |
| joint\_pos\_limits | asset\_cfg.name | Penalize violations of soft joint-position limits. |
| joint\_vel\_limits | soft\_ratio (`float`), asset\_cfg.name | Penalize violations of soft joint-velocity limits (clipped). |
| applied\_torque\_limits | asset\_cfg.name | Penalize mismatch between applied and computed torques. |
| action\_rate\_l2 | none | Penalize squared change in actions from one step to the next. |
| action\_l2 | none | Penalize squared magnitude of the actions themselves. |
| undesired\_contacts | threshold (`float`), sensor\_cfg.name | Penalize count of contact events whose force exceeds threshold. |
| contact\_forces | threshold (`float`), sensor\_cfg.name | Penalize amount by which contact forces exceed threshold. |
| track\_lin\_vel\_xy\_exp | std (`float`), command\_name (`str`), asset\_cfg.name | Reward (exp-kernel) how well base xy-velocity matches command. |
| track\_ang\_vel\_z\_exp | std (`float`), command\_name (`str`), asset\_cfg.name | Reward (exp-kernel) how well yaw velocity matches command. |
| air\_time | mode\_time (`float`), velocity\_threshold (`float`), asset\_cfg.name (`str`), sensor\_cfg.name (`str`), sensor\_cfg.body\_names (regex) | Reward for limbs airborne above the velocity threshold. |
| air\_time\_variance\_penalty | sensor\_cfg.name (`str`), sensor\_cfg.body\_names (regex) | Penalize uneven airborne time across limbs. |
| base\_angular\_velocity | std (`float`), asset\_cfg.name (`str`) | Reward (Gaussian) on the magnitude of base angular velocity. |
| base\_linear\_velocity | std (`float`), ramp\_rate (`float`), ramp\_at\_vel (`float`), asset\_cfg.name (`str`) | Reward (Gaussian with ramp) on base linear velocity. |
| foot\_clearance | std (`float`), tanh\_mult (`float`), target\_height (`float`), asset\_cfg.name (`str`) | Reward for foot clearance above a target height. |
| base\_motion | asset\_cfg.name (`str`) | Penalize any base movement (encourages stationarity). |
| base\_orientation | asset\_cfg.name (`str`) | Penalize deviation from upright base orientation. |
| foot\_slip | asset\_cfg.name (`str`), sensor\_cfg.name (`str`), sensor\_cfg.body\_names (regex), threshold (`float`) | Penalize foot-slip events when force exceeds the threshold. |
| joint\_pos | asset\_cfg.name (`str`), stand\_still\_scale (`float`), velocity\_threshold (`float`) | Penalize deviation from reference joint positions when stationary. |
| joint\_torques | asset\_cfg.name (`str`) | Penalize high joint-torque usage on configured joints. |
| termination\_penalty | none | Large penalty applied when the episode terminates. |

#### Task-Specific Reward Terms

| Reward Function | Configurable Options | Description | Task Name |
| - | - | - | - |
| position\_tracking\_error | std (`float`), command\_name (`str`) | Reward (tanh) on base position tracking accuracy. | Navigation |
| orientation\_tracking\_error | command\_name (`str`) | Penalize heading error relative to the commanded orientation. | Navigation |
| object\_ee\_distance | std (`float`) | Reward (Gaussian) on the distance between the end-effector and the object. | Manipulation Lift Object |
| object\_is\_lifted | minimal\_height (`float`) | Reward (binary) for the object being lifted above the minimal height threshold. | Manipulation Lift Object |
| object\_goal\_distance | std (`float`), minimal\_height (`float`), command\_name (`str`) | Reward (Gaussian) on the object's distance to the goal pose after lifting. | Manipulation Lift Object |
| track\_lin\_vel\_xy\_exp | std (`float`), command\_name (`str`), asset\_cfg.name | Reward (exp-kernel) how well base xy-velocity matches command. | Velocity Tracking |
| track\_ang\_vel\_z\_exp | std (`float`), command\_name (`str`), asset\_cfg.name | Reward (exp-kernel) how well yaw velocity matches command. | Velocity Tracking |
| track\_orientation\_inv\_l2 | `object_cfg` (`SceneEntityCfg("object")`), `rot_eps` (`float`), `command_name` (`str`) | Reward (inverse-L2) encouraging alignment of object orientation with the commanded pose. | Manipulation In-Hand |
| success\_bonus\_inhand | `object_cfg` (`SceneEntityCfg("object")`), `command_name` (`str`) | Bonus reward upon successful completion of the in-hand manipulation task. | Manipulation In-Hand |

#### Robot-Specific Reward Terms

| Reward Function | Robot | Configurable Options | Description |
| - | - | - | - |
| left\_wrist\_end\_effector\_position\_tracking | Unitree G1 (27 DOF) | asset\_cfg.name, body\_names, command\_name, shift | Penalize deviation of the left-wrist end-effector position from the commanded target. |
| left\_wrist\_end\_effector\_position\_tracking\_fine\_grained | Unitree G1 (27 DOF) | asset\_cfg.name, body\_names, std, command\_name, shift | Reward (tanh) on fine-grained left-wrist position tracking accuracy. |
| left\_wrist\_end\_effector\_orientation\_tracking | Unitree G1 (27 DOF) | asset\_cfg.name, body\_names, command\_name, tol | Penalize orientation error of the left-wrist end-effector relative to the command. |
| left\_hand\_joint\_range\_violation | Unitree G1 (27 DOF) | asset\_cfg.name, joint\_names, limits\_min, limits\_max | Penalize any left-hand joints outside the specified minimum/maximum limits. |

## Events

Events list environment-level operations that introduce randomized or deterministic changes — such as randomizing physical properties or applying external forces—along with the parameters needed to specify how those changes are applied.

| Event Function | Configurable Options | Description |
| - | - | - |
| randomize\_rigid\_body\_scale | env\_ids, scale\_range (`tuple[float, float]` or `dict{x, y, z → tuple[float, float]}`), asset\_cfg.name, relative\_child\_path (optional) | Randomize the USD-scale of a rigid‐body asset (or a specified child prim) before simulation starts. |
| randomize\_robot\_body\_material | env\_ids, static\_friction\_range (`tuple[float, float]`), dynamic\_friction\_range (`tuple[float, float]`), restitution\_range (`tuple[float, float]`), num\_buckets (int), asset\_cfg.name, make\_consistent (`bool`) | Sample a set of friction/restitution “buckets” and assign them to each geometry of the specified robot Articulation. |
| randomize\_object\_body\_material | env\_ids, static\_friction\_range (`tuple[float, float]`), dynamic\_friction\_range (`tuple[float, float]`), restitution\_range (`tuple[float, float]`), num\_buckets (int), asset\_cfg.name, make\_consistent (`bool`) | Sample a set of friction/restitution “buckets” and assign them to each geometry of the specified RigidObject. |
| randomize\_rigid\_body\_mass | env\_ids, asset\_cfg.name, mass\_distribution\_params (`tuple[float, float]`), operation (“add”/“scale”/“abs”), distribution (“uniform”/“log\_uniform”/“gaussian”), recompute\_inertia (`bool`) | Randomize per‐body mass values (add/scale/overwrite) and optionally recompute inertia tensors from default mass. |
| randomize\_rigid\_body\_com | env\_ids, com\_range (`dict{x, y, z → tuple[float, float]}`), asset\_cfg.name | Add a random offset to the center of mass of each body in the specified Articulation. |
| randomize\_rigid\_body\_collider\_offsets | env\_ids, rest\_offset\_distribution\_params (`tuple[float, float]`), contact\_offset\_distribution\_params (`tuple[float, float]`), asset\_cfg.name, distribution (“uniform”/“log\_uniform”/“gaussian”) | Randomize physics collider “rest” and/or “contact” offsets for each body shape of the specified asset. |
| randomize\_physics\_scene\_gravity | env\_ids, gravity\_distribution\_params (`tuple[list[float], list[float]]`), operation (“add”/“scale”/“abs”), distribution (“uniform”/“log\_uniform”/“gaussian”) | Randomize the global gravity vector (x, y, z) for the entire physics scene (same gravity for all envs). |
| randomize\_actuator\_gains | env\_ids, asset\_cfg.name, stiffness\_distribution\_params (`tuple[float, float]`), damping\_distribution\_params (`tuple[float, float]`), operation, distribution | Randomize stiffness and/or damping gains of actuators (implicit or explicit) on specified joint IDs. |
| randomize\_joint\_parameters | env\_ids, asset\_cfg.name, friction\_distribution\_params (`tuple[float, float]`), armature\_distribution\_params (`tuple[float, float]`), lower\_limit\_distribution\_params (`tuple[float, float]`), upper\_limit\_distribution\_params (`tuple[float, float]`), operation, distribution | Randomize joint physics properties: friction, armature, and position limits (lower/upper) by adding/scaling/overwriting. |
| randomize\_fixed\_tendon\_parameters | env\_ids, asset\_cfg.name, stiffness\_distribution\_params (`tuple[float, float]`), damping\_distribution\_params (`tuple[float, float]`), limit\_stiffness\_distribution\_params (`tuple[float, float]`), lower\_limit\_distribution\_params (`tuple[float, float]`), upper\_limit\_distribution\_params (`tuple[float, float]`), rest\_length\_distribution\_params (`tuple[float, float]`), offset\_distribution\_params (`tuple[float, float]`), operation, distribution | Randomize fixed‐tendon stiffness, damping, limit stiffness, lower/upper position limits, rest length, and/or offset. |
| apply\_external\_force\_torque | env\_ids, force\_range (`tuple[float, float]`), torque\_range (`tuple[float, float]`), asset\_cfg.name | Sample and buffer random forces and torques to apply to each body of the specified asset (effective on next write). |
| push\_by\_setting\_velocity | env\_ids, velocity\_range (`dict{x, y, z, roll, pitch, yaw → tuple[float, float]}`), asset\_cfg.name | Sample a random root‐velocity (linear + angular) and set it directly on the specified asset to simulate a push. |
| reset\_base | env\_ids, pose\_range (`dict{x, y, z, roll, pitch, yaw → tuple[float, float]}`), velocity\_range (`dict{x, y, z, roll, pitch, yaw → tuple[float, float]}`), asset\_cfg.name | Randomize root pose of the robot (translation + rotation) uniformly around default and root velocity, then write to simulation. |
| reset\_root\_state | env\_ids, pose\_range (`dict{x, y, z, roll, pitch, yaw → tuple[float, float]}`), velocity\_range (`dict{x, y, z, roll, pitch, yaw → tuple[float, float]}`), asset\_cfg.name | Randomize root pose (translation + rotation) of an object uniformly around default and root velocity, then write to simulation. |
| reset\_root\_state\_with\_random\_orientation | env\_ids, pose\_range (`dict{x, y, z → `tuple\[float, float]`}`), velocity\_range (`dict{x, y, z, roll, pitch, yaw → tuple[float, float]}`), asset\_cfg.name | Randomize root position uniformly, sample orientation uniformly from SO(3), and set velocity within given ranges. |
| reset\_root\_state\_from\_terrain | env\_ids, pose\_range (`dict{roll, pitch, yaw → `tuple\[float, float]`}`), velocity\_range (`dict{x, y, z, roll, pitch, yaw → tuple[float, float]}`), asset\_cfg.name | Sample a valid terrain patch (“init\_pos”), set root pose on terrain + random yaw/pitch/roll, then set velocity. |
| reset\_joints\_by\_scale | env\_ids, position\_range (`tuple[float, float]`), velocity\_range (`tuple[float, float]`), asset\_cfg.name | Scale default joint positions and velocities by random factors (within ranges) and clamp to soft limits before writing. |
| reset\_joints\_by\_offset | env\_ids, position\_range (`tuple[float, float]`), velocity\_range (`tuple[float, float]`), asset\_cfg.name | Offset default joint positions and velocities by random values (within ranges) and clamp to soft limits before writing. |
| reset\_nodal\_state\_uniform | env\_ids, position\_range (`dict{x, y, z → tuple[float, float]}`), velocity\_range (`dict{x, y, z → tuple[float, float]}`), asset\_cfg.name | Randomize default nodal (vertex) positions and velocities of a DeformableObject uniformly within given ranges. |
| reset\_scene\_to\_default | env\_ids | Restore all rigid objects, articulations (root pose + joint state), and deformables (nodal state) to their default values. |
| randomize\_visual\_texture\_material | env\_ids, event\_name (`str`), asset\_cfg.name, texture\_paths (`list[str]`), texture\_rotation (`tuple[float, float]`) | Trigger a Replicator‐based event that randomizes textures on each body’s “/visuals” prim under the specified asset. |
| randomize\_visual\_color | env\_ids, event\_name (`str`), asset\_cfg.name, colors (`list[tuple[float, float, float]]` or `dict{r, g, b → tuple[float, float]}`), mesh\_name (`str`) | Trigger a Replicator‐based event that randomizes color on the specified mesh prims under the asset. |

## Terminations

Terminations specify the conditions under which an episode ends, the configuration options that define threshold values or monitored signals, and a brief explanation of what triggers each termination.

| Termination Function | Configurable Options | Description |
| - | - | - |
| time\_out | none | Terminate when episode length ≥ max\_episode\_length. |
| command\_resample | command\_name (`str`), num\_resamples (`int`) | Terminate when a command has been resampled the specified number of times. |
| bad\_orientation | limit\_angle (float), asset\_cfg.name | Terminate if the asset’s orientation deviates from vertical by > limit\_angle. |
| root\_height\_below\_minimum | minimum\_height (`float`), asset\_cfg.name | Terminate if the asset’s root height drops below the minimum height. |
| joint\_pos\_out\_of\_limit | asset\_cfg.name | Terminate if any joint position exceeds the soft position limits. |
| joint\_pos\_out\_of\_manual\_limit | bounds (`tuple[min, max]`), asset\_cfg.name | Terminate if any joint position falls outside the user-specified bounds. |
| joint\_vel\_out\_of\_limit | asset\_cfg.name | Terminate if any joint velocity exceeds the soft velocity limits. |
| joint\_vel\_out\_of\_manual\_limit | max\_velocity (`float`), asset\_cfg.name | Terminate if any joint velocity exceeds the given max\_velocity. |
| joint\_effort\_out\_of\_limit | asset\_cfg.name | Terminate if any joint’s computed torque equals its applied torque (indicating effort clipping). |
| base\_contact | threshold (`float`), sensor\_cfg.name | Terminate if any contact force at the sensor exceeds the threshold. |

#### Robot-Specific Termination Terms

| Termination Function | Robot | Configurable Options | Description |
| - | - | - | - |
| base\_contact\_g1 | Unitree G1 (27 DOF) | sensor\_cfg.name (`str`), sensor\_cfg.body\_names (`list[str]`), threshold (`float`) | Terminate episode if any specified non-foot link (e.g. pelvis, torso, waist, shoulders) registers contact force above the threshold. |

#### Task-Specific Termination Terms

| Termination Function | Configurable Options | Description | Task Name |
| - | - | - | - |
| object\_out\_of\_reach | `asset_cfg` (`SceneEntityCfg("object")`), `threshold` (`float`) | Terminate when the object moves farther than the specified threshold distance from the robot. | Manipulation In-Hand |
| max\_consecutive\_success | `num_success` (`int`), `command_name` (`str`) | Terminate once the in-hand manipulation has succeeded the given number of times in a row. | Manipulation In-Hand |


## Related topics

- [Training Workflow](/v2.2/simulation/isaac/reinforcement-learning/training-workflow.md)
- [Agent Config](/v2.2/simulation/isaac/session_configuration/agent.md)
- [Overview](/v2.2/simulation/isaac/overview.md)
- [AirGen Overview](/v2.2/simulation/airgen/overview.md)
- [Policy Inference](/v2.2/simulation/isaac/reinforcement-learning/inference.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.