Unverified Commit f0b05749 authored by Georg Wiedebach's avatar Georg Wiedebach Committed by GitHub

Adds `use_terrain_origins` option to TerrainImporterCfg (#3537)

# Description

Support distributing environments in a grid when using a generated
terrain.

Fixes #3536 

## Type of change

- New feature (non-breaking change which adds functionality)

## Screenshots

## Checklist

- [x] I have read and understood the [contribution
guidelines](https://isaac-sim.github.io/IsaacLab/main/source/refs/contributing.html)
- [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with
`./isaaclab.sh --format`
- [x] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [x] I have updated the changelog and the corresponding version in the
extension's `config/extension.toml` file
- [ ] I have added my name to the `CONTRIBUTORS.md` or my name already
exists there

---------
Signed-off-by: 's avatarGeorg Wiedebach <georgwi@users.noreply.github.com>
Co-authored-by: 's avatarMayank Mittal <12863862+Mayankm96@users.noreply.github.com>
parent 7b26eb41
[package]
# Note: Semantic Versioning is used: https://semver.org/
version = "0.47.7"
version = "0.47.8"
# Description
title = "Isaac Lab framework for Robot Learning"
......
Changelog
---------
0.47.8 (2025-11-06)
~~~~~~~~~~~~~~~~~~~
Added
^^^^^
* Added parameter :attr:`~isaaclab.terrains.TerrainImporterCfg.use_terrain_origins` to allow generated sub terrains with grid origins.
0.47.7 (2025-10-31)
~~~~~~~~~~~~~~~~~~~
......
......@@ -87,8 +87,11 @@ class TerrainImporter:
cfg=self.cfg.terrain_generator, device=self.device
)
self.import_mesh("terrain", terrain_generator.terrain_mesh)
if self.cfg.use_terrain_origins:
# configure the terrain origins based on the terrain generator
self.configure_env_origins(terrain_generator.terrain_origins)
else:
self.configure_env_origins()
# refer to the flat patches
self._terrain_flat_patches = terrain_generator.flat_patches
elif self.cfg.terrain_type == "usd":
......
......@@ -65,7 +65,16 @@ class TerrainImporterCfg:
"""The spacing between environment origins when defined in a grid. Defaults to None.
Note:
This parameter is used only when the ``terrain_type`` is "plane" or "usd".
This parameter is used only when the ``terrain_type`` is "plane" or "usd" or if
:attr:`use_terrain_origins` is False.
"""
use_terrain_origins: bool = True
"""Whether to set the environment origins based on the terrain origins or in a grid
according to :attr:`env_spacing`. Defaults to True.
Note:
This parameter is used only when the :attr:`terrain type` is "generator".
"""
visual_material: sim_utils.VisualMaterialCfg | None = sim_utils.PreviewSurfaceCfg(diffuse_color=(0.0, 0.0, 0.0))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment