raulmur / ORB_SLAM2

Real-Time SLAM for Monocular, Stereo and RGB-D Cameras, with Loop Detection and Relocalization Capabilities
Other
9.17k stars 4.69k forks source link

./build.sh error: error: no declaration matches ‘void ORB_SLAM2::PnPsolver::.... #1061

Open lijoe123 opened 1 year ago

lijoe123 commented 1 year ago

I used the opencv4.2.0 ,and occur this problem:

/home/music/catkin_ws/src/ORB_SLAM2/src/PnPsolver.cc:841:6: error: no declaration matches ‘void ORB_SLAM2::PnPsolver::gauss_newton(const CvMat*, const CvMat*, double*)’
  841 | void PnPsolver::gauss_newton(const CvMat * L_6x10, const CvMat * Rho,
      |      ^~~~~~~~~
In file included from /home/music/catkin_ws/src/ORB_SLAM2/src/PnPsolver.cc:53:
/home/music/catkin_ws/src/ORB_SLAM2/include/PnPsolver.h:113:8: note: candidate is: ‘void ORB_SLAM2::PnPsolver::gauss_newton(const int*, const int*, double*)’
  113 |   void gauss_newton(const CvMat * L_6x10, const CvMat * Rho, double current_betas[4]);
      |        ^~~~~~~~~~~~
In file included from /home/music/catkin_ws/src/ORB_SLAM2/src/PnPsolver.cc:53:
/home/music/catkin_ws/src/ORB_SLAM2/include/PnPsolver.h:61:7: note: ‘class ORB_SLAM2::PnPsolver’ defined here
   61 | class PnPsolver {
      |       ^~~~~~~~~
/home/music/catkin_ws/src/ORB_SLAM2/src/PnPsolver.cc:861:6: error: no declaration matches ‘void ORB_SLAM2::PnPsolver::qr_solve(CvMat*, CvMat*, CvMat*)’
  861 | void PnPsolver::qr_solve(CvMat * A, CvMat * b, CvMat * X)
      |      ^~~~~~~~~
In file included from /home/music/catkin_ws/src/ORB_SLAM2/src/PnPsolver.cc:53:

Could you please give me a hand ! Thank you!

qianjyM commented 1 year ago

I met the same problem with Opencv4.2.0. Have you solved it?