opencv-4.2.0 source-based installation is not used to compile rtabmap_ros
Scenario: I am trying to install rtabmap_ros-0.20.7-noetic in ubuntu 20.04. By default it installs opencv-4.2.0. To install opencv extra modules I installed opencv from sources. I followed this guideline. Later, when I go on to compiling rtabmap_ros-0.20.9 noetic, I find the following warnings.
runtime library [libopencv_freetype.so.4.2] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
/usr/local/opencv-4.2.0-opt/lib
runtime library [libopencv_fuzzy.so.4.2] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
/usr/local/opencv-4.2.0-opt/lib
runtime library [libopencv_hdf.so.4.2] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
/usr/local/opencv-4.2.0-opt/lib
runtime library [libopencv_hfs.so.4.2] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
/usr/local/opencv-4.2.0-opt/lib
runtime library [libopencv_img_hash.so.4.2] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
/usr/local/opencv-4.2.0-opt/lib
runtime library [libopencv_line_descriptor.so.4.2] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
/usr/local/opencv-4.2.0-opt/lib
runtime library [libopencv_optflow.so.4.2] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
/usr/local/opencv-4.2.0-opt/lib
runtime library [libopencv_phase_unwrapping.so.4.2] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
/usr/local/opencv-4.2.0-opt/lib
runtime library [libopencv_plot.so.4.2] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
/usr/local/opencv-4.2.0-opt/lib
runtime library [libopencv_quality.so.4.2] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
/usr/local/opencv-4.2.0-opt/lib
runtime library [libopencv_reg.so.4.2] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
/usr/local/opencv-4.2.0-opt/lib
runtime library [libopencv_rgbd.so.4.2] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
/usr/local/opencv-4.2.0-opt/lib
runtime library [libopencv_saliency.so.4.2] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
/usr/local/opencv-4.2.0-opt/lib
runtime library [libopencv_shape.so.4.2] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
/usr/local/opencv-4.2.0-opt/lib
runtime library [libopencv_stereo.so.4.2] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
/usr/local/opencv-4.2.0-opt/lib
runtime library [libopencv_structured_light.so.4.2] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
/usr/local/opencv-4.2.0-opt/lib
runtime library [libopencv_superres.so.4.2] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
/usr/local/opencv-4.2.0-opt/lib
runtime library [libopencv_surface_matching.so.4.2] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
/usr/local/opencv-4.2.0-opt/lib
runtime library [libopencv_text.so.4.2] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
/usr/local/opencv-4.2.0-opt/lib
runtime library [libopencv_tracking.so.4.2] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
/usr/local/opencv-4.2.0-opt/lib
runtime library [libopencv_videostab.so.4.2] in /usr/lib/x86_64-linux-gnu ...
The cleanest way would be to remove opencv system binaries (
sudo apt remove libopencv*
). This will remove cv_bridge and all ros packages depending on it, so you would have to rebuild cv_bridge and all packages you need depending on it from source (clone them in your catkin workspace). Then make sure to rebuild/install rtabmap library so that it is linking on your opencv versionHi Matheu,
Now, those warnings are not coming anymore after removing the cv_bridge and other packages having prebuilt opencv dependencies. However, when I launch rtabmap.launch file, the following errors show up.
In case important, Currently, I compiled rtabmap_ros-0.20.7-noetic (edited in the first post too). I am using ubuntu-20.04, gcc-10.3.0. System specs: CPU-i7-11375H. The above-mentioned error did not arise earlier for rtabmap-0.20.7-melodic version.
See step A from this issue to debug "process has died" errors, make sure to copy/paste here the full "backtrace" from gdb.
Following is the output when I launch only rtabmap node.
It is given in two separate comments.
next part
last part:
Hi, I saw the post you had referred to. Then, I reinstalled
g2o-20201223_git
tag (g2omaster
branch throws an error as it does not contain a member variableVertexSBAPointXYZ
), andgtsam-4.0.3
in debug mode. Then, I installedrtabmap-0.20.7-noetic
. Subsequently, I tried to runrtabmap-console
with gdb. The outcome is provided here. Following that, I also tried running it withValgrind
. The corresponding output is divided into two consecutive links. (link1, link2)Please look into it.