unilab.terrains.terrain_generator.FlatPatchSamplingCfg¶
- class unilab.terrains.terrain_generator.FlatPatchSamplingCfg[source]¶
Bases:
objectConfiguration for sampling flat patches on a heightfield surface.
- Parameters:
Methods
__init__([num_patches, patch_radius, ...])Attributes
Resolution of the grid used for flat-patch detection, in meters.
Maximum allowed height variation within the patch footprint, in meters.
Number of flat patches to sample per sub-terrain.
Radius of the circular footprint used to test flatness, in meters.
Allowed range of x coordinates for sampled patches, in meters.
Allowed range of y coordinates for sampled patches, in meters.
Allowed range of z coordinates (world height) for sampled patches, in meters.
-
max_height_diff:
float= 0.05¶ Maximum allowed height variation within the patch footprint, in meters.
-
x_range:
tuple[float,float] = (-1000000.0, 1000000.0)¶ Allowed range of x coordinates for sampled patches, in meters.
-
y_range:
tuple[float,float] = (-1000000.0, 1000000.0)¶ Allowed range of y coordinates for sampled patches, in meters.
-
z_range:
tuple[float,float] = (-1000000.0, 1000000.0)¶ Allowed range of z coordinates (world height) for sampled patches, in meters.
-
grid_resolution:
float|None= None¶ Resolution of the grid used for flat-patch detection, in meters. When
None(default), the terrain’s ownhorizontal_scaleis used. Set to a smaller value (e.g. 0.025) for finer boundary precision at the cost of a larger intermediate grid.
- __init__(num_patches=10, patch_radius=0.5, max_height_diff=0.05, x_range=(-1000000.0, 1000000.0), y_range=(-1000000.0, 1000000.0), z_range=(-1000000.0, 1000000.0), grid_resolution=None)¶