Isaac ros visual slam dual realsense robot_localization cannot find -lnvToolsExt

So I got the isaac ros visual slam working with one realsense in the isaac_ros-dev container and must I say it looks amazing. So now I’m trying to make the dual camera work but it needs robot_localization, so I grabbed the humble release also the latest geographic_info release for humble and when I try to build them using colcon build --packages-up-to robot_localization it says it needs libgeographic-dev so I installed that using sudo apt install libgeographic-dev but now I’m running into

admin@DESKTOP-Ubuntu:/workspaces/isaac_ros-dev$ colcon build --packages-up-to robot_localization
Starting >>> geographic_msgs
Finished <<< geographic_msgs [4.65s]                     
Starting >>> robot_localization
--- stderr: robot_localization                             
/usr/bin/ld: cannot find -lnvToolsExt
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/rl_lib.dir/build.make:369: librl_lib.so] Error 1
make[1]: *** [CMakeFiles/Makefile2:638: CMakeFiles/rl_lib.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
make: *** [Makefile:146: all] Error 2
---
Failed   <<< robot_localization [1.92s, exited with code 2]

Summary: 1 package finished [6.83s]
  1 package failed: robot_localization
  1 package had stderr output: robot_localization

So I grabbed nvtxtools using git clone https://github.com/NVIDIA/NVTX.git -b release-v3 but when I run colcon build --packages-select NVTX-Tools I get this:

admin@DESKTOP-Ubuntu:/workspaces/isaac_ros-dev$ colcon build --packages-select NVTX-Tools
[0.467s] WARNING:colcon.colcon_core.package_selection:ignoring unknown package 'NVTX-Tools' in --packages-select
                     
Summary: 0 packages finished [0.24s]

Any thoughts on how I can get the dual camera to work in the dev container?

1 Like

That’s great news. robot_localization is a great package to run an EKF to post fuse multiple instances of Isaac ROS Visual SLAM. However, the quality of the output is sensitive to the quality of the covariance matrices and in our initial evaluation several releases ago, we had encountered some minor problems which may have been fixed along the way by now.

Yes, you’ll need libgeographic-dev for the robot_localization package as well as a few others. You can add that to your own Dockerfile.mystuff and add the “mystuff” image key to your run_dev.sh configuration as described here so it is persistent.

NVTX is a framework for decorating your code with annotations that Nsight Systems. I can reproduce the issue on locally building robot_localization now which is new. Let me see if I can figure out why it is looking for nvtx in the first place and why it isn’t already there on x86_64 at least. The immediate workaround to unblock you is to disable nvtx annotations for Isaac ROS packages at least by passing -DUSE_NVTX = OFF, but not sure why robot_localization has this dependency yet.

1 Like

Appreciate the reply! Once the issue is resolved, I’ll put everything in a dockerfile.

I tried colcon build --packages-up-to robot_localization --cmake-args " -DUSE_NVTX=OFF" but I still get the same response:

admin@DESKTOP-Ubuntu:/workspaces/isaac_ros-dev$ colcon build --packages-up-to robot_localization --cmake-args " -DUSE_NVTX=OFF"
Starting >>> geographic_msgs
Finished <<< geographic_msgs [14.6s]                     
Starting >>> robot_localization
--- stderr: robot_localization                              
/usr/bin/ld: cannot find -lnvToolsExt
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/rl_lib.dir/build.make:369: librl_lib.so] Error 1
make[1]: *** [CMakeFiles/Makefile2:638: CMakeFiles/rl_lib.dir/all] Error 2
make: *** [Makefile:146: all] Error 2
---
Failed   <<< robot_localization [7.48s, exited with code 2]

Summary: 1 package finished [22.5s]
  1 package failed: robot_localization
  1 package had stderr output: robot_localization

For now I made a record_dual_realsense.launch.py file to record the topics, once the robot_localization issue is resolved I’ll test it with the data.

If I delete ‘build’ ‘log’ and ‘install’ in a fresh container, I can build robot_localization with no problem and can no longer reproduce the issue. I thought I’d have to append /usr/local/cuda-11.8/targets/x86_64-linux/lib to LD_LIBRARY_PATH for cmake to find libnvToolsExt.so (which is there in the container as expected), but on a fresh container without this on LD_LIBRARY_PATH, a clean build seemed to do the trick.