Skip to content

Adds ability to set platform height independent of object height for terrain #2695

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion source/isaaclab/config/extension.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]

# Note: Semantic Versioning is used: https://semver.org/
version = "0.40.10"
version = "0.40.11"

# Description
title = "Isaac Lab framework for Robot Learning"
Expand Down
9 changes: 9 additions & 0 deletions source/isaaclab/docs/CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
Changelog
---------

0.40.11 (2025-06-27)
~~~~~~~~~~~~~~~~~~~

Added
^^^^^

* Added ability to set platform height independent of object height for trimesh terrains.


0.40.10 (2025-06-25)
~~~~~~~~~~~~~~~~~~~~

Expand Down
7 changes: 4 additions & 3 deletions source/isaaclab/isaaclab/terrains/trimesh/mesh_terrains.py
Original file line number Diff line number Diff line change
Expand Up @@ -773,6 +773,7 @@ def repeated_objects_terrain(
# -- common parameters
num_objects = cp_0.num_objects + int(difficulty * (cp_1.num_objects - cp_0.num_objects))
height = cp_0.height + difficulty * (cp_1.height - cp_0.height)
platform_height = cfg.platform_height if cfg.platform_height >= 0.0 else height
# -- object specific parameters
# note: SIM114 requires duplicated logical blocks under a single body.
if isinstance(cfg, MeshRepeatedBoxesTerrainCfg):
Expand Down Expand Up @@ -808,7 +809,7 @@ def repeated_objects_terrain(
# initialize list of meshes
meshes_list = list()
# compute quantities
origin = np.asarray((0.5 * cfg.size[0], 0.5 * cfg.size[1], 0.5 * height))
origin = np.asarray((0.5 * cfg.size[0], 0.5 * cfg.size[1], 0.5 * platform_height))
platform_corners = np.asarray([
[origin[0] - cfg.platform_width / 2, origin[1] - cfg.platform_width / 2],
[origin[0] + cfg.platform_width / 2, origin[1] + cfg.platform_width / 2],
Expand Down Expand Up @@ -849,8 +850,8 @@ def repeated_objects_terrain(
ground_plane = make_plane(cfg.size, height=0.0, center_zero=False)
meshes_list.append(ground_plane)
# generate a platform in the middle
dim = (cfg.platform_width, cfg.platform_width, 0.5 * height)
pos = (0.5 * cfg.size[0], 0.5 * cfg.size[1], 0.25 * height)
dim = (cfg.platform_width, cfg.platform_width, 0.5 * platform_height)
pos = (0.5 * cfg.size[0], 0.5 * cfg.size[1], 0.25 * platform_height)
platform = trimesh.creation.box(dim, trimesh.transformations.translation_matrix(pos))
meshes_list.append(platform)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ class MeshPyramidStairsTerrainCfg(SubTerrainBaseCfg):
"""The width of the steps (in m)."""
platform_width: float = 1.0
"""The width of the square platform at the center of the terrain. Defaults to 1.0."""
platform_height: float = -1.0
"""The height of the platform. Defaults to -1.0.

If the value is negative, the height is the same as the object height."""
holes: bool = False
"""If True, the terrain will have holes in the steps. Defaults to False.

Expand Down