IsaacLab icon indicating copy to clipboard operation
IsaacLab copied to clipboard

[Bug Report] Articulation initialization fails to reconstruct correct paths for its rigid bodies on assets with deep hierarchy

Open ozhanozen opened this issue 1 year ago • 2 comments

Describe the bug

When an Articulation is initialized, _initilize_imp() function tries to construct the body paths by simply combining the root prim path and body names within the articulation tree:

https://github.com/NVIDIA-Omniverse/orbit/blob/477cd6b3f6f37bdf8d7d8a47bf6ea8bb15376c3b/source/extensions/omni.isaac.orbit/omni/isaac/orbit/assets/articulation/articulation.py#L490-L502

However, this leads to incorrect paths for the bodies that are not right under the root prim.

For example, if there is an Xform to group a few bodies together:

robot (defaultPrim)
--- body1
--- body2
--- Xform
-------- body3 
-------- body4

the prim path for body3 is assumed to be on /robot/body3 rather than /robot/Xform/body3.

Eventually, the RigidBodyView is not constructed correctly, and this raises a RuntimeError at the following lines due to the mismatch of the body_names with the physx_body_names:

https://github.com/NVIDIA-Omniverse/orbit/blob/477cd6b3f6f37bdf8d7d8a47bf6ea8bb15376c3b/source/extensions/omni.isaac.orbit/omni/isaac/orbit/assets/articulation/articulation.py#L510-L512

Steps to reproduce

Using any Articulation with a similar hierarchy reproduces the error.

System Info

  • Commit: [939a768]
  • Isaac Sim Version: [2023.1.0-hotfix.1]
  • OS: [Ubuntu 20.04]
  • GPU: [RTX A6000]
  • CUDA: [12.0]
  • GPU Driver: [525.60.11]

Additional context

#200 and #208 are probably related to this.

Checklist

  • [x] I have checked that there is no similar issue in the repo (required)
  • [x] I have checked that the issue is not in running Isaac Sim itself and is related to the repo

ozhanozen avatar Feb 09 '24 19:02 ozhanozen

Thank you for bringing this up.

We are aware of this issue and have reported it to the PhysX team to fix the regex parser on their side. The immediate fix is to ensure the asset follows a flat hierarchy of rigid links.

If you don't care about all the bodies in the articulation, a more temporary solution is to replace the regex expression on the line you highlighted with the bodies you care about. Although ugly, hopefully, it lets you use the class.

Mayankm96 avatar Feb 10 '24 18:02 Mayankm96

Thank you for bringing this up.

We are aware of this issue and have reported it to the PhysX team to fix the regex parser on their side. The immediate fix is to ensure the asset follows a flat hierarchy of rigid links.

If you don't care about all the bodies in the articulation, a more temporary solution is to replace the regex expression on the line you highlighted with the bodies you care about. Although ugly, hopefully, it lets you use the class.

Thanks for the workarounds!

ozhanozen avatar Feb 10 '24 23:02 ozhanozen

Hi @Mayankm96, I am having the same issue @ozhanozen described. I tried to replace the regex expression with multiple different versions, but none of them worked (ChatGPT couldn`t help me either). For example: "/robot/(body1|body2)" works, but when I use "/robot/(body1|body2|Xform/body3)" I get the error Pattern '/robot/(body1|body2|Xform/body3)' did not match any rigid bodies.

The interpretation of the regex expression seems to be very restrictive, or am I missing something?

Any help would be appreciated.

axelgoedrich avatar May 20 '24 12:05 axelgoedrich