From 3f96602eef96a70e680ca184685e7972948c8f40 Mon Sep 17 00:00:00 2001 From: Junghwan Ro Date: Fri, 14 Jun 2024 10:05:55 +0200 Subject: [PATCH] Fixes root view to body view mapping in articulation (#497) Fixes #475 ## Type of change - Bug fix (non-breaking change which fixes an issue) ## Checklist - [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 - [x] I have added tests that prove my fix is effective or that my feature works - [x] I have run all the tests with `./isaaclab.sh --test` and they pass - [ ] 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 --- .../omni/isaac/lab/assets/articulation/articulation.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/extensions/omni.isaac.lab/omni/isaac/lab/assets/articulation/articulation.py b/source/extensions/omni.isaac.lab/omni/isaac/lab/assets/articulation/articulation.py index 773c6c7d77..a2acc523e2 100644 --- a/source/extensions/omni.isaac.lab/omni/isaac/lab/assets/articulation/articulation.py +++ b/source/extensions/omni.isaac.lab/omni/isaac/lab/assets/articulation/articulation.py @@ -821,7 +821,7 @@ def _initialize_impl(self): prim_paths = self._body_physx_view.prim_paths[: self.num_bodies] body_view_body_names = [path.split("/")[-1] for path in prim_paths] # -- mapping from articulation view to body view - self._body_view_ordering = [body_view_body_names.index(name) for name in root_view_body_names] + self._body_view_ordering = [root_view_body_names.index(name) for name in body_view_body_names] self._body_view_ordering = torch.tensor(self._body_view_ordering, dtype=torch.long, device=self.device) # log information about the articulation