unilab.envs.locomotion.go2w.rough

Classes

Go2WJoystickRoughCfg

Go2W rough terrain task with procedurally generated sub-terrains.

Go2WJoystickRoughDomainRandomizationProvider

Go2WJoystickRoughEnv

Go2WRoughCommands

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

Go2WRoughTerrainCfg

Go2WRoughTerrainCfg(*, seed: 'int | None' = None, curriculum: 'bool' = False, size: 'tuple[float, float]' = (8.0, 8.0), horizontal_scale: 'float' = 0.1, vertical_scale: 'float' = 0.005, border_width: 'float' = 1.0, num_rows: 'int' = 6, num_cols: 'int' = 6, sub_terrains: 'dict[str, SubTerrainCfg]' = <factory>, difficulty_range: 'tuple[float, float]' = (0.0, 1.0), add_lights: 'bool' = True)

RoughTerminationConfig

RoughTerminationConfig(terrain_out_of_bounds: 'bool' = True, terrain_distance_buffer: 'float' = 3.0)

class unilab.envs.locomotion.go2w.rough.Go2WRoughCommands[source]

Bases: Commands

Go2WRoughCommands(vel_limit: ‘list[list[float]]’ = <factory>, resampling_time: ‘float’ = 10.0, heading_command: ‘bool’ = True, 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 = 10.0
heading_command: bool = True
heading_range: list[float]
__init__(vel_limit=<factory>, resampling_time=10.0, heading_command=True, heading_range=<factory>, heading_control_stiffness=0.5, rel_standing_envs=0.0)
Parameters:
class unilab.envs.locomotion.go2w.rough.RoughTerminationConfig[source]

Bases: object

RoughTerminationConfig(terrain_out_of_bounds: ‘bool’ = True, terrain_distance_buffer: ‘float’ = 3.0)

Parameters:
  • terrain_out_of_bounds (bool)

  • terrain_distance_buffer (float)

terrain_out_of_bounds: bool = True
terrain_distance_buffer: float = 3.0
__init__(terrain_out_of_bounds=True, terrain_distance_buffer=3.0)
Parameters:
  • terrain_out_of_bounds (bool)

  • terrain_distance_buffer (float)

class unilab.envs.locomotion.go2w.rough.Go2WRoughTerrainCfg[source]

Bases: TerrainGeneratorCfg

Go2WRoughTerrainCfg(*, seed: ‘int | None’ = None, curriculum: ‘bool’ = False, size: ‘tuple[float, float]’ = (8.0, 8.0), horizontal_scale: ‘float’ = 0.1, vertical_scale: ‘float’ = 0.005, border_width: ‘float’ = 1.0, num_rows: ‘int’ = 6, num_cols: ‘int’ = 6, sub_terrains: ‘dict[str, SubTerrainCfg]’ = <factory>, difficulty_range: ‘tuple[float, float]’ = (0.0, 1.0), add_lights: ‘bool’ = True)

Parameters:
size: tuple[float, float] = (8.0, 8.0)

Width and length of each sub-terrain patch, in meters. Both components must be integer multiples of horizontal_scale.

num_rows: int = 6

Number of sub-terrain rows in the grid. Represents difficulty levels in curriculum mode. Note: Environments are randomly assigned to rows, so multiple envs can share the same patch.

num_cols: int = 6

Number of sub-terrain columns in the grid.

In curriculum mode the generator ignores this value and uses one column per terrain type (len(sub_terrains)). In random mode it is used as-is.

border_width: float = 1.0

Width of the flat border around the entire terrain grid, in meters. Must be an integer multiple of horizontal_scale if non-zero. The border is a flat hfield slab whose top surface is flush with the inner-terrain floor at z=0; it is NOT a wall.

add_lights: bool = True

If True, adds a directional light above the terrain grid.

horizontal_scale: float = 0.1

Heightfield grid resolution along x and y, in meters per cell. Shared by every sub-terrain (overwritten in TerrainGenerator __init__). All length-like sub-terrain parameters (step_width, platform_width, border_width, etc.) must be integer multiples of this value.

sub_terrains: dict[str, SubTerrainCfg]

Named sub-terrain configurations to populate the grid.

__init__(*, seed=None, curriculum=False, size=(8.0, 8.0), horizontal_scale=0.1, vertical_scale=0.005, border_width=1.0, num_rows=6, num_cols=6, sub_terrains=<factory>, difficulty_range=(0.0, 1.0), add_lights=True)
Parameters:
class unilab.envs.locomotion.go2w.rough.Go2WJoystickRoughCfg[source]

Bases: Go2WJoystickCfg

Go2W rough terrain task with procedurally generated sub-terrains.

Parameters:
  • scene (SceneCfg)

  • sim_dt (float)

  • max_episode_seconds (float)

  • ctrl_dt (float)

  • render_spacing (float)

  • render_offset_mode (str)

  • motrix_max_iterations (Optional[int])

  • post_step_forward_sensor (bool)

  • control_config (ControlConfig)

  • noise_config (NoiseConfig)

  • sensor (JoystickSensor)

  • asset (Asset)

  • init_state (InitState)

  • commands (Go2WRoughCommands)

  • reward_config (RewardConfig | None)

  • domain_rand (Go2WDomainRandConfig)

  • terrain_scan (HeightScanConfig)

  • termination_config (RoughTerminationConfig)

  • terrain_curriculum (TerrainCurriculumCfg)

commands: Go2WRoughCommands
terrain_scan: HeightScanConfig
termination_config: RoughTerminationConfig
terrain_curriculum: TerrainCurriculumCfg
__init__(scene=<factory>, sim_dt=0.005, max_episode_seconds=20.0, ctrl_dt=0.02, render_spacing=1.0, render_offset_mode='grid', motrix_max_iterations=None, post_step_forward_sensor=False, control_config=<factory>, noise_config=<factory>, sensor=<factory>, asset=<factory>, init_state=<factory>, commands=<factory>, reward_config=None, domain_rand=<factory>, terrain_scan=<factory>, termination_config=<factory>, terrain_curriculum=<factory>)
Parameters:
  • scene (SceneCfg)

  • sim_dt (float)

  • max_episode_seconds (float)

  • ctrl_dt (float)

  • render_spacing (float)

  • render_offset_mode (str)

  • motrix_max_iterations (Optional[int])

  • post_step_forward_sensor (bool)

  • control_config (ControlConfig)

  • noise_config (NoiseConfig)

  • sensor (JoystickSensor)

  • asset (Asset)

  • init_state (InitState)

  • commands (Go2WRoughCommands)

  • reward_config (RewardConfig | None)

  • domain_rand (Go2WDomainRandConfig)

  • terrain_scan (HeightScanConfig)

  • termination_config (RoughTerminationConfig)

  • terrain_curriculum (TerrainCurriculumCfg)

class unilab.envs.locomotion.go2w.rough.Go2WJoystickRoughDomainRandomizationProvider[source]

Bases: Go2WJoystickDomainRandomizationProvider

build_reset_plan(env, env_ids)[source]
Parameters:
Return type:

ResetPlan

class unilab.envs.locomotion.go2w.rough.Go2WJoystickRoughEnv[source]

Bases: Go2WJoystickEnv

Parameters:

cfg (Go2WJoystickRoughCfg)

__init__(cfg, num_envs=1, backend_type='mujoco')[source]
Parameters:

cfg (Go2WJoystickRoughCfg)

property obs_groups_spec: dict[str, int]

101}.

Subclasses MUST override this property.

Type:

Return observation group dimensions, e.g. {“obs”

Type:

98, “critic”