Skip to content
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 exts/nav_suite/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.2.5"
version = "0.2.6"

# Description
title = "IsaacLab Navigation Suite"
Expand Down
10 changes: 10 additions & 0 deletions exts/nav_suite/docs/CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
Changelog
---------

0.2.6 (2025-08-20)
~~~~~~~~~~~~~~~~~~

Added
^^^^^^^

- Added pytest testing suite for :class:`nav_suite.terrains.nav_terrain_importer.NavTerrainImporter`
- Added :attr:`nav_suite.terrains.nav_terrain_importer_cfg.NavTerrainImporterCfg.random_seed` parameter for deterministic random sampling behavior.
- Added :attr:`nav_suite.terrains.nav_terrain_importer_cfg.NavTerrainImporterCfg.custom_origins` parameter


0.2.5 (2025-08-13)
~~~~~~~~~~~~~~~~~~
Expand Down
3 changes: 3 additions & 0 deletions exts/nav_suite/nav_suite/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
NAVSUITE_DATA_DIR = os.path.join(NAVSUITE_EXT_DIR, "data")
"""Path to the extension data directory."""

NAVSUITE_TEST_ASSETS_DIR = os.path.join(NAVSUITE_EXT_DIR, "tests", "assets")
"""Path to the extension test assets directory."""

NAVSUITE_METADATA = toml.load(os.path.join(NAVSUITE_EXT_DIR, "config", "extension.toml"))
"""Extension metadata dictionary parsed from the extension.toml file."""

Expand Down
14 changes: 9 additions & 5 deletions exts/nav_suite/nav_suite/terrains/nav_terrain_importer.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,14 @@ def configure_env_origins(self, origins: np.ndarray | torch.Tensor | None = None
This method adds the options to add grid-like origins to a USD terrain.
"""
# decide whether to compute origins in a grid or based on curriculum
if origins is not None:
# convert to numpy
if isinstance(origins, np.ndarray):
origins = torch.from_numpy(origins)
terrain_origins_source = self.cfg.custom_origins if self.cfg.custom_origins is not None else origins

if terrain_origins_source is not None:
# convert to torch tensor if needed
if isinstance(terrain_origins_source, np.ndarray):
terrain_origins_source = torch.from_numpy(terrain_origins_source)
# store the origins
self.terrain_origins = origins.to(self.device, dtype=torch.float)
self.terrain_origins = terrain_origins_source.to(self.device, dtype=torch.float)
# compute environment origins
self.env_origins = self._compute_env_origins_curriculum(self.cfg.num_envs, self.terrain_origins)
# uniform env_spacing for usd_size
Expand Down Expand Up @@ -459,6 +461,8 @@ def _convert_obj_to_usd(self, file_path: str) -> str:
# Convert the asset
converter_instance._convert_asset(self.cfg.asset_converter)

self.cfg.usd_path = base_path + ".usd"

# update the usd_path
return base_path + ".usd"

Expand Down
8 changes: 8 additions & 0 deletions exts/nav_suite/nav_suite/terrains/nav_terrain_importer_cfg.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
#
# SPDX-License-Identifier: Apache-2.0

import torch

from isaaclab.terrains import TerrainImporterCfg
from isaaclab.utils import configclass

Expand Down Expand Up @@ -61,3 +63,9 @@ class NavTerrainImporterCfg(TerrainImporterCfg):

add_colliders: bool = False
"""Add colliders to meshes"""

custom_origins: torch.Tensor | None = None
"""Custom origins for environment placement. If provided, these origins will be used to place environments instead of computing them via grid or curriculum logic. Shape should be (num_rows, num_cols, 3) or compatible. Default is None."""

random_seed: int | None = None
"""Random seed for deterministic terrain generation. If None, random behavior is non-deterministic. Default is None."""
3 changes: 3 additions & 0 deletions exts/nav_suite/tests/assets/terrains/ground_plane.usda
Git LFS file not shown
Git LFS file not shown
17 changes: 17 additions & 0 deletions exts/nav_suite/tests/assets/terrains/ground_plane_obj.obj
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
mtllib ground_plane.mtl
o mesh_0
usemtl material7
v -24.999999441206455 -24.999999441206455 0
v 24.999999441206455 -24.999999441206455 0
v 24.999999441206455 24.999999441206455 0
v -24.999999441206455 -24.999999441206455 0
v 24.999999441206455 24.999999441206455 0
v -24.999999441206455 24.999999441206455 0
vn 0 0 1
vn 0 0 1
vn 0 0 1
vn 0 0 1
vn 0 0 1
vn 0 0 1
f 1//1 2//2 3//3
f 4//4 5//5 6//6
3 changes: 3 additions & 0 deletions exts/nav_suite/tests/assets/terrains/natural_terrain.usda
Git LFS file not shown
3 changes: 3 additions & 0 deletions exts/nav_suite/tests/assets/terrains/no_collision.usda
Git LFS file not shown
Loading
Loading