unilab.envs.locomotion.common.commands

Functions

apply_heading_yaw_feedback(commands, ...[, clip])

In-place P-control on heading error → commands[:, 2] (yaw rate).

sample_heading_commands(env, num_samples)

Uniformly sample heading targets from env.cfg.commands.heading_range.

sample_velocity_commands(rng, num_samples, ...)

zero_small_xy_commands(commands, *[, threshold])

Zero commands[:, :2] in-place wherever its norm is below threshold.

Classes

Commands

Commands(vel_limit: 'list[list[float]]' = <factory>, resampling_time: 'float' = 0.0, heading_command: 'bool' = False, heading_range: 'list[float]' = <factory>, heading_control_stiffness: 'float' = 0.5, rel_standing_envs: 'float' = 0.0)

class unilab.envs.locomotion.common.commands.Commands[source]

Bases: object

Commands(vel_limit: ‘list[list[float]]’ = <factory>, resampling_time: ‘float’ = 0.0, heading_command: ‘bool’ = False, heading_range: ‘list[float]’ = <factory>, heading_control_stiffness: ‘float’ = 0.5, rel_standing_envs: ‘float’ = 0.0)

Parameters:
vel_limit: list[list[float]]
resampling_time: float = 0.0
heading_command: bool = False
heading_range: list[float]
heading_control_stiffness: float = 0.5
rel_standing_envs: float = 0.0
__init__(vel_limit=<factory>, resampling_time=0.0, heading_command=False, heading_range=<factory>, heading_control_stiffness=0.5, rel_standing_envs=0.0)
Parameters:
unilab.envs.locomotion.common.commands.sample_velocity_commands(rng, num_samples, low, high)[source]
Parameters:
Return type:

ndarray

unilab.envs.locomotion.common.commands.zero_small_xy_commands(commands, *, threshold=0.2)[source]

Zero commands[:, :2] in-place wherever its norm is below threshold.

Parameters:
Return type:

None

unilab.envs.locomotion.common.commands.sample_heading_commands(env, num_samples)[source]

Uniformly sample heading targets from env.cfg.commands.heading_range.

Parameters:
Return type:

ndarray

unilab.envs.locomotion.common.commands.apply_heading_yaw_feedback(commands, base_quat, heading_commands, *, stiffness, clip=2.0)[source]

In-place P-control on heading error → commands[:, 2] (yaw rate).

Parameters:
Return type:

None