Unity-Technologies / URDF-Importer

URDF importer
Apache License 2.0
217 stars 71 forks source link

Missing collision meshes references in generated mesh colliders #135

Closed thibnoel closed 2 years ago

thibnoel commented 3 years ago

Describe the bug Hello, I noticed that using the URDF importer with a URDF model containing multiple references to the same collision mesh leads to missing mesh colliders in the generated Unity model for all links sharing this reference except one (specifically, the mesh colliders under ArticulationBody/Collisions/link are generated correctly but without a reference to the correct mesh)

To Reproduce Steps to reproduce the behavior:

  1. Download a URDF with multiple ref. to a same collision mesh (the PR2 for example : https://github.com/PR2/pr2_common/tree/melodic-devel/pr2_description) and the associated meshes
  2. Use the URDF Importer as described in the tutorials
  3. Check the wheels ArticulationBody in the editor : one clearly displays the mesh collider, not the other
  4. On play, one of the wheels goes through the ground

Console logs / stack traces Not applicable

Expected behavior All ArticulationBody generated by the URDF Importer have correctly referenced meshes for their children mesh colliders.

Screenshots Example with a 2 armed robot : Left arm with correct reference to the collision meshes : correct_behavior Right arm with correct hierarchy generation but unreferenced collision meshes : incorrect_behavior

Environment (please complete the following information, where applicable):

Additional context None

LaurieCheers-unity commented 3 years ago

Thanks. I've filed an internal ticket to investigate this issue.

at669 commented 2 years ago

The PR for this issue has been merged into dev and will be in the next release of the URDF-Importer. Please feel free to try it out on dev. I'll be closing this issue, but feel free to reopen it if the problem persists, or open a new ticket if you encounter other issues.