Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with "ros2 run ros2_orb_slam3 mono_node_cpp --ros-args -p node_name_arg:=mono_slam_cpp" #19

Open
amymok1318 opened this issue Nov 2, 2024 · 1 comment

Comments

@amymok1318
Copy link

amymok1318 commented Nov 2, 2024

When I run the following command:
ros2 run ros2_orb_slam3 mono_node_cpp --ros-args -p node_name_arg:=mono_slam_cpp

I encountered the following error:
/home/amy/ros2_test/install/ros2_orb_slam3/lib/ros2_orb_slam3/mono_node_cpp: error while loading shared libraries: libopencv_core.so.4.5d: cannot open shared object file: No such file or directory
[ros2run]: Process exited with failure 127

My opencv version is 4.6.0.

Any idea on how to resolve this issue? Thanks very much!

@Mechazo11
Copy link
Owner

Hi @amymok1318

I think since, I tested it only for Ubuntu 22.04, the problem maybe in the CmakeLists.txt file where opencv was configured to use Version 4.2 only. Maybe update the line find_package(OpenCV 4.2 REQUIRED) to find_package(OpenCV 4.6 REQUIRED) and rebuild the project. Before doing so, make sure to delete the devel, build and log folders from the root of your colcon workspace.

Ideally it should just look for opencv 4 and not worry about the minor version but I haven't had the chance to updating the Cmake file to account for this. If you can configure the Cmake to handle opencv include with the focus on only looking for major version number, please open a PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants