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

I'm unable to run the launch due to an OpenCV issue. #198

Open
ho-choi opened this issue Dec 21, 2023 · 1 comment
Open

I'm unable to run the launch due to an OpenCV issue. #198

ho-choi opened this issue Dec 21, 2023 · 1 comment

Comments

@ho-choi
Copy link

ho-choi commented Dec 21, 2023

When I run the launch, an error occurs. Please help. My ROS environment is Noetic, and OpenCV 4.2.0 is installed.
When I execute
roslaunch astra_camera astra_pro_plus.launch
the following error occurs:

/home/jetson/yahboomcar_ws/devel/lib/astra_camera/astra_camera_node: error while loading shared libraries: libopencv_imgcodecs.so.4.5: cannot open shared object file: No such file or directory
[camera/camera-1] process has died [pid 6586, exit code 127, cmd /home/jetson/yahboomcar_ws/devel/lib/astra_camera/astra_camera_node /camera/depth/color/points:=/camera/depth_registered/points __name:=camera __log:=/home/jetson/.ros/log/d1fc4c96-9fcd-11ee-b263-f4ce23bb24cf/camera-camera-1.log].
log file: /home/jetson/.ros/log/d1fc4c96-9fcd-11ee-b263-f4ce23bb24cf/camera-camera-1*.log
all processes on machine have died, roslaunch will exit
shutting down processing monitor...
... shutting down processing monitor complete
done

Even after modifying it as below in the CMakeLists.txt file and running Catkin_make, the same issue keeps recurring.

find_package(OpenCV 4.2.0 REQUIRED)
Please help me out.

@jian-dong
Copy link
Collaborator

Can your try adding this in CMakeLists.txt

set(OpenCV_DIR "/your_opencv_cmake_path/cmake/opencv4")
set(OPENCV_LIBS_DIR "/your_opencv_lib_path/lib")
find_package(OpenCV REQUIRED)
set(CMAKE_BUILD_RPATH "${CMAKE_BUILD_RPATH}:${OPENCV_LIBS_DIR}")
set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_RPATH}:${OPENCV_LIBS_DIR}")

your_opencv_cmake_path and your_opencv_lib_path can be find by

dpkg -L libopencv-dev

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