No ROS2 module named 'diagnostic_msgs' in 2023.1.0

In ROS2, diagnostic_msgs is defined as Index of /latest/api/diagnostic_msgs/msg
So I added “import diagnostic_msgs.msg” in standalone_examples/api/omni.isaac.ros2_bridge/subscriber.py
Error message shows when I execute subscriber.py:
ModuleNotFoundError: No module named ‘diagnostic_msgs’


I also check the exts/omni.isaac.ros2_bridge/${ROS_DISTRO}/lib/ folder, diagnostic_msgs seems NOT be built
Can I build it by myself? or some other way to include the message type?

thanks

I build the library by adding “diagnostic_msgs” to https://github.com/NVIDIA-Omniverse/IsaacSim-ros_workspaces/blob/main/ubuntu_20_humble_minimal.dockerfile#L85
Then copy the libraries to ros2 bridger’s humble relative folder

It works~~

1 Like

Hi @jaohsu, if you have a system level ROS2 Humble install, as you long as you source the install in your bashrc or in the terminal before running isaac-sim.sh or ./python.sh, you should be able to access all your ROS packages installed on your system from Isaac Sim.

The libraries in exts/omni.isaac.ros2_bridge/${ROS_DISTRO}/lib/ are there so that Isaac Sim can fall back to it if a system level ROS install is not found.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.