Skip to content

Commit df77fe7

Browse files
vidurv-nvidiagreptile-apps[bot]isaaclab-review-bot[bot]
authored
Adds collision, inertia, and visual geometry toggles to Newton viewer (#5161)
# Description Add visualization toggles for collision meshes, inertia boxes, and visual geometries to the Newton viewer. - Add `show_collision` config option and UI checkbox to visualize collision meshes at runtime - Add `show_inertia_boxes` config option and UI checkbox to visualize body inertia boxes at runtime - Add `show_visual` config option and UI checkbox to toggle visual geometry rendering at runtime All options wire through `NewtonVisualizerCfg` to the underlying Newton `ViewerGL` attributes. ## Type of change - New feature (non-breaking change which adds functionality) ## Screenshots Please attach before and after screenshots of the change if applicable. ## Checklist - [x] I have read and understood the [contribution guidelines](https://isaac-sim.github.io/IsaacLab/main/source/refs/contributing.html) - [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with `./isaaclab.sh --format` - [ ] I have made corresponding changes to the documentation - [x] My changes generate no new warnings - [ ] I have added tests that prove my fix is effective or that my feature works - [ ] I have updated the changelog and the corresponding version in the extension's `config/extension.toml` file - [ ] I have added my name to the `CONTRIBUTORS.md` or my name already exists there --------- Signed-off-by: vidurv-nvidia <vidurv@nvidia.com> Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> Co-authored-by: isaaclab-review-bot[bot] <270793704+isaaclab-review-bot[bot]@users.noreply.github.com>
1 parent 78e765b commit df77fe7

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

source/isaaclab_visualizers/isaaclab_visualizers/newton/newton_visualizer.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,9 +190,15 @@ def _render_left_panel(self):
190190
show_contacts = self.show_contacts
191191
changed, self.show_contacts = imgui.checkbox("Show Contacts", show_contacts)
192192

193+
show_collision = self.show_collision
194+
changed, self.show_collision = imgui.checkbox("Show Collision", show_collision)
195+
193196
show_springs = self.show_springs
194197
changed, self.show_springs = imgui.checkbox("Show Springs", show_springs)
195198

199+
show_inertia_boxes = self.show_inertia_boxes
200+
changed, self.show_inertia_boxes = imgui.checkbox("Show Inertia Boxes", show_inertia_boxes)
201+
196202
show_com = self.show_com
197203
changed, self.show_com = imgui.checkbox("Show Center of Mass", show_com)
198204

@@ -316,7 +322,9 @@ def initialize(self, scene_data_provider: BaseSceneDataProvider) -> None:
316322

317323
self._viewer.show_joints = self.cfg.show_joints
318324
self._viewer.show_contacts = self.cfg.show_contacts
325+
self._viewer.show_collision = self.cfg.show_collision
319326
self._viewer.show_springs = self.cfg.show_springs
327+
self._viewer.show_inertia_boxes = self.cfg.show_inertia_boxes
320328
self._viewer.show_com = self.cfg.show_com
321329

322330
self._viewer.renderer.draw_shadows = self.cfg.enable_shadows

source/isaaclab_visualizers/isaaclab_visualizers/newton/newton_visualizer_cfg.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,15 @@ class NewtonVisualizerCfg(VisualizerCfg):
4040
show_contacts: bool = False
4141
"""Show contact visualization."""
4242

43+
show_collision: bool = False
44+
"""Show collision visualization."""
45+
4346
show_springs: bool = False
4447
"""Show spring visualization."""
4548

49+
show_inertia_boxes: bool = False
50+
"""Show inertia box visualization."""
51+
4652
show_com: bool = False
4753
"""Show center of mass visualization."""
4854

0 commit comments

Comments
 (0)