Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error during make Indigo #44

Open
husdo opened this issue Jul 6, 2015 · 7 comments
Open

Error during make Indigo #44

husdo opened this issue Jul 6, 2015 · 7 comments

Comments

@husdo
Copy link

husdo commented Jul 6, 2015

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

@jwcrawley
Copy link

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.

@aaronma37
Copy link

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

@marcelinomalmeidan
Copy link

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

@yanyan-li
Copy link

aaronma37's suggestion solved same problem in 16.04

@JeffYoung17
Copy link

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

icoderaven added a commit to rislab/ORB_SLAM2 that referenced this issue Oct 4, 2017
@gandhiRobo
Copy link

aaronma37 solution works for 16.04Ubuntu on Kinetic

@ckchng
Copy link

ckchng commented Nov 4, 2019

aaronma37 solution works for 18.04Ubuntu on Melodic

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants