Failed to play the navigation example and enable ROS2 extension in the `isaaclab` virtual environment

Hello!

I have installed Isaac Sim 4.1.0 by Omniverse launcher and followed the documentation ROS and ROS2 Installation to install ROS2 and set up my ROS2(humble) workspace. I have also followed Isaac Lab documentation to set up the conda environment and install Isaac Lab.

I come across some problems when trying to use Isaac Lab, which I don’t have when using Isaac Sim. When using Isaac Sim 4.1.0, I am able to enable the ROS2 Bridge extension, load the sample navigation file carter_warehouse_navigation.usd and play it, which I find in the newest assets pack downloaded from the launcher. However, when using Isaac Lab, I find I have trouble in enabling the ROS2 Bridge extension in the virtual environment isaaclab. When the virtual environment is not activated, I can enable the ROS2 Bridge extension, but I also have problems playing the sample scenario carter_warehouse_navigation.usd. All the commands are run in the same directory. Below are the details.

In the virtural environment isaaclab, firstly I ran:


source /opt/ros/humble/setup.bash

source ~/IsaacSim-ros_workspaces/humble_ws/install/local_setup.bash

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

python source/standalone/tutorials/00_sim/create_empty.py

Then the Isaac Sim Python 4.1.0 window appeared normally but after I disabled the ROS2 Bridge extension and enabled it again, as shown by the screenshot below, some messages showed in the terminal, such as Could not import system rclpy. In this situation, playing the sample scenario carter_warehouse_navigation.usd caused the same errors as playing the scenario without the virtual environment isaaclab, shown in the last image below.

After I exited that window, I ran the following:


export isaac_sim_package_path=$HOME/.local/share/ov/pkg/isaac-sim-4.1.0

export RMW_IMPLEMENTATION=rmw_fastrtps_cpp

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$isaac_sim_package_path/exts/omni.isaac.ros2_bridge/humble/lib

python source/standalone/tutorials/00_sim/create_empty.py

This time the Isaac Sim Python 4.1.0 window poped up and disppeared soon. The error message shown in the image below is:


[ERROR] [1723185509.708649220] [rcl]: Error getting RMW implementation identifier / RMW implementation not installed (expected identifier of `rmw_fastrtps_cpp`), with error message 'failed to load share library 'librmw_fastrtps_cpp.so' due to dlopen error: /home/ke/anaconda3/envs/isaaclab/bin/../lib/libstdc++.so.6: version 'GLIBCXX_3.4.30' not found (required by /opt/ros/humble/lib/libfastrtps.so.2.6), at ./src/shared_library.c:99, ar ./src/function.cpp:65', exiting with 1., at ./src/rcl/rmw_implementation_identifier_check.c:139

Without activating the virtual environment isaaclab, I ran:


source /opt/ros/humble/setup.bash

source ~/IsaacSim-ros_workspaces/humble_ws/install/local_setup.bash

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

./isaaclab.sh -p source/standalone/tutorials/00_sim/create_empty.py

Then the Isaac Sim Python 4.1.0 window appeared normally and the ROS2 Bridge extension could be enabled (system rclpy could be imported). However, after I played the scenario carter_warehouse_navigation.usd, the window was not responding and some error messages poped up as shown in the image below.

Any help would be appreciated !

Thanks for bringing this to our attention.

I am able to replicate the issue inside the virtual environment.
While outside the virtual environment, I am able to load the scene with some warnings (the first time I tried, it froze like yours).
When I hit play button, it gives me some error and freezes.

I have already passed this issue to our internal team. I will let you know if there are any updates!

Hi @Luke_L ,

Could you please check that the folder omni.isaac.ros2_bridge is present in the virtual env? It should be under ~/.local/share/ov/pkg/isaac-sim-4.1.0/exts/.
If it is present then the best way is to use internal ros libs for with the following steps:

  1. Enable isaaclab virtual environment. Make sure local ros installation is not sourced.
  2. Source internal libs at the location where exts/omni.isaac.ros2_bridge is found:
export RMW_IMPLEMENTATION=rmw_fastrtps_cpp 
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:<PATH_TO_ISAACSIM_ROOT>/exts/omni.isaac.ros2_bridge/humble/lib
  1. Run python source/standalone/tutorials/00_sim/create_empty.py
  2. Open window => extensions, search for ros2* and enable ros2 bridge

This should resolve your first issue that ros2 bridge is failed to enable in virtual environment.

For scene loading, since you have already loaded a scene in create_empty.py, it cannot load another scene in isaac sim without initialization. One solution would be writing your own python file to load the scene you would like to use.

Here is what I did to load the scene:

from omni.isaac.core.utils.stage import add_reference_to_stage
from omni.isaac.lab.utils.assets import ISAAC_NUCLEUS_DIR

def setup_scene():
        usd_path = ISAAC_NUCLEUS_DIR + "/Samples/ROS2/Scenario/carter_warehouse_navigation.usd"
        add_reference_to_stage(usd_path=usd_path, prim_path="/World/Stand")

Call this in the main function and make sure the simulation step is consistent.

def main():
    """Main function."""

    # Initialize the simulation context
    sim_cfg = SimulationCfg()
    sim = SimulationContext(sim_cfg)
    # Set main camera, you might want to change the camera view
    sim.set_camera_view([2.5, 2.5, 2.5], [0.0, 0.0, 0.0])
    setup_scene()

    # Play the simulator
    sim.reset()
    # Now we are ready!
    print("[INFO]: Setup complete...")

    # Simulate physics
    while simulation_app.is_running():
        # perform step
        sim.step()


if __name__ == "__main__":
    # run the main function
    main()
    # close sim app
    simulation_app.close()

Here is the whole file:
create_empty.py (1.7 KB)

Since IsaacLab is minimized and it doesn’t have a lot of extensions enabled by default, it is recommended to use --experience with experience file to load the isaac sim file. Here is the command I used:

./isaaclab.sh -p source/standalone/tutorials/00_sim/create_empty.py --experience /home/zhengwang/.local/share/ov/pkg/isaac-sim-4.1.0/apps/omni.isaac.sim.base.kit