diff --git a/source/isaaclab/config/extension.toml b/source/isaaclab/config/extension.toml index 249c71e86be..cf769e34cfb 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.10" +version = "0.40.11" # Description title = "Isaac Lab framework for Robot Learning" diff --git a/source/isaaclab/docs/CHANGELOG.rst b/source/isaaclab/docs/CHANGELOG.rst index bfd39a9524d..46998e41508 100644 --- a/source/isaaclab/docs/CHANGELOG.rst +++ b/source/isaaclab/docs/CHANGELOG.rst @@ -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) ~~~~~~~~~~~~~~~~~~~~ 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.