-
Notifications
You must be signed in to change notification settings - Fork 370
User_App_NoROS_ImportURDFOnWindows
Mehmet Emre Çakal edited this page Oct 11, 2024
·
5 revisions
Note: This tutorial assumes that you have completed tutorials:
- Copy the
.urdf
file into an arbitrary Asset subfolder, that is,Assets/Urdf/<package_name>/<urdf_name>.urdf
. - Copy all resources (mesh and texture files) into the same subfolder, keeping the original folder structure of the ROS package. At the bottom left you can see the R2D2 URDF file. We can see that it is looking for the mesh file in
package://urdf_tutorial/meshes/1_finger.dae
. Obviously this is in the ROS installation folder, but we need to mimic that. Below, on the right, you can see the Unity folder structure. The mesh location isAssets/Urdf/urdf_tutortial/urdf_tutortial/meshes/1_finger.dae
, as if we treated thepacakge://
part of the original path asAssets/Urdf/urdf_tutortial/
. Similarly, all robot resources should be placed like this.
- In Unity, find the
.urdf
file in the Project window pane. Right click the file and selectImport Robot from URDF
in the context menu. (Alternative method: in Unity's menu bar, clickGameObject
>3D Object
>URDF Model (import)
and select the.urdf
file.)
- You can follow this video's first part for this example.
- Copy the
/opt/ros/humble/share/urdf_tutorial/urdf/07-physics.urdf
(from Ubuntu) to:
/Assets/Urdf/urdf_tutorial/07-physics.urdf
If you are using WSL, you can directly access your Windows files and copy within terminal. Your files should be located in
/mnt/c/Users/<user_name>/<unity_project_name>/Assets
. See Ubuntu copy command: cp
- Copy the
.dae
mesh geometry files from/opt/ros/humble/share/urdf_tutorial/meshes
to:
/Assets/Urdf/urdf_tutortial/urdf_tutortial/meshes
- In Unity click
GameObject
>3D Object
>URDF Model
and select07-physics.urdf
.
Here is an illustration of the resulting R2D2 GameObject which is directly imported into the scene.
Next tutorial: 3.2 Create, Modify and Export a URDF model
© Siemens AG, 2017-2024
-
- 1.3.1 R2D2 Setup
- 1.3.2 Gazebo Setup on VM
- 1.3.3 TurtleBot Setup (Optional for ROS2)
-
- 2.1 Quick Start
- 2.2 Transfer a URDF from ROS to Unity
- 2.3 Transfer a URDF from Unity to ROS
- 2.4 Unity Simulation Scene Example
- 2.5 Gazebo Simulation Scene Example
- 2.6 Fibonacci Action Client
- 2.7 Fibonacci Action Server
- 3.1 Import a URDF on Windows
- 3.2 Create, Modify and Export a URDF Model
- 3.3 Animate a Robot Model in Unity
- Message Handling: Readers & Writers
- Thread Safety for Message Reception
- File Server Package
- ROS-Unity Coordinate System Conversions
- Post Build Events
- Preprocessor Directives in ROS#
- Adding New Message Types
- RosBridgeClient Protocols
- RosBridgeClient Serializers
- Action Server State Machine Model
© Siemens AG, 2017-2024