Skip to content

Using ROS 2 in an instance

ROS 2 Jazzy is pre-installed in the default instance templates, together with the Isaac Sim ROS workspaces and topic_based_ros2_control. Nothing is sourced automatically, so a fresh terminal starts without a ROS environment. Isaac Sim needs a ROS environment to use the ROS 2 Bridge and the ROS Action Graph nodes, so source it in the terminal you start Isaac Sim from as well.

How you source it depends on the Isaac Sim version of your instance.

Isaac Sim 6 uses Python 3.12, the same version as ROS 2 Jazzy on Ubuntu 24.04, and uses the system ROS 2 installation directly. There is a single ROS environment, loaded with sr:

sr

This sources the system ROS 2 installation followed by the two pre-built workspaces, /workspace/topic_based_ros2_control_ws and /workspace/IsaacSim-ros_workspaces/jazzy_ws. Run it in every terminal that uses ROS, including the one you start Isaac Sim from.

Standalone scripts

Scripts written for the standalone workflow have to run with the Python interpreter that ships with Isaac Sim:

sr
/isaac-sim/python.sh my_script.py

Custom packages

  1. Place your packages in the src folder of a workspace, for example /workspace/my_ws/src.

  2. Source ROS and build the workspace:

    sr
    cd /workspace/my_ws
    colcon build --symlink-install
    

  3. Source your workspace on top:

    source /workspace/my_ws/install/setup.bash
    

  4. Start Isaac Sim, or run your script, from that same terminal:

    /isaac-sim/isaac-sim.streaming.sh
    

Isaac Sim 5.1 embeds Python 3.11, while ROS 2 Jazzy on Ubuntu 24.04 is built for Python 3.12. Your instance therefore has two ROS environments, each loaded by its own alias:

ROS 2 installation system (Python 3.12) built for Isaac Sim (Python 3.11)
Load it with sr sr-isaac
ros2 CLI, rviz2 yes no
Your own nodes, outside Isaac Sim yes no
Anything run by /isaac-sim/python.sh no yes
Starting Isaac Sim yes yes

sr sources the system installation followed by the two pre-built workspaces, /workspace/topic_based_ros2_control_ws and /workspace/IsaacSim-ros_workspaces/jazzy_ws. sr-isaac sources a ROS 2 built against the interpreter embedded in Isaac Sim, which provides rclpy, the common message packages such as std_msgs, sensor_msgs, geometry_msgs, nav_msgs and tf2_msgs, plus tf2_ros, message_filters and the launch packages.

Do not source both in the same terminal. The two installations put incompatible modules on the same path, and anything built against one fails to import under the other. Use one terminal per environment instead. Nodes started from either terminal communicate over DDS and find each other automatically.

Standalone scripts

Standalone scripts run with Isaac Sim's embedded Python 3.11, so they need sr-isaac:

sr-isaac
/isaac-sim/python.sh my_script.py

Custom packages

Packages, including your own .msg and .srv definitions, are tied to the environment they were built in. Build them under the environment that will use them, and build them in two separate workspaces if both need them:

  • under sr for Action Graphs and for your own nodes running outside Isaac Sim
  • under sr-isaac for anything run by /isaac-sim/python.sh

  • Place your packages in the src folder of a workspace, for example /workspace/my_ws/src.

  • Source the matching environment and build:

    sr          # or sr-isaac
    cd /workspace/my_ws
    colcon build --symlink-install
    

  • Source your workspace on top:

    source /workspace/my_ws/install/setup.bash
    

  • Start Isaac Sim, or run your script, from that same terminal:

    /isaac-sim/isaac-sim.sh $STREAM_ARGS      # under sr
    /isaac-sim/python.sh my_script.py         # under sr-isaac