Skip to content

Commit

Permalink
Bug fix (#41)
Browse files Browse the repository at this point in the history
# Description

- [add save_path to
data_collect.py](9889c1f)
- [fix readme script
error](3fc7ed3)
- [updated the import path for MatterportSemanticCostMapping from
`nav_collectors.configs` to
`omni.viplanner.config`](3e54ca2)
- [in headless mode, we cannot visualize the graph and omni.debug.draw
is not
available](bc5af14)


## Type of change

- Bug fix (non-breaking change which fixes an issue)

## Checklist

- [ ] I have run the [`pre-commit` checks](https://pre-commit.com/) with
`./formatter.sh`
- [ ] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings

---------

Co-authored-by: Pascal Roth <[email protected]>
  • Loading branch information
fan-ziqi and pascal-roth authored Nov 19, 2024
1 parent 7d481c1 commit 07735cd
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion omniverse/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ The rendered viewpoints are collected by executing
```
cd IsaacLab
./isaaclab.sh -p <path-to-viplanner-repo>/omniverse/standalone/viplanner_demo.py --scene <matterport/carla/warehouse> --num_samples <how-many-viewpoints>
./isaaclab.sh -p <path-to-viplanner-repo>/omniverse/standalone/data_collect.py --scene <matterport/carla/warehouse> --num_samples <how-many-viewpoints>
```
To test that the data has been correctly extracted, please run the 3D reconstruction and see if the results fits to the simulated environment.
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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]
Expand Down

0 comments on commit 07735cd

Please sign in to comment.