Unverified Commit 963b53b9 authored by Pascal Roth's avatar Pascal Roth Committed by GitHub

Adds option for terrain border to above or below the ground (#2394)

# Description

Adds option to add terrain border as "wall" above the ground or as
terrain extension below the ground in `TerrainGeneratorCfg`.

## Type of change

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

## Checklist

- [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with
`./isaaclab.sh --format`
- [ ] 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
- [x] I have added my name to the `CONTRIBUTORS.md` or my name already
exists there

---------
Signed-off-by: 's avatarKelly Guo <kellyg@nvidia.com>
Signed-off-by: 's avatarKelly Guo <kellyguo123@hotmail.com>
Co-authored-by: 's avatarKelly Guo <kellyg@nvidia.com>
Co-authored-by: 's avatarKelly Guo <kellyguo123@hotmail.com>
parent 02c0a217
[package]
# Note: Semantic Versioning is used: https://semver.org/
version = "0.39.2"
version = "0.39.4"
# Description
title = "Isaac Lab framework for Robot Learning"
......
Changelog
---------
0.39.4 (2025-05-16)
~~~~~~~~~~~~~~~~~~~
Fixed
^^^^^
* Fixed penetration issue for negative border height in :class:`~isaaclab.terrains.terrain_generator.TerrainGeneratorCfg`.
0.39.3 (2025-05-16)
~~~~~~~~~~~~~~~~~~~
......
......@@ -271,7 +271,7 @@ class TerrainGenerator:
-self.cfg.border_height / 2,
)
# border mesh
border_meshes = make_border(border_size, inner_size, height=self.cfg.border_height, position=border_center)
border_meshes = make_border(border_size, inner_size, height=abs(self.cfg.border_height), position=border_center)
border = trimesh.util.concatenate(border_meshes)
# update the faces to have minimal triangles
selector = ~(np.asarray(border.triangles)[:, :, 2] < -0.1).any(1)
......
......@@ -136,7 +136,11 @@ class TerrainGeneratorCfg:
"""The width of the border around the terrain (in m). Defaults to 0.0."""
border_height: float = 1.0
"""The height of the border around the terrain (in m). Defaults to 1.0."""
"""The height of the border around the terrain (in m). Defaults to 1.0.
.. note::
The default border extends below the ground. If you want to make the border above the ground, choose a negative value.
"""
num_rows: int = 1
"""Number of rows of sub-terrains to generate. Defaults to 1."""
......
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