ORB_SLAM icon indicating copy to clipboard operation
ORB_SLAM copied to clipboard

Error during make Indigo

Open husdo opened this issue 9 years ago • 7 comments

Hi, I got that error message during the ORB_SLAM make. I've done everything like in the manual.

Regards, husdo

/opt/ros/indigo/share/ORB_SLAM/Thirdparty/DBoW2/DBoW2/TemplatedVocabulary.h: In instantiation of ‘DBoW2::TemplatedVocabulary<TDescriptor, F>::~TemplatedVocabulary() [with TDescriptor = cv::Mat; F = DBoW2::FORB]’: /opt/ros/indigo/share/ORB_SLAM/src/main.cc:86:29: required from here /opt/ros/indigo/share/ORB_SLAM/Thirdparty/DBoW2/DBoW2/TemplatedVocabulary.h:510:3: warning: deleting object of abstract class type ‘DBoW2::GeneralScoring’ which has non-virtual destructor will cause undefined behaviour [-Wdelete-non-virtual-dtor] delete m_scoring_object; ^ /opt/ros/indigo/share/ORB_SLAM/Thirdparty/DBoW2/DBoW2/TemplatedVocabulary.h: In instantiation of ‘void DBoW2::TemplatedVocabulary<TDescriptor, F>::createScoringObject() [with TDescriptor = cv::Mat; F = DBoW2::FORB]’: /opt/ros/indigo/share/ORB_SLAM/Thirdparty/DBoW2/DBoW2/TemplatedVocabulary.h:420:23: required from ‘DBoW2::TemplatedVocabulary<TDescriptor, F>::TemplatedVocabulary(int, int, DBoW2::WeightingType, DBoW2::ScoringType) [with TDescriptor = cv::Mat; F = DBoW2::FORB]’ /opt/ros/indigo/share/ORB_SLAM/src/main.cc:86:29: required from here /opt/ros/indigo/share/ORB_SLAM/Thirdparty/DBoW2/DBoW2/TemplatedVocabulary.h:446:3: warning: deleting object of abstract class type ‘DBoW2::GeneralScoring’ which has non-virtual destructor will cause undefined behaviour [-Wdelete-non-virtual-dtor] delete m_scoring_object; ^ [ 11%] Building CXX object CMakeFiles/ORB_SLAM.dir/src/Tracking.cc.o [ 16%] Building CXX object CMakeFiles/ORB_SLAM.dir/src/LocalMapping.cc.o [ 22%] Building CXX object CMakeFiles/ORB_SLAM.dir/src/LoopClosing.cc.o [ 27%] Building CXX object CMakeFiles/ORB_SLAM.dir/src/ORBextractor.cc.o /opt/ros/indigo/share/ORB_SLAM/src/ORBextractor.cc: In member function ‘void ORB_SLAM::ORBextractor::ComputeKeyPoints(std::vectorstd::vector<cv::KeyPoint >&)’: /opt/ros/indigo/share/ORB_SLAM/src/ORBextractor.cc:606:63: error: ‘FAST’ was not declared in this scope FAST(cellImage,cellKeyPoints[i][j],fastTh,true); ^ /opt/ros/indigo/share/ORB_SLAM/src/ORBextractor.cc:615:34: error: ‘ORB’ has not been declared if( scoreType == ORB::HARRIS_SCORE ) ^ /opt/ros/indigo/share/ORB_SLAM/src/ORBextractor.cc:682:17: error: ‘KeyPointsFilter’ has not been declared KeyPointsFilter::retainBest(keysCell,nToRetain[i][j]); ^ /opt/ros/indigo/share/ORB_SLAM/src/ORBextractor.cc:698:13: error: ‘KeyPointsFilter’ has not been declared KeyPointsFilter::retainBest(keypoints,nDesiredFeatures); ^ /opt/ros/indigo/share/ORB_SLAM/src/ORBextractor.cc: In member function ‘void ORB_SLAM::ORBextractor::operator()(cv::InputArray, cv::InputArray, std::vectorcv::KeyPoint&, cv::OutputArray)’: /opt/ros/indigo/share/ORB_SLAM/src/ORBextractor.cc:759:82: error: ‘GaussianBlur’ was not declared in this scope GaussianBlur(workingMat, workingMat, Size(7, 7), 2, 2, BORDER_REFLECT_101); ^ /opt/ros/indigo/share/ORB_SLAM/src/ORBextractor.cc: In member function ‘void ORB_SLAM::ORBextractor::ComputePyramid(cv::Mat, cv::Mat)’: /opt/ros/indigo/share/ORB_SLAM/src/ORBextractor.cc:799:78: error: ‘INTER_LINEAR’ was not declared in this scope resize(mvImagePyramid[level-1], mvImagePyramid[level], sz, 0, 0, INTER_LINEAR); ^ /opt/ros/indigo/share/ORB_SLAM/src/ORBextractor.cc:799:90: error: ‘resize’ was not declared in this scope resize(mvImagePyramid[level-1], mvImagePyramid[level], sz, 0, 0, INTER_LINEAR); ^ /opt/ros/indigo/share/ORB_SLAM/src/ORBextractor.cc:802:80: error: ‘INTER_NEAREST’ was not declared in this scope resize(mvMaskPyramid[level-1], mvMaskPyramid[level], sz, 0, 0, INTER_NEAREST); ^ make[2]: *** [CMakeFiles/ORB_SLAM.dir/src/ORBextractor.cc.o] Error 1 make[1]: *** [CMakeFiles/ORB_SLAM.dir/all] Error 2 make: *** [all] Error 2

husdo avatar Jul 06 '15 18:07 husdo

I personally solved it by loading synaptic, searching for ros-indigo and selecting every package that was installed. Then I marked them for complete removal, and then apply.

Then go to the bottom of your ~/.bashrc and remove all lines related to ROS.

And now, go through the install procedure as listed on ROS website.

That solved the problem of OpenCV libs not working for me.

jwcrawley avatar Jul 07 '15 12:07 jwcrawley

I was able to fix this by adding

#include <opencv2/opencv.hpp>

to the top of ORB_SLAM/src/ORBextractor.cc. My opencv library didn't have the header files

#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>

which were in ORB_SLAM/src/ORBextractor.cc, but after looking I found that

#include <opencv2/opencv.hpp> 

had them. I think this was a problem for me because I am trying to run 15.04 on jade

aaronma37 avatar Aug 13 '15 19:08 aaronma37

I had the same problem in 14.04 on Indigo. aaronma37's suggestion solved my problem!

marcelinomalmeidan avatar Feb 02 '16 22:02 marcelinomalmeidan

aaronma37's suggestion solved same problem in 16.04

yanyan-li avatar Jun 19 '17 12:06 yanyan-li

I had same problem with aaronma37,and his method works. My ubuntu is 14.04.

JeffYoung17 avatar Jul 14 '17 04:07 JeffYoung17

aaronma37 solution works for 16.04Ubuntu on Kinetic

gandhiRobo avatar Apr 22 '18 09:04 gandhiRobo

aaronma37 solution works for 18.04Ubuntu on Melodic

ckchng avatar Nov 04 '19 05:11 ckchng