uzh-rpg / rpg_dvs_evo_open

Implementation of EVO (RA-L 17)
158 stars 42 forks source link

build error #17

Open hebaoy opened 2 years ago

hebaoy commented 2 years ago

/home/xiaoheya/catkin_evo_ws/devel/lib/libdvs_mapping.so:undefined reference to‘cv::error(int, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, char const, char const, int)’ /home/xiaoheya/catkin_evo_ws/devel/lib/libdvs_mapping.so:undefined reference to‘cv::Mat::updateContinuityFlag()’ collect2: error: ld returned 1 exit status

sherlie831 commented 2 years ago

I also encountered this problem. Have you solved it?

zhaoliqun-7788 commented 2 years ago

Perhaps try to change the version of opencv from 4 to 3 ? I encountered this problem several days ago, but solved it successfully by changing the version of opencv~

hebaoy commented 2 years ago

Thanks! I'm successfully

hebaoy commented 2 years ago

but, I also,,, /home/xiaoheya/catkin_evo_ws/src/rpg_dvs_evo_open/dvs_reconstruction/src/mosaic.cpp: In member function ‘void Mosaic::update(const cv::Mat&, const ros::Time&, const ros::Time&)’: /home/xiaoheya/catkin_evo_ws/src/rpg_dvs_evo_open/dvs_reconstruction/src/mosaic.cpp:291:48: error: invalid initialization of reference of type ‘const Scalar& {aka const cv::Matx<float, 1, 1>&}’ from expression of type ‘const float’ const Scalar &z = new_grad.at(y, x);


/home/xiaoheya/catkin_evo_ws/src/rpg_dvs_evo_open/dvs_reconstruction/src/mosaic.cpp:314:35: error: conversion from ‘float’ to non-scalar type ‘const Scalar {aka const cv::Matx<float, 1, 1>}’ requested
             const Scalar h = g.dot(v), nu = z - h, S = dhdg * P * dhdg.t() + R_;
thomaswxu commented 2 years ago

Which version of opencv 3 are you using? I tried with the latest opencv3 version but still got many build errors related to opencv functions when trying to catkin build dvs_tracking

hebaoy commented 2 years ago

i used in opencv3.4.16

munirjojoverge commented 2 years ago

Hi. I have exactly the same problem and I've tried many approaches, but none of them successful. I started by changing the opencv version to 3.14, I added to the CmakeList the requirement to make sure all pieces of the repo were using the same opencv version. The problem @hebaoy had I solved it by using uniform initialization (aka {} instead of =). But I still have linking issues. To address this ld issues I added to the CMakeList specific paths to find the opencv libraries and where the target libraries should go, but I haven't been successful. For completeness: Ubuntu 18.04, ROS Melodic, opencv from repo checkout branch 3.14 and built, also installed open_contrib on the same branch. I'll post the exact failure messages shortly. I'd love to get some ideas on how to address this.

msh003 commented 8 months ago

Hi. I have exactly the same problem and I've tried many approaches, but none of them successful. I started by changing the opencv version to 3.14, I added to the CmakeList the requirement to make sure all pieces of the repo were using the same opencv version. The problem @hebaoy had I solved it by using uniform initialization (aka {} instead of =). But I still have linking issues. To address this ld issues I added to the CMakeList specific paths to find the opencv libraries and where the target libraries should go, but I haven't been successful. For completeness: Ubuntu 18.04, ROS Melodic, opencv from repo checkout branch 3.14 and built, also installed open_contrib on the same branch. I'll post the exact failure messages shortly. I'd love to get some ideas on how to address this.

Could you please clarify how to solved the problem by using uniform initialization (aka {} instead of =)? Thank you