pjrambo / VINS-Fusion-gpu

This repository is a version of VINS-Fusion with gpu acceleration. It can run on the Nvidia TX2 in realtime
GNU General Public License v3.0
515 stars 137 forks source link

error while catkin build #4

Closed engcang closed 5 years ago

engcang commented 5 years ago

Errors << vins:make /home/mason/catkin_ws/logs/vins/build.make.001.log
/home/mason/catkin_ws/devel/.private/vins/lib/libvinslib.so: undefined reference to `cv::cuda::SparsePyrLKOpticalFlow::create(cv::Size, int, int, bool)' /home/mason/catkin_ws/devel/.private/vins/lib/libvins_lib.so: undefined reference to cv:/home/mason/catkin_ws/devel/.private/vins/lib/libvins_lib.so: undefined reference tocv::cuda::/SparsePyrLKOpticalFlow::home/mason/catkin_ws/devel/.private/vins/lib/libvinslib.so: undefined reference to `cv::cuda::SparsePyrLKOpticalFlow::create(cv::Size, int, int, bool)' /home/mason/catkin_ws/devel/.private/vins/lib/libvinslib.so: undefined reference to `cv::cuda::createGoodFeaturesToTrackDetector(int, int, double, double, int, bool, double)' :create(cvcuda::createGoodFeaturesToTrackDetector(int, int, double, ::collect2: error: ld returned 1 exit status double, int, bool, double)' Size, int, int, bool)' /home/mason/catkin_ws/devel/.private/vins/lib/libvins_lib.so: undefined reference to `cv::cuda::createGoodFeaturesToTrackDetector(int, int, double, double, int, collect2: error: ld returned 1 exit status bool, double)' collect2: error: ld returned 1 exit status make[2]: [/home/mason/catkin_ws/devel/.private/vins/lib/vins/kitti_odom_test] Error 1 make[1]: [CMakeFiles/kitti_odom_test.dir/all] Error 2 make[1]: Waiting for unfinished jobs.... make[2]: [/home/mason/catkin_ws/devel/.private/vins/lib/vins/kitti_gps_test] Error 1 make[2]: [/home/mason/catkin_ws/devel/.private/vins/lib/vins/vins_node] Error 1 make[1]: [CMakeFiles/kitti_gps_test.dir/all] Error 2 make[1]: [CMakeFiles/vins_node.dir/all] Error 2 make: [all] Error 2 cd /home/mason/catkin_ws/build/vins; catkin build --get-env vins | catkin env -si /usr/bin/make --jobserver-fds=6,7 -j; cd -

I built OpenCV with CUDA using https://github.com/jetsonhacks/buildOpenCVXavier here and cv2.version returns 3.2.0 for python2 and 3.4.3 for python3.

and I manually built cv_brigde using here https://github.com/ros-perception/vision_opencv with edited CMakeLists.txt find_package(OpenCV 3 REQUIRED PATHS /usr/share/OpenCV NO_DEFAULT_PATH COMPONENTS opencv_core opencv_imgproc opencv_imgcodecs CONFIG ) include(/usr/share/OpenCV/OpenCVConfig.cmake)

Is there any mistake of Cmakelist of cv_bridge? or any other problem of my build process?

Thank you in advance!

engcang commented 5 years ago

Built OpenCV for 3.4.1 version as you did and problem has gone. thank you

slamlixiaodong commented 5 years ago

How to solve it? I encountered the same problem.

engcang commented 5 years ago

How to solve it? I encountered the same problem.

@slamlixiaodong Did you build OpenCV for 3.4.1 version? In my case the version was problem. I removed the other version of OpenCV cleanly and then built it manually.

Mehdi20000103 commented 2 years ago

I am using openCV 3.4.14 and have the same issue. How to solve it please