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

RGBDSLAM v2 errors on catkin_make #31

Closed
KaiserUDM opened this issue May 1, 2016 · 25 comments
Closed

RGBDSLAM v2 errors on catkin_make #31

KaiserUDM opened this issue May 1, 2016 · 25 comments

Comments

@KaiserUDM
Copy link

I'm basically having this same issue http://answers.opencv.org/question/34814/help-with-headercode-adaptation-of-rgbdslam/
I can't find a way to resolve it for the life of me. I have edit the files to include #include and I get the same errors every time. Any insight into this issue would be amazing

@felixendres
Copy link
Owner

The main problem I see for porting rgbdslam_v2 to OpenCV3, is that the code in feature_adjuster.* uses OpenCV2 base classes that do not exist in OpenCV3. Everything else is of minor difficulty.

The "right" way to handle this would be to write a general threshold adjuster and gridded detector as the one in the mentioned file and propose it as a patch to OpenCV. I have no idea why they got rid of the original functionality (except that it was very bad for processing of image streams), but I think it is of general interest, as most people still set fixed thresholds.

@KaiserUDM
Copy link
Author

I just started getting these errors on Sunday. Took me a while to realize that the base class was missing. Also to fix my issue I just changed all the cv::vectors to std::vector. That shouldn't break anything correct?

@felixendres
Copy link
Owner

felixendres commented May 3, 2016

As far as I know, that works. By the way, there is not much functionality
provided by these Adjuster base classes that is not overridden. So maybe they
can be changed to directly inherit from FeatureDetector.

@revilokeb
Copy link

@KaiserUDM I am also running on OpenCV3.1 (Ubuntu 14.04 / indigo). Consequentially I am also getting cv::Vector / AdjusterAdapter errors. Have you managed to write a general threshold adjuster? Do the above adjustments go through, i.e. did you get rgbdslam running with OpenCV3?

@felixendres
Copy link
Owner

I quickly tried search and replace cv::AdjusterAdapter -> DetectorAdjuster and cv::vector -> std::vector, which solved the initial compiler errors. However, I ran into new problems, which I currently haven't got the time to solve.

@bruderjakob12
Copy link

Any update on the issue?

@Bis123
Copy link

Bis123 commented Nov 1, 2016

I have the same issue.
Right now I have installed openCv 2.4.8 .
I am getting the following errors.

/home/SLAM/ws/src/rgbdslam/src/sift_gpu_wrapper.h:49:40: error: ‘cv::vector’ has not been declared
void detect(const cv::Mat& image, cv::vectorcv::KeyPoint& keypoints, std::vector& descriptors, const cv::Mat& mask = cv::Mat()) const;
^
/home/SLAM/ws/src/rgbdslam/src/sift_gpu_wrapper.h:49:46: error: expected ‘,’ or ‘...’ before ‘<’ token
void detect(const cv::Mat& image, cv::vectorcv::KeyPoint& keypoints, std::vector& descriptors, const cv::Mat& mask = cv::Mat()) const;
^
/home/SLAM/ws/src/rgbdslam/src/node.cpp: In constructor ‘Node::Node(const cv::Mat&, const cv::Mat&, const cv::Mat&, const CameraInfoConstPtr&, myHeader, cv::Ptrcv::Feature2D, cv::Ptrcv::Feature2D)’:
/home/SLAM/ws/src/rgbdslam/src/node.cpp:144:43: error: ‘cvtColor’ was not declared in this scope
cvtColor(visual, gray_img, CV_RGB2GRAY);
^
/home/SLAM/ws/src/rgbdslam/src/node.cpp:155:65: error: no matching function for call to ‘SiftGPUWrapper::detect(cv::Mat&, std::vectorcv::KeyPoint&, std::vector&)’
siftgpu->detect(gray_img, feature_locations_2d_, descriptors);
^
/home/SLAM/ws/src/rgbdslam/src/node.cpp:155:65: note: candidate is:
In file included from /home/sfm/Bisna/SLAM/ws/src/rgbdslam/src/node.cpp:32:0:
/home/SLAM/ws/src/rgbdslam/src/sift_gpu_wrapper.h:49:7: note: void SiftGPUWrapper::detect(const cv::Mat&, int) const
void detect(const cv::Mat& image, cv::vectorcv::KeyPoint& keypoints, std::vector& descriptors, const cv::Mat& mask = cv::Mat()) const;
^
/home/SLAM/ws/src/rgbdslam/src/sift_gpu_wrapper.h:49:7: note: candidate expects 2 arguments, 3 provided
/home/SLAM/ws/src/rgbdslam/src/node.cpp:174:67: error: no matching function for call to ‘SiftGPUWrapper::detect(cv::Mat&, std::vectorcv::KeyPoint&, std::vector&)’
siftgpu->detect(gray_img, feature_locations_2d_, descriptors);
^
/home/SLAM/ws/src/rgbdslam/src/node.cpp:174:67: note: candidate is:
In file included from /home/sfm/Bisna/SLAM/ws/src/rgbdslam/src/node.cpp:32:0:
/home/SLAM/ws/src/rgbdslam/src/sift_gpu_wrapper.h:49:7: note: void SiftGPUWrapper::detect(const cv::Mat&, int) const
void detect(const cv::Mat& image, cv::vectorcv::KeyPoint& keypoints, std::vector& descriptors, const cv::Mat& mask = cv::Mat()) const;
^
/home/SLAM/ws/src/rgbdslam/src/sift_gpu_wrapper.h:49:7: note: candidate expects 2 arguments, 3 provided
/home/SLAM/ws/src/rgbdslam/src/node.cpp: In constructor ‘Node::Node(cv::Mat, cv::Ptrcv::Feature2D, cv::Ptrcv::Feature2D, pcl::PointCloudpcl::PointXYZRGB::Ptr, cv::Mat)’:
/homeSLAM/ws/src/rgbdslam/src/node.cpp:278:71: error: ‘cvtColor’ was not declared in this scope
if(visual.type() == CV_8UC3){ cvtColor(visual, gray_img, CV_RGB2GRAY); }
^
/home/SLAM/ws/src/rgbdslam/src/node.cpp:287:65: error: no matching function for call to ‘SiftGPUWrapper::detect(cv::Mat&, std::vectorcv::KeyPoint&, std::vector&)’
siftgpu->detect(gray_img, feature_locations_2d_, descriptors);
^
/home/SLAM/ws/src/rgbdslam/src/node.cpp:287:65: note: candidate is:
In file included from /home/sfm/Bisna/SLAM/ws/src/rgbdslam/src/node.cpp:32:0:
/home/SLAM/ws/src/rgbdslam/src/sift_gpu_wrapper.h:49:7: note: void SiftGPUWrapper::detect(const cv::Mat&, int) const
void detect(const cv::Mat& image, cv::vectorcv::KeyPoint& keypoints, std::vector& descriptors, const cv::Mat& mask = cv::Mat()) const;
^
/home/SLAM/ws/src/rgbdslam/src/sift_gpu_wrapper.h:49:7: note: candidate expects 2 arguments, 3 provided
In file included from /home/SLAM/ws/src/rgbdslam/src/misc.cpp:41:0:
/home/SLAM/ws/src/rgbdslam/src/aorb.h:65:56: error: ‘vector’ has not been declared
void operator()(InputArray image, InputArray mask, vector& keypoints) const;
^
/home/SLAM/ws/src/rgbdslam/src/aorb.h:65:62: error: expected ‘,’ or ‘...’ before ‘<’ token
void operator()(InputArray image, InputArray mask, vector& keypoints) const;
^
/home/SLAM/ws/src/rgbdslam/src/aorb.h:68:57: error: ‘vector’ has not been declared
void operator()( InputArray image, InputArray mask, vector& keypoints,
^
/home/SLAM/ws/src/rgbdslam/src/aorb.h:68:63: error: expected ‘,’ or ‘...’ before ‘<’ token
void operator()( InputArray image, InputArray mask, vector& keypoints,
^
/home/SLAM/ws/src/rgbdslam/src/aorb.h:68:10: error: ‘void cv::AORB::operator()(cv::InputArray, cv::InputArray, int) const’ cannot be overloaded
void operator()( InputArray image, InputArray mask, vector& keypoints,
^
/home/SLAM/ws/src/rgbdslam/src/aorb.h:65:10: error: with ‘void cv::AORB::operator()(cv::InputArray, cv::InputArray, int) const’
void operator()(InputArray image, InputArray mask, vector& keypoints) const;
^
/home/SLAM/ws/src/rgbdslam/src/aorb.h:71:5: error: ‘AlgorithmInfo’ does not name a type
AlgorithmInfo* info() const;
^
/home/SLAM/ws/src/rgbdslam/src/aorb.h:75:41: error: ‘vector’ has not been declared
void computeImpl( const Mat& image, vector& keypoints, Mat& descriptors ) const;
^
/home/SLAM/ws/src/rgbdslam/src/aorb.h:75:47: error: expected ‘,’ or ‘...’ before ‘<’ token
void computeImpl( const Mat& image, vector& keypoints, Mat& descriptors ) const;
^
/home/SLAM/ws/src/rgbdslam/src/aorb.h:76:40: error: ‘vector’ has not been declared
void detectImpl( const Mat& image, vector& keypoints, const Mat& mask=Mat() ) const;
^
/home/
SLAM/ws/src/rgbdslam/src/aorb.h:76:46: error: expected ‘,’ or ‘...’ before ‘<’ token
void detectImpl( const Mat& image, vector& keypoints, const Mat& mask=Mat() ) const;

@felixendres
Copy link
Owner

Actually this looks like you are not building against OpenCV 2.4.8, but 3.0.

@blankered
Copy link

blankered commented Nov 8, 2016

@felixendres I have been working through the compiler errors with RGBD_v2 on my system which is Ubuntu 16 with ROS Kinetic, QT5, and openCV3. I have gotten pretty far but I can't find an alternative to the AdjusterAdapter member because OpenCV3 I guess did away with it. I am unable to find an alternative to this one hiccup.

EDIT: I just read your comment to update cv::AdjusterAdapter -> DetectorAdjuster

@felixendres
Copy link
Owner

IIRC this is a major hiccup. Anyway, I would give it another go. Would you share your changes, so I can try to work from there towards an OpenCV3 reimplementation of the Gridded Adjuster?

@blankered
Copy link

@felixendres I have merely implemented your changes to fix the compiler errors. @fradelg fork looks as though he has completed much more in terms of making changes to update to QT5 and OpenCV3. I tried compiling his fork but had many compiler errors. If you want, I can try to debug the compiler errors from his version and then post his fork.

@felixendres
Copy link
Owner

I have tried to migrate to qt5, opencv3. See the branch "kinetic" (it probably isn't kinetic-specific, but I have only kinetic installed). It compiles fine, but crashes on startup!
The problem is the one of issue #8:

  • g2o requires code to be built with c++11
  • pcl will cause a SIGSEV on startup if code is built with the c++11 flag
  • The central class (and others) of rgbdslam has pcl and g2o includes

Therefore rgbdslam cannot work without changing either g2o or pcl.

In #8 is a description how to make it work by recompiling pcl with C++11. I didn't do that yet, so I don't know whether my changes actually work. It would be great if someone could try to take this further.

@felixendres
Copy link
Owner

I made a c++03 fork of g2o (see my g2o fork, branch "c++03") and updated the rgbdslam_v2 kinetic branch, so you can export the environment variable $G2O_DIR to where you installed the g2o from that branch to (e.g., using make install, possibly with $CMAKE_INSTALL_PREFIX env. var. set). Then build rgbdslam_v2 as usual.

While it compiles and "runs" there is some OpenCV error which I couldn't solve for now. Maybe next week.

@psembere
Copy link

psembere commented Dec 1, 2016

@felixendres I have also problems to build RGBD-SLAM from branch Kinetic on clean Ubuntu 16.04 with ROS Kinetic.

When I try to build custom g2o c++03 fork from https://github.com/felixendres/g2o/tree/c++03 you mentioned in this commit c26e9b7 I have errors printed below:

Scanning dependencies of target circle_fit
[ 71%] Building CXX object g2o/examples/data_fitting/CMakeFiles/circle_fit.dir/circle_fit.cpp.o
In file included from /usr/include/c++/5/random:35:0,
from /home/ubuntu/catkin_ws/src/g2o/g2o/stuff/sampler.h:38,
from /home/ubuntu/catkin_ws/src/g2o/g2o/examples/data_fitting/circle_fit.cpp:32:
/usr/include/c++/5/bits/c++0x_warning.h:32:2: error: #error This file requires compiler and library support for the ISO C++ 2011 standard. This support must be enabled with the -std=c++11 or -std=gnu++11 compiler options.
#error This file requires compiler and library support
^
In file included from /home/ubuntu/catkin_ws/src/g2o/g2o/examples/data_fitting/circle_fit.cpp:32:0:
/home/ubuntu/catkin_ws/src/g2o/g2o/stuff/sampler.h:44:71: error: ‘std::mt19937’ has not been declared
double G2O_STUFF_API sampleUniform(double min=0, double max=1, std::mt19937* generator=0);
^
/home/ubuntu/catkin_ws/src/g2o/g2o/stuff/sampler.h:45:39: error: ‘mt19937’ is not a member of ‘std’
double G2O_STUFF_API sampleGaussian(std::mt19937* generator = 0);
^
/home/ubuntu/catkin_ws/src/g2o/g2o/stuff/sampler.h:45:53: error: ‘generator’ was not declared in this scope
double G2O_STUFF_API sampleGaussian(std::mt19937* generator = 0);
^
/home/ubuntu/catkin_ws/src/g2o/g2o/stuff/sampler.h:83:10: error: ‘mt19937’ in namespace ‘std’ does not name a type
std::mt19937* _generator;
^
/home/ubuntu/catkin_ws/src/g2o/g2o/stuff/sampler.h: In constructor ‘g2o::GaussianSampler<SampleType, CovarianceType>::GaussianSampler(bool)’:
/home/ubuntu/catkin_ws/src/g2o/g2o/stuff/sampler.h:51:7: error: class ‘g2o::GaussianSampler<SampleType, CovarianceType>’ does not have any field named ‘_generator’
_generator(0)
^
/home/ubuntu/catkin_ws/src/g2o/g2o/stuff/sampler.h:54:9: error: ‘_generator’ was not declared in this scope
_generator = new std::mt19937;
^
/home/ubuntu/catkin_ws/src/g2o/g2o/stuff/sampler.h:54:31: error: ‘mt19937’ in namespace ‘std’ does not name a type
_generator = new std::mt19937;
^
/home/ubuntu/catkin_ws/src/g2o/g2o/stuff/sampler.h: In destructor ‘g2o::GaussianSampler<SampleType, CovarianceType>::~GaussianSampler()’:
/home/ubuntu/catkin_ws/src/g2o/g2o/stuff/sampler.h:58:14: error: ‘_generator’ was not declared in this scope
delete _generator;
^
/home/ubuntu/catkin_ws/src/g2o/g2o/stuff/sampler.h: In member function ‘SampleType g2o::GaussianSampler<SampleType, CovarianceType>::generateSample()’:
/home/ubuntu/catkin_ws/src/g2o/g2o/stuff/sampler.h:70:17: error: ‘_generator’ was not declared in this scope
s(i) = (_generator) ? sampleGaussian(_generator) : sampleGaussian();
^
/home/ubuntu/catkin_ws/src/g2o/g2o/stuff/sampler.h:70:56: error: ‘g2o::sampleGaussian’ cannot be used as a function
s(i) = (_generator) ? sampleGaussian(_generator) : sampleGaussian();
^
/home/ubuntu/catkin_ws/src/g2o/g2o/stuff/sampler.h:70:75: error: ‘g2o::sampleGaussian’ cannot be used as a function
s(i) = (_generator) ? sampleGaussian(_generator) : sampleGaussian();
^
/home/ubuntu/catkin_ws/src/g2o/g2o/stuff/sampler.h: In member function ‘bool g2o::GaussianSampler<SampleType, CovarianceType>::seed(int)’:
/home/ubuntu/catkin_ws/src/g2o/g2o/stuff/sampler.h:76:12: error: ‘_generator’ was not declared in this scope
if (!_generator)
^
/home/ubuntu/catkin_ws/src/g2o/g2o/stuff/sampler.h:78:7: error: ‘_generator’ was not declared in this scope
_generator->seed(s);
^
g2o/examples/data_fitting/CMakeFiles/circle_fit.dir/build.make:62: recipe for target 'g2o/examples/data_fitting/CMakeFiles/circle_fit.dir/circle_fit.cpp.o' failed
make[2]: *** [g2o/examples/data_fitting/CMakeFiles/circle_fit.dir/circle_fit.cpp.o] Error 1
CMakeFiles/Makefile2:1795: recipe for target 'g2o/examples/data_fitting/CMakeFiles/circle_fit.dir/all' failed
make[1]: *** [g2o/examples/data_fitting/CMakeFiles/circle_fit.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2

@felixendres
Copy link
Owner

Ah, sorry. You have to disable building of some parts. Set G2O_BUILD_EXAMPLES to false (e.g., with cmake .. -DG2O_BUILD_EXAMPLES=OFF).

@psembere
Copy link

psembere commented Dec 2, 2016

@felixendres Thanks. Meanwhile I tested RGBD-SLAM with PCL 1.8 compiled with c++11 and it is also crashing.

When I have only custom G2O installed (without kinetic version) I had a problem with:

make[2]: *** No rule to make target '/opt/ros/kinetic/lib/libg2o_csparse_extension.so', needed by '/home/ubuntu/catkin_ws/devel/lib/rgbdslam/rgbdslam'. Stop.

when I installed the ros-kinetic-libg2o it is fixed, so it is probably some dependency problem.

Using your advice I finally managed to build and run RGBD-SLAM, thanks again, however when I plugged my Asus Xtion I have got an error:

[ WARN] [1480637640.285420397]: First RGBD-Data Received
[ INFO] [1480637640.285912291]: Encoding: rgb8
OpenCV Error: The function/feature is not implemented () in detectAndCompute, file /tmp/binarydeb/ros-kinetic-opencv3-3.1.0/modules/features2d/src/feature2d.cpp, line 144
terminate called after throwing an instance of 'cv::Exception'
what(): /tmp/binarydeb/ros-kinetic-opencv3-3.1.0/modules/features2d/src/feature2d.cpp:144: error: (-213) in function detectAndCompute
[ INFO] [1480637640.404338179]: Stopping color stream.
================================================================================REQUIRED process [rgbdslam-16] has died!
process has died [pid 21903, exit code -6, cmd /home/ubuntu/catkin_ws/devel/lib/rgbdslam/rgbdslam __name:=rgbdslam __log:=/home/ubuntu/.ros/log/382469a2-b824-11e6-9c05-000c293bf35e/rgbdslam-16.log].
log file: /home/ubuntu/.ros/log/382469a2-b824-11e6-9c05-000c293bf35e/rgbdslam-16*.log
Initiating shutdown!
================================================================================

So it's probably some OpenCV 3.1 compatibility issue.

@felixendres
Copy link
Owner

Yes, probably. The error message I get is slightly different: The function/feature is not implemented () in detectAndCompute". I adapted the code in features.cpp, feature_adapter.cpp and aorb.cpp according to the OpenCV migration guide in commit 84a03c9

That being done I am in the dark, so any help resolving this issue is appreciated.

@felixendres
Copy link
Owner

I just identified the error source: The signature of the virtual methods of FeatureDetector (typedef'd now to Feature2D) has changed. Thus my subclass overrides do not override anymore and the base class's Feature2D::detect is called. Straightforward changing of the signature results in (hopefully) minor errors. I'll fix it in the coming week.

@psembere
Copy link

psembere commented Dec 4, 2016

Thank you very much.

@felixendres
Copy link
Owner

Please try the newest commit.

@psembere
Copy link

psembere commented Dec 6, 2016

@felixendres Ok, I manage to run it once, but I can't repeat it. There is a mess with g2o dependecies. Cmake still adds the kinetic-g2o version even when I had G2O_DIR env set to the g2o-c03 install path. When I remove the kinetic-g2o version I get this error

[100%] Linking CXX executable /home/ubuntu/rgbdslam_catkin_ws/devel/lib/rgbdslam/rgbdslam
CMakeFiles/rgbdslam.dir/src/graph_manager.cpp.o: In function g2o::LinearSolverCSparse<Eigen::Matrix<double, -1, -1, 0, -1, -1> >::solvePattern(g2o::SparseBlockMatrix<Eigen::Matrix<double, -1, -1, 0, -1, -1> >&, std::vector<std::pair<int, int>, std::allocator<std::pair<int, int> > > const&, g2o::SparseBlockMatrix<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&)': graph_manager.cpp:(.text._ZN3g2o19LinearSolverCSparseIN5Eigen6MatrixIdLin1ELin1ELi0ELin1ELin1EEEE12solvePatternERNS_17SparseBlockMatrixIS3_EERKSt6vectorISt4pairIiiESaISA_EERKS6_[_ZN3g2o19LinearSolverCSparseIN5Eigen6MatrixIdLin1ELin1ELi0ELin1ELin1EEEE12solvePatternERNS_17SparseBlockMatrixIS3_EERKSt6vectorISt4pairIiiESaISA_EERKS6_]+0x67): undefined reference to g2o::csparse_extension::cs_chol_workspace(cs_di_sparse const*, cs_di_symbolic const*, int*, double*)'
CMakeFiles/rgbdslam.dir/src/graph_manager.cpp.o: In function g2o::LinearSolverCSparse<Eigen::Matrix<double, -1, -1, 0, -1, -1> >::solveBlocks(double**&, g2o::SparseBlockMatrix<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&)': graph_manager.cpp:(.text._ZN3g2o19LinearSolverCSparseIN5Eigen6MatrixIdLin1ELin1ELi0ELin1ELin1EEEE11solveBlocksERPPdRKNS_17SparseBlockMatrixIS3_EE[_ZN3g2o19LinearSolverCSparseIN5Eigen6MatrixIdLin1ELin1ELi0ELin1ELin1EEEE11solveBlocksERPPdRKNS_17SparseBlockMatrixIS3_EE]+0xee): undefined reference to g2o::csparse_extension::cs_chol_workspace(cs_di_sparse const*, cs_di_symbolic const*, int*, double*)'
CMakeFiles/rgbdslam.dir/src/graph_manager.cpp.o: In function g2o::LinearSolverCSparse<Eigen::Matrix<double, -1, -1, 0, -1, -1> >::solve(g2o::SparseBlockMatrix<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, double*, double*)': graph_manager.cpp:(.text._ZN3g2o19LinearSolverCSparseIN5Eigen6MatrixIdLin1ELin1ELi0ELin1ELin1EEEE5solveERKNS_17SparseBlockMatrixIS3_EEPdS9_[_ZN3g2o19LinearSolverCSparseIN5Eigen6MatrixIdLin1ELin1ELi0ELin1ELin1EEEE5solveERKNS_17SparseBlockMatrixIS3_EEPdS9_]+0xf6): undefined reference to g2o::csparse_extension::cs_cholsolsymb(cs_di_sparse const*, double*, cs_di_symbolic const*, double*, int*)'
graph_manager.cpp:(.text.ZN3g2o19LinearSolverCSparseIN5Eigen6MatrixIdLin1ELin1ELi0ELin1ELin1EEEE5solveERKNS_17SparseBlockMatrixIS3_EEPdS9[ZN3g2o19LinearSolverCSparseIN5Eigen6MatrixIdLin1ELin1ELi0ELin1ELin1EEEE5solveERKNS_17SparseBlockMatrixIS3_EEPdS9]+0x1c6): undefined reference to g2o::csparse_extension::writeCs2Octave(char const*, cs_di_sparse const*, bool)' CMakeFiles/rgbdslam.dir/src/graph_manager.cpp.o: In function g2o::LinearSolverCSparse<Eigen::Matrix<double, 6, 6, 0, 6, 6> >::solvePattern(g2o::SparseBlockMatrix<Eigen::Matrix<double, -1, -1, 0, -1, -1> >&, std::vector<std::pair<int, int>, std::allocator<std::pair<int, int> > > const&, g2o::SparseBlockMatrix<Eigen::Matrix<double, 6, 6, 0, 6, 6> > const&)':
graph_manager.cpp:(.text._ZN3g2o19LinearSolverCSparseIN5Eigen6MatrixIdLi6ELi6ELi0ELi6ELi6EEEE12solvePatternERNS_17SparseBlockMatrixINS2_IdLin1ELin1ELi0ELin1ELin1EEEEERKSt6vectorISt4pairIiiESaISB_EERKNS5_IS3_EE[_ZN3g2o19LinearSolverCSparseIN5Eigen6MatrixIdLi6ELi6ELi0ELi6ELi6EEEE12solvePatternERNS_17SparseBlockMatrixINS2_IdLin1ELin1ELi0ELin1ELin1EEEEERKSt6vectorISt4pairIiiESaISB_EERKNS5_IS3_EE]+0x67): undefined reference to g2o::csparse_extension::cs_chol_workspace(cs_di_sparse const*, cs_di_symbolic const*, int*, double*)' CMakeFiles/rgbdslam.dir/src/graph_manager.cpp.o: In function g2o::LinearSolverCSparse<Eigen::Matrix<double, 6, 6, 0, 6, 6> >::solveBlocks(double**&, g2o::SparseBlockMatrix<Eigen::Matrix<double, 6, 6, 0, 6, 6> > const&)':
graph_manager.cpp:(.text._ZN3g2o19LinearSolverCSparseIN5Eigen6MatrixIdLi6ELi6ELi0ELi6ELi6EEEE11solveBlocksERPPdRKNS_17SparseBlockMatrixIS3_EE[_ZN3g2o19LinearSolverCSparseIN5Eigen6MatrixIdLi6ELi6ELi0ELi6ELi6EEEE11solveBlocksERPPdRKNS_17SparseBlockMatrixIS3_EE]+0xee): undefined reference to g2o::csparse_extension::cs_chol_workspace(cs_di_sparse const*, cs_di_symbolic const*, int*, double*)' CMakeFiles/rgbdslam.dir/src/graph_manager.cpp.o: In function g2o::LinearSolverCSparse<Eigen::Matrix<double, 6, 6, 0, 6, 6> >::solve(g2o::SparseBlockMatrix<Eigen::Matrix<double, 6, 6, 0, 6, 6> > const&, double*, double*)':
graph_manager.cpp:(.text.ZN3g2o19LinearSolverCSparseIN5Eigen6MatrixIdLi6ELi6ELi0ELi6ELi6EEEE5solveERKNS_17SparseBlockMatrixIS3_EEPdS9[ZN3g2o19LinearSolverCSparseIN5Eigen6MatrixIdLi6ELi6ELi0ELi6ELi6EEEE5solveERKNS_17SparseBlockMatrixIS3_EEPdS9]+0xf6): undefined reference to g2o::csparse_extension::cs_cholsolsymb(cs_di_sparse const*, double*, cs_di_symbolic const*, double*, int*)' graph_manager.cpp:(.text._ZN3g2o19LinearSolverCSparseIN5Eigen6MatrixIdLi6ELi6ELi0ELi6ELi6EEEE5solveERKNS_17SparseBlockMatrixIS3_EEPdS9_[_ZN3g2o19LinearSolverCSparseIN5Eigen6MatrixIdLi6ELi6ELi0ELi6ELi6EEEE5solveERKNS_17SparseBlockMatrixIS3_EEPdS9_]+0x1c6): undefined reference to g2o::csparse_extension::writeCs2Octave(char const*, cs_di_sparse const*, bool)'
collect2: error: ld returned 1 exit status
rgbdslam_v2/CMakeFiles/rgbdslam.dir/build.make:1544: recipe for target '/home/ubuntu/rgbdslam_catkin_ws/devel/lib/rgbdslam/rgbdslam' failed
make[2]: *** [/home/ubuntu/rgbdslam_catkin_ws/devel/lib/rgbdslam/rgbdslam] Error 1
CMakeFiles/Makefile2:3158: recipe for target 'rgbdslam_v2/CMakeFiles/rgbdslam.dir/all' failed
make[1]: *** [rgbdslam_v2/CMakeFiles/rgbdslam.dir/all] Error 2
Makefile:138: recipe for target 'all' failed
make: *** [all] Error 2
Invoking "make -j4" failed

@felixendres
Copy link
Owner

Hm, I have not installed ros-kinetic-libg2o and it builds fine. Have you tried deleting your g2o build folder and rebuilding g2o from scratch?
Another idea is that, maybe when you deinstalled ros-kinetic-libg2o, you also deinstalled some dependencies of g2o, like libsuitesparse-dev?

@psembere
Copy link

psembere commented Dec 7, 2016

Thank you very much, after I removed the ros-kinetic-libg2o and rebuild g2o afterwards it finally worked :D No linker errors. But the G2O_DIR flag does not work.

felixendres added a commit that referenced this issue Dec 15, 2016
@felixendres
Copy link
Owner

Could you guys please try the new install script (see README.md "Installation from scratch" in kinetic branch). It works fine on my machine, including the usage of the G2O_DIR environment variable.

@arunumd
Copy link

arunumd commented Dec 7, 2018

Dear @felixendres I installed PCL Version 1.8 and configured rgbdslam to look for the new PCL version in /usr/local/lib but I still get this strange error. My rgbdslam starts momentarily and then dies all together, by throwing the error message below :

================================================================================REQUIRED process [rgbdslam-35] has died!
process has died [pid 1216, exit code -11, cmd /home/arun/Code/rgbdslam_catkin_ws/devel/lib/rgbdslam/rgbdslam /camera/rgb/image_color:=/camera/rgb/image_raw /camera/depth_registered/sw_registered/image_rect_raw:=/camera/depth/image_raw __name:=rgbdslam __log:=/home/arun/.ros/log/0767c1dc-fa68-11e8-86d6-5cea1d834771/rgbdslam-35.log].
log file: /home/arun/.ros/log/0767c1dc-fa68-11e8-86d6-5cea1d834771/rgbdslam-35*.log
Initiating shutdown!
================================================================================

Can you please guide me what could be the issue here ?

PS: I am using Ubuntu 16.4 LTS with ROS version Kinetic

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

No branches or pull requests

8 participants