跳转至

commands

类:

名称 描述
UniformPoseCommandGlobal

Command generator that generates pose commands containing a 3-D position and heading.

UniformPoseCommandGlobalCfg

Configuration for the uniform 3D-pose command generator.

UniformVelocityGlobalCommand

Command generator that generates a velocity command with uniform distribution.

UniformVelocityGlobalCommandCfg

Configuration for the uniform velocity command generator.

UniformBimodalVelocityCommand

Bimodal velocity command generator with a discrete mode indicator (4+1).

UniformBimodalVelocityCommandCfg

Configuration for the bimodal velocity command generator (flight vs ground).

UniformPoseCommandGlobal

UniformPoseCommandGlobal(cfg: UniformPoseCommandGlobalCfg, env: ManagerBasedEnv)

Bases: CommandTerm

Command generator that generates pose commands containing a 3-D position and heading.

The command generator samples uniform 3D positions around the environment origin. The heading command is either set to point towards the target or is sampled uniformly. This can be configured through the :attr:UniformPoseCommandGlobalCfg.simple_heading parameter in the configuration.

Initialize the command generator class.

参数:

名称 类型 描述 默认

cfg

UniformPoseCommandGlobalCfg

The configuration parameters for the command generator.

必需

env

ManagerBasedEnv

The environment object.

必需

属性:

名称 类型 描述
cfg UniformPoseCommandGlobalCfg

Configuration for the command generator.

command Tensor

The desired 3D-pose in base frame. Shape is (num_envs, 4).

cfg instance-attribute

cfg: UniformPoseCommandGlobalCfg

Configuration for the command generator.

command property

command: Tensor

The desired 3D-pose in base frame. Shape is (num_envs, 4).

UniformPoseCommandGlobalCfg

Bases: CommandTermCfg

Configuration for the uniform 3D-pose command generator.

类:

名称 描述
Ranges

Uniform distribution ranges for the position commands.

属性:

名称 类型 描述
asset_name str

Name of the asset in the environment for which the commands are generated.

simple_heading bool

Whether to use simple heading or not.

ranges Ranges

Distribution ranges for the position commands.

goal_pose_visualizer_cfg VisualizationMarkersCfg

The configuration for the goal pose visualization marker. Defaults to GREEN_ARROW_X_MARKER_CFG.

asset_name class-attribute instance-attribute

asset_name: str = MISSING

Name of the asset in the environment for which the commands are generated.

simple_heading class-attribute instance-attribute

simple_heading: bool = MISSING

Whether to use simple heading or not.

If True, the heading is in the direction of the target position.

ranges class-attribute instance-attribute

ranges: Ranges = MISSING

Distribution ranges for the position commands.

goal_pose_visualizer_cfg class-attribute instance-attribute

goal_pose_visualizer_cfg: VisualizationMarkersCfg = replace(prim_path='/Visuals/Command/pose_goal')

The configuration for the goal pose visualization marker. Defaults to GREEN_ARROW_X_MARKER_CFG.

Ranges

Uniform distribution ranges for the position commands.

属性:

名称 类型 描述
pos_x tuple[float, float]

Range for the x position (in m).

pos_y tuple[float, float]

Range for the y position (in m).

pos_z tuple[float, float]

Range for the z position (in m).

heading tuple[float, float]

Heading range for the position commands (in rad).

pos_x class-attribute instance-attribute

pos_x: tuple[float, float] = MISSING

Range for the x position (in m).

pos_y class-attribute instance-attribute

pos_y: tuple[float, float] = MISSING

Range for the y position (in m).

pos_z class-attribute instance-attribute

pos_z: tuple[float, float] = MISSING

Range for the z position (in m).

heading class-attribute instance-attribute

heading: tuple[float, float] = MISSING

Heading range for the position commands (in rad).

Used only if :attr:simple_heading is False.

UniformVelocityGlobalCommand

UniformVelocityGlobalCommand(cfg: UniformVelocityGlobalCommandCfg, env: ManagerBasedEnv)

Bases: CommandTerm

Command generator that generates a velocity command with uniform distribution.

The command comprises linear velocity in x, y, z directions and an angular velocity around the z-axis. It is given in the robot's base frame.

If the :attr:cfg.heading_command flag is set to True, the angular velocity is computed from the heading error similar to doing a proportional control on the heading error. The target heading is sampled uniformly from the provided range. Otherwise, the angular velocity is sampled uniformly from the provided range.

Mathematically, the angular velocity is computed as follows from the heading command:

.. math::

\omega_z = \frac{1}{2} \text{wrap_to_pi}(\theta_{\text{target}} - \theta_{\text{current}})

Initialize the command generator.

参数:

名称 类型 描述 默认

cfg

UniformVelocityGlobalCommandCfg

The configuration of the command generator.

必需

env

ManagerBasedEnv

The environment.

必需

引发:

类型 描述
ValueError

If the heading command is active but the heading range is not provided.

方法:

名称 描述
__str__

Return a string representation of the command generator.

属性:

名称 类型 描述
cfg UniformVelocityGlobalCommandCfg

The configuration of the command generator.

command Tensor

The desired base velocity command in the base frame. Shape is (num_envs, 4).

cfg instance-attribute

cfg: UniformVelocityGlobalCommandCfg

The configuration of the command generator.

command property

command: Tensor

The desired base velocity command in the base frame. Shape is (num_envs, 4).

__str__

__str__() -> str

Return a string representation of the command generator.

UniformVelocityGlobalCommandCfg

Bases: CommandTermCfg

Configuration for the uniform velocity command generator.

类:

名称 描述
Ranges

Uniform distribution ranges for the velocity commands.

属性:

名称 类型 描述
asset_name str

Name of the asset in the environment for which the commands are generated.

heading_command bool

Whether to use heading command or angular velocity command. Defaults to False.

heading_control_stiffness float

Scale factor to convert the heading error to angular velocity command. Defaults to 1.0.

rel_standing_envs float

The sampled probability of environments that should be standing still. Defaults to 0.0.

rel_heading_envs float

The sampled probability of environments where the robots follow the heading-based angular velocity command

ranges Ranges

Distribution ranges for the velocity commands.

goal_vel_visualizer_cfg VisualizationMarkersCfg

The configuration for the goal velocity visualization marker. Defaults to GREEN_ARROW_X_MARKER_CFG.

current_vel_visualizer_cfg VisualizationMarkersCfg

The configuration for the current velocity visualization marker. Defaults to BLUE_ARROW_X_MARKER_CFG.

asset_name class-attribute instance-attribute

asset_name: str = MISSING

Name of the asset in the environment for which the commands are generated.

heading_command class-attribute instance-attribute

heading_command: bool = False

Whether to use heading command or angular velocity command. Defaults to False.

If True, the angular velocity command is computed from the heading error, where the target heading is sampled uniformly from provided range. Otherwise, the angular velocity command is sampled uniformly from provided range.

heading_control_stiffness class-attribute instance-attribute

heading_control_stiffness: float = 1.0

Scale factor to convert the heading error to angular velocity command. Defaults to 1.0.

rel_standing_envs class-attribute instance-attribute

rel_standing_envs: float = 0.0

The sampled probability of environments that should be standing still. Defaults to 0.0.

rel_heading_envs class-attribute instance-attribute

rel_heading_envs: float = 1.0

The sampled probability of environments where the robots follow the heading-based angular velocity command (the others follow the sampled angular velocity command). Defaults to 1.0.

This parameter is only used if :attr:heading_command is True.

ranges class-attribute instance-attribute

ranges: Ranges = MISSING

Distribution ranges for the velocity commands.

goal_vel_visualizer_cfg class-attribute instance-attribute

goal_vel_visualizer_cfg: VisualizationMarkersCfg = replace(prim_path='/Visuals/Command/velocity_goal')

The configuration for the goal velocity visualization marker. Defaults to GREEN_ARROW_X_MARKER_CFG.

current_vel_visualizer_cfg class-attribute instance-attribute

current_vel_visualizer_cfg: VisualizationMarkersCfg = replace(prim_path='/Visuals/Command/velocity_current')

The configuration for the current velocity visualization marker. Defaults to BLUE_ARROW_X_MARKER_CFG.

Ranges

Uniform distribution ranges for the velocity commands.

属性:

名称 类型 描述
lin_vel_x tuple[float, float]

Range for the linear-x velocity command (in m/s).

lin_vel_y tuple[float, float]

Range for the linear-y velocity command (in m/s).

lin_vel_z tuple[float, float]

Range for the linear-z velocity command (in m/s).

ang_vel_z tuple[float, float]

Range for the angular-z velocity command (in rad/s).

heading tuple[float, float] | None

Range for the heading command (in rad). Defaults to None.

lin_vel_x class-attribute instance-attribute

lin_vel_x: tuple[float, float] = MISSING

Range for the linear-x velocity command (in m/s).

lin_vel_y class-attribute instance-attribute

lin_vel_y: tuple[float, float] = MISSING

Range for the linear-y velocity command (in m/s).

lin_vel_z class-attribute instance-attribute

lin_vel_z: tuple[float, float] = MISSING

Range for the linear-z velocity command (in m/s).

ang_vel_z class-attribute instance-attribute

ang_vel_z: tuple[float, float] = MISSING

Range for the angular-z velocity command (in rad/s).

heading class-attribute instance-attribute

heading: tuple[float, float] | None = None

Range for the heading command (in rad). Defaults to None.

This parameter is only used if :attr:~UniformVelocityGlobalCommandCfg.heading_command is True.

UniformBimodalVelocityCommand

UniformBimodalVelocityCommand(cfg: UniformBimodalVelocityCommandCfg, env: ManagerBasedEnv)

Bases: CommandTerm

Bimodal velocity command generator with a discrete mode indicator (4+1).

This command samples base-frame velocities with two modes: - Flight mode: uses ranges_flight - Ground mode: uses ranges_ground

The output command augments the 4-D velocity with a 1-D discrete indicator: - 0.0 for flight mode - 1.0 for ground/terrestrial mode

Heading behavior matches UniformVelocityGlobalCommand with optional heading-target proportional control. Ranges are applied per selected mode.

属性:

名称 类型 描述
command Tensor

Return 4-D velocity plus 1-D mode indicator. Shape: (num_envs, 5).

command property

command: Tensor

Return 4-D velocity plus 1-D mode indicator. Shape: (num_envs, 5).

UniformBimodalVelocityCommandCfg

Bases: CommandTermCfg

Configuration for the bimodal velocity command generator (flight vs ground).

类:

名称 描述
Ranges

Uniform distribution ranges for velocity commands per mode.

属性:

名称 类型 描述
asset_name str

Name of the asset receiving commands.

heading_command bool

Whether to convert heading error to angular velocity (per-mode ranges apply).

heading_control_stiffness float

Scale factor for heading error to yaw rate conversion.

rel_standing_envs float

Probability that an environment should be standing still (zero command).

rel_heading_envs float

Probability that an environment uses heading-based angular velocity when enabled.

rel_flight_envs float

Probability of sampling flight mode (vs ground).

ranges_flight Ranges

Ranges for flight mode sampling.

ranges_ground Ranges

Ranges for ground/terrestrial mode sampling.

goal_vel_visualizer_cfg VisualizationMarkersCfg

The configuration for the goal velocity visualization marker. Defaults to GREEN_ARROW_X_MARKER_CFG.

current_vel_visualizer_cfg VisualizationMarkersCfg

The configuration for the current velocity visualization marker. Defaults to BLUE_ARROW_X_MARKER_CFG.

asset_name class-attribute instance-attribute

asset_name: str = MISSING

Name of the asset receiving commands.

heading_command class-attribute instance-attribute

heading_command: bool = False

Whether to convert heading error to angular velocity (per-mode ranges apply).

heading_control_stiffness class-attribute instance-attribute

heading_control_stiffness: float = 1.0

Scale factor for heading error to yaw rate conversion.

rel_standing_envs class-attribute instance-attribute

rel_standing_envs: float = 0.0

Probability that an environment should be standing still (zero command).

rel_heading_envs class-attribute instance-attribute

rel_heading_envs: float = 1.0

Probability that an environment uses heading-based angular velocity when enabled.

rel_flight_envs class-attribute instance-attribute

rel_flight_envs: float = 0.5

Probability of sampling flight mode (vs ground).

ranges_flight class-attribute instance-attribute

ranges_flight: Ranges = MISSING

Ranges for flight mode sampling.

ranges_ground class-attribute instance-attribute

ranges_ground: Ranges = MISSING

Ranges for ground/terrestrial mode sampling.

goal_vel_visualizer_cfg class-attribute instance-attribute

goal_vel_visualizer_cfg: VisualizationMarkersCfg = VisualizationMarkersCfg(prim_path='/Visuals/Command/velocity_goal', markers={'flight': UsdFileCfg(usd_path=f'{ISAAC_NUCLEUS_DIR}/Props/UIElements/arrow_x.usd', scale=(1.0, 0.1, 0.1), visual_material=PreviewSurfaceCfg(diffuse_color=(0.0, 1.0, 0.0))), 'ground': UsdFileCfg(usd_path=f'{ISAAC_NUCLEUS_DIR}/Props/UIElements/arrow_x.usd', scale=(1.0, 0.1, 0.1), visual_material=PreviewSurfaceCfg(diffuse_color=(1.0, 0.0, 0.0)))})

The configuration for the goal velocity visualization marker. Defaults to GREEN_ARROW_X_MARKER_CFG.

current_vel_visualizer_cfg class-attribute instance-attribute

current_vel_visualizer_cfg: VisualizationMarkersCfg = replace(prim_path='/Visuals/Command/velocity_current')

The configuration for the current velocity visualization marker. Defaults to BLUE_ARROW_X_MARKER_CFG.

Ranges

Uniform distribution ranges for velocity commands per mode.

属性:

名称 类型 描述
lin_vel_x tuple[float, float]

Range for the linear-x velocity command (in m/s).

lin_vel_y tuple[float, float]

Range for the linear-y velocity command (in m/s).

lin_vel_z tuple[float, float]

Range for the linear-z velocity command (in m/s).

ang_vel_z tuple[float, float]

Range for the angular-z velocity command (in rad/s).

heading tuple[float, float] | None

Range for the heading command (in rad). Defaults to None.

lin_vel_x class-attribute instance-attribute

lin_vel_x: tuple[float, float] = MISSING

Range for the linear-x velocity command (in m/s).

lin_vel_y class-attribute instance-attribute

lin_vel_y: tuple[float, float] = MISSING

Range for the linear-y velocity command (in m/s).

lin_vel_z class-attribute instance-attribute

lin_vel_z: tuple[float, float] = MISSING

Range for the linear-z velocity command (in m/s).

ang_vel_z class-attribute instance-attribute

ang_vel_z: tuple[float, float] = MISSING

Range for the angular-z velocity command (in rad/s).

heading class-attribute instance-attribute

heading: tuple[float, float] | None = None

Range for the heading command (in rad). Defaults to None.

This parameter is only used if :attr:~UniformBimodalVelocityCommandCfg.heading_command is True.