Unity-Technologies / URDF-Importer

URDF importer
Apache License 2.0
214 stars 71 forks source link

Importing the Panda URDF creates the wrong articulation root #210

Open wyattrees opened 1 year ago

wyattrees commented 1 year ago

Describe the bug When importing the Panda Robot URDF, the robot in the scene has panda_link1 as the root of the Articulation Body, while panda_link0 should be the root. This causes the robot to "explode" apart from the base link. GitHub won't let me upload the video for some reason, but every link from panda_link1 and above stays connected, but shoots off into the sky when the scene is started. panda_link0 stays on the ground. Adding an Articulation Body component to panda_link0 so that it is the new root fixes the exploding robot.

To Reproduce

  1. Generate the panda URDF from the franka_ros2 repository: Run xacro panda_arm.urdf.xacro hand:=true use_fake_hardware:=true > panda_arm.urdf in the franka_ros2/franka_description/robots directory.
  2. Import the generated URDF. I had to copy the franka_description folder from the above repo into the Unity project alongside the URDF, although I'm not sure if there's a way around that.
  3. Inspecting the Articulation Body component of the panda_link1 Game Object shows that it is the root body of the articulation.
  4. Press play, and the robot shoots off into the sky.

Console logs / stack traces No errors are logged.

Expected behavior The root body of the articulation is panda_link0. The robot stays intact when the scene is played.

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

Additional context I followed the tutorials for setting the various robot parameters (Stiffness, Damping, etc.) and adding a controller script, although I don't think this should make a difference.