Cannot properly load isaacsim.ros2.bridge extension from standalone script

Isaac Sim Version

5.1.0
5.0.0
4.5.0
4.2.0
4.1.0
4.0.0
4.5.0
2023.1.1
2023.1.0-hotfix.1
Other (please specify):

Operating System

Ubuntu 24.04
Ubuntu 22.04
Ubuntu 20.04
Windows 11
Windows 10
Other (please specify):

GPU Information

  • Model: L40s
  • Driver Version: 570.172.08

Topic Description

Cannot properly load isaacsim.ros2.bridge extension from a standalone script. I would relaly prefer to NOT have to set env vars in the terminal prior to launching the script, but I cannot get it to work regardless.

My setup:

Detailed Description

I have tried:

  1. source setup_ros_env.sh && ./python.sh workspace/mxi-isaacsim/main.py (without any setting of any env var in the python script)
    This results in ROS_DISTRO=jazzy, and python crashes.

  2. as another attempt: after running source setup_ros_env.sh, i tried export ROS_DISTRO=humble
    results in the following:

    [11.346s] [ext: isaacsim.ros2.bridge-4.9.3] startupFatal glibc error: malloc.c:2599 (sysmalloc): assertion failed: (old_top == initial_top (av) && old_size == 0) || ((unsigned long) (old_size) >= MINSIZE && prev_inuse (old_top) && ((unsigned long) old_end & (pagesize - 1)) == 0)2025-10-29T23:35:47Z [11,410ms] [Warning] [carb] Acquiring non optional plugin interface which is not listed as dependency: [carb::dictionary::ISerializer v1.1] (plugin: carb.dictionary.serializer-json.plugin), by client: carb.scenerenderer-rtx.plugin. Add it to CARB_PLUGIN_IMPL_DEPS() macro of a client.Aborted (core dumped)

    [11.725s] To use the internal libraries included with the extension please set the following environment variables to use with FastDDS (default) or CycloneDDS before starting Isaac Sim:

    FastDDS (default):export ROS_DISTRO=humbleexport RMW_IMPLEMENTATION=rmw_fastrtps_cppexport LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/IsaacSim/exts/isaacsim.ros2.bridge/humble/lib

    OR

    CycloneDDS:export ROS_DISTRO=humbleexport RMW_IMPLEMENTATION=rmw_cyclonedds_cppexport LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/IsaacSim/exts/isaacsim.ros2.bridge/humble/lib

    2025-10-29T23:35:47Z [11,704ms] [Error] [isaacsim.ros2.bridge.impl.extension] ROS2 Bridge startup failed[11.883s] [ext: isaacsim.ros2.bridge-4.9.3] shutdown

  3. setting ROS_DISTRO=humble, `RMW_IMPLEMENTATION=rmw_fastrtps_cpp` and LD_LIBRARY_PATHenv manually with export … before launching my python script

    … WAY too many python crashes to copy here

  4. using os.environ… inside the python script (before importing SimulationApp):
    I still get the console warning from attempt 1).

The nuance is that I need humble, not jazzy, even though my host OS is ubuntu 24.04… And I know it CAN load humble just fine because it works great from isaac-sim.selector.sh

…so… how do we enable ros2 bridge purely and solely from a standalone python script?

# Set ROS2 environment variables - required for ROS2 bridge to load completely:
os.environ["ROS_DISTRO"] = "humble"
os.environ["RMW_IMPLEMENTATION"] = "rmw_fastrtps_cpp"
# Ensure ROS2 bridge native libs are found. check if /opt/IsaacSim/exts/isaacsim.ros2.bridge/humble/lib exists in $LD_LIBRARY_PATH
ros2_bridge_lib_path = "/opt/IsaacSim/exts/isaacsim.ros2.bridge/humble/lib/"
if "LD_LIBRARY_PATH" in os.environ:
    if ros2_bridge_lib_path not in os.environ["LD_LIBRARY_PATH"]:
        os.environ["LD_LIBRARY_PATH"] += f":{ros2_bridge_lib_path}"
else:
    os.environ["LD_LIBRARY_PATH"] = ros2_bridge_lib_path
print("LD_LIBRARY_PATH:", os.environ["LD_LIBRARY_PATH"])
from isaacsim.simulation_app import SimulationApp
# Launch Isaac Sim in GUI mode
simulation_app = SimulationApp({"headless": False,}, experience="apps/isaacsim.exp.full.kit")

from isaacsim.core.api import SimulationContext
from isaacsim.core.prims.impl.xform_prim import XFormPrim
from isaacsim.core.utils.extensions import enable_extension
from isaacsim.core.utils.stage import add_reference_to_stage
from omni import usd

# enable ROS2 bridge extension
enable_extension("isaacsim.ros2.bridge")

If you can live with setting environment variables, here’s what works on Ubuntu 24.04 to start Isaac Sim in a way that supports ROS2 Humble:

export isaac_sim_package_path=$HOME/isaacsim_5.1

export ROS_DISTRO=humble

export RMW_IMPLEMENTATION=rmw_fastrtps_cpp

export FASTRTPS_DEFAULT_PROFILES_FILE=/home/yourusername/IsaacSim-ros_workspaces/humble_ws/fastdds.xml


export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$isaac_sim_package_path/exts/isaacsim.ros2.bridge/humble/lib

$isaac_sim_package_path/isaac-sim.sh

This works in Isaac Sim 5.0 or 5.1, just change the first line based on which version you installed and where exactly you installed it. (Note that you need to run the post install script from the folder where you installed it)

Also note that you need to put your own username in the place of yourusername. The ~ shortcut for home does not seem to work reliably, you have to spell it out as /home/user

The nuance is that I need humble, not jazzy, even though my host OS is ubuntu 24.04

I actually have the opposite issue, I can run ROS2 Humble on Ubuntu 24.04 just fine, but Jazzy doesn’t work for me. I posted separately about that.

Still cant figure this out.

I just tried this on windows but still doesnt work…

  1. run setup_ros_env.bat (no output; as expected)
  2. run my script ./python.bat workspace/mxi-isaacsim/main.py

I get the following:

[11.305s] [ext: isaacsim.ros2.bridge-4.12.4] startup
2025-11-17T22:09:33Z [11,255ms] [Warning] [isaacsim.ros2.bridge.impl.extension] Using ‘humble’ as default
[11.343s] Using backup internal ROS2 humble distro

[12.799s] To use the internal libraries included with the extension, please set the environment variables using one of the following methods before starting Isaac Sim:

Command Prompt (CMD):
set ROS_DISTRO=humble
set RMW_IMPLEMENTATION=rmw_fastrtps_cpp
set PATH=%PATH%;c:/users/ted/isaac-sim-standalone-5.1.0-windows-x86_64/exts/isaacsim.ros2.bridge/humble/lib

PowerShell:
$env:ROS_DISTRO = “humble”
$env:RMW_IMPLEMENTATION = “rmw_fastrtps_cpp”
$env:PATH = “$env:PATH;c:/users/ted/isaac-sim-standalone-5.1.0-windows-x86_64/exts/isaacsim.ros2.bridge/humble/lib”

2025-11-17T22:09:34Z [12,733ms] [Error] [isaacsim.ros2.bridge.impl.extension] ROS2 Bridge startup failed

I dont understand how to launch a standalone python script and use the IsaacSim Internal Ros2 libs?