URDF Import: Turtlebot

Objective

Import a Turtlebot3 into Isaac Sim using the URDF imporer

Getting started

(1)Prerequisite
(1)-1 Completed ROS & ROS 2 Installation so that ROS is available, ROS extension is enabled, and necessary environment variables are set
Running Native os
Ros2 > No System Level Install > Humble
=> Already Done
Ref: https://docs.omniverse.nvidia.com/isaacsim/latest/installation/install_ros.html#isaac-sim-app-install-ros
(1)-2 Basic understanding ROS workspace. => Confirmed
(1)-3 Nucleus downloaded to access Isaac Environments
ImportTurtlebot1
=> Already Done
Ref: https://docs.omniverse.nvidia.com/nucleus/latest/workstation/installation.html

Importing TurtleBot URDF

(1)Download and build the Turtlebot3 description package
Build it inside the ROS workspace
=> isaac_ros-dev
(1)-1 Navigate to the Ros2 Workspace

cd ${ISAAC_ROS_WS}/src

Ref: https://nvidia-isaac-ros.github.io/getting_started/dev_env_setup.html
(1)-2 Download Turtlebot3 description package

git clone -b humble-devel https://github.com/ROBOTIS-GIT/turtlebot3.git turtlebot3

distro: Humble
(1)-3 Navigate to the urdf folder turtlebot3/turtlebot3_description/urdf/

cd ~/workspaces/isaac_ros-dev/src/turtlebot3/turtlebot3_description/urdf

ImportTurtlebot2
Found the .urdf file for turtlebot3_burger, no need to convert file to an urdf
(1)-4 If your URDF file contains calls to other ROS packages, such as when looking for mesh files of accessories, make sure the path to those ROS packages are also inside the ROS_PACKAGE_PATH before launching the simulator
Part of the urdf file that contains calls to other Ros packages

#xmlns:xacro="http://ros.org/wiki/xacro">
<!-- <xacro:include filename="$(find turtlebot3_description)/urdf/common_properties.urdf"/> -->
#base_link
<mesh filename="package://turtlebot3_description/meshes/bases/burger_base.stl" scale="0.001 0.001 0.001"/>
#wheel_left_link
<mesh filename="package://turtlebot3_description/meshes/wheels/left_tire.stl" scale="0.001 0.001 0.001"/>
#wheel_right_link
<mesh filename="package://turtlebot3_description/meshes/wheels/right_tire.stl" scale="0.001 0.001 0.001"/>
#base_scan
<mesh filename="package://turtlebot3_description/meshes/sensors/lds.stl" scale="0.001 0.001 0.001"/>

URDF snippet includes references to external mesh files located in the turtlebot3_description package
These files are used to visually represent parts of the TurtleBot3 Burger robot, including its base, wheels, and the LDS (Laser Distance Sensor)
The references are made using the package:// URI scheme, which ROS resolves by looking up the paths in the ROS_PACKAGE_PATH environment variable

nano ~/.bashrc
export ROS_PACKAGE_PATH=$ROS_PACKAGE_PATH:~/workspaces/isaac_ros-dev/src/turtlebot3/turtlebot3_description

ImportTurtlebot3

cd ~/workspaces/isaac_ros-dev
colcon build

ImportTurtlebot4
Build the entire turtlebot3 package
Some package building showed errors

cd ~/workspaces/isaac_ros-dev
colcon build --packages-select turtlebot3_description

ImportTurtlebot5
(For the purpose of this tutorial, you only need to build the turtlebot3_description package. Feel free to bypass other packages in the repository)
(2)Import robot to environment
ImportTurtlebot6
Use an Isaac environment for this tutorial(Can import the robot into any environment of your choosing)
Open the environment by going to the Content tab below the viewport, and find Isaac/Environments/Simple_Room/simple_room.usd
(If you do not want to use the provided environment, just make sure there is a GroundPlane and a PhysicsScene to your environment
Both can be found in Create -> Physics. You may also need some lighting, play with the various types of lighting in Create -> Light to get the desired effect)
(3)Set up the simple room environment
ImportTurtlebot7
On a new stage, drag the simple_room.usd onto the stage, and place it at the origin by zero out all the Translate components in the Transform Property
You many need to zoom in a bit to see the table inside the room
=> Click on the table > Pressed F
(4)Open the URDF importer
ImportTurtlebot8
ImportTurtlebot9
Isaac Utils > Workflows > URDF Importer
(5)Change the import options
ImportTurtlebot10
In the prompt window, inside Import Option section
uncheck clear stage to preserve the existing environment
uncheck Fix Base Link since this is a mobile robot
Change Joint Drive Type to Velocity so that wheels can be properly driven later
(6)Import additional materials
(6)-1 Import ball
ImportTurtlebot12
Inside Import section, first locate the URDF file you wish to import in the Input File
(The Import button will only enable after you’ve selected the file)
ImportTurtlebot13
ImportTurtlebot15
Click on Folder > objects > ball.urdf > Select URDF> Press IMPORT
(6)-2 Import turtlebot3_burger

#Input file Path
~/workspaces/isaac_ros-dev/src/turtlebot3/turtlebot3_description/urdf/turtlebot3_burger.urdf
#Output file Path
/home/rosexpert1/Desktop/IsaacSim_usd/

ImportTurtlebot18
ImportTurtlebot19
URDF to usd
(7)Convert the urdf to usd
ImportTurtlebot20
Once the asset is imported into Omniverse Kit, a copy of the .usd version of the asset will be automatically saved
Specify the folder you wish to save the asset in Output Directory if it’s different than the folder that the .urdf file is located in
A folder name matching the .urdf file will be created in the specified directory, and the .usd file will be inside the newly created folder
turtlebot3_burger.usd Generated
(8)Selct the World Prim
ImportTurtlebot21
Make sure to unselect everything on the stage by click on an empty space inside the Stage tab, or select /World on the tree
Otherwise you might be importing the Turtlebot as a child of a random object on the tree
(9)Click Import
ImportTurtlebot22
ImportTurtlebot23
Import turtlebot3_burger.usd
(10)Place turtlebot3 to the floor
ImportTurtlebot24
When the Turtlebot is first imported, it will be on the table. Place it just above the floor of the room using the gizmo
(11)Press Play
Press Play and you should see the Turtlebot fall onto the floor
(11)-1 Robot flies to the air instead of falling onto the floor
Video File: https://drive.google.com/file/d/1zyehw_vfdD2VoedMwoavM9YNJf8PXhyJ/view?usp=sharing
(11)-2 Robot now falls onto the floor
Press Ctrl key > Select simple_room & turtlebot3_burger > +Add > Physics > Rigid Body with Colliders Preset
Video File: https://drive.google.com/file/d/1eaF-iklFoX79wUsG_iPg5X5qvS41elDP/view?usp=sharing
Ref: https://docs.omniverse.nvidia.com/isaacsim/latest/gui_tutorials/tutorial_intro_simple_objects.html#isaac-sim-app-tutorial-intro-simple-objects

Tune the Robot

The URDF importer automatically imports material, physical, and joint properties whenever it is available and have matching categories in Omniverse Isaac Sim
(However, in cases there are no available or matching categories, or if the units are different between the two systems, what gets automatically filled in may not be accurate and changes the robot’s behavior)
Steps for tuning some of the common paramters
(1)Frictional Properties
If your robot’s wheels are slipping, try changing the friction coefficients of the wheels and potentially the ground as well following steps 2.4.2 in Add Simple Objects
Adding Contact and Friction Parameters
Intend to modify frictional properties
(1)-1 Create a different physics material and then assign it to the desired object
ImportTurtlebot25
Go to the Menu Bar and click Create > Physics > Physics Material, select Rigid Body Material in the popup box
ImportTurtlebot26
A new PhysicsMaterial will appear on the stage tree. Parameters such as friction coefficients and restitution can be tuned in its property tab
ImportTurtlebot27

(2)Physical Properties
If no explicit mass or inertial properties are given, the physics engine will estimate them from the geometry mesh
To update the mass and inertial properties, find the prim that contains the rigid body for the given link (You can verify this by finding “Physics > Rigid Body” under its property tab)
If it already has a “Mass” category under its Physics property tab, modify them accordingly
(If there isn’t already a “Mass” category, you can add it by clicking on the +Add button on top of the Propery tab, and select “Physics > Mass”)

(3)Joint Properties
If your robot is oscillating at the joint or moving too slow, take a look at the stiffness and damping parameters for the joints
High stiffness makes the joints snap faster and harder to the desire target, and higher damping smoothes but also slows down the joint’s movement to target
-Pure position drives: Set relatively high stiffness and low damping
-Velocity drives: Stiffness must be set to zero with a non-zero damping
-Gain Tuner and Articulation Inspector: Two tools provided to help with inspect the joints and tune the stiffness and damping parameters

Reference:
https://docs.omniverse.nvidia.com/isaacsim/latest/ros_tutorials/tutorial_ros_turtlebot.html#tune-the-robot
https://docs.omniverse.nvidia.com/isaacsim/latest/introductory_tutorials/tutorial_intro_interface.html#isaac-sim-app-tutorial-intro-interface