unilab.terrains.heightfield_terrains.HfPyramidSlopedTerrainCfg¶
- class unilab.terrains.heightfield_terrains.HfPyramidSlopedTerrainCfg[source]¶
Bases:
SubTerrainCfgHfPyramidSlopedTerrainCfg(proportion: ‘float’ = 1.0, size: ‘tuple[float, float]’ = (10.0, 10.0), flat_patch_sampling: ‘dict[str, FlatPatchSamplingCfg] | None’ = None, *, slope_range: ‘tuple[float, float]’, platform_width: ‘float’ = 1.0, inverted: ‘bool’ = False, border_width: ‘float’ = 0.0, horizontal_scale: ‘float’ = 0.1, vertical_scale: ‘float’ = 0.005, base_thickness_ratio: ‘float’ = 1.0)
- Parameters:
proportion (float)
size (tuple[float, float])
flat_patch_sampling (dict[str, FlatPatchSamplingCfg] | None)
slope_range (tuple[float, float])
platform_width (float)
inverted (bool)
border_width (float)
horizontal_scale (float)
vertical_scale (float)
base_thickness_ratio (float)
Methods
Attributes
Ratio of the heightfield base thickness to its maximum surface height.
Width of the flat border around the terrain edges, in meters.
Named flat-patch sampling configurations, or None to disable.
Heightfield grid resolution along x and y, in meters per cell.
If True, the pyramid is inverted so the platform is at the bottom.
Side length of the flat square platform at the terrain center, in meters.
Robot spawning weight for this terrain type.
Width and length of the terrain patch, in meters.
Heightfield height resolution, in meters per integer unit of the noise array.
Range of slope gradients (rise / run), interpolated by difficulty.
- slope_range: tuple[float, float]¶
Range of slope gradients (rise / run), interpolated by difficulty.
- platform_width: float = 1.0¶
Side length of the flat square platform at the terrain center, in meters.
- inverted: bool = False¶
If True, the pyramid is inverted so the platform is at the bottom.
- border_width: float = 0.0¶
Width of the flat border around the terrain edges, in meters. Must be >= horizontal_scale if non-zero.
- horizontal_scale: float = 0.1¶
Heightfield grid resolution along x and y, in meters per cell.
- vertical_scale: float = 0.005¶
Heightfield height resolution, in meters per integer unit of the noise array.
- base_thickness_ratio: float = 1.0¶
Ratio of the heightfield base thickness to its maximum surface height.
- function(difficulty, rng)[source]¶
Generate backend-agnostic terrain data.
- Return type:
- Returns:
TerrainOutput containing spawn origin and heightfield data.
- Parameters:
- __init__(proportion=1.0, size=(10.0, 10.0), flat_patch_sampling=None, *, slope_range, platform_width=1.0, inverted=False, border_width=0.0, horizontal_scale=0.1, vertical_scale=0.005, base_thickness_ratio=1.0)¶
- Parameters:
proportion (float)
size (tuple[float, float])
flat_patch_sampling (dict[str, FlatPatchSamplingCfg] | None)
slope_range (tuple[float, float])
platform_width (float)
inverted (bool)
border_width (float)
horizontal_scale (float)
vertical_scale (float)
base_thickness_ratio (float)
- flat_patch_sampling: dict[str, FlatPatchSamplingCfg] | None = None¶
Named flat-patch sampling configurations, or None to disable.
- 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.