unilab.terrains.heightfield_terrains.HfInvertedPyramidStairsTerrainCfg

class unilab.terrains.heightfield_terrains.HfInvertedPyramidStairsTerrainCfg[source]

Bases: HfPyramidStairsTerrainCfg

A pit-style pyramid stairs terrain encoded as a heightfield.

Inverts HfPyramidStairsTerrainCfg: outer ring sits at world z=0, rings descend toward a central platform at the bottom. With holes=True the diagonal corners are even deeper than the platform.

Parameters:
  • proportion (float)

  • size (tuple[float, float])

  • flat_patch_sampling (dict[str, FlatPatchSamplingCfg] | None)

  • step_height_range (tuple[float, float])

  • step_width (float)

  • platform_width (float)

  • border_width (float)

  • holes (bool)

  • pit_depth (float)

  • horizontal_scale (float)

  • vertical_scale (float)

  • base_thickness_ratio (float)

Methods

__init__([proportion, size, ...])

function(difficulty, rng)

Generate backend-agnostic terrain data.

Attributes

base_thickness_ratio

Ratio of the heightfield base thickness to its surface height.

border_width

Width of the flat outer border around the staircase, in meters.

flat_patch_sampling

Named flat-patch sampling configurations, or None to disable.

holes

If True, carve deep pits at the diagonal corners of each step ring.

horizontal_scale

Heightfield grid resolution.

pit_depth

Depth of holes-mode pits below the lowest stair, in meters.

platform_width

Side length of the flat square platform at the top of the staircase, in meters.

proportion

Robot spawning weight for this terrain type.

size

Width and length of the terrain patch, in meters.

vertical_scale

Heightfield height resolution.

step_height_range

Min and max step height, in meters.

step_width

Depth (run) of each step, in meters.

__init__(proportion=1.0, size=(10.0, 10.0), flat_patch_sampling=None, *, step_height_range, step_width, platform_width=1.0, border_width=0.0, holes=False, pit_depth=5.0, horizontal_scale=0.05, vertical_scale=0.005, base_thickness_ratio=1.0)
Parameters:
  • proportion (float)

  • size (tuple[float, float])

  • flat_patch_sampling (dict[str, FlatPatchSamplingCfg] | None)

  • step_height_range (tuple[float, float])

  • step_width (float)

  • platform_width (float)

  • border_width (float)

  • holes (bool)

  • pit_depth (float)

  • horizontal_scale (float)

  • vertical_scale (float)

  • base_thickness_ratio (float)

base_thickness_ratio: float = 1.0

Ratio of the heightfield base thickness to its surface height.

border_width: float = 0.0

Width of the flat outer border around the staircase, in meters.

flat_patch_sampling: dict[str, FlatPatchSamplingCfg] | None = None

Named flat-patch sampling configurations, or None to disable.

holes: bool = False

If True, carve deep pits at the diagonal corners of each step ring.

horizontal_scale: float = 0.05

Heightfield grid resolution. Overwritten by TerrainGenerator.

pit_depth: float = 5.0

Depth of holes-mode pits below the lowest stair, in meters.

platform_width: float = 1.0

Side length of the flat square platform at the top of the staircase, in meters.

proportion: float = 1.0

Robot spawning weight for this terrain type.

In curriculum mode, controls how many robots are spawned on this terrain’s column relative to other terrain types. Each terrain type always gets exactly one column; proportion only affects spawning distribution.

In random mode, controls the sampling probability for each patch.

size: tuple[float, float] = (10.0, 10.0)

Width and length of the terrain patch, in meters.

vertical_scale: float = 0.005

Heightfield height resolution. Overwritten by TerrainGenerator.

step_height_range: tuple[float, float]

Min and max step height, in meters. Interpolated by difficulty.

step_width: float

Depth (run) of each step, in meters. Must be a multiple of horizontal_scale.

function(difficulty, rng)[source]

Generate backend-agnostic terrain data.

Return type:

TerrainOutput

Returns:

TerrainOutput containing spawn origin and heightfield data.

Parameters: