ubuntu
源码安装vins-mono算法问题整理(ROS Melodic + opencv 4.1.1)
ROS相关 • lalala 发表了文章 • 0 个评论 • 9059 次浏览 • 2020-08-28 13:12
问题一
编译时报错 error: ‘CV_GRAY2RGB’ was not declared in this scope 等
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/chessboard/Chessboard.cc: In constructor ‘camodocal::Chessboard::Chessboard(cv::Size, cv::Mat&)’:
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/chessboard/Chessboard.cc:20:38: error: ‘CV_GRAY2BGR’ was not declared in this scope
cv::cvtColor(image, mSketch, CV_GRAY2BGR);
^~~~~~~~~~~
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/chessboard/Chessboard.cc:26:37: error: ‘CV_BGR2GRAY’ was not declared in this scope
cv::cvtColor(image, mImage, CV_BGR2GRAY);
^~~~~~~~~~~
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/chessboard/Chessboard.cc: In member function ‘bool camodocal::Chessboard::findChessboardCornersImproved(const cv::Mat&, const Size&, std::vector<cv::Point_<float> >&, int)’:
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/chessboard/Chessboard.cc:150:43: error: ‘CV_BGR2GRAY’ was not declared in this scope
cv::cvtColor(image, norm_img, CV_BGR2GRAY);
^~~~~~~~~~~
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/chessboard/Chessboard.cc:207:67: error: ‘CV_THRESH_BINARY’ was not declared in this scope
cv::threshold(img, thresh_img, thresh_level, 255, CV_THRESH_BINARY);
^~~~~~~~~~~~~~~~
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/chessboard/Chessboard.cc: In constructor ‘camodocal::Chessboard::Chessboard(cv::Size, cv::Mat&)’:
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/chessboard/Chessboard.cc:20:38: error: ‘CV_GRAY2BGR’ was not declared in this scope
cv::cvtColor(image, mSketch, CV_GRAY2BGR);
^~~~~~~~~~~
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/chessboard/Chessboard.cc:26:37: error: ‘CV_BGR2GRAY’ was not declared in this scope
cv::cvtColor(image, mImage, CV_BGR2GRAY);
^~~~~~~~~~~
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/chessboard/Chessboard.cc:215:57: error: ‘CV_SHAPE_CROSS’ was not declared in this scope
cv::Mat kernel1 = cv::getStructuringElement(CV_SHAPE_CROSS, cv::Size(3,3), cv::Point(1,1));
^~~~~~~~~~~~~~
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/chessboard/Chessboard.cc: In member function ‘bool camodocal::Chessboard::findChessboardCornersImproved(const cv::Mat&, const Size&, std::vector<cv::Point_<float> >&, int)’:
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/chessboard/Chessboard.cc:150:43: error: ‘CV_BGR2GRAY’ was not declared in this scope
cv::cvtColor(image, norm_img, CV_BGR2GRAY);
^~~~~~~~~~~
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/chessboard/Chessboard.cc:215:57: note: suggested alternative: ‘CV_WRAP_AS’
cv::Mat kernel1 = cv::getStructuringElement(CV_SHAPE_CROSS, cv::Size(3,3), cv::Point(1,1));
^~~~~~~~~~~~~~
CV_WRAP_AS
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/chessboard/Chessboard.cc:216:57: error: ‘CV_SHAPE_RECT’ was not declared in this scope
cv::Mat kernel2 = cv::getStructuringElement(CV_SHAPE_RECT, cv::Size(3,3), cv::Point(1,1));
^~~~~~~~~~~~~
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/chessboard/Chessboard.cc:320:43: error: ‘CV_TERMCRIT_EPS’ was not declared in this scope
cv::TermCriteria(CV_TERMCRIT_EPS + CV_TERMCRIT_ITER, 30, 0.1));
^~~~~~~~~~~~~~~
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/chessboard/Chessboard.cc:207:67: error: ‘CV_THRESH_BINARY’ was not declared in this scope
cv::threshold(img, thresh_img, thresh_level, 255, CV_THRESH_BINARY);
^~~~~~~~~~~~~~~~
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/chessboard/Chessboard.cc:320:61: error: ‘CV_TERMCRIT_ITER’ was not declared in this scope
cv::TermCriteria(CV_TERMCRIT_EPS + CV_TERMCRIT_ITER, 30, 0.1));
^~~~~~~~~~~~~~~~
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/chessboard/Chessboard.cc:215:57: error: ‘CV_SHAPE_CROSS’ was not declared in this scope
cv::Mat kernel1 = cv::getStructuringElement(CV_SHAPE_CROSS, cv::Size(3,3), cv::Point(1,1));
^~~~~~~~~~~~~~
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/chessboard/Chessboard.cc:215:57: note: suggested alternative: ‘CV_WRAP_AS’
cv::Mat kernel1 = cv::getStructuringElement(CV_SHAPE_CROSS, cv::Size(3,3), cv::Point(1,1));
^~~~~~~~~~~~~~
CV_WRAP_AS
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/chessboard/Chessboard.cc:216:57: error: ‘CV_SHAPE_RECT’ was not declared in this scope
cv::Mat kernel2 = cv::getStructuringElement(CV_SHAPE_RECT, cv::Size(3,3), cv::Point(1,1));
^~~~~~~~~~~~~
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/chessboard/Chessboard.cc:320:43: error: ‘CV_TERMCRIT_EPS’ was not declared in this scope
cv::TermCriteria(CV_TERMCRIT_EPS + CV_TERMCRIT_ITER, 30, 0.1));
^~~~~~~~~~~~~~~
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/chessboard/Chessboard.cc: In member function ‘void camodocal::Chessboard::generateQuads(std::vector<boost::shared_ptr<camodocal::ChessboardQuad> >&, cv::Mat&, int, int, bool)’:
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/chessboard/Chessboard.cc:1175:50: error: ‘CV_RETR_CCOMP’ was not declared in this scope
cv::findContours(image, contours, hierarchy, CV_RETR_CCOMP, CV_CHAIN_APPROX_SIMPLE);
^~~~~~~~~~~~~
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/chessboard/Chessboard.cc:320:61: error: ‘CV_TERMCRIT_ITER’ was not declared in this scope
cv::TermCriteria(CV_TERMCRIT_EPS + CV_TERMCRIT_ITER, 30, 0.1));
^~~~~~~~~~~~~~~~
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/chessboard/Chessboard.cc:1175:65: error: ‘CV_CHAIN_APPROX_SIMPLE’ was not declared in this scope
cv::findContours(image, contours, hierarchy, CV_RETR_CCOMP, CV_CHAIN_APPROX_SIMPLE);
^~~~~~~~~~~~~~~~~~~~~~
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/chessboard/Chessboard.cc: In member function ‘void camodocal::Chessboard::generateQuads(std::vector<boost::shared_ptr<camodocal::ChessboardQuad> >&, cv::Mat&, int, int, bool)’:
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/chessboard/Chessboard.cc:1175:50: error: ‘CV_RETR_CCOMP’ was not declared in this scope
cv::findContours(image, contours, hierarchy, CV_RETR_CCOMP, CV_CHAIN_APPROX_SIMPLE);
^~~~~~~~~~~~~
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/chessboard/Chessboard.cc:1175:65: error: ‘CV_CHAIN_APPROX_SIMPLE’ was not declared in this scope
cv::findContours(image, contours, hierarchy, CV_RETR_CCOMP, CV_CHAIN_APPROX_SIMPLE);
^~~~~~~~~~~~~~~~~~~~~~
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/chessboard/Chessboard.cc: In member function ‘bool camodocal::Chessboard::checkChessboard(const cv::Mat&, cv::Size) const’:
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/chessboard/Chessboard.cc:1586:72: error: ‘CV_THRESH_BINARY’ was not declared in this scope
cv::threshold(white, thresh, threshLevel + blackWhiteGap, 255, CV_THRESH_BINARY);
^~~~~~~~~~~~~~~~
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/chessboard/Chessboard.cc:1592:55: error: ‘CV_RETR_CCOMP’ was not declared in this scope
cv::findContours(thresh, contours, hierarchy, CV_RETR_CCOMP, CV_CHAIN_APPROX_SIMPLE);
^~~~~~~~~~~~~
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/chessboard/Chessboard.cc:1592:70: error: ‘CV_CHAIN_APPROX_SIMPLE’ was not declared in this scope
cv::findContours(thresh, contours, hierarchy, CV_RETR_CCOMP, CV_CHAIN_APPROX_SIMPLE);
^~~~~~~~~~~~~~~~~~~~~~
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/chessboard/Chessboard.cc: In member function ‘bool camodocal::Chessboard::checkChessboard(const cv::Mat&, cv::Size) const’:
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/chessboard/Chessboard.cc:1586:72: error: ‘CV_THRESH_BINARY’ was not declared in this scope
cv::threshold(white, thresh, threshLevel + blackWhiteGap, 255, CV_THRESH_BINARY);
^~~~~~~~~~~~~~~~
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/chessboard/Chessboard.cc:1597:56: error: ‘CV_THRESH_BINARY_INV’ was not declared in this scope
cv::threshold(black, thresh, threshLevel, 255, CV_THRESH_BINARY_INV);
^~~~~~~~~~~~~~~~~~~~
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/chessboard/Chessboard.cc:1592:55: error: ‘CV_RETR_CCOMP’ was not declared in this scope
cv::findContours(thresh, contours, hierarchy, CV_RETR_CCOMP, CV_CHAIN_APPROX_SIMPLE);
^~~~~~~~~~~~~
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/chessboard/Chessboard.cc:1592:70: error: ‘CV_CHAIN_APPROX_SIMPLE’ was not declared in this scope
cv::findContours(thresh, contours, hierarchy, CV_RETR_CCOMP, CV_CHAIN_APPROX_SIMPLE);
^~~~~~~~~~~~~~~~~~~~~~
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/chessboard/Chessboard.cc:1597:56: error: ‘CV_THRESH_BINARY_INV’ was not declared in this scope
cv::threshold(black, thresh, threshLevel, 255, CV_THRESH_BINARY_INV);
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/calib/CameraCalibration.cc: In member function ‘void camodocal::CameraCalibration::drawResults(std::vector<cv::Mat>&) const’:
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/calib/CameraCalibration.cc:236:40: error: ‘CV_GRAY2RGB’ was not declared in this scope
cv::cvtColor(image, image, CV_GRAY2RGB);
^~~~~~~~~~~
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/calib/CameraCalibration.cc:236:40: note: suggested alternative: ‘CV_GRAPH’
cv::cvtColor(image, image, CV_GRAY2RGB);
^~~~~~~~~~~
CV_GRAPH
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/calib/CameraCalibration.cc:254:37: error: ‘CV_AA’ was not declared in this scope
5, green, 2, CV_AA, drawShiftBits);
^~~~~
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/calib/CameraCalibration.cc:254:37: note: suggested alternative: ‘CV_AVX’
5, green, 2, CV_AA, drawShiftBits);
^~~~~
CV_AVX
解决方法
在报错文件上添加头文件 #include <opencv2/imgproc/imgproc_c.h>单独遇到CV_AA的报错时,也可以将 CV_AA 改为 cv::LINE_AA
问题二
编译时报错 error: ‘CV_CALIB_CB_ADAPTIVE_THRESH’ was not declared in this scope 、error: ‘CV_CALIB_CB_NORMALIZE_IMAGE’ was not declared in this scope、error: ‘CV_CALIB_CB_FILTER_QUADS’ was not declared in this scope 和 error: ‘CV_CALIB_CB_FAST_CHECK’ was not declared in this scope
解决方法
将CV_CALIB_CB_ADAPTIVE_THRESH、CV_CALIB_CB_NORMALIZE_IMAGE、CV_CALIB_CB_FILTER_QUADS和CV_CALIB_CB_FAST_CHECK修改为 cv::CALIB_CB_ADAPTIVE_THRESH 、 cv::CALIB_CB_NORMALIZE_IMAGE 、cv::CALIB_CB_FILTER_QUADS 和cv::CALIB_CB_FAST_CHECK
问题三
编译时报错 error: ‘CV_RGB2GRAY’ was not declared in this scope
/home/ubuntu/catkin_ws/src/VINS-Mono/pose_graph/src/ThirdParty/DVision/BRIEF.cpp:53:32: error: ‘CV_RGB2GRAY’ was not declared in this scope cv::cvtColor(image, aux, CV_RGB2GRAY);
^~~~~~~~~~~
/home/ubuntu/catkin_ws/src/VINS-Mono/pose_graph/src/ThirdParty/DVision/BRIEF.cpp:53:32: note: suggested alternative: ‘CV_RGB’ cv::cvtColor(image, aux, CV_RGB2GRAY);
解决方法
在报错文件上添加头文件 #include<opencv2/imgproc/types_c.h>
问题四
编译时遇到报错 error: ‘CV_FONT_HERSHEY_SIMPLEX’ was not declared in this scope
解决方法
将报错文件上的 CV_FONT_HERSHEY_SIMPLEX 参数改为 cv::FONT_HERSHEY_SIMPLEX 查看全部
问题一
- 编译时报错 error: ‘CV_GRAY2RGB’ was not declared in this scope 等
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/chessboard/Chessboard.cc: In constructor ‘camodocal::Chessboard::Chessboard(cv::Size, cv::Mat&)’:
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/chessboard/Chessboard.cc:20:38: error: ‘CV_GRAY2BGR’ was not declared in this scope
cv::cvtColor(image, mSketch, CV_GRAY2BGR);
^~~~~~~~~~~
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/chessboard/Chessboard.cc:26:37: error: ‘CV_BGR2GRAY’ was not declared in this scope
cv::cvtColor(image, mImage, CV_BGR2GRAY);
^~~~~~~~~~~
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/chessboard/Chessboard.cc: In member function ‘bool camodocal::Chessboard::findChessboardCornersImproved(const cv::Mat&, const Size&, std::vector<cv::Point_<float> >&, int)’:
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/chessboard/Chessboard.cc:150:43: error: ‘CV_BGR2GRAY’ was not declared in this scope
cv::cvtColor(image, norm_img, CV_BGR2GRAY);
^~~~~~~~~~~
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/chessboard/Chessboard.cc:207:67: error: ‘CV_THRESH_BINARY’ was not declared in this scope
cv::threshold(img, thresh_img, thresh_level, 255, CV_THRESH_BINARY);
^~~~~~~~~~~~~~~~
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/chessboard/Chessboard.cc: In constructor ‘camodocal::Chessboard::Chessboard(cv::Size, cv::Mat&)’:
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/chessboard/Chessboard.cc:20:38: error: ‘CV_GRAY2BGR’ was not declared in this scope
cv::cvtColor(image, mSketch, CV_GRAY2BGR);
^~~~~~~~~~~
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/chessboard/Chessboard.cc:26:37: error: ‘CV_BGR2GRAY’ was not declared in this scope
cv::cvtColor(image, mImage, CV_BGR2GRAY);
^~~~~~~~~~~
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/chessboard/Chessboard.cc:215:57: error: ‘CV_SHAPE_CROSS’ was not declared in this scope
cv::Mat kernel1 = cv::getStructuringElement(CV_SHAPE_CROSS, cv::Size(3,3), cv::Point(1,1));
^~~~~~~~~~~~~~
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/chessboard/Chessboard.cc: In member function ‘bool camodocal::Chessboard::findChessboardCornersImproved(const cv::Mat&, const Size&, std::vector<cv::Point_<float> >&, int)’:
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/chessboard/Chessboard.cc:150:43: error: ‘CV_BGR2GRAY’ was not declared in this scope
cv::cvtColor(image, norm_img, CV_BGR2GRAY);
^~~~~~~~~~~
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/chessboard/Chessboard.cc:215:57: note: suggested alternative: ‘CV_WRAP_AS’
cv::Mat kernel1 = cv::getStructuringElement(CV_SHAPE_CROSS, cv::Size(3,3), cv::Point(1,1));
^~~~~~~~~~~~~~
CV_WRAP_AS
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/chessboard/Chessboard.cc:216:57: error: ‘CV_SHAPE_RECT’ was not declared in this scope
cv::Mat kernel2 = cv::getStructuringElement(CV_SHAPE_RECT, cv::Size(3,3), cv::Point(1,1));
^~~~~~~~~~~~~
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/chessboard/Chessboard.cc:320:43: error: ‘CV_TERMCRIT_EPS’ was not declared in this scope
cv::TermCriteria(CV_TERMCRIT_EPS + CV_TERMCRIT_ITER, 30, 0.1));
^~~~~~~~~~~~~~~
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/chessboard/Chessboard.cc:207:67: error: ‘CV_THRESH_BINARY’ was not declared in this scope
cv::threshold(img, thresh_img, thresh_level, 255, CV_THRESH_BINARY);
^~~~~~~~~~~~~~~~
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/chessboard/Chessboard.cc:320:61: error: ‘CV_TERMCRIT_ITER’ was not declared in this scope
cv::TermCriteria(CV_TERMCRIT_EPS + CV_TERMCRIT_ITER, 30, 0.1));
^~~~~~~~~~~~~~~~
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/chessboard/Chessboard.cc:215:57: error: ‘CV_SHAPE_CROSS’ was not declared in this scope
cv::Mat kernel1 = cv::getStructuringElement(CV_SHAPE_CROSS, cv::Size(3,3), cv::Point(1,1));
^~~~~~~~~~~~~~
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/chessboard/Chessboard.cc:215:57: note: suggested alternative: ‘CV_WRAP_AS’
cv::Mat kernel1 = cv::getStructuringElement(CV_SHAPE_CROSS, cv::Size(3,3), cv::Point(1,1));
^~~~~~~~~~~~~~
CV_WRAP_AS
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/chessboard/Chessboard.cc:216:57: error: ‘CV_SHAPE_RECT’ was not declared in this scope
cv::Mat kernel2 = cv::getStructuringElement(CV_SHAPE_RECT, cv::Size(3,3), cv::Point(1,1));
^~~~~~~~~~~~~
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/chessboard/Chessboard.cc:320:43: error: ‘CV_TERMCRIT_EPS’ was not declared in this scope
cv::TermCriteria(CV_TERMCRIT_EPS + CV_TERMCRIT_ITER, 30, 0.1));
^~~~~~~~~~~~~~~
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/chessboard/Chessboard.cc: In member function ‘void camodocal::Chessboard::generateQuads(std::vector<boost::shared_ptr<camodocal::ChessboardQuad> >&, cv::Mat&, int, int, bool)’:
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/chessboard/Chessboard.cc:1175:50: error: ‘CV_RETR_CCOMP’ was not declared in this scope
cv::findContours(image, contours, hierarchy, CV_RETR_CCOMP, CV_CHAIN_APPROX_SIMPLE);
^~~~~~~~~~~~~
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/chessboard/Chessboard.cc:320:61: error: ‘CV_TERMCRIT_ITER’ was not declared in this scope
cv::TermCriteria(CV_TERMCRIT_EPS + CV_TERMCRIT_ITER, 30, 0.1));
^~~~~~~~~~~~~~~~
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/chessboard/Chessboard.cc:1175:65: error: ‘CV_CHAIN_APPROX_SIMPLE’ was not declared in this scope
cv::findContours(image, contours, hierarchy, CV_RETR_CCOMP, CV_CHAIN_APPROX_SIMPLE);
^~~~~~~~~~~~~~~~~~~~~~
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/chessboard/Chessboard.cc: In member function ‘void camodocal::Chessboard::generateQuads(std::vector<boost::shared_ptr<camodocal::ChessboardQuad> >&, cv::Mat&, int, int, bool)’:
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/chessboard/Chessboard.cc:1175:50: error: ‘CV_RETR_CCOMP’ was not declared in this scope
cv::findContours(image, contours, hierarchy, CV_RETR_CCOMP, CV_CHAIN_APPROX_SIMPLE);
^~~~~~~~~~~~~
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/chessboard/Chessboard.cc:1175:65: error: ‘CV_CHAIN_APPROX_SIMPLE’ was not declared in this scope
cv::findContours(image, contours, hierarchy, CV_RETR_CCOMP, CV_CHAIN_APPROX_SIMPLE);
^~~~~~~~~~~~~~~~~~~~~~
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/chessboard/Chessboard.cc: In member function ‘bool camodocal::Chessboard::checkChessboard(const cv::Mat&, cv::Size) const’:
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/chessboard/Chessboard.cc:1586:72: error: ‘CV_THRESH_BINARY’ was not declared in this scope
cv::threshold(white, thresh, threshLevel + blackWhiteGap, 255, CV_THRESH_BINARY);
^~~~~~~~~~~~~~~~
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/chessboard/Chessboard.cc:1592:55: error: ‘CV_RETR_CCOMP’ was not declared in this scope
cv::findContours(thresh, contours, hierarchy, CV_RETR_CCOMP, CV_CHAIN_APPROX_SIMPLE);
^~~~~~~~~~~~~
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/chessboard/Chessboard.cc:1592:70: error: ‘CV_CHAIN_APPROX_SIMPLE’ was not declared in this scope
cv::findContours(thresh, contours, hierarchy, CV_RETR_CCOMP, CV_CHAIN_APPROX_SIMPLE);
^~~~~~~~~~~~~~~~~~~~~~
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/chessboard/Chessboard.cc: In member function ‘bool camodocal::Chessboard::checkChessboard(const cv::Mat&, cv::Size) const’:
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/chessboard/Chessboard.cc:1586:72: error: ‘CV_THRESH_BINARY’ was not declared in this scope
cv::threshold(white, thresh, threshLevel + blackWhiteGap, 255, CV_THRESH_BINARY);
^~~~~~~~~~~~~~~~
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/chessboard/Chessboard.cc:1597:56: error: ‘CV_THRESH_BINARY_INV’ was not declared in this scope
cv::threshold(black, thresh, threshLevel, 255, CV_THRESH_BINARY_INV);
^~~~~~~~~~~~~~~~~~~~
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/chessboard/Chessboard.cc:1592:55: error: ‘CV_RETR_CCOMP’ was not declared in this scope
cv::findContours(thresh, contours, hierarchy, CV_RETR_CCOMP, CV_CHAIN_APPROX_SIMPLE);
^~~~~~~~~~~~~
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/chessboard/Chessboard.cc:1592:70: error: ‘CV_CHAIN_APPROX_SIMPLE’ was not declared in this scope
cv::findContours(thresh, contours, hierarchy, CV_RETR_CCOMP, CV_CHAIN_APPROX_SIMPLE);
^~~~~~~~~~~~~~~~~~~~~~
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/chessboard/Chessboard.cc:1597:56: error: ‘CV_THRESH_BINARY_INV’ was not declared in this scope
cv::threshold(black, thresh, threshLevel, 255, CV_THRESH_BINARY_INV);
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/calib/CameraCalibration.cc: In member function ‘void camodocal::CameraCalibration::drawResults(std::vector<cv::Mat>&) const’:
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/calib/CameraCalibration.cc:236:40: error: ‘CV_GRAY2RGB’ was not declared in this scope
cv::cvtColor(image, image, CV_GRAY2RGB);
^~~~~~~~~~~
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/calib/CameraCalibration.cc:236:40: note: suggested alternative: ‘CV_GRAPH’
cv::cvtColor(image, image, CV_GRAY2RGB);
^~~~~~~~~~~
CV_GRAPH
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/calib/CameraCalibration.cc:254:37: error: ‘CV_AA’ was not declared in this scope
5, green, 2, CV_AA, drawShiftBits);
^~~~~
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/calib/CameraCalibration.cc:254:37: note: suggested alternative: ‘CV_AVX’
5, green, 2, CV_AA, drawShiftBits);
^~~~~
CV_AVX
解决方法
- 在报错文件上添加头文件 #include <opencv2/imgproc/imgproc_c.h>
- 单独遇到CV_AA的报错时,也可以将 CV_AA 改为 cv::LINE_AA
问题二
- 编译时报错 error: ‘CV_CALIB_CB_ADAPTIVE_THRESH’ was not declared in this scope 、error: ‘CV_CALIB_CB_NORMALIZE_IMAGE’ was not declared in this scope、error: ‘CV_CALIB_CB_FILTER_QUADS’ was not declared in this scope 和 error: ‘CV_CALIB_CB_FAST_CHECK’ was not declared in this scope
解决方法
- 将CV_CALIB_CB_ADAPTIVE_THRESH、CV_CALIB_CB_NORMALIZE_IMAGE、CV_CALIB_CB_FILTER_QUADS和CV_CALIB_CB_FAST_CHECK修改为 cv::CALIB_CB_ADAPTIVE_THRESH 、 cv::CALIB_CB_NORMALIZE_IMAGE 、cv::CALIB_CB_FILTER_QUADS 和cv::CALIB_CB_FAST_CHECK
问题三
- 编译时报错 error: ‘CV_RGB2GRAY’ was not declared in this scope
/home/ubuntu/catkin_ws/src/VINS-Mono/pose_graph/src/ThirdParty/DVision/BRIEF.cpp:53:32: error: ‘CV_RGB2GRAY’ was not declared in this scope cv::cvtColor(image, aux, CV_RGB2GRAY);
^~~~~~~~~~~
/home/ubuntu/catkin_ws/src/VINS-Mono/pose_graph/src/ThirdParty/DVision/BRIEF.cpp:53:32: note: suggested alternative: ‘CV_RGB’ cv::cvtColor(image, aux, CV_RGB2GRAY);
解决方法
- 在报错文件上添加头文件 #include<opencv2/imgproc/types_c.h>
问题四
- 编译时遇到报错 error: ‘CV_FONT_HERSHEY_SIMPLEX’ was not declared in this scope
解决方法
- 将报错文件上的 CV_FONT_HERSHEY_SIMPLEX 参数改为 cv::FONT_HERSHEY_SIMPLEX
Ubuntu1804上源码安装cartographer问题整理
Linux系统相关 • lalala 发表了文章 • 0 个评论 • 7249 次浏览 • 2020-08-18 13:19
本文章整理了ubuntu1804上源码安装cartographer问题
问题一
测试环境:Jetson Xavier NX+ Jetpack4.4 + Ubuntu 1804 + ROS Melodic
编译时出现缺少absl包
-- Found GMock: gmock_main;-lpthread
CMake Error at CMakeLists.txt:32 (find_package):
By not providing "Findabsl.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "absl", but
CMake did not find one.
Could not find a package configuration file provided by "absl" with any of
the following names:
abslConfig.cmake
absl-config.cmake
Add the installation prefix of "absl" to CMAKE_PREFIX_PATH or set
"absl_DIR" to a directory containing one of the above files. If "absl"
provides a separate development package or SDK, be sure it has been
installed.解决方法
在下载回来的cartographer上有安装absl的脚本
$ sudo apt-get install stow
$ sudo chmod +x ~/cartographer_ws/src/cartographer/scriptsinstall_abseil.sh
$ cd ~/cartographer_ws/src/cartographer/scripts
$ ./install_abseil.sh问题二
测试环境:Jetson Xavier NX+ Jetpack4.4 + Ubuntu 1804 + ROS Melodic 更新时遇到错误
ubuntu@ubuntu:~/cartographer_ws$ rosdep install --from-paths src --ignore-src --rosdistro=melodic -y -i
ERROR: the following packages/stacks could not have their rosdep keys resolved
to system dependencies:
cartographer_turtlebot: Cannot locate rosdep definition for [turtlebot_bringup]解决方法
https://wenda.ncnynl.com/question/116424 查看全部
- 本文章整理了ubuntu1804上源码安装cartographer问题
问题一
- 测试环境:Jetson Xavier NX+ Jetpack4.4 + Ubuntu 1804 + ROS Melodic
- 编译时出现缺少absl包
-- Found GMock: gmock_main;-lpthread解决方法
CMake Error at CMakeLists.txt:32 (find_package):
By not providing "Findabsl.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "absl", but
CMake did not find one.
Could not find a package configuration file provided by "absl" with any of
the following names:
abslConfig.cmake
absl-config.cmake
Add the installation prefix of "absl" to CMAKE_PREFIX_PATH or set
"absl_DIR" to a directory containing one of the above files. If "absl"
provides a separate development package or SDK, be sure it has been
installed.
- 在下载回来的cartographer上有安装absl的脚本
$ sudo apt-get install stow问题二
$ sudo chmod +x ~/cartographer_ws/src/cartographer/scriptsinstall_abseil.sh
$ cd ~/cartographer_ws/src/cartographer/scripts
$ ./install_abseil.sh
- 测试环境:Jetson Xavier NX+ Jetpack4.4 + Ubuntu 1804 + ROS Melodic
- 更新时遇到错误
ubuntu@ubuntu:~/cartographer_ws$ rosdep install --from-paths src --ignore-src --rosdistro=melodic -y -i解决方法
ERROR: the following packages/stacks could not have their rosdep keys resolved
to system dependencies:
cartographer_turtlebot: Cannot locate rosdep definition for [turtlebot_bringup]
Ubuntu 1804 编译realsense-ros包报错
回复ROS相关 • lalala 回复了问题 • 1 人关注 • 2 个回复 • 3155 次浏览 • 2020-08-05 12:14
使用usb摄像头报错:CameraInfo/P resulted in an invalid position calculation (nans or infs)
回复ROS相关 • lalala 回复了问题 • 1 人关注 • 1 个回复 • 3063 次浏览 • 2020-07-15 17:42
apt update 遇到相关错误: The repository 'xxx' does not have a Release file.
回复Linux系统相关 • lalala 回复了问题 • 1 人关注 • 1 个回复 • 4666 次浏览 • 2020-06-05 10:33
上传固件时遇到 Fail to open port 1 : /dev/ttyACM0
回复Turtlebot3 • lalala 回复了问题 • 1 人关注 • 1 个回复 • 4912 次浏览 • 2019-12-24 15:16
ubutnu下apt安装时报错:The following signatures were invalid: KEYEXPIRED 1622248854
回复Linux系统相关 • lalala 回复了问题 • 1 人关注 • 1 个回复 • 6220 次浏览 • 2019-10-12 11:34
虚拟机 ubuntu 1804 编译tb3_ros2包时,报错c++: internal compiler error: Killed (program cc1plus)
回复ROS2相关 • lalala 回复了问题 • 1 人关注 • 1 个回复 • 3175 次浏览 • 2019-09-03 09:35
安装arduino-1.0.6后 打开有 arduino: java: not found
回复Linux系统相关 • lalala 回复了问题 • 1 人关注 • 1 个回复 • 1773 次浏览 • 2019-08-15 16:45
ubuntu1604 apt update 失败 An error occurred during the signature verification.
回复Linux系统相关 • lalala 回复了问题 • 1 人关注 • 1 个回复 • 2621 次浏览 • 2019-07-06 19:59
lalala 回答了问题 • 2020-06-05 10:30 • 1 个回复
apt update 遇到相关错误: The repository 'xxx' does not have a Release file.
[sudo] password for ubuntu:
Get:1 file:/var/cuda-repo-9-0-local InRelease
Ign:1 file... 显示全部 »
[sudo] password for ubuntu:
Get:1 file:/var/cuda-repo-9-0-local InRelease
Ign:1 file:/var/cuda-repo-9-0-local InRelease
Get:2 file:/var/visionworks-repo InRelease
Ign:2 file:/var/visionworks-repo InRelease
Get:3 file:/var/visionworks-sfm-repo InRelease
Ign:3 file:/var/visionworks-sfm-repo InRelease
Get:4 file:/var/visionworks-tracking-repo InRelease
Ign:4 file:/var/visionworks-tracking-repo InRelease
Get:5 file:/var/cuda-repo-9-0-local Release [574 B]
Get:6 file:/var/visionworks-repo Release [1,999 B]
Get:7 file:/var/visionworks-sfm-repo Release [2,003 B]
Get:8 file:/var/visionworks-tracking-repo Release [2,008 B]
Get:5 file:/var/cuda-repo-9-0-local Release [574 B]
Get:6 file:/var/visionworks-repo Release [1,999 B]
Get:7 file:/var/visionworks-sfm-repo Release [2,003 B]
Get:8 file:/var/visionworks-tracking-repo Release [2,008 B]
Hit:12 http://ports.ubuntu.com/ubuntu-ports xenial InRelease
Ign:13 http://ppa.launchpad.net/chris-lea/node.js/ubuntu xenial InRelease
Hit:15 http://ports.ubuntu.com/ubuntu-ports xenial-updates InRelease
Hit:16 http://ports.ubuntu.com/ubuntu-ports xenial-security InRelease
Hit:17 http://packages.ros.org/ros/ubuntu xenial InRelease
Hit:18 http://realsense-hw-public.s3.amazonaws.com/Debian/apt-repo xenial InRelease
Ign:19 http://ppa.launchpad.net/jonathonf/python-3.6/ubuntu xenial InRelease
Err:20 http://ppa.launchpad.net/chris-lea/node.js/ubuntu xenial Release
404 Not Found [IP: 91.189.95.83 80]
Err:21 http://ppa.launchpad.net/jonathonf/python-3.6/ubuntu xenial Release
403 Forbidden
Reading package lists... Done
E: The repository 'http://ppa.launchpad.net/chris-lea/node.js/ubuntu xenial Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: The repository 'http://ppa.launchpad.net/jonathonf/python-3.6/ubuntu xenial Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
解决方法 $ sudo add-apt-repository -y -r ppa:chris-lea/node.js
$ sudo rm -f /etc/apt/sources.list.d/chris-lea-node_js-*.list
参考链接
https://github.com/nodesource/distributions/issues/324
Ubuntu 1804 编译realsense-ros包报错
回复ROS相关 • lalala 回复了问题 • 1 人关注 • 2 个回复 • 3155 次浏览 • 2020-08-05 12:14
使用usb摄像头报错:CameraInfo/P resulted in an invalid position calculation (nans or infs)
回复ROS相关 • lalala 回复了问题 • 1 人关注 • 1 个回复 • 3063 次浏览 • 2020-07-15 17:42
apt update 遇到相关错误: The repository 'xxx' does not have a Release file.
回复Linux系统相关 • lalala 回复了问题 • 1 人关注 • 1 个回复 • 4666 次浏览 • 2020-06-05 10:33
上传固件时遇到 Fail to open port 1 : /dev/ttyACM0
回复Turtlebot3 • lalala 回复了问题 • 1 人关注 • 1 个回复 • 4912 次浏览 • 2019-12-24 15:16
ubutnu下apt安装时报错:The following signatures were invalid: KEYEXPIRED 1622248854
回复Linux系统相关 • lalala 回复了问题 • 1 人关注 • 1 个回复 • 6220 次浏览 • 2019-10-12 11:34
虚拟机 ubuntu 1804 编译tb3_ros2包时,报错c++: internal compiler error: Killed (program cc1plus)
回复ROS2相关 • lalala 回复了问题 • 1 人关注 • 1 个回复 • 3175 次浏览 • 2019-09-03 09:35
安装arduino-1.0.6后 打开有 arduino: java: not found
回复Linux系统相关 • lalala 回复了问题 • 1 人关注 • 1 个回复 • 1773 次浏览 • 2019-08-15 16:45
ubuntu1604 apt update 失败 An error occurred during the signature verification.
回复Linux系统相关 • lalala 回复了问题 • 1 人关注 • 1 个回复 • 2621 次浏览 • 2019-07-06 19:59
源码安装vins-mono算法问题整理(ROS Melodic + opencv 4.1.1)
ROS相关 • lalala 发表了文章 • 0 个评论 • 9059 次浏览 • 2020-08-28 13:12
问题一
编译时报错 error: ‘CV_GRAY2RGB’ was not declared in this scope 等
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/chessboard/Chessboard.cc: In constructor ‘camodocal::Chessboard::Chessboard(cv::Size, cv::Mat&)’:
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/chessboard/Chessboard.cc:20:38: error: ‘CV_GRAY2BGR’ was not declared in this scope
cv::cvtColor(image, mSketch, CV_GRAY2BGR);
^~~~~~~~~~~
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/chessboard/Chessboard.cc:26:37: error: ‘CV_BGR2GRAY’ was not declared in this scope
cv::cvtColor(image, mImage, CV_BGR2GRAY);
^~~~~~~~~~~
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/chessboard/Chessboard.cc: In member function ‘bool camodocal::Chessboard::findChessboardCornersImproved(const cv::Mat&, const Size&, std::vector<cv::Point_<float> >&, int)’:
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/chessboard/Chessboard.cc:150:43: error: ‘CV_BGR2GRAY’ was not declared in this scope
cv::cvtColor(image, norm_img, CV_BGR2GRAY);
^~~~~~~~~~~
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/chessboard/Chessboard.cc:207:67: error: ‘CV_THRESH_BINARY’ was not declared in this scope
cv::threshold(img, thresh_img, thresh_level, 255, CV_THRESH_BINARY);
^~~~~~~~~~~~~~~~
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/chessboard/Chessboard.cc: In constructor ‘camodocal::Chessboard::Chessboard(cv::Size, cv::Mat&)’:
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/chessboard/Chessboard.cc:20:38: error: ‘CV_GRAY2BGR’ was not declared in this scope
cv::cvtColor(image, mSketch, CV_GRAY2BGR);
^~~~~~~~~~~
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/chessboard/Chessboard.cc:26:37: error: ‘CV_BGR2GRAY’ was not declared in this scope
cv::cvtColor(image, mImage, CV_BGR2GRAY);
^~~~~~~~~~~
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/chessboard/Chessboard.cc:215:57: error: ‘CV_SHAPE_CROSS’ was not declared in this scope
cv::Mat kernel1 = cv::getStructuringElement(CV_SHAPE_CROSS, cv::Size(3,3), cv::Point(1,1));
^~~~~~~~~~~~~~
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/chessboard/Chessboard.cc: In member function ‘bool camodocal::Chessboard::findChessboardCornersImproved(const cv::Mat&, const Size&, std::vector<cv::Point_<float> >&, int)’:
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/chessboard/Chessboard.cc:150:43: error: ‘CV_BGR2GRAY’ was not declared in this scope
cv::cvtColor(image, norm_img, CV_BGR2GRAY);
^~~~~~~~~~~
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/chessboard/Chessboard.cc:215:57: note: suggested alternative: ‘CV_WRAP_AS’
cv::Mat kernel1 = cv::getStructuringElement(CV_SHAPE_CROSS, cv::Size(3,3), cv::Point(1,1));
^~~~~~~~~~~~~~
CV_WRAP_AS
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/chessboard/Chessboard.cc:216:57: error: ‘CV_SHAPE_RECT’ was not declared in this scope
cv::Mat kernel2 = cv::getStructuringElement(CV_SHAPE_RECT, cv::Size(3,3), cv::Point(1,1));
^~~~~~~~~~~~~
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/chessboard/Chessboard.cc:320:43: error: ‘CV_TERMCRIT_EPS’ was not declared in this scope
cv::TermCriteria(CV_TERMCRIT_EPS + CV_TERMCRIT_ITER, 30, 0.1));
^~~~~~~~~~~~~~~
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/chessboard/Chessboard.cc:207:67: error: ‘CV_THRESH_BINARY’ was not declared in this scope
cv::threshold(img, thresh_img, thresh_level, 255, CV_THRESH_BINARY);
^~~~~~~~~~~~~~~~
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/chessboard/Chessboard.cc:320:61: error: ‘CV_TERMCRIT_ITER’ was not declared in this scope
cv::TermCriteria(CV_TERMCRIT_EPS + CV_TERMCRIT_ITER, 30, 0.1));
^~~~~~~~~~~~~~~~
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/chessboard/Chessboard.cc:215:57: error: ‘CV_SHAPE_CROSS’ was not declared in this scope
cv::Mat kernel1 = cv::getStructuringElement(CV_SHAPE_CROSS, cv::Size(3,3), cv::Point(1,1));
^~~~~~~~~~~~~~
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/chessboard/Chessboard.cc:215:57: note: suggested alternative: ‘CV_WRAP_AS’
cv::Mat kernel1 = cv::getStructuringElement(CV_SHAPE_CROSS, cv::Size(3,3), cv::Point(1,1));
^~~~~~~~~~~~~~
CV_WRAP_AS
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/chessboard/Chessboard.cc:216:57: error: ‘CV_SHAPE_RECT’ was not declared in this scope
cv::Mat kernel2 = cv::getStructuringElement(CV_SHAPE_RECT, cv::Size(3,3), cv::Point(1,1));
^~~~~~~~~~~~~
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/chessboard/Chessboard.cc:320:43: error: ‘CV_TERMCRIT_EPS’ was not declared in this scope
cv::TermCriteria(CV_TERMCRIT_EPS + CV_TERMCRIT_ITER, 30, 0.1));
^~~~~~~~~~~~~~~
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/chessboard/Chessboard.cc: In member function ‘void camodocal::Chessboard::generateQuads(std::vector<boost::shared_ptr<camodocal::ChessboardQuad> >&, cv::Mat&, int, int, bool)’:
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/chessboard/Chessboard.cc:1175:50: error: ‘CV_RETR_CCOMP’ was not declared in this scope
cv::findContours(image, contours, hierarchy, CV_RETR_CCOMP, CV_CHAIN_APPROX_SIMPLE);
^~~~~~~~~~~~~
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/chessboard/Chessboard.cc:320:61: error: ‘CV_TERMCRIT_ITER’ was not declared in this scope
cv::TermCriteria(CV_TERMCRIT_EPS + CV_TERMCRIT_ITER, 30, 0.1));
^~~~~~~~~~~~~~~~
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/chessboard/Chessboard.cc:1175:65: error: ‘CV_CHAIN_APPROX_SIMPLE’ was not declared in this scope
cv::findContours(image, contours, hierarchy, CV_RETR_CCOMP, CV_CHAIN_APPROX_SIMPLE);
^~~~~~~~~~~~~~~~~~~~~~
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/chessboard/Chessboard.cc: In member function ‘void camodocal::Chessboard::generateQuads(std::vector<boost::shared_ptr<camodocal::ChessboardQuad> >&, cv::Mat&, int, int, bool)’:
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/chessboard/Chessboard.cc:1175:50: error: ‘CV_RETR_CCOMP’ was not declared in this scope
cv::findContours(image, contours, hierarchy, CV_RETR_CCOMP, CV_CHAIN_APPROX_SIMPLE);
^~~~~~~~~~~~~
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/chessboard/Chessboard.cc:1175:65: error: ‘CV_CHAIN_APPROX_SIMPLE’ was not declared in this scope
cv::findContours(image, contours, hierarchy, CV_RETR_CCOMP, CV_CHAIN_APPROX_SIMPLE);
^~~~~~~~~~~~~~~~~~~~~~
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/chessboard/Chessboard.cc: In member function ‘bool camodocal::Chessboard::checkChessboard(const cv::Mat&, cv::Size) const’:
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/chessboard/Chessboard.cc:1586:72: error: ‘CV_THRESH_BINARY’ was not declared in this scope
cv::threshold(white, thresh, threshLevel + blackWhiteGap, 255, CV_THRESH_BINARY);
^~~~~~~~~~~~~~~~
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/chessboard/Chessboard.cc:1592:55: error: ‘CV_RETR_CCOMP’ was not declared in this scope
cv::findContours(thresh, contours, hierarchy, CV_RETR_CCOMP, CV_CHAIN_APPROX_SIMPLE);
^~~~~~~~~~~~~
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/chessboard/Chessboard.cc:1592:70: error: ‘CV_CHAIN_APPROX_SIMPLE’ was not declared in this scope
cv::findContours(thresh, contours, hierarchy, CV_RETR_CCOMP, CV_CHAIN_APPROX_SIMPLE);
^~~~~~~~~~~~~~~~~~~~~~
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/chessboard/Chessboard.cc: In member function ‘bool camodocal::Chessboard::checkChessboard(const cv::Mat&, cv::Size) const’:
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/chessboard/Chessboard.cc:1586:72: error: ‘CV_THRESH_BINARY’ was not declared in this scope
cv::threshold(white, thresh, threshLevel + blackWhiteGap, 255, CV_THRESH_BINARY);
^~~~~~~~~~~~~~~~
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/chessboard/Chessboard.cc:1597:56: error: ‘CV_THRESH_BINARY_INV’ was not declared in this scope
cv::threshold(black, thresh, threshLevel, 255, CV_THRESH_BINARY_INV);
^~~~~~~~~~~~~~~~~~~~
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/chessboard/Chessboard.cc:1592:55: error: ‘CV_RETR_CCOMP’ was not declared in this scope
cv::findContours(thresh, contours, hierarchy, CV_RETR_CCOMP, CV_CHAIN_APPROX_SIMPLE);
^~~~~~~~~~~~~
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/chessboard/Chessboard.cc:1592:70: error: ‘CV_CHAIN_APPROX_SIMPLE’ was not declared in this scope
cv::findContours(thresh, contours, hierarchy, CV_RETR_CCOMP, CV_CHAIN_APPROX_SIMPLE);
^~~~~~~~~~~~~~~~~~~~~~
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/chessboard/Chessboard.cc:1597:56: error: ‘CV_THRESH_BINARY_INV’ was not declared in this scope
cv::threshold(black, thresh, threshLevel, 255, CV_THRESH_BINARY_INV);
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/calib/CameraCalibration.cc: In member function ‘void camodocal::CameraCalibration::drawResults(std::vector<cv::Mat>&) const’:
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/calib/CameraCalibration.cc:236:40: error: ‘CV_GRAY2RGB’ was not declared in this scope
cv::cvtColor(image, image, CV_GRAY2RGB);
^~~~~~~~~~~
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/calib/CameraCalibration.cc:236:40: note: suggested alternative: ‘CV_GRAPH’
cv::cvtColor(image, image, CV_GRAY2RGB);
^~~~~~~~~~~
CV_GRAPH
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/calib/CameraCalibration.cc:254:37: error: ‘CV_AA’ was not declared in this scope
5, green, 2, CV_AA, drawShiftBits);
^~~~~
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/calib/CameraCalibration.cc:254:37: note: suggested alternative: ‘CV_AVX’
5, green, 2, CV_AA, drawShiftBits);
^~~~~
CV_AVX
解决方法
在报错文件上添加头文件 #include <opencv2/imgproc/imgproc_c.h>单独遇到CV_AA的报错时,也可以将 CV_AA 改为 cv::LINE_AA
问题二
编译时报错 error: ‘CV_CALIB_CB_ADAPTIVE_THRESH’ was not declared in this scope 、error: ‘CV_CALIB_CB_NORMALIZE_IMAGE’ was not declared in this scope、error: ‘CV_CALIB_CB_FILTER_QUADS’ was not declared in this scope 和 error: ‘CV_CALIB_CB_FAST_CHECK’ was not declared in this scope
解决方法
将CV_CALIB_CB_ADAPTIVE_THRESH、CV_CALIB_CB_NORMALIZE_IMAGE、CV_CALIB_CB_FILTER_QUADS和CV_CALIB_CB_FAST_CHECK修改为 cv::CALIB_CB_ADAPTIVE_THRESH 、 cv::CALIB_CB_NORMALIZE_IMAGE 、cv::CALIB_CB_FILTER_QUADS 和cv::CALIB_CB_FAST_CHECK
问题三
编译时报错 error: ‘CV_RGB2GRAY’ was not declared in this scope
/home/ubuntu/catkin_ws/src/VINS-Mono/pose_graph/src/ThirdParty/DVision/BRIEF.cpp:53:32: error: ‘CV_RGB2GRAY’ was not declared in this scope cv::cvtColor(image, aux, CV_RGB2GRAY);
^~~~~~~~~~~
/home/ubuntu/catkin_ws/src/VINS-Mono/pose_graph/src/ThirdParty/DVision/BRIEF.cpp:53:32: note: suggested alternative: ‘CV_RGB’ cv::cvtColor(image, aux, CV_RGB2GRAY);
解决方法
在报错文件上添加头文件 #include<opencv2/imgproc/types_c.h>
问题四
编译时遇到报错 error: ‘CV_FONT_HERSHEY_SIMPLEX’ was not declared in this scope
解决方法
将报错文件上的 CV_FONT_HERSHEY_SIMPLEX 参数改为 cv::FONT_HERSHEY_SIMPLEX 查看全部
问题一
- 编译时报错 error: ‘CV_GRAY2RGB’ was not declared in this scope 等
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/chessboard/Chessboard.cc: In constructor ‘camodocal::Chessboard::Chessboard(cv::Size, cv::Mat&)’:
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/chessboard/Chessboard.cc:20:38: error: ‘CV_GRAY2BGR’ was not declared in this scope
cv::cvtColor(image, mSketch, CV_GRAY2BGR);
^~~~~~~~~~~
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/chessboard/Chessboard.cc:26:37: error: ‘CV_BGR2GRAY’ was not declared in this scope
cv::cvtColor(image, mImage, CV_BGR2GRAY);
^~~~~~~~~~~
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/chessboard/Chessboard.cc: In member function ‘bool camodocal::Chessboard::findChessboardCornersImproved(const cv::Mat&, const Size&, std::vector<cv::Point_<float> >&, int)’:
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/chessboard/Chessboard.cc:150:43: error: ‘CV_BGR2GRAY’ was not declared in this scope
cv::cvtColor(image, norm_img, CV_BGR2GRAY);
^~~~~~~~~~~
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/chessboard/Chessboard.cc:207:67: error: ‘CV_THRESH_BINARY’ was not declared in this scope
cv::threshold(img, thresh_img, thresh_level, 255, CV_THRESH_BINARY);
^~~~~~~~~~~~~~~~
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/chessboard/Chessboard.cc: In constructor ‘camodocal::Chessboard::Chessboard(cv::Size, cv::Mat&)’:
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/chessboard/Chessboard.cc:20:38: error: ‘CV_GRAY2BGR’ was not declared in this scope
cv::cvtColor(image, mSketch, CV_GRAY2BGR);
^~~~~~~~~~~
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/chessboard/Chessboard.cc:26:37: error: ‘CV_BGR2GRAY’ was not declared in this scope
cv::cvtColor(image, mImage, CV_BGR2GRAY);
^~~~~~~~~~~
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/chessboard/Chessboard.cc:215:57: error: ‘CV_SHAPE_CROSS’ was not declared in this scope
cv::Mat kernel1 = cv::getStructuringElement(CV_SHAPE_CROSS, cv::Size(3,3), cv::Point(1,1));
^~~~~~~~~~~~~~
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/chessboard/Chessboard.cc: In member function ‘bool camodocal::Chessboard::findChessboardCornersImproved(const cv::Mat&, const Size&, std::vector<cv::Point_<float> >&, int)’:
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/chessboard/Chessboard.cc:150:43: error: ‘CV_BGR2GRAY’ was not declared in this scope
cv::cvtColor(image, norm_img, CV_BGR2GRAY);
^~~~~~~~~~~
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/chessboard/Chessboard.cc:215:57: note: suggested alternative: ‘CV_WRAP_AS’
cv::Mat kernel1 = cv::getStructuringElement(CV_SHAPE_CROSS, cv::Size(3,3), cv::Point(1,1));
^~~~~~~~~~~~~~
CV_WRAP_AS
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/chessboard/Chessboard.cc:216:57: error: ‘CV_SHAPE_RECT’ was not declared in this scope
cv::Mat kernel2 = cv::getStructuringElement(CV_SHAPE_RECT, cv::Size(3,3), cv::Point(1,1));
^~~~~~~~~~~~~
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/chessboard/Chessboard.cc:320:43: error: ‘CV_TERMCRIT_EPS’ was not declared in this scope
cv::TermCriteria(CV_TERMCRIT_EPS + CV_TERMCRIT_ITER, 30, 0.1));
^~~~~~~~~~~~~~~
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/chessboard/Chessboard.cc:207:67: error: ‘CV_THRESH_BINARY’ was not declared in this scope
cv::threshold(img, thresh_img, thresh_level, 255, CV_THRESH_BINARY);
^~~~~~~~~~~~~~~~
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/chessboard/Chessboard.cc:320:61: error: ‘CV_TERMCRIT_ITER’ was not declared in this scope
cv::TermCriteria(CV_TERMCRIT_EPS + CV_TERMCRIT_ITER, 30, 0.1));
^~~~~~~~~~~~~~~~
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/chessboard/Chessboard.cc:215:57: error: ‘CV_SHAPE_CROSS’ was not declared in this scope
cv::Mat kernel1 = cv::getStructuringElement(CV_SHAPE_CROSS, cv::Size(3,3), cv::Point(1,1));
^~~~~~~~~~~~~~
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/chessboard/Chessboard.cc:215:57: note: suggested alternative: ‘CV_WRAP_AS’
cv::Mat kernel1 = cv::getStructuringElement(CV_SHAPE_CROSS, cv::Size(3,3), cv::Point(1,1));
^~~~~~~~~~~~~~
CV_WRAP_AS
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/chessboard/Chessboard.cc:216:57: error: ‘CV_SHAPE_RECT’ was not declared in this scope
cv::Mat kernel2 = cv::getStructuringElement(CV_SHAPE_RECT, cv::Size(3,3), cv::Point(1,1));
^~~~~~~~~~~~~
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/chessboard/Chessboard.cc:320:43: error: ‘CV_TERMCRIT_EPS’ was not declared in this scope
cv::TermCriteria(CV_TERMCRIT_EPS + CV_TERMCRIT_ITER, 30, 0.1));
^~~~~~~~~~~~~~~
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/chessboard/Chessboard.cc: In member function ‘void camodocal::Chessboard::generateQuads(std::vector<boost::shared_ptr<camodocal::ChessboardQuad> >&, cv::Mat&, int, int, bool)’:
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/chessboard/Chessboard.cc:1175:50: error: ‘CV_RETR_CCOMP’ was not declared in this scope
cv::findContours(image, contours, hierarchy, CV_RETR_CCOMP, CV_CHAIN_APPROX_SIMPLE);
^~~~~~~~~~~~~
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/chessboard/Chessboard.cc:320:61: error: ‘CV_TERMCRIT_ITER’ was not declared in this scope
cv::TermCriteria(CV_TERMCRIT_EPS + CV_TERMCRIT_ITER, 30, 0.1));
^~~~~~~~~~~~~~~~
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/chessboard/Chessboard.cc:1175:65: error: ‘CV_CHAIN_APPROX_SIMPLE’ was not declared in this scope
cv::findContours(image, contours, hierarchy, CV_RETR_CCOMP, CV_CHAIN_APPROX_SIMPLE);
^~~~~~~~~~~~~~~~~~~~~~
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/chessboard/Chessboard.cc: In member function ‘void camodocal::Chessboard::generateQuads(std::vector<boost::shared_ptr<camodocal::ChessboardQuad> >&, cv::Mat&, int, int, bool)’:
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/chessboard/Chessboard.cc:1175:50: error: ‘CV_RETR_CCOMP’ was not declared in this scope
cv::findContours(image, contours, hierarchy, CV_RETR_CCOMP, CV_CHAIN_APPROX_SIMPLE);
^~~~~~~~~~~~~
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/chessboard/Chessboard.cc:1175:65: error: ‘CV_CHAIN_APPROX_SIMPLE’ was not declared in this scope
cv::findContours(image, contours, hierarchy, CV_RETR_CCOMP, CV_CHAIN_APPROX_SIMPLE);
^~~~~~~~~~~~~~~~~~~~~~
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/chessboard/Chessboard.cc: In member function ‘bool camodocal::Chessboard::checkChessboard(const cv::Mat&, cv::Size) const’:
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/chessboard/Chessboard.cc:1586:72: error: ‘CV_THRESH_BINARY’ was not declared in this scope
cv::threshold(white, thresh, threshLevel + blackWhiteGap, 255, CV_THRESH_BINARY);
^~~~~~~~~~~~~~~~
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/chessboard/Chessboard.cc:1592:55: error: ‘CV_RETR_CCOMP’ was not declared in this scope
cv::findContours(thresh, contours, hierarchy, CV_RETR_CCOMP, CV_CHAIN_APPROX_SIMPLE);
^~~~~~~~~~~~~
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/chessboard/Chessboard.cc:1592:70: error: ‘CV_CHAIN_APPROX_SIMPLE’ was not declared in this scope
cv::findContours(thresh, contours, hierarchy, CV_RETR_CCOMP, CV_CHAIN_APPROX_SIMPLE);
^~~~~~~~~~~~~~~~~~~~~~
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/chessboard/Chessboard.cc: In member function ‘bool camodocal::Chessboard::checkChessboard(const cv::Mat&, cv::Size) const’:
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/chessboard/Chessboard.cc:1586:72: error: ‘CV_THRESH_BINARY’ was not declared in this scope
cv::threshold(white, thresh, threshLevel + blackWhiteGap, 255, CV_THRESH_BINARY);
^~~~~~~~~~~~~~~~
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/chessboard/Chessboard.cc:1597:56: error: ‘CV_THRESH_BINARY_INV’ was not declared in this scope
cv::threshold(black, thresh, threshLevel, 255, CV_THRESH_BINARY_INV);
^~~~~~~~~~~~~~~~~~~~
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/chessboard/Chessboard.cc:1592:55: error: ‘CV_RETR_CCOMP’ was not declared in this scope
cv::findContours(thresh, contours, hierarchy, CV_RETR_CCOMP, CV_CHAIN_APPROX_SIMPLE);
^~~~~~~~~~~~~
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/chessboard/Chessboard.cc:1592:70: error: ‘CV_CHAIN_APPROX_SIMPLE’ was not declared in this scope
cv::findContours(thresh, contours, hierarchy, CV_RETR_CCOMP, CV_CHAIN_APPROX_SIMPLE);
^~~~~~~~~~~~~~~~~~~~~~
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/chessboard/Chessboard.cc:1597:56: error: ‘CV_THRESH_BINARY_INV’ was not declared in this scope
cv::threshold(black, thresh, threshLevel, 255, CV_THRESH_BINARY_INV);
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/calib/CameraCalibration.cc: In member function ‘void camodocal::CameraCalibration::drawResults(std::vector<cv::Mat>&) const’:
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/calib/CameraCalibration.cc:236:40: error: ‘CV_GRAY2RGB’ was not declared in this scope
cv::cvtColor(image, image, CV_GRAY2RGB);
^~~~~~~~~~~
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/calib/CameraCalibration.cc:236:40: note: suggested alternative: ‘CV_GRAPH’
cv::cvtColor(image, image, CV_GRAY2RGB);
^~~~~~~~~~~
CV_GRAPH
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/calib/CameraCalibration.cc:254:37: error: ‘CV_AA’ was not declared in this scope
5, green, 2, CV_AA, drawShiftBits);
^~~~~
/home/ubuntu/catkin_ws/src/VINS-Mono/camera_model/src/calib/CameraCalibration.cc:254:37: note: suggested alternative: ‘CV_AVX’
5, green, 2, CV_AA, drawShiftBits);
^~~~~
CV_AVX
解决方法
- 在报错文件上添加头文件 #include <opencv2/imgproc/imgproc_c.h>
- 单独遇到CV_AA的报错时,也可以将 CV_AA 改为 cv::LINE_AA
问题二
- 编译时报错 error: ‘CV_CALIB_CB_ADAPTIVE_THRESH’ was not declared in this scope 、error: ‘CV_CALIB_CB_NORMALIZE_IMAGE’ was not declared in this scope、error: ‘CV_CALIB_CB_FILTER_QUADS’ was not declared in this scope 和 error: ‘CV_CALIB_CB_FAST_CHECK’ was not declared in this scope
解决方法
- 将CV_CALIB_CB_ADAPTIVE_THRESH、CV_CALIB_CB_NORMALIZE_IMAGE、CV_CALIB_CB_FILTER_QUADS和CV_CALIB_CB_FAST_CHECK修改为 cv::CALIB_CB_ADAPTIVE_THRESH 、 cv::CALIB_CB_NORMALIZE_IMAGE 、cv::CALIB_CB_FILTER_QUADS 和cv::CALIB_CB_FAST_CHECK
问题三
- 编译时报错 error: ‘CV_RGB2GRAY’ was not declared in this scope
/home/ubuntu/catkin_ws/src/VINS-Mono/pose_graph/src/ThirdParty/DVision/BRIEF.cpp:53:32: error: ‘CV_RGB2GRAY’ was not declared in this scope cv::cvtColor(image, aux, CV_RGB2GRAY);
^~~~~~~~~~~
/home/ubuntu/catkin_ws/src/VINS-Mono/pose_graph/src/ThirdParty/DVision/BRIEF.cpp:53:32: note: suggested alternative: ‘CV_RGB’ cv::cvtColor(image, aux, CV_RGB2GRAY);
解决方法
- 在报错文件上添加头文件 #include<opencv2/imgproc/types_c.h>
问题四
- 编译时遇到报错 error: ‘CV_FONT_HERSHEY_SIMPLEX’ was not declared in this scope
解决方法
- 将报错文件上的 CV_FONT_HERSHEY_SIMPLEX 参数改为 cv::FONT_HERSHEY_SIMPLEX
Ubuntu1804上源码安装cartographer问题整理
Linux系统相关 • lalala 发表了文章 • 0 个评论 • 7249 次浏览 • 2020-08-18 13:19
本文章整理了ubuntu1804上源码安装cartographer问题
问题一
测试环境:Jetson Xavier NX+ Jetpack4.4 + Ubuntu 1804 + ROS Melodic
编译时出现缺少absl包
-- Found GMock: gmock_main;-lpthread
CMake Error at CMakeLists.txt:32 (find_package):
By not providing "Findabsl.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "absl", but
CMake did not find one.
Could not find a package configuration file provided by "absl" with any of
the following names:
abslConfig.cmake
absl-config.cmake
Add the installation prefix of "absl" to CMAKE_PREFIX_PATH or set
"absl_DIR" to a directory containing one of the above files. If "absl"
provides a separate development package or SDK, be sure it has been
installed.解决方法
在下载回来的cartographer上有安装absl的脚本
$ sudo apt-get install stow
$ sudo chmod +x ~/cartographer_ws/src/cartographer/scriptsinstall_abseil.sh
$ cd ~/cartographer_ws/src/cartographer/scripts
$ ./install_abseil.sh问题二
测试环境:Jetson Xavier NX+ Jetpack4.4 + Ubuntu 1804 + ROS Melodic 更新时遇到错误
ubuntu@ubuntu:~/cartographer_ws$ rosdep install --from-paths src --ignore-src --rosdistro=melodic -y -i
ERROR: the following packages/stacks could not have their rosdep keys resolved
to system dependencies:
cartographer_turtlebot: Cannot locate rosdep definition for [turtlebot_bringup]解决方法
https://wenda.ncnynl.com/question/116424 查看全部
- 本文章整理了ubuntu1804上源码安装cartographer问题
问题一
- 测试环境:Jetson Xavier NX+ Jetpack4.4 + Ubuntu 1804 + ROS Melodic
- 编译时出现缺少absl包
-- Found GMock: gmock_main;-lpthread解决方法
CMake Error at CMakeLists.txt:32 (find_package):
By not providing "Findabsl.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "absl", but
CMake did not find one.
Could not find a package configuration file provided by "absl" with any of
the following names:
abslConfig.cmake
absl-config.cmake
Add the installation prefix of "absl" to CMAKE_PREFIX_PATH or set
"absl_DIR" to a directory containing one of the above files. If "absl"
provides a separate development package or SDK, be sure it has been
installed.
- 在下载回来的cartographer上有安装absl的脚本
$ sudo apt-get install stow问题二
$ sudo chmod +x ~/cartographer_ws/src/cartographer/scriptsinstall_abseil.sh
$ cd ~/cartographer_ws/src/cartographer/scripts
$ ./install_abseil.sh
- 测试环境:Jetson Xavier NX+ Jetpack4.4 + Ubuntu 1804 + ROS Melodic
- 更新时遇到错误
ubuntu@ubuntu:~/cartographer_ws$ rosdep install --from-paths src --ignore-src --rosdistro=melodic -y -i解决方法
ERROR: the following packages/stacks could not have their rosdep keys resolved
to system dependencies:
cartographer_turtlebot: Cannot locate rosdep definition for [turtlebot_bringup]