From 4e9346a87608f8429cc52c4630998f803d3529c7 Mon Sep 17 00:00:00 2001 From: James Tigue Date: Fri, 13 Jun 2025 11:18:35 -0400 Subject: [PATCH 1/2] add platform_height cfg params --- source/isaaclab/isaaclab/terrains/trimesh/mesh_terrains.py | 7 ++++--- .../isaaclab/terrains/trimesh/mesh_terrains_cfg.py | 4 ++++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/source/isaaclab/isaaclab/terrains/trimesh/mesh_terrains.py b/source/isaaclab/isaaclab/terrains/trimesh/mesh_terrains.py index 6201a6ca3d4..edd8077ae13 100644 --- a/source/isaaclab/isaaclab/terrains/trimesh/mesh_terrains.py +++ b/source/isaaclab/isaaclab/terrains/trimesh/mesh_terrains.py @@ -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): @@ -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], @@ -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) diff --git a/source/isaaclab/isaaclab/terrains/trimesh/mesh_terrains_cfg.py b/source/isaaclab/isaaclab/terrains/trimesh/mesh_terrains_cfg.py index ce52bc9bcb1..9de0fab31b3 100644 --- a/source/isaaclab/isaaclab/terrains/trimesh/mesh_terrains_cfg.py +++ b/source/isaaclab/isaaclab/terrains/trimesh/mesh_terrains_cfg.py @@ -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. From 4a5f6f9c3bb0e4ce46ca0307bcdbabddaafb8172 Mon Sep 17 00:00:00 2001 From: James Tigue Date: Fri, 13 Jun 2025 11:22:47 -0400 Subject: [PATCH 2/2] update changelog --- source/isaaclab/config/extension.toml | 2 +- source/isaaclab/docs/CHANGELOG.rst | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/source/isaaclab/config/extension.toml b/source/isaaclab/config/extension.toml index ed7c2997613..aa5e112813c 100644 --- a/source/isaaclab/config/extension.toml +++ b/source/isaaclab/config/extension.toml @@ -1,7 +1,7 @@ [package] # Note: Semantic Versioning is used: https://semver.org/ -version = "0.40.5" +version = "0.40.6" # Description title = "Isaac Lab framework for Robot Learning" diff --git a/source/isaaclab/docs/CHANGELOG.rst b/source/isaaclab/docs/CHANGELOG.rst index f515d3411ae..a47045144ef 100644 --- a/source/isaaclab/docs/CHANGELOG.rst +++ b/source/isaaclab/docs/CHANGELOG.rst @@ -1,6 +1,15 @@ Changelog --------- +0.40.6 (2025-06-13) +~~~~~~~~~~~~~~~~~~~ + +Added +^^^^^ + +* Adds ability to set platform height independent of object height for trimesh terrains. + + 0.40.5 (2025-05-22) ~~~~~~~~~~~~~~~~~~~