Tag Archives: Ubuntu18 Compile Kalibr Error

How to Solve Ubuntu18 Compile Kalibr Error (Various Errors)

Opencv-3.4.13 is too new, and errors will be encountered during the compilation of kalibr. The summary is as follows:

Error 1: sudo pip install python-igraph –upgrade failed

Solution:

sudo apt-get install python-igraph

Error 2:

Could not find a package configuration file provided by “code_utils” with
any of the following names:
code_utilsConfig.cmake
code_utils-config.cmake```

Solution:

  1. You need to put the following sentence in the sumpixel_test.cpp file
    #include “backward.hpp”
    to this line
    #include “code_utils/backward.hpp”
  2. Put code_utils into the workspace first, then catkin_ws once, then put imu_utils, then compile

 

Error 3: catkin build -DCMAKE_BUILD_TYPE=Release -j4 errors during compilation

3-1 error reporting:

 error: ‘CV_GRAY2RGB’ was not declared in this scope
     cv::cvtColor(imageCopy1, imageCopy1, CV_GRAY2RGB);
    
 error: ‘CV_TERMCRIT_ITER’ was not declared in this scope
         cv::TermCriteria(CV_TERMCRIT_EPS + CV_TERMCRIT_ITER, 30, 0.1));

error: ‘CV_TERMCRIT_EPS’ was not declared in this scope
         cv::TermCriteria(CV_TERMCRIT_EPS + CV_TERMCRIT_ITER, 30, 0.1));

3-1 solution: add a header file to the corresponding file:

#include <opencv2/imgproc/types_c.h>

##############################################################################################################

3-2 cvstartwindowthread() error:

Change 3-2 to:

cv::startWindowThread()

3-3 CV_LOAD_IMAGE_UNCHANGED error:

3-3 changed to

cv::IMREAD_UNCHANGED

3-4 CV_LOAD_IMAGE_GRAYSCALE error:

3-4 changed to

cv::IMREAD_GRAYSCALE错误:

3-5 CV_ LOAD_ IMAGE_ Grayscale error:

Change 3-5 to

cv::IMREAD_GRAYSCALE

3-6 CV_LOAD_IMAGE_COLOR error:

Change 3-6 to

cv::IMREAD_COLOR

3-7 CV_LOAD_IMAGE_ANYDEPTH error:

3-7 changed to

cv::IMREAD_ANYDEPTH

3-8 CV_MINMAX error:

3-8 changed to

    NORM_MINMAX

3-9 CV_FONT_HERSHEY_SIMPLEX error:

3-9 changed to

cv::FONT_HERSHEY_SIMPLEX```

3-10 CV_WINDOW_AUTOSIZE error:

3-10 changed to

cv::WINDOW_AUTOSIZE

3-11 error: error: aggregate ‘std::ofstream out_t’ has incomplete type and cannot be defined std::ofstream out_t;
3-11 Solution: add the header file as below:

#include <fstream>