ROS2 cam2image Shared Library Error

asked 2021-03-30 20:24:50 -0500

J. J. gravatar image

I am currently running a freshly installed ROS2 Dashing on my Jetson Nano. I am trying to run the simple cam2image to check if my camera is working. Running the command: ros2 run image_tools cam2image gives me the following error:

error while loading shared libraries: libopencv_highgui.so.3.2: cannot open shared object file: No such file or directory

Having checked OpenCV I found that the libopencv_highgui.so.4.1 is located at /usr/lib/aarch64-linux-gnu. From inital searches I tried to add this to the LD_LIBRARY_PATH via adding the line in my bashrc:

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/aarch64-linux-gnu

However I still get the error. OpenCV 4.1 seems to be the default for JetPack 4.5.1. Can anybody help me on this? I hope downgrading OpenCV will be the last resort as I need it for other packages. Thank you.

edit retag flag offensive close merge delete