isaaclab_experimental.mdp2.mdp#
Built-in terms, the MDP2 counterparts of isaaclab.envs.mdp.
Terms keep the names of their MDP1 functions, and bind scene data through inputs instead of asset_cfg:
from isaaclab_experimental import mdp2
from isaaclab_experimental.mdp2 import mdp
mdp2.Observation(
mdp.joint_pos_rel,
inputs={
"joint_pos": robot.joint_pos,
"default_joint_pos": robot.default_joint_pos,
"joint_ids": robot.joints(".*"),
},
)
Observations#
Observation terms, the MDP2 counterparts of isaaclab.envs.mdp.observations.
Joint terms read the joints of a subset input, joint_ids=robot.joints(".*"), and output one value per joint.
Root terms read the root state of an asset, root_link_pose_w and root_com_vel_w.
Functions:
|
Return the direction of gravity in the root frame, |
- isaaclab_experimental.mdp2.mdp.observations.joint_pos = Term(torch=Implementation(compute=<function <lambda>>, update=None, reset=None), warp=Implementation(compute=<Function _joint_pos(world: int, joint: int, joint_pos: array(ndim=2, dtype=float32), joint_ids: array(ndim=1, dtype=int32))>, update=None, reset=None), shape=('worlds', 'joint_ids'), state={}, random=False, init=None, capturable=True)#
Joint positions.
- isaaclab_experimental.mdp2.mdp.observations.joint_pos_rel = Term(torch=Implementation(compute=<function <lambda>>, update=None, reset=None), warp=Implementation(compute=<Function _joint_pos_rel(world: int, joint: int, joint_pos: array(ndim=2, dtype=float32), default_joint_pos: array(ndim=2, dtype=float32), joint_ids: array(ndim=1, dtype=int32))>, update=None, reset=None), shape=('worlds', 'joint_ids'), state={}, random=False, init=None, capturable=True)#
Joint positions relative to the default joint positions.
- isaaclab_experimental.mdp2.mdp.observations.joint_vel = Term(torch=Implementation(compute=<function <lambda>>, update=None, reset=None), warp=Implementation(compute=<Function _joint_vel(world: int, joint: int, joint_vel: array(ndim=2, dtype=float32), joint_ids: array(ndim=1, dtype=int32))>, update=None, reset=None), shape=('worlds', 'joint_ids'), state={}, random=False, init=None, capturable=True)#
Joint velocities.
- isaaclab_experimental.mdp2.mdp.observations.joint_vel_rel = Term(torch=Implementation(compute=<function <lambda>>, update=None, reset=None), warp=Implementation(compute=<Function _joint_vel_rel(world: int, joint: int, joint_vel: array(ndim=2, dtype=float32), default_joint_vel: array(ndim=2, dtype=float32), joint_ids: array(ndim=1, dtype=int32))>, update=None, reset=None), shape=('worlds', 'joint_ids'), state={}, random=False, init=None, capturable=True)#
Joint velocities relative to the default joint velocities.
- isaaclab_experimental.mdp2.mdp.observations.joint_pos_limit_normalized = Term(torch=Implementation(compute=<function _joint_pos_limit_normalized_torch>, update=None, reset=None), warp=Implementation(compute=<Function _joint_pos_limit_normalized(world: int, joint: int, joint_pos: array(ndim=2, dtype=float32), soft_joint_pos_limits: array(ndim=2, dtype=vec2f), joint_ids: array(ndim=1, dtype=int32))>, update=None, reset=None), shape=('worlds', 'joint_ids'), state={}, random=False, init=None, capturable=True)#
Joint positions scaled to [-1, 1] between the soft joint position limits.
- isaaclab_experimental.mdp2.mdp.observations.root_pos_w = Term(torch=Implementation(compute=<function <lambda>>, update=None, reset=None), warp=Implementation(compute=<Function _root_pos_w(world: int, axis: int, root_link_pose_w: array(ndim=1, dtype=transformf), env_origins: array(ndim=1, dtype=vec3f))>, update=None, reset=None), shape=('worlds', 3), state={}, random=False, init=None, capturable=True)#
Root position relative to the world’s environment origin.
- isaaclab_experimental.mdp2.mdp.observations.root_quat_w = Term(torch=Implementation(compute=<function _root_quat_w_torch>, update=None, reset=None), warp=Implementation(compute=<Function _root_quat_w(world: int, element: int, root_link_pose_w: array(ndim=1, dtype=transformf), make_quat_unique: bool)>, update=None, reset=None), shape=('worlds', 4), state={}, random=False, init=None, capturable=True)#
Root orientation
(x, y, z, w), with a non-negative real part ifmake_quat_unique.
- isaaclab_experimental.mdp2.mdp.observations.base_lin_vel = Term(torch=Implementation(compute=<function _base_lin_vel_torch>, update=None, reset=None), warp=Implementation(compute=<Function _base_lin_vel(world: int, axis: int, root_link_pose_w: array(ndim=1, dtype=transformf), root_com_vel_w: array(ndim=1, dtype=vector(length=6, dtype=float32)))>, update=None, reset=None), shape=('worlds', 3), state={}, random=False, init=None, capturable=True)#
Root linear velocity in the root frame.
- isaaclab_experimental.mdp2.mdp.observations.base_ang_vel = Term(torch=Implementation(compute=<function _base_ang_vel_torch>, update=None, reset=None), warp=Implementation(compute=<Function _base_ang_vel(world: int, axis: int, root_link_pose_w: array(ndim=1, dtype=transformf), root_com_vel_w: array(ndim=1, dtype=vector(length=6, dtype=float32)))>, update=None, reset=None), shape=('worlds', 3), state={}, random=False, init=None, capturable=True)#
Root angular velocity in the root frame.
- isaaclab_experimental.mdp2.mdp.observations.projected_gravity_torch(root_link_pose_w: torch.Tensor, gravity_w: torch.Tensor) torch.Tensor[source]#
Return the direction of gravity in the root frame,
(num_worlds, 3).
- isaaclab_experimental.mdp2.mdp.observations.projected_gravity = Term(torch=Implementation(compute=<function projected_gravity_torch>, update=None, reset=None), warp=Implementation(compute=<Function _projected_gravity(world: int, axis: int, root_link_pose_w: array(ndim=1, dtype=transformf), gravity_w: array(ndim=1, dtype=vec3f))>, update=None, reset=None), shape=('worlds', 3), state={}, random=False, init=None, capturable=True)#
Direction of gravity in the root frame.
- isaaclab_experimental.mdp2.mdp.observations.last_action = Term(torch=Implementation(compute=<function <lambda>>, update=None, reset=None), warp=Implementation(compute=<Function _last_action(world: int, action: int, actions: array(ndim=2, dtype=float32))>, update=None, reset=None), shape=('worlds', 'actions'), state={}, random=False, init=None, capturable=True)#
The last actions, bound to
mdp2.last_action.
- isaaclab_experimental.mdp2.mdp.observations.generated_commands = Term(torch=Implementation(compute=<function <lambda>>, update=None, reset=None), warp=Implementation(compute=<Function _generated_commands(world: int, element: int, command: array(ndim=2, dtype=float32))>, update=None, reset=None), shape=('worlds', 'command'), state={}, random=False, init=None, capturable=True)#
The value of a command, bound to
mdp2.commands.<name>.
Commands#
Command terms, the MDP2 counterparts of the command terms of isaaclab.envs.mdp.commands.
A command use samples its term when its resampling timer expires and on reset; observe it with
generated_commands. Each command draws from its use’s random stream, the same
draws on both backends.
- isaaclab_experimental.mdp2.mdp.commands.uniform_velocity_command = Term(torch=Implementation(compute=<function _uniform_velocity_command_torch>, update=None, reset=None), warp=Implementation(compute=<Function _uniform_velocity_command(world: int, command: array(ndim=2, dtype=float32), lin_vel_x: vec2f, lin_vel_y: vec2f, ang_vel_z: vec2f, rel_standing_envs: float, rng: int32)>, update=None, reset=None), shape=('worlds', 3), state={}, random=True, init=None, capturable=True)#
Base velocity
(lin_vel_x, lin_vel_y, ang_vel_z)drawn uniformly from the given ranges.The velocity is zero for a fraction
rel_standing_envsof the samples. For heading control, useheading_velocity_command.
- isaaclab_experimental.mdp2.mdp.commands.heading_velocity_command = Term(torch=Implementation(compute=<function _heading_velocity_command_torch>, update=<function _steer_to_heading_torch>, reset=None), warp=Implementation(compute=<Function _heading_velocity_command(world: int, command: array(ndim=2, dtype=float32), heading_target: array(ndim=1, dtype=float32), lin_vel_x: vec2f, lin_vel_y: vec2f, ang_vel_z: vec2f, heading: vec2f, rel_standing_envs: float, rel_heading_envs: float, rng: int32)>, update=<Function _steer_to_heading(world: int, command: array(ndim=2, dtype=float32), heading_target: array(ndim=1, dtype=float32), root_link_pose_w: array(ndim=1, dtype=transformf), ang_vel_z: vec2f, heading_control_stiffness: float)>, reset=None), shape=('worlds', 3), state={'heading_target': State(shape=('worlds',), initial=nan, persistent=False)}, random=True, init=None, capturable=True)#
Base velocity like
uniform_velocity_command, with the yaw rate steered to a target heading.Each sample also draws a target heading from
headingfor a fractionrel_heading_envsof the moving samples. Every step, theirang_vel_zsteers the root’s yaw towards it with gainheading_control_stiffness, clipped toang_vel_z, as MDP1’sUniformVelocityCommandwithheading_command. Bindroot_link_pose_wto the robot.
- isaaclab_experimental.mdp2.mdp.commands.uniform_pose_command = Term(torch=Implementation(compute=<function _uniform_pose_command_torch>, update=None, reset=None), warp=Implementation(compute=<Function _uniform_pose_command(world: int, command: array(ndim=2, dtype=float32), pose_range: matrix(shape=(6, 2), dtype=float32), make_quat_unique: bool, rng: int32)>, update=None, reset=None), shape=('worlds', 7), state={}, random=True, init=None, capturable=True)#
Pose
(x, y, z, qx, qy, qz, qw)in the robot’s base frame, drawn uniformly frompose_range.pose_rangeholds six(low, high)pairs in the order x, y, z, roll, pitch, yaw. Withmake_quat_unique, the real part is non-negative.
Events#
Event terms, the MDP2 counterparts of isaaclab.envs.mdp.events.
Events write their outputs for the selected worlds. Ranges are (low, high) pairs; root ranges are six pairs in
the order x, y, z, roll, pitch, yaw, where MDP1 takes a dict. Each event draws from its use’s random stream, the same
draws on both backends.
- isaaclab_experimental.mdp2.mdp.events.reset_joints_by_offset = Term(torch=Implementation(compute=<function _reset_joints_by_offset_torch>, update=None, reset=None), warp=Implementation(compute=<Function _reset_joints_by_offset(world: int, joint_pos: array(ndim=2, dtype=float32), joint_vel: array(ndim=2, dtype=float32), default_joint_pos: array(ndim=2, dtype=float32), default_joint_vel: array(ndim=2, dtype=float32), soft_joint_pos_limits: array(ndim=2, dtype=vec2f), soft_joint_vel_limits: array(ndim=2, dtype=float32), joint_ids: array(ndim=1, dtype=int32), position_range: vec2f, velocity_range: vec2f, rng: int32)>, update=None, reset=None), shape=('worlds',), state={}, random=True, init=None, capturable=True)#
Set the joint state to the default plus uniform offsets from
position_rangeandvelocity_range.
- isaaclab_experimental.mdp2.mdp.events.reset_joints_by_scale = Term(torch=Implementation(compute=<function _reset_joints_by_scale_torch>, update=None, reset=None), warp=Implementation(compute=<Function _reset_joints_by_scale(world: int, joint_pos: array(ndim=2, dtype=float32), joint_vel: array(ndim=2, dtype=float32), default_joint_pos: array(ndim=2, dtype=float32), default_joint_vel: array(ndim=2, dtype=float32), soft_joint_pos_limits: array(ndim=2, dtype=vec2f), soft_joint_vel_limits: array(ndim=2, dtype=float32), joint_ids: array(ndim=1, dtype=int32), position_range: vec2f, velocity_range: vec2f, rng: int32)>, update=None, reset=None), shape=('worlds',), state={}, random=True, init=None, capturable=True)#
Set the joint state to the default scaled by uniform factors from
position_rangeandvelocity_range.
- isaaclab_experimental.mdp2.mdp.events.reset_root_state_uniform = Term(torch=Implementation(compute=<function _reset_root_state_uniform_torch>, update=None, reset=None), warp=Implementation(compute=<Function _reset_root_state_uniform(world: int, root_link_pose_w: array(ndim=1, dtype=transformf), root_com_vel_w: array(ndim=1, dtype=vector(length=6, dtype=float32)), default_root_pose: array(ndim=1, dtype=transformf), default_root_vel: array(ndim=1, dtype=vector(length=6, dtype=float32)), env_origins: array(ndim=1, dtype=vec3f), pose_range: matrix(shape=(6, 2), dtype=float32), velocity_range: matrix(shape=(6, 2), dtype=float32), rng: int32)>, update=None, reset=None), shape=('worlds',), state={}, random=True, init=None, capturable=True)#
Set the root pose and velocity to their defaults plus uniform samples from
pose_rangeandvelocity_range.The pose is relative to the environment origin. Floating bases only.
- isaaclab_experimental.mdp2.mdp.events.push_by_setting_velocity = Term(torch=Implementation(compute=<function _push_by_setting_velocity_torch>, update=None, reset=None), warp=Implementation(compute=<Function _push_by_setting_velocity(world: int, root_com_vel_w: array(ndim=1, dtype=vector(length=6, dtype=float32)), velocity_range: matrix(shape=(6, 2), dtype=float32), rng: int32)>, update=None, reset=None), shape=('worlds',), state={}, random=True, init=None, capturable=True)#
Add uniform samples from
velocity_rangeto the root velocity. Floating bases only.
- isaaclab_experimental.mdp2.mdp.events.randomize_rigid_body_mass = Term(torch=Implementation(compute=<function _randomize_rigid_body_mass>, update=None, reset=None), warp=None, shape=('worlds',), state={'mass': State(shape=('worlds', 'body_ids'), initial=0.0, persistent=True), 'inertia': State(shape=('worlds', 'body_ids', 9), initial=0.0, persistent=True)}, random=True, init=<function _init_body_defaults>, capturable=False)#
Add to, scale, or set (
operation"add","scale","abs") the masses of thebody_idsbodies.Samples come from
mass_distribution_paramswithdistribution"uniform","log_uniform", or"gaussian", and apply to the masses at startup. Withrecompute_inertia, the inertias scale with the masses.
- isaaclab_experimental.mdp2.mdp.events.randomize_rigid_body_inertia = Term(torch=Implementation(compute=<function _randomize_rigid_body_inertia>, update=None, reset=None), warp=None, shape=('worlds',), state={'mass': State(shape=('worlds', 'body_ids'), initial=0.0, persistent=True), 'inertia': State(shape=('worlds', 'body_ids', 9), initial=0.0, persistent=True)}, random=True, init=<function _init_body_defaults>, capturable=False)#
Add to, scale, or set the inertias at startup of the
body_idsbodies, one sample per world and body.With
diagonal_only, only Ixx, Iyy, and Izz change.
- isaaclab_experimental.mdp2.mdp.events.randomize_actuator_gains = Term(torch=Implementation(compute=<function _randomize_actuator_gains>, update=None, reset=None), warp=None, shape=('worlds',), state={'stiffness': State(shape=('worlds', 'joint_ids'), initial=0.0, persistent=True), 'damping': State(shape=('worlds', 'joint_ids'), initial=0.0, persistent=True)}, random=True, init=<function _init_actuator_gains>, capturable=False)#
Add to, scale, or set the startup stiffness and damping of the
joint_idsjoints, one sample per world and joint.Implicit actuators only, whose gains are the solver’s joint gains.
- isaaclab_experimental.mdp2.mdp.events.randomize_joint_parameters = Term(torch=Implementation(compute=<function _randomize_joint_parameters>, update=None, reset=None), warp=None, shape=('worlds',), state={'friction': State(shape=('worlds', 'joint_ids'), initial=0.0, persistent=True), 'armature': State(shape=('worlds', 'joint_ids'), initial=0.0, persistent=True)}, random=True, init=<function _init_joint_parameters>, capturable=True)#
Add to, scale, or set the startup friction coefficients and armatures of the
joint_idsjoints.One sample per world and joint; friction coefficients stay non-negative. It runs inside CUDA graphs, also as a reset event. MDP1’s joint position limit randomization is not supported.
- isaaclab_experimental.mdp2.mdp.events.randomize_rigid_body_com = Term(torch=Implementation(compute=<function _randomize_rigid_body_com>, update=None, reset=None), warp=None, shape=('worlds',), state={'com': State(shape=('worlds', 'body_ids', 3), initial=0.0, persistent=True)}, random=True, init=<function _init_rigid_body_com>, capturable=False)#
Offset the startup centers of mass of the
body_idsbodies by one uniform sample per world fromcom_range.com_rangeholds three(low, high)pairs in the order x, y, z, where MDP1 takes a dict.
- isaaclab_experimental.mdp2.mdp.events.randomize_rigid_body_material = Term(torch=Implementation(compute=<function _randomize_rigid_body_material>, update=None, reset=None), warp=None, shape=('worlds',), state={}, random=True, init=None, capturable=False)#
Draw the friction and restitution of the shapes of the
body_idsbodies uniformly, per world and shape.Articulations and rigid objects on Newton only. Newton has one friction coefficient, so there is no separate dynamic friction. Solvers that share materials across worlds, like Kamino’s own collision detection, are not supported.
Rewards#
Reward terms, the MDP2 counterparts of isaaclab.envs.mdp.rewards.
Each term returns one value per world, which the reward use weighs. Joint terms sum over the joints of a subset
input, joint_ids=robot.joints(".*").
Data:
below any physics step, above rounding. |
Functions:
|
Return whether each body's normal contact force exceeded |
- isaaclab_experimental.mdp2.mdp.rewards.FIRST_CONTACT_TOLERANCE = 0.0001#
below any physics step, above rounding.
- Type:
Margin [s] on the step duration within which a contact counts as new
- isaaclab_experimental.mdp2.mdp.rewards.is_alive = Term(torch=Implementation(compute=<function <lambda>>, update=None, reset=None), warp=Implementation(compute=<Function _is_alive(world: int, terminated: array(ndim=1, dtype=warp._src.types.bool))>, update=None, reset=None), shape=('worlds',), state={}, random=False, init=None, capturable=True)#
One for worlds whose episode did not terminate this step, bound to
mdp2.terminated.
- isaaclab_experimental.mdp2.mdp.rewards.is_terminated = Term(torch=Implementation(compute=<function <lambda>>, update=None, reset=None), warp=Implementation(compute=<Function _is_terminated(world: int, terminated: array(ndim=1, dtype=warp._src.types.bool))>, update=None, reset=None), shape=('worlds',), state={}, random=False, init=None, capturable=True)#
One for worlds whose episode terminated this step, not by a time-out, bound to
mdp2.terminated.
- isaaclab_experimental.mdp2.mdp.rewards.value = Term(torch=Implementation(compute=<function _value_torch>, update=None, reset=None), warp=Implementation(compute=<Function _value(world: int, value: array(ndim=1, dtype=float32))>, update=None, reset=None), shape=('worlds',), state={}, random=False, init=None, capturable=True)#
The
valueinput itself, one float per world, such as a quantity or the state of another term.
- isaaclab_experimental.mdp2.mdp.rewards.joint_vel_l1 = Term(torch=Implementation(compute=<function <lambda>>, update=None, reset=None), warp=Implementation(compute=<Function _joint_vel_l1(world: int, joint_vel: array(ndim=2, dtype=float32), joint_ids: array(ndim=1, dtype=int32))>, update=None, reset=None), shape=('worlds',), state={}, random=False, init=None, capturable=True)#
Sum of the absolute joint velocities.
- isaaclab_experimental.mdp2.mdp.rewards.joint_vel_l2 = Term(torch=Implementation(compute=<function <lambda>>, update=None, reset=None), warp=Implementation(compute=<Function _joint_vel_l2(world: int, joint_vel: array(ndim=2, dtype=float32), joint_ids: array(ndim=1, dtype=int32))>, update=None, reset=None), shape=('worlds',), state={}, random=False, init=None, capturable=True)#
Sum of the squared joint velocities.
- isaaclab_experimental.mdp2.mdp.rewards.joint_torques_l2 = Term(torch=Implementation(compute=<function <lambda>>, update=None, reset=None), warp=Implementation(compute=<Function _joint_torques_l2(world: int, applied_effort: array(ndim=2, dtype=float32), joint_ids: array(ndim=1, dtype=int32))>, update=None, reset=None), shape=('worlds',), state={}, random=False, init=None, capturable=True)#
Sum of the squared efforts the actuators applied, bound to
robot.applied_effort.
- isaaclab_experimental.mdp2.mdp.rewards.joint_acc_l2 = Term(torch=Implementation(compute=<function <lambda>>, update=None, reset=None), warp=Implementation(compute=<Function _joint_acc_l2(world: int, joint_acc: array(ndim=2, dtype=float32), joint_ids: array(ndim=1, dtype=int32))>, update=None, reset=None), shape=('worlds',), state={}, random=False, init=None, capturable=True)#
Sum of the squared joint accelerations.
- isaaclab_experimental.mdp2.mdp.rewards.joint_deviation_l1 = Term(torch=Implementation(compute=<function _joint_deviation_l1_torch>, update=None, reset=None), warp=Implementation(compute=<Function _joint_deviation_l1(world: int, joint_pos: array(ndim=2, dtype=float32), default_joint_pos: array(ndim=2, dtype=float32), joint_ids: array(ndim=1, dtype=int32))>, update=None, reset=None), shape=('worlds',), state={}, random=False, init=None, capturable=True)#
Sum of the absolute deviations of the joint positions from their defaults.
- isaaclab_experimental.mdp2.mdp.rewards.joint_pos_target_l2 = Term(torch=Implementation(compute=<function <lambda>>, update=None, reset=None), warp=Implementation(compute=<Function _joint_pos_target_l2(world: int, joint_pos: array(ndim=2, dtype=float32), joint_ids: array(ndim=1, dtype=int32), target: float)>, update=None, reset=None), shape=('worlds',), state={}, random=False, init=None, capturable=True)#
Sum of the squared errors of the joint positions from
target.
- isaaclab_experimental.mdp2.mdp.rewards.joint_pos_limits = Term(torch=Implementation(compute=<function _joint_pos_limits_torch>, update=None, reset=None), warp=Implementation(compute=<Function _joint_pos_limits(world: int, joint_pos: array(ndim=2, dtype=float32), soft_joint_pos_limits: array(ndim=2, dtype=vec2f), joint_ids: array(ndim=1, dtype=int32))>, update=None, reset=None), shape=('worlds',), state={}, random=False, init=None, capturable=True)#
Sum of the distances of the joint positions beyond their soft limits.
- isaaclab_experimental.mdp2.mdp.rewards.lin_vel_z_l2 = Term(torch=Implementation(compute=<function _lin_vel_z_l2_torch>, update=None, reset=None), warp=Implementation(compute=<Function _lin_vel_z_l2(world: int, root_link_pose_w: array(ndim=1, dtype=transformf), root_com_vel_w: array(ndim=1, dtype=vector(length=6, dtype=float32)))>, update=None, reset=None), shape=('worlds',), state={}, random=False, init=None, capturable=True)#
Squared vertical velocity of the root, in the root frame.
- isaaclab_experimental.mdp2.mdp.rewards.ang_vel_xy_l2 = Term(torch=Implementation(compute=<function _ang_vel_xy_l2_torch>, update=None, reset=None), warp=Implementation(compute=<Function _ang_vel_xy_l2(world: int, root_link_pose_w: array(ndim=1, dtype=transformf), root_com_vel_w: array(ndim=1, dtype=vector(length=6, dtype=float32)))>, update=None, reset=None), shape=('worlds',), state={}, random=False, init=None, capturable=True)#
Squared roll and pitch rates of the root, in the root frame.
- isaaclab_experimental.mdp2.mdp.rewards.flat_orientation_l2 = Term(torch=Implementation(compute=<function _flat_orientation_l2_torch>, update=None, reset=None), warp=Implementation(compute=<Function _flat_orientation_l2(world: int, root_link_pose_w: array(ndim=1, dtype=transformf), gravity_w: array(ndim=1, dtype=vec3f))>, update=None, reset=None), shape=('worlds',), state={}, random=False, init=None, capturable=True)#
zero when the root is level.
- Type:
Squared horizontal components of the gravity direction in the root frame
- isaaclab_experimental.mdp2.mdp.rewards.base_height_l2 = Term(torch=Implementation(compute=<function <lambda>>, update=None, reset=None), warp=Implementation(compute=<Function _base_height_l2(world: int, root_link_pose_w: array(ndim=1, dtype=transformf), target_height: float)>, update=None, reset=None), shape=('worlds',), state={}, random=False, init=None, capturable=True)#
for flat ground at height zero.
- Type:
Squared error of the root height from
target_height, in the world frame
- isaaclab_experimental.mdp2.mdp.rewards.track_lin_vel_xy_exp = Term(torch=Implementation(compute=<function _track_lin_vel_xy_exp_torch>, update=None, reset=None), warp=Implementation(compute=<Function _track_lin_vel_xy_exp(world: int, command: array(ndim=2, dtype=float32), root_link_pose_w: array(ndim=1, dtype=transformf), root_com_vel_w: array(ndim=1, dtype=vector(length=6, dtype=float32)), std: float)>, update=None, reset=None), shape=('worlds',), state={}, random=False, init=None, capturable=True)#
Exponential kernel of the squared error of the root’s horizontal velocity, in the root frame, from the command.
- isaaclab_experimental.mdp2.mdp.rewards.track_ang_vel_z_exp = Term(torch=Implementation(compute=<function _track_ang_vel_z_exp_torch>, update=None, reset=None), warp=Implementation(compute=<Function _track_ang_vel_z_exp(world: int, command: array(ndim=2, dtype=float32), root_link_pose_w: array(ndim=1, dtype=transformf), root_com_vel_w: array(ndim=1, dtype=vector(length=6, dtype=float32)), std: float)>, update=None, reset=None), shape=('worlds',), state={}, random=False, init=None, capturable=True)#
Exponential kernel of the squared error of the root’s yaw rate, in the root frame, from the command.
- isaaclab_experimental.mdp2.mdp.rewards.action_l2 = Term(torch=Implementation(compute=<function <lambda>>, update=None, reset=None), warp=Implementation(compute=<Function _action_l2(world: int, actions: array(ndim=2, dtype=float32))>, update=None, reset=None), shape=('worlds',), state={}, random=False, init=None, capturable=True)#
Sum of the squared actions, bound to
mdp2.last_action.
- isaaclab_experimental.mdp2.mdp.rewards.action_rate_l2 = Term(torch=Implementation(compute=<function <lambda>>, update=<function <lambda>>, reset=None), warp=Implementation(compute=<Function _action_rate_l2(world: int, actions: array(ndim=2, dtype=float32), previous_actions: array(ndim=2, dtype=float32))>, update=<Function _action_rate_update(world: int, actions: array(ndim=2, dtype=float32), previous_actions: array(ndim=2, dtype=float32))>, reset=None), shape=('worlds',), state={'previous_actions': State(shape=('worlds', 'actions'), initial=0.0, persistent=False)}, random=False, init=None, capturable=True)#
Sum of the squared changes of the actions since the last step, bound to
mdp2.last_action.The previous actions are zero after a reset, as in MDP1.
- isaaclab_experimental.mdp2.mdp.rewards.contact_mask_torch(net_normal_forces_w_history: torch.Tensor, body_ids: torch.Tensor, threshold: float) torch.Tensor[source]#
Return whether each body’s normal contact force exceeded
thresholdin the sensor history.
- isaaclab_experimental.mdp2.mdp.rewards.undesired_contacts = Term(torch=Implementation(compute=<function _undesired_contact_mask_torch>, update=None, reset=None), warp=Implementation(compute=<Function _undesired_contacts(world: int, net_normal_forces_w_history: array(ndim=3, dtype=vec3f), body_ids: array(ndim=1, dtype=int32), threshold: float)>, update=None, reset=None), shape=('worlds',), state={}, random=False, init=None, capturable=True)#
Number of the
body_idsbodies whose normal contact force exceededthresholdin the sensor history.
- isaaclab_experimental.mdp2.mdp.rewards.feet_air_time = Term(torch=Implementation(compute=<function _feet_air_time_torch>, update=None, reset=None), warp=Implementation(compute=<Function _feet_air_time(world: int, current_contact_time: array(ndim=2, dtype=float32), last_air_time: array(ndim=2, dtype=float32), command: array(ndim=2, dtype=float32), body_ids: array(ndim=1, dtype=int32), threshold: float, step_dt: float)>, update=None, reset=None), shape=('worlds',), state={}, random=False, init=None, capturable=True)#
Sum over the
body_idsfeet that touched down this step of their air time minusthreshold[s].Zero for worlds whose planar velocity
commandis at most 0.1 m/s. Bindstep_dt[s] tomdp2.step_dt.
Terminations#
Termination terms, the MDP2 counterparts of isaaclab.envs.mdp.terminations.
Each term returns whether to end each world’s episode. Time-outs are TimeLimit.
- isaaclab_experimental.mdp2.mdp.terminations.is_positive = Term(torch=Implementation(compute=<function _is_positive_torch>, update=None, reset=None), warp=Implementation(compute=<Function _is_positive(world: int, value: array(ndim=1, dtype=float32))>, update=None, reset=None), shape=('worlds',), state={}, random=False, init=None, capturable=True)#
Whether the
valueinput, one float per world such as a quantity, is positive.
- isaaclab_experimental.mdp2.mdp.terminations.joint_pos_out_of_manual_limit = Term(torch=Implementation(compute=<function _joint_pos_out_of_manual_limit_torch>, update=None, reset=None), warp=Implementation(compute=<Function _joint_pos_out_of_manual_limit(world: int, joint_pos: array(ndim=2, dtype=float32), joint_ids: array(ndim=1, dtype=int32), bounds: vec2f)>, update=None, reset=None), shape=('worlds',), state={}, random=False, init=None, capturable=True)#
Whether a joint position is outside
bounds, a(lower, upper)pair.
- isaaclab_experimental.mdp2.mdp.terminations.joint_vel_out_of_limit = Term(torch=Implementation(compute=<function _joint_vel_out_of_limit_torch>, update=None, reset=None), warp=Implementation(compute=<Function _joint_vel_out_of_limit(world: int, joint_vel: array(ndim=2, dtype=float32), soft_joint_vel_limits: array(ndim=2, dtype=float32), joint_ids: array(ndim=1, dtype=int32))>, update=None, reset=None), shape=('worlds',), state={}, random=False, init=None, capturable=True)#
Whether a joint speed exceeds its soft velocity limit.
- isaaclab_experimental.mdp2.mdp.terminations.root_height_below_minimum = Term(torch=Implementation(compute=<function <lambda>>, update=None, reset=None), warp=Implementation(compute=<Function _root_height_below_minimum(world: int, root_link_pose_w: array(ndim=1, dtype=transformf), minimum_height: float)>, update=None, reset=None), shape=('worlds',), state={}, random=False, init=None, capturable=True)#
Whether the root is lower than
minimum_heightin the world frame.
- isaaclab_experimental.mdp2.mdp.terminations.bad_orientation = Term(torch=Implementation(compute=<function _bad_orientation_torch>, update=None, reset=None), warp=Implementation(compute=<Function _bad_orientation(world: int, root_link_pose_w: array(ndim=1, dtype=transformf), gravity_w: array(ndim=1, dtype=vec3f), limit_angle: float)>, update=None, reset=None), shape=('worlds',), state={}, random=False, init=None, capturable=True)#
Whether the root is tilted more than
limit_angleradians from upright.
- isaaclab_experimental.mdp2.mdp.terminations.illegal_contact = Term(torch=Implementation(compute=<function _illegal_contact_torch>, update=None, reset=None), warp=Implementation(compute=<Function _illegal_contact(world: int, net_normal_forces_w_history: array(ndim=3, dtype=vec3f), body_ids: array(ndim=1, dtype=int32), threshold: float)>, update=None, reset=None), shape=('worlds',), state={}, random=False, init=None, capturable=True)#
Whether a normal contact force on the
body_idsbodies exceededthresholdin the sensor history.
Curriculums#
Curriculum terms, the MDP2 counterparts of isaaclab.envs.mdp.curriculums.
A curriculum is a reset event that keeps its progress in persistent state, which other terms read through
term_state(), for example to scale observation noise or to move a bound.
- isaaclab_experimental.mdp2.mdp.curriculums.difficulty_scheduler = Term(torch=Implementation(compute=<function _difficulty_scheduler_torch>, update=None, reset=None), warp=Implementation(compute=<function _difficulty_scheduler>, update=None, reset=None), shape=('worlds',), state={'difficulty': State(shape=('worlds',), initial=0.0, persistent=True), 'progress': State(shape=('worlds',), initial=0.0, persistent=True), 'total': State(shape=(1,), initial=0.0, persistent=False)}, random=False, init=<function _init_difficulty>, capturable=True)#
Adaptive difficulty, like MDP1’s
DifficultySchedulerwithinitial_final_interpolate_fn.Each world’s difficulty starts at
init_difficulty, rises by one when the episode that endedsucceeded(an input, such as a sticky success quantity) and falls by one otherwise, unlesspromotion_only, within[min_difficulty, max_difficulty]. Itsprogressstate is the mean difficulty overmax_difficulty, once that reachesmin_progress: dependent terms interpolate between their initial and final values by it, and keep their initial values until then. The same in every world.