跳转至

commands

类:

名称 描述
HeadingVelocityCommandRange

4-D velocity command range: vx, vy, vz, wz.

HeadingVelocityCommandManager

Velocity command manager with heading-based yaw rate control and z velocity.

HeadingVelocityCommandRange

Bases: TypedDict

4-D velocity command range: vx, vy, vz, wz.

HeadingVelocityCommandManager

HeadingVelocityCommandManager(env: GenesisEnv, range: HeadingVelocityCommandRange, resample_time_sec: float = 5.0, standing_probability: float = 0.0, heading_command: bool = False, heading_control_stiffness: float = 1.0, rel_heading_envs: float = 1.0, heading_range: tuple[float, float] = (-math.pi, math.pi), debug_visualizer: bool = False, debug_visualizer_cfg: VelocityDebugVisualizerConfig = DEFAULT_VISUALIZER_CONFIG)

Bases: VelocityCommandManager

Velocity command manager with heading-based yaw rate control and z velocity.

Uses its own HeadingVelocityCommandRange config with 4 velocity dimensions. The parent's _command buffer stores 4-D [vx, vy, vz, wz]. The public command property returns the same 4-D tensor.

When heading_command=True, the angular velocity (wz) is overridden for heading-enabled environments by a proportional controller on the heading error::

wz = clip(stiffness * wrap_to_pi(heading_target - heading_w), ang_vel_z_range)

参数:

名称 类型 描述 默认

env

GenesisEnv

The environment to control.

必需

range

HeadingVelocityCommandRange

The ranges of linear & angular velocities (4-D: vx, vy, vz, wz).

必需

resample_time_sec

float

The time interval between changing the command.

5.0

standing_probability

float

Probability of standing still.

0.0

heading_command

bool

Enable heading-based angular velocity control.

False

heading_control_stiffness

float

P-gain for heading error to yaw rate.

1.0

rel_heading_envs

float

Fraction of environments that use heading control.

1.0

heading_range

tuple[float, float]

Range for sampling heading targets (radians).

(-pi, pi)

debug_visualizer

bool

Enable debug arrow visualization.

False

debug_visualizer_cfg

VelocityDebugVisualizerConfig

Configuration for the debug visualizer.

DEFAULT_VISUALIZER_CONFIG

属性:

名称 类型 描述
command Tensor

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

command property

command: Tensor

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

Columns: [vx, vy, vz, wz].