5. ROS & ROS 2 Installation

Omniverse Isaac Sim provides both a ROS and ROS 2 bridge for ROS system integration. The same set of common components are used to define the types of data being published/received by the simulator.

For the ROS bridge, Isaac Sim runs a custom roscpp build of ROS Noetic internally so that it works properly with the Omniverse framework and Python 3. This is backwards compatible with ROS Melodic.

For the ROS 2 bridge, Isaac Sim is currently compatible with ROS 2 Foxy. Using Ubuntu 20.04 is recommended for ROS 2.

Important

For ROS, in the steps below replace noetic with melodic if you are installing on Ubuntu 18.04

5.1. Running Native ROS

  1. Download ROS following the instructions on the official website:

  2. Source the ROS environment in the terminal. You must perform this step each time before using any ROS commands.

    ROS

    source /opt/ros/noetic/setup.bash
    

    ROS 2

    source /opt/ros/foxy/setup.bash
    

    You can also automatically source the environment by adding it to your ~/.bashrc file. Change <ros-distro> to noetic, melodic, or foxy, as appropriate

    echo "source /opt/ros/<ros-distro>/setup.bash" >> ~/.bashrc
    source ~/.bashrc
    
  3. For ROS only: Start roscore in a ROS-sourced terminal. Isaac Sim does not run roscore by default to be more flexible for use cases where Isaac Sim is being integrated with existing ROS workflows.

5.2. Enabling the ROS / ROS 2 Bridge Extension

To enable the ROS/ROS2 bridge extension, go to the extension manager menu Window->Extensions and search for ROS bridge. Only one of the ROS Bridge extensions can be enabled at any given time.

../_images/isaac_ros_install_enable.gif

5.3. Setting Up Workspaces

5.3.1. ROS 1

A few ROS packages are needed to go through the Isaac Sim ROS / ROS 2 tutorial series. To make it easy, an entire ROS workspace with the necessary packages is included. Follow the steps below to build it and source the overlay of this package.

  1. Ensure your native ROS has been sourced if it has not been already:

    source /opt/ros/noetic/setup.bash
    

    You can check if the sourcing is successful by checking the ROS_PACKAGE_PATH environment variable.

    echo $ROS_PACKAGE_PATH
    /opt/ros/noetic/share
    
  2. Resolve any package dependencies from the root of the ROS workspace by running the following command:

    cd ros_workspace
    rosdep install -i --from-path src --rosdistro noetic -y
    
  3. In the ROS-sourced terminal, build the Isaac ros_workspace folder, then source the overlay.

    catkin_make
    source devel/setup.bash
    

    This will put the Isaac Sim ROS workspace in your ROS_PACKAGE_PATH. You can use echo $ROS_PACKAGE_PATH again to see that the path to the Isaac Sim ROS workspace has been added in front of the original one.

  4. Alternatively, you can move the individual ROS packages from the ros_workspace/src folder into your own ROS workspaces and build it.

Go to the ROS website for tutorials on building your own ROS packages.

If you want to give Isaac Sim access to your existing packages, make sure to set the ROS_PACKAGE_PATH environment variable to include the desired ROS workspace in the same terminal before starting up Omniverse Isaac Sim.

5.3.1.1. Included ROS 1 Packages

The following is a list of sample ROS packages created for Omniverse Isaac Sim:

  • carter_2dnav: Contains the required launch file and ROS navigation parameters for the NVIDIA Carter robot.

  • carter_description: A description of the NVIDIA Carter robot model.

  • cortex_control: Tools for establishing communication between Cortex and controllers.

  • cortex_control_franka: Contains launch files and python nodes used to control a physical Franka robot with Cortex.

  • isaac_moveit: Contains the required launch and config files for running ROS MoveIt.

  • isaac_ros_messages: A custom set of messages for 2D/3D bounding boxes and pose service messages.

  • isaac_ros_navigation_goal: Used to automatically set random or user-defined goal poses in ROS Navigation.

  • isaac_tutorials: Contains launch files, RViz config files, and scripts for the tutorial series.

  • isaac_vins: Contains launch, parameters, and config files required to run VINS Fusion with Unitree A1 Quadruped robot.

5.3.2. ROS 2

  1. To build the ros2 workspace, you may need to install additional packages:

    # For rosdep install command
    sudo apt install python3-rosdep python3-rosinstall python3-rosinstall-generator python3-wstool build-essential
    # For colcon build command
    sudo apt install python3-colcon-common-extensions
    
  2. Ensure your native ROS2 has been sourced if not already.

    source /opt/ros/foxy/setup.bash
    
  3. Resolve any package dependencies from the root of the ROS2 workspace by running the following command:

    cd ros2_workspace
    rosdep install -i --from-path src --rosdistro foxy -y
    
  4. Build the workspace:

    colcon build
    

    Under the root directory, new build, install, and log directories will be created.

  5. To start using the ROS2 packages built within this workspace, open a new terminal and source the workspace with the following commands:

    source /opt/ros/foxy/setup.bash
    cd ros2_workspace
    source install/local_setup.bash
    

5.3.2.1. Included ROS 2 Packages

A list of sample ROS2 packages created for Omniverse Isaac Sim:

  • carter_description: Description of the NVIDIA Carter robot model.

  • carter_navigation: Contains the required launch file and ROS2 navigation parameters for the NVIDIA Carter robot.

  • isaac_moveit: Contains the required launch and config files for running MoveIt 2.

  • isaac_ros2_messages: A custom set of ROS2 messages for 2d/3d bounding boxes and pose service messages.

  • isaac_ros_navigation_goal: Used to automatically set random or user-defined goal poses in ROS2 Navigation.

  • isaac_tutorials: Contains launch files, RViz2 config files, and scripts for the tutorial series.

Important

Remember to source your ROS2 workspace each time a new terminal is opened or whenever a new ROS2 package is included.

Warning

Do not source ROS2 in the terminal running Isaac Sim, standalone python scripts or Isaac Cortex as that can cause errors during startup because of conflicting symbols.

5.4. ROS Tutorials

To start using Omniverse Isaac Sim with ROS, complete the ROS Tutorial series starting with Import and Drive TurtleBot3.

5.5. ROS2 Tutorials

To start using Omniverse Isaac Sim with ROS2, complete the ROS2 Tutorial series starting with ROS2 Import and Drive TurtleBot3.