ROS 2 Launch
Note
ROS 2 Launch with Isaac Sim is only supported in Linux ROS2 Humble. The isaacsim
package is not supported in WSL2.
Warning
ROS 2 Foxy is no longer tested or supported. This may result in potential issues when ROS 2 Foxy is used in conjunction with Isaac Sim 4.2 or later. ROS 2 Foxy Isaac Sim packages will be removed in a future release.
Learning Objectives
In this tutorial, we are demonstrating running Omniverse Isaac Sim from a ROS 2 launch file.
Important
Make sure to source your ROS 2 installation from the terminal before running Isaac Sim. If sourcing ROS 2 is a part of your bashrc
then Isaac Sim can be run directly.
Prerequisite
ROS 2 Launch for Isaac Sim is only supported on Linux.
Completed ROS2 Navigation for ROS 2 Nav2 with a single robot. So that
ROS 2 and Nav2 are installed.
ROS 2 bridge is enabled.
This tutorial requires
carter_navigation
,isaac_ros_navigation_goal
andisaacsim
ROS 2 packages which are provided as part of your Omniverse Isaac Sim download. These ROS 2 packages are located inside the appropriateros2_ws
(foxy_ws
orhumble_ws
). They contain the required launch files, navigation parameters, and robot model. Complete ROS and ROS 2 Installation, make sure the ROS 2 workspace environment is setup correctly.
Launching Isaac Sim with ROS 2
The isaacsim
package contains scripts and ROS 2 launch file to launch Isaac Sim.
The launch file called run_isaacsim.launch.py
is included in the launch folder of the isaacsim
package.
The launch parameters are defined below:
version: Specify the version of Isaac Sim to use. Isaac Sim will be run from default install root folder for the specified version. Leave empty to use latest version of Isaac Sim. [default_value = “4.2.0”]
install_path: If Isaac Sim is installed in a non-default location, provide a specific path to Isaac Sim installation root folder which is the package path displayed in Isaac Sim App Selector. (If defined, “version” parameter will be ignored). [default_value = “”]
use_internal_libs: Set to true if you wish to use internal ROS libraries shipped with Isaac Sim. [default_value = “false”]
dds_type: Set to “fastdds” or “cyclonedds” (Cyclone only supported for ROS 2 Humble) to run Isaac Sim with a specific dds type. [default_value = “fastdds”]
gui: Provide the path to a usd file to open it when starting Isaac Sim in standard gui mode. If left empty, Isaac Sim will open an empty stage in standard gui mode. [default_value = “”]
standalone: Provide the path to the python file to open it and start Isaac Sim in standalone workflow. If left empty, Isaac Sim will open an empty stage in standard Gui mode. [default_value = “”]
play_sim_on_start: If enabled and Isaac Sim will start playing the scene after it is loaded. (Only applicable when in standard gui mode). [default_value = “false”]
ros_distro: Provide ROS version to use. Only Humble and Foxy is supported. [default_value = “humble”]
ros_installation_path: If ROS is installed in a non-default location (as in not under /opt/ros/), provide the path to your main setup.bash file for your ROS install. (/path/to/custom/ros/install/setup.bash). [default_value = “”]
headless: Set to “native” or “webrtc” to run Isaac Sim with different headless modes. If left empty, Isaac Sim will run in the standard gui mode. This parameter can be overridden by “standalone” parameter. [default_value = “”]
Now we will go through the main examples for running Isaac Sim from ROS 2 launch. Make sure to quit the launch process before the next example.
To launch Isaac Sim in default configuration run the command below.
ros2 launch isaacsim run_isaacsim.launch.py
Next we will launch Isaac Sim with a usd file open and immediately start playing. Run the command below.
ros2 launch isaacsim run_isaacsim.launch.py gui:=omniverse://localhost/NVIDIA/Assets/Isaac/4.2/Isaac/Samples/ROS2/Robots/Nova_Carter_ROS.usd play_sim_on_start:=true
Now lets launch Isaac Sim with standalone workflow. Run the command below.
ros2 launch isaacsim run_isaacsim.launch.py standalone:=$HOME/.local/share/ov/pkg/isaac-sim-4.2.0/standalone_examples/api/omni.isaac.ros2_bridge/moveit.py
Summary
In this tutorial, we covered
Launching Isaac Sim from a ROS 2 launch file.
Running an integrated launch file with Isaac Sim Nav2 stack, and
isaac_ros_navigation_goal
package.
Next Steps
Continue on to the next tutorial in our ROS2 Tutorials series, ROS 2 Publish Real Time Factor (RTF).