unilab.envs.mdp.commands

Built-in command terms supported by the NumPy runtime.

class unilab.envs.mdp.commands.UniformPoseCommand[source]

Bases: CommandTerm

Uniformly sampled vector command held until the next resample.

Parameters:
cfg: UniformPoseCommandCfg
__init__(cfg, env)[source]
Parameters:
property command: ndarray
metrics: dict[str, ndarray]
class unilab.envs.mdp.commands.UniformPoseCommandCfg[source]

Bases: CommandTermCfg

Sample a fixed-width pose vector independently per dimension.

Parameters:
ranges: tuple[tuple[float, float], ...] | list[list[float]]
zero_command_prob: float = 0.0
build(env)[source]

Build the command term from this config.

Parameters:

env (ManagerBasedRlEnv)

Return type:

UniformPoseCommand

__init__(*, resampling_time_range, debug_vis=False, ranges, zero_command_prob=0.0)
Parameters:
resampling_time_range: tuple[float, float]

Time range in seconds for command resampling. When the timer expires, a new command is sampled and the timer is reset to a value uniformly drawn from [min, max]. Set both values equal for fixed-interval resampling.

class unilab.envs.mdp.commands.UniformVelocityCommand[source]

Bases: CommandTerm

Sample planar velocity commands and update frame-dependent components.

Parameters:
cfg: UniformVelocityCommandCfg
__init__(cfg, env)[source]
Parameters:
property command: ndarray
metrics: dict[str, ndarray]
class unilab.envs.mdp.commands.UniformVelocityCommandCfg[source]

Bases: CommandTermCfg

Configuration for uniformly sampled planar velocity commands.

Parameters:
  • resampling_time_range (tuple[float, float])

  • debug_vis (bool)

  • entity_name (str)

  • heading_command (bool)

  • heading_control_stiffness (float)

  • rel_standing_envs (float)

  • rel_heading_envs (float)

  • rel_world_envs (float)

  • rel_forward_envs (float)

  • init_velocity_prob (float)

  • ranges (Ranges)

  • viz (VizCfg)

entity_name: str
heading_command: bool = False
heading_control_stiffness: float = 1.0
rel_standing_envs: float = 0.0
rel_heading_envs: float = 1.0
rel_world_envs: float = 0.0
rel_forward_envs: float = 0.0
init_velocity_prob: float = 0.0
class Ranges[source]

Bases: object

Ranges(lin_vel_x: ‘tuple[float, float]’, lin_vel_y: ‘tuple[float, float]’, ang_vel_z: ‘tuple[float, float]’, heading: ‘tuple[float, float] | None’ = None)

Parameters:
lin_vel_x: tuple[float, float]
lin_vel_y: tuple[float, float]
ang_vel_z: tuple[float, float]
heading: tuple[float, float] | None = None
__init__(lin_vel_x, lin_vel_y, ang_vel_z, heading=None)
Parameters:
ranges: Ranges
class VizCfg[source]

Bases: object

VizCfg(z_offset: ‘float’ = 0.2, scale: ‘float’ = 0.5)

Parameters:
z_offset: float = 0.2
scale: float = 0.5
__init__(z_offset=0.2, scale=0.5)
Parameters:
viz: VizCfg
build(env)[source]

Build the command term from this config.

Parameters:

env (ManagerBasedRlEnv)

Return type:

UniformVelocityCommand

__init__(*, resampling_time_range, debug_vis=False, entity_name, heading_command=False, heading_control_stiffness=1.0, rel_standing_envs=0.0, rel_heading_envs=1.0, rel_world_envs=0.0, rel_forward_envs=0.0, init_velocity_prob=0.0, ranges, viz=<factory>)
Parameters:
  • resampling_time_range (tuple[float, float])

  • debug_vis (bool)

  • entity_name (str)

  • heading_command (bool)

  • heading_control_stiffness (float)

  • rel_standing_envs (float)

  • rel_heading_envs (float)

  • rel_world_envs (float)

  • rel_forward_envs (float)

  • init_velocity_prob (float)

  • ranges (Ranges)

  • viz (VizCfg)

resampling_time_range: tuple[float, float]

Time range in seconds for command resampling. When the timer expires, a new command is sampled and the timer is reset to a value uniformly drawn from [min, max]. Set both values equal for fixed-interval resampling.

Modules

pose_command

Generic pose and posture command terms for Manager-Based tasks.

velocity_command

Uniform velocity commands for locomotion tasks.