From 9889c1f829849ecbf3d761a46b3aa219a734dafe Mon Sep 17 00:00:00 2001 From: fan-ziqi Date: Tue, 19 Nov 2024 17:49:48 +0800 Subject: [PATCH 1/5] add save_path to data_collect.py --- omniverse/standalone/data_collect.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/omniverse/standalone/data_collect.py b/omniverse/standalone/data_collect.py index 8d484b5..cabe7e3 100644 --- a/omniverse/standalone/data_collect.py +++ b/omniverse/standalone/data_collect.py @@ -11,6 +11,7 @@ """Launch Isaac Sim Simulator first.""" import argparse +import os from omni.isaac.lab.app import AppLauncher @@ -54,6 +55,7 @@ def main(): """Main function to start the data collection in different environments.""" # setup sampling config cfg = ViewpointSamplingCfg() + cfg.save_path = os.path.join("${USER_SAVE_PATH}", args_cli.scene) cfg.terrain_analysis.raycaster_sensor = "depth_camera" # create environment cfg and modify the collector config depending on the environment From 3fc7ed36d0096a720eb5465efcabc516f4be3a2f Mon Sep 17 00:00:00 2001 From: fan-ziqi Date: Tue, 19 Nov 2024 17:50:12 +0800 Subject: [PATCH 2/5] fix readme script error --- omniverse/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/omniverse/README.md b/omniverse/README.md index 9bd12b6..9440fa4 100644 --- a/omniverse/README.md +++ b/omniverse/README.md @@ -129,7 +129,7 @@ The rendered viewpoints are collected by executing ``` cd IsaacLab -./isaaclab.sh -p /omniverse/standalone/viplanner_demo.py --scene --num_samples +./isaaclab.sh -p /omniverse/standalone/data_collect.py --scene --num_samples ``` To test that the data has been correctly extracted, please run the 3D reconstruction and see if the results fits to the simulated environment. From 3e54ca2dc988644f05318d65349b778884d98b95 Mon Sep 17 00:00:00 2001 From: fan-ziqi Date: Tue, 19 Nov 2024 17:52:32 +0800 Subject: [PATCH 3/5] updated the import path for `MatterportSemanticCostMapping` from `nav_collectors.configs` to `omni.viplanner.config` --- .../omni/viplanner/collectors/terrain_analysis_cfg.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/omniverse/extension/omni.viplanner/omni/viplanner/collectors/terrain_analysis_cfg.py b/omniverse/extension/omni.viplanner/omni/viplanner/collectors/terrain_analysis_cfg.py index 8f2f076..dd11c82 100644 --- a/omniverse/extension/omni.viplanner/omni/viplanner/collectors/terrain_analysis_cfg.py +++ b/omniverse/extension/omni.viplanner/omni/viplanner/collectors/terrain_analysis_cfg.py @@ -6,7 +6,7 @@ from __future__ import annotations -from nav_collectors.configs import MatterportSemanticCostMapping +from omni.viplanner.config import MatterportSemanticCostMapping from omni.isaac.lab.utils import configclass From bc5af14c093aaef6455910c4857956bd980e98d8 Mon Sep 17 00:00:00 2001 From: fan-ziqi Date: Tue, 19 Nov 2024 17:53:57 +0800 Subject: [PATCH 4/5] in headless mode, we cannot visualize the graph and omni.debug.draw is not available --- .../omni/viplanner/viplanner/viplanner_algo.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/omniverse/extension/omni.viplanner/omni/viplanner/viplanner/viplanner_algo.py b/omniverse/extension/omni.viplanner/omni/viplanner/viplanner/viplanner_algo.py index 5fe4859..6247083 100644 --- a/omniverse/extension/omni.viplanner/omni/viplanner/viplanner/viplanner_algo.py +++ b/omniverse/extension/omni.viplanner/omni/viplanner/viplanner/viplanner_algo.py @@ -10,7 +10,6 @@ import omni.isaac.lab.utils.math as math_utils import torch import torchvision.transforms as transforms -from omni.isaac.debug_draw import _debug_draw from viplanner.config import TrainCfg @@ -51,7 +50,12 @@ def __init__(self, model_dir: str, fear_threshold: float = 0.5, device: str = "c self.traj_generate = TrajOpt() # setup waypoint display in Isaac - self.draw = _debug_draw.acquire_debug_draw_interface() + # in headless mode, we cannot visualize the graph and omni.debug.draw is not available + try: + import omni.isaac.debug_draw._debug_draw as omni_debug_draw + self.draw = omni_debug_draw.acquire_debug_draw_interface() + except ImportError: + print("[WARNING] Graph Visualization is not available in headless mode.") self.color_fear = [(1.0, 0.4, 0.1, 1.0)] # red self.color_path = [(0.4, 1.0, 0.1, 1.0)] # green self.size = [5.0] From 1aedbe2cd61eac16535a235d144a4edba440553e Mon Sep 17 00:00:00 2001 From: Pascal Roth <57946385+pascal-roth@users.noreply.github.com> Date: Tue, 19 Nov 2024 12:20:02 +0100 Subject: [PATCH 5/5] Apply suggestions from code review --- omniverse/standalone/data_collect.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/omniverse/standalone/data_collect.py b/omniverse/standalone/data_collect.py index cabe7e3..8d484b5 100644 --- a/omniverse/standalone/data_collect.py +++ b/omniverse/standalone/data_collect.py @@ -11,7 +11,6 @@ """Launch Isaac Sim Simulator first.""" import argparse -import os from omni.isaac.lab.app import AppLauncher @@ -55,7 +54,6 @@ def main(): """Main function to start the data collection in different environments.""" # setup sampling config cfg = ViewpointSamplingCfg() - cfg.save_path = os.path.join("${USER_SAVE_PATH}", args_cli.scene) cfg.terrain_analysis.raycaster_sensor = "depth_camera" # create environment cfg and modify the collector config depending on the environment