unilab.terrains.config

Terrain configuration presets and named terrain sets.

Slim port of mjlab/terrains/config.py — keeps only the 7 sub-terrains used by ROUGH_TERRAINS_CFG and the curriculum stairs preset.

To add a new terrain, define a function decorated with @terrain_preset:

@terrain_preset
def my_new_terrain(**overrides: Any) -> SomeTerrainCfg:
    defaults: dict[str, Any] = dict(...)
    defaults.update(overrides)
    return SomeTerrainCfg(**defaults)

It will be auto-included in ALL_TERRAIN_PRESETS.

Functions

flat(**overrides)

hf_pyramid_slope(**overrides)

hf_pyramid_slope_inv(**overrides)

pyramid_stairs(**overrides)

pyramid_stairs_inv(**overrides)

random_rough(**overrides)

terrain_preset(fn)

Register a terrain preset into ALL_TERRAIN_PRESETS.

wave_terrain(**overrides)

unilab.terrains.config.terrain_preset(fn)[source]

Register a terrain preset into ALL_TERRAIN_PRESETS.

Parameters:

fn (TypeVar(_F, bound= Callable[..., SubTerrainCfg]))

Return type:

TypeVar(_F, bound= Callable[..., SubTerrainCfg])

unilab.terrains.config.flat(**overrides)[source]
Parameters:

overrides (Any)

Return type:

HfFlatTerrainCfg

unilab.terrains.config.pyramid_stairs(**overrides)[source]
Parameters:

overrides (Any)

Return type:

HfPyramidStairsTerrainCfg

unilab.terrains.config.pyramid_stairs_inv(**overrides)[source]
Parameters:

overrides (Any)

Return type:

HfInvertedPyramidStairsTerrainCfg

unilab.terrains.config.hf_pyramid_slope(**overrides)[source]
Parameters:

overrides (Any)

Return type:

HfPyramidSlopedTerrainCfg

unilab.terrains.config.hf_pyramid_slope_inv(**overrides)[source]
Parameters:

overrides (Any)

Return type:

HfPyramidSlopedTerrainCfg

unilab.terrains.config.random_rough(**overrides)[source]
Parameters:

overrides (Any)

Return type:

HfRandomUniformTerrainCfg

unilab.terrains.config.wave_terrain(**overrides)[source]
Parameters:

overrides (Any)

Return type:

HfWaveTerrainCfg