-
Notifications
You must be signed in to change notification settings - Fork 0
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.
- Install the latest version of Unity.
- Create a new 3D project.
- In the new project, go to
File > Build Settings ... > Player Settings... > Other Settings > Configuration
and change theApi compatibility level
to.NET 4.x
- In the top menu bar, navigate to
Edit > Project Settings > Physics
and make sure that theSolver Type
is set toTemporal Gauss Seidel
.
This prevents erratic behavior in the joints that may be caused by the default solver.
- Open
Window > Package Manager
. - In the Package Manager window, find and click the
+
button in the upper left-hand corner of the window. SelectAdd package from git URL...
. - 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
- 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.
- 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. - Copy the panda_arm.urdf file from the home directory of the Ubuntu VM to Windows.
- In the Windows environment, download the franka_ros repository.
- Open the Unity 3D project.
- In the Assets folder of the Unity 3D project, create a new folder called "URDF".
- Move the franka_description folder located in
franka_ros
to the newly created URDF folder. - Move the panda_arm.urdf file from the wherever it is located to the URDF folder.
- In the project window of Unity, find the panda_arm.urdf file located under
Assets > URDF
, right click the file and clickImport 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.
- Add a plane
- Adjust the camera
- change the stiffness/damping/etc. values
- Make the base link immovable
- Press play and try moving the joints individually.