Skip to content

simulo.Terrain

Terrain factory.

Provides static methods to create different terrain types for robot simulation. All terrain types are backend-independent abstractions that get translated to backend-specific implementations.

Real usage, shared by every shipped training app — a flat ground plane added once, not per environment:

scene.add(simulo.Terrain.plane(name="ground"), at="/", per_environment=False)
class Terrain
Terrain.plane(
name: str = 'groundPlane',
pose: Optional[Pose] = None,
size: float = 100.0,
) -> GroundPlane

Create a ground plane (infinite flat surface).

Use this for simple environments where terrain complexity is not needed. Fast and memory-efficient.

Args:

  • name — Terrain name
  • pose — Pose in space
  • size — Visual size (actual collision is infinite)

Returns:

GroundPlane instance

Terrain.rough(
name: str = 'terrain',
pose: Optional[Pose] = None,
num_rows: int = 10,
num_cols: int = 20,
size: Tuple[float, float] = (8.0, 8.0),
border_width: float = 20.0,
curriculum: bool = True,
max_init_terrain_level: Optional[int] = None,
sub_terrains: Optional[List[SubTerrainConfig]] = None,
color_scheme: str = 'height',
) -> RoughTerrain

Create procedurally generated rough terrain.

This creates a grid of sub-terrains with varying difficulty, suitable for curriculum learning in locomotion tasks. Equivalent to IsaacLab’s TerrainGeneratorCfg with TerrainImporterCfg.

Args:

  • name — Terrain name
  • pose — Pose in space
  • num_rows — Number of terrain rows (sub-terrain grid rows)
  • num_cols — Number of terrain columns (sub-terrain grid columns)
  • size — Size of each sub-terrain (width, height) in meters
  • border_width — Width of flat border around terrain
  • curriculum — If True, use curriculum learning (progressive difficulty)
  • max_init_terrain_level — Maximum initial terrain level for curriculum. None means spawn randomly across all levels.
  • sub_terrains — List of sub-terrain configurations. If None, uses default rough terrain preset with stairs, rough, and slopes.
  • color_scheme — Color scheme for terrain visualization (“height” or “none”)

Returns:

RoughTerrain instance

Example:

# Simple rough terrain with defaults
terrain = simulo.Terrain.rough(name="terrain")
# Custom terrain configuration
terrain = simulo.Terrain.rough(
name="terrain",
num_rows=5,
num_cols=10,
curriculum=False, # No curriculum, random placement
sub_terrains=[
simulo.SubTerrainConfig(type="flat", proportion=0.1),
simulo.SubTerrainConfig(type="random_rough", proportion=0.4),
simulo.SubTerrainConfig(type="pyramid_stairs", proportion=0.5),
],
)