Closed masterdot closed 4 years ago
cs.h
is located by default here: /usr/include/suitesparse/cs.h
. Normally the include directory of cs.h
should be added to compilation: https://github.com/introlab/rtabmap/blob/e2e2227895f84ef9cea238d2805d8bc1d77465f0/cmake_modules/FindG2O.cmake#L2
Make sure libsuitesparse-dev
is installed:
sudo apt install libsuitesparse-dev
Hey there,
that did work and took my to another issue:
`In file included from /usr/local/include/opencv4/opencv2/core/core_c.h:48:0,
from /usr/local/include/opencv4/opencv2/imgproc/types_c.h:46,
from /usr/local/include/opencv4/opencv2/imgproc/imgproc_c.h:46,
from /home/masterdot/3dscan/rtabmap/guilib/src/CalibrationDialog.cpp:33:
/usr/local/include/opencv4/opencv2/core/types_c.h:1169:16: note: candidate: CvSize::CvSize()
typedef struct CvSize
^~
/usr/local/include/opencv4/opencv2/core/types_c.h:1169:16: note: candidate expects 0 arguments, 1 provided
/usr/local/include/opencv4/opencv2/core/types_c.h:1169:16: note: candidate: constexpr CvSize::CvSize(const CvSize&)
/usr/local/include/opencv4/opencv2/core/typesc.h:1169:16: note: no known conversion for argument 1 from ‘cv::Size {aka cv::Size~
/usr/local/include/opencv4/opencv2/core/types_c.h:1169:16: note: candidate expects 0 arguments, 1 provided
/usr/local/include/opencv4/opencv2/core/types_c.h:1169:16: note: candidate: constexpr CvSize::CvSize(const CvSize&)
/usr/local/include/opencv4/opencv2/core/typesc.h:1169:16: note: no known conversion for argument 1 from ‘cv::Size {aka cv::Size
/home/masterdot/3dscan/rtabmap/guilib/src/ExportBundlerDialog.cpp:251:24: warning: ‘*((void*)&<anonymous> +568)’ may be used uninitialized in this function [-Wmaybe-uninitialized]
CMakeFiles/Makefile2:341: recipe for target 'guilib/src/CMakeFiles/rtabmap_gui.dir/all' failed
make[1]: *** [guilib/src/CMakeFiles/rtabmap_gui.dir/all] Error 2
Makefile:151: recipe for target 'all' failed
make: *** [all] Error 2
`
I updated the code to build with latest OpenCV version from source. See commit above.
Ok, done with that one :)
Heres another one:
collect2: error: ld returned 1 exit status tools/KittiDataset/CMakeFiles/kitti_dataset.dir/build.make:470: recipe for target '../bin/rtabmap-kitti_dataset' failed make[2]: *** [../bin/rtabmap-kitti_dataset] Error 1 CMakeFiles/Makefile2:822: recipe for target 'tools/KittiDataset/CMakeFiles/kitti_dataset.dir/all' failed make[1]: *** [tools/KittiDataset/CMakeFiles/kitti_dataset.dir/all] Error 2 Makefile:151: recipe for target 'all' failed make: *** [all] Error 2
Sorry for the problems...
It says there is an error in the generated Makefiles, but not actually saying what is the error... Try cleanup the build directory and remake.
rm -rf rtabmap/build/*
cd rtabmap/build
cmake ..
make -j4
I'm sorry to bother you again... Last time I tried to clear the build folder didn't work, but this time it did. Sorry for this beginner's error -. -
The next one is this:
[ 70%] Building CXX object guilib/src/CMakeFiles/rtabmap_gui.dir/__/include/rtabmap/gui/moc_MainWindow.cpp.o [ 71%] Building CXX object guilib/src/CMakeFiles/rtabmap_gui.dir/__/include/rtabmap/gui/moc_PreferencesDialog.cpp.o [ 71%] Building CXX object guilib/src/CMakeFiles/rtabmap_gui.dir/__/include/rtabmap/gui/moc_DatabaseViewer.cpp.o [ 71%] Building CXX object guilib/src/CMakeFiles/rtabmap_gui.dir/__/include/rtabmap/gui/moc_AboutDialog.cpp.o [ 72%] Building CXX object guilib/src/CMakeFiles/rtabmap_gui.dir/__/include/rtabmap/gui/moc_ConsoleWidget.cpp.o [ 72%] Building CXX object guilib/src/CMakeFiles/rtabmap_gui.dir/__/include/rtabmap/gui/moc_ImageView.cpp.o [ 73%] Building CXX object guilib/src/CMakeFiles/rtabmap_gui.dir/__/include/rtabmap/gui/moc_PdfPlot.cpp.o [ 73%] Building CXX object guilib/src/CMakeFiles/rtabmap_gui.dir/__/include/rtabmap/gui/moc_StatsToolBox.cpp.o [ 73%] Building CXX object guilib/src/CMakeFiles/rtabmap_gui.dir/__/include/rtabmap/gui/moc_ProgressDialog.cpp.o [ 74%] Building CXX object guilib/src/CMakeFiles/rtabmap_gui.dir/__/include/rtabmap/utilite/moc_UPlot.cpp.o [ 74%] Building CXX object guilib/src/CMakeFiles/rtabmap_gui.dir/__/include/rtabmap/utilite/moc_UImageView.cpp.o [ 74%] Building CXX object guilib/src/CMakeFiles/rtabmap_gui.dir/__/include/rtabmap/gui/moc_CloudViewer.cpp.o [ 75%] Building CXX object guilib/src/CMakeFiles/rtabmap_gui.dir/__/include/rtabmap/gui/moc_OdometryViewer.cpp.o [ 75%] Building CXX object guilib/src/CMakeFiles/rtabmap_gui.dir/__/include/rtabmap/gui/moc_LoopClosureViewer.cpp.o [ 75%] Building CXX object guilib/src/CMakeFiles/rtabmap_gui.dir/__/include/rtabmap/gui/moc_DataRecorder.cpp.o [ 76%] Building CXX object guilib/src/CMakeFiles/rtabmap_gui.dir/__/include/rtabmap/gui/moc_CameraViewer.cpp.o [ 76%] Building CXX object guilib/src/CMakeFiles/rtabmap_gui.dir/__/include/rtabmap/gui/moc_CalibrationDialog.cpp.o [ 76%] Building CXX object guilib/src/CMakeFiles/rtabmap_gui.dir/__/include/rtabmap/gui/moc_ExportDialog.cpp.o [ 77%] Building CXX object guilib/src/CMakeFiles/rtabmap_gui.dir/__/include/rtabmap/gui/moc_PostProcessingDialog.cpp.o [ 77%] Building CXX object guilib/src/CMakeFiles/rtabmap_gui.dir/__/include/rtabmap/gui/moc_ExportCloudsDialog.cpp.o [ 77%] Building CXX object guilib/src/CMakeFiles/rtabmap_gui.dir/__/include/rtabmap/gui/moc_ExportBundlerDialog.cpp.o [ 78%] Building CXX object guilib/src/CMakeFiles/rtabmap_gui.dir/__/include/rtabmap/gui/moc_MapVisibilityWidget.cpp.o [ 78%] Building CXX object guilib/src/CMakeFiles/rtabmap_gui.dir/__/include/rtabmap/gui/moc_GraphViewer.cpp.o [ 78%] Building CXX object guilib/src/CMakeFiles/rtabmap_gui.dir/__/include/rtabmap/gui/moc_CreateSimpleCalibrationDialog.cpp.o [ 79%] Building CXX object guilib/src/CMakeFiles/rtabmap_gui.dir/__/include/rtabmap/gui/moc_ParametersToolBox.cpp.o [ 79%] Building CXX object guilib/src/CMakeFiles/rtabmap_gui.dir/__/include/rtabmap/gui/moc_DepthCalibrationDialog.cpp.o [ 79%] Building CXX object guilib/src/CMakeFiles/rtabmap_gui.dir/__/include/rtabmap/gui/moc_EditConstraintDialog.cpp.o [ 80%] Building CXX object guilib/src/CMakeFiles/rtabmap_gui.dir/3rdParty/moc_QMultiComboBox.cpp.o [ 80%] Building CXX object guilib/src/CMakeFiles/rtabmap_gui.dir/__/include/rtabmap/gui/moc_TexturingState.cpp.o [ 80%] Building CXX object guilib/src/CMakeFiles/rtabmap_gui.dir/__/include/rtabmap/gui/moc_RecoveryState.cpp.o [ 81%] Building CXX object guilib/src/CMakeFiles/rtabmap_gui.dir/__/include/rtabmap/gui/moc_EditDepthArea.cpp.o [ 81%] Building CXX object guilib/src/CMakeFiles/rtabmap_gui.dir/__/include/rtabmap/gui/moc_EditMapArea.cpp.o [ 81%] Building CXX object guilib/src/CMakeFiles/rtabmap_gui.dir/qrc_GuiLib.cpp.o [ 82%] Linking CXX shared library ../../../bin/librtabmap_gui.so [ 82%] Built target rtabmap_gui Makefile:151: recipe for target 'all' failed make: *** [all] Error 2 masterdot@masterdot-linux:~/3dscan/rtabmap/build$
It comes out of nowhere... Seems to be a issue with the gui building, but I don't find a hint what might be wrong... Maybe a lib is missing, but I don't know which may be... Thanks for your patience and help!
Use "make" (without -j4), so only one file is built at the same time to make easier to read the error.
Thanks for the tip, now it's more clear what failed. Didn't know that multi compile just exist somewhere.
[ 80%] Generating moc_ObjDeletionHandler.cpp Scanning dependencies of target rtabmap [ 81%] Building CXX object app/src/CMakeFiles/rtabmap.dir/main.cpp.o [ 81%] Building CXX object app/src/CMakeFiles/rtabmap.dir/moc_ObjDeletionHandler.cpp.o [ 82%] Linking CXX executable ../../../bin/rtabmap ../../../bin/librtabmap_core.so.0.19.6: Warnung: undefinierter Verweis auf »g2o::csparse_extension::cs_chol_workspace(cs_di_sparse const*, cs_di_symbolic const*, int*, double*)« ../../../bin/librtabmap_core.so.0.19.6: Warnung: undefinierter Verweis auf »g2o::csparse_extension::writeCs2Octave(char const*, cs_di_sparse const*, bool)« ../../../bin/librtabmap_core.so.0.19.6: Warnung: undefinierter Verweis auf »g2o::csparse_extension::cs_cholsolsymb(cs_di_sparse const*, double*, cs_di_symbolic const*, double*, int*)« collect2: error: ld returned 1 exit status app/src/CMakeFiles/rtabmap.dir/build.make:504: recipe for target '../bin/rtabmap' failed make[2]: *** [../bin/rtabmap] Error 1 CMakeFiles/Makefile2:416: recipe for target 'app/src/CMakeFiles/rtabmap.dir/all' failed make[1]: *** [app/src/CMakeFiles/rtabmap.dir/all] Error 2 Makefile:151: recipe for target 'all' failed make: *** [all] Error 2
OK, quick update: I did recompile g2o and found out that it does use the EIGEN package. The result is: YES! It did compile without errors and I've successfully build it now. You should add the requirement of the EIGEN fro the main package and the g2o.
Hope I could help you, thanks a lot for helping. Hope I do actually use it :)
RTAB-Map doesn't depend on Eigen directly, it is why it is not explicitly specified (when building against PCL, the eigen headers directory is automatically included in rtabmap compilation). It looks more a g2o error to me, not sure eigen was the problem, unless g2o was using another version than the one used by PCL. Great that you managed to build it!
cheers, Mathieu
The file is truly not there and I didnt find anything helping with this. Any help appreciated :)