Skip to content

2b. URDF Import with Unity Robotics Hub

Erencan edited this page Apr 15, 2022 · 1 revision

This page takes you through setting up the Franka Emika Panda Robot using Unity Robotic Hub's URDF Importer.

Unity-side Set-up

  1. Install the latest version of Unity.
  2. Create a new 3D project.
  3. In the new project, go to File > Build Settings ... > Player Settings... > Other Settings > Configuration and change the Api compatibility level to .NET 4.x
  4. In the top menu bar, navigate to Edit > Project Settings > Physics and make sure that the Solver Type is set to Temporal Gauss Seidel.

This prevents erratic behavior in the joints that may be caused by the default solver.

  1. Open Window > Package Manager.
  2. In the Package Manager window, find and click the + button in the upper left-hand corner of the window. Select Add package from git URL....
  3. There are two packages that need to be imported:
    i. ROS-TCP-Connector: https://github.com/Unity-Technologies/ROS-TCP-Connector.git?path=/com.unity.robotics.ros-tcp-connector
    ii. URDF Importer: https://github.com/Unity-Technologies/URDF-Importer.git?path=/com.unity.robotics.urdf-importer

Importing the URDF File

  1. In Ubuntu, open up a terminal window and install the necessary packages by running the code sudo apt install ros-noetic-libfranka ros-noetic-franka-ros.

The files in the repository are in the .urdf.xacro format and need to be converted into the .urdf format in order for the URDF importer in Unity to work.

  1. In a terminal window, execute rosrun xacro xacro $(rospack find franka_description)/robots/panda_arm.urdf.xacro gazebo:=true hand:=true> panda_arm.urdf which should create the aforementioned .urdf file in the home directory of the Ubuntu VM.
  2. Copy the panda_arm.urdf file from the home directory of the Ubuntu VM to Windows.
  3. In the Windows environment, download the franka_ros repository.
  4. Open the Unity 3D project.
  5. In the Assets folder of the Unity 3D project, create a new folder called "URDF".
  6. Move the franka_description folder located in franka_ros to the newly created URDF folder.
  7. Move the panda_arm.urdf file from the wherever it is located to the URDF folder.
  8. In the project window of Unity, find the panda_arm.urdf file located under Assets > URDF, right click the file and click Import Robot from URDF

If everything is executed correctly, you should now end up with the Franka Emika Panda imported into the Unity scene. The following steps configure the Unity scene and the robot model in order to have a fully functional basic simulation of the robot.


Too tired for now, check out this link for a detailed description of the following steps.


  1. Add a plane
  2. Adjust the camera
  3. change the stiffness/damping/etc. values
  4. Make the base link immovable
  5. Press play and try moving the joints individually.