Hi Mathieu,
I have build the rtabmap 0.17 from source using below versions on Ubuntu 16.04. PCL 1.8.1 (buit from source) VTK 8.1 (built from source) Qt 5.10.0 When I start the rtabmap, its crashing with segmentation fault and below is the trace from gdb. Can you suggest which newest versions of PCL,Q5, VTK are suited for rtabmap. Thanks. Nayab ______________________________________________________________________________________ gdb rtabmap GNU gdb (Ubuntu 7.11.1-0ubuntu1~16.5) 7.11.1 Copyright (C) 2016 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-linux-gnu". Type "show configuration" for configuration details. For bug reporting instructions, please see: <http://www.gnu.org/software/gdb/bugs/>. Find the GDB manual and other documentation resources online at: <http://www.gnu.org/software/gdb/documentation/>. For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from rtabmap...(no debugging symbols found)...done. (gdb) r Starting program: /usr/local/bin/rtabmap [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". [New Thread 0x7fffbbd09700 (LWP 19208)] [New Thread 0x7fffba180700 (LWP 19209)] [New Thread 0x7fffaf48e700 (LWP 19210)] [New Thread 0x7fffaec8d700 (LWP 19211)] [New Thread 0x7fffae48c700 (LWP 19212)] [New Thread 0x7fffacbc6700 (LWP 19213)] libpng warning: iCCP: known incorrect sRGB profile libpng warning: iCCP: known incorrect sRGB profile libpng warning: iCCP: known incorrect sRGB profile [New Thread 0x7fff9ee9e700 (LWP 19217)] Generic Warning: In /home/shaik/Documents/vtk_git/VTK/GUISupport/Qt/QVTKWidget.cxx, line 83 QVTKWidget was deprecated for VTK 8.1 and will be removed in a future version. Generic Warning: In /home/shaik/Documents/vtk_git/VTK/GUISupport/Qt/QVTKPaintEngine.cxx, line 25 QVTKPaintEngine was deprecated for VTK 8.1 and will be removed in a future version. Thread 1 "rtabmap" received signal SIGSEGV, Segmentation fault. 0x00007fffee9d89da in vtkAlgorithm::GetExecutive (this=0x137fe60) at /home/shaik/Documents/vtk_git/VTK/Common/ExecutionModel/vtkAlgorithm.cxx:660 660 e->Delete(); (gdb) bt #0 0x00007fffee9d89da in vtkAlgorithm::GetExecutive (this=0x137fe60) at /home/shaik/Documents/vtk_git/VTK/Common/ExecutionModel/vtkAlgorithm.cxx:660 #1 0x00007fffee9da013 in vtkAlgorithm::SetInputConnection (this=0x137fe60, port=0, input=0x13803d0) at /home/shaik/Documents/vtk_git/VTK/Common/ExecutionModel/vtkAlgorithm.cxx:1010 #2 0x00007fffee9d9f44 in vtkAlgorithm::SetInputConnection (this=0x137fe60, input=0x13803d0) at /home/shaik/Documents/vtk_git/VTK/Common/ExecutionModel/vtkAlgorithm.cxx:995 #3 0x00007fffef8d4fe0 in vtkInteractorStyle::vtkInteractorStyle (this=0x137ded0) at /home/shaik/Documents/vtk_git/VTK/Rendering/Core/vtkInteractorStyle.cxx:66 #4 0x00007ffff0271dec in vtkInteractorStyleTrackballCamera::vtkInteractorStyleTrackballCamera (this=0x137ded0) at /home/shaik/Documents/vtk_git/VTK/Interaction/Style/vtkInteractorStyleTrackballCamera.cxx:28 #5 0x00007ffff0269cfb in vtkInteractorStyleRubberBandPick::vtkInteractorStyleRubberBandPick (this=0x137ded0) at /home/shaik/Documents/vtk_git/VTK/Interaction/Style/vtkInteractorStyleRubberBandPick.cxx:32 #6 0x00007ffff79e9aed in pcl::visualization::PCLVisualizerInteractorStyle::PCLVisualizerInteractorStyle() () from /usr/local/lib/librtabmap_gui.so.0.17 #7 0x00007ffff79d0fb0 in rtabmap::CloudViewer::CloudViewer(QWidget*) () from /usr/local/lib/librtabmap_gui.so.0.17 #8 0x00007ffff782d9d1 in rtabmap::MainWindow::MainWindow(rtabmap::PreferencesDialog*, QWidget*, bool) () from /usr/local/lib/librtabmap_gui.so.0.17 #9 0x000000000040267b in main () ________________________________________________________________________________________________ |
Administrator
|
Hi,
If you use the default PCL, VTK and Qt binaries of Ubuntu 16.04, it should be fine. The error you are seeing seems an incompatibility between PCL and VTK versions. Well, rtabmap would need also to be updated as QVTKWidget is deprecated in VTK 8.1. VTK 7 and PCL 1.8 should work. Note however that PCL from >=1.8 is built by default with "-march=native" flag on Ubuntu. If you build also g2o or GTSAM, make sure to enable in cmake the use of the same flag, otherwise you will get seg fault at start (or when optimization is required). The deep reason is that Eigen used in all these libraries should be using the same build flags. cheers, Mathieu |
Thanks for your explanation.
I have tried with VTK 6.2 (buit from source), PCL 1.7 (built from source). And I had linking problem as below. Not able to figure out whats the wrong with my build. --------------------------------------------------------------------------------------------------------------------------------------- [ 36%] Building CXX object corelib/src/CMakeFiles/rtabmap_core.dir/toro3d/treeoptimizer2.cpp.o [ 37%] Linking CXX shared library ../../../bin/librtabmap_core.so /usr/bin/ld: cannot find -lvtkGUISupportQt collect2: error: ld returned 1 exit status corelib/src/CMakeFiles/rtabmap_core.dir/build.make:2260: recipe for target '../bin/librtabmap_core.so.0.17.0' failed make[2]: *** [../bin/librtabmap_core.so.0.17.0] Error 1 CMakeFiles/Makefile2:267: recipe for target 'corelib/src/CMakeFiles/rtabmap_core.dir/all' failed make[1]: *** [corelib/src/CMakeFiles/rtabmap_core.dir/all] Error 2 Makefile:149: recipe for target 'all' failed make: *** [all] Error 2 ------------------------------------------------------------------------------------------------------------------------------------------------- Thanks, Nayab |
Administrator
|
Make sure you activate the Qt module when building VTK from source.
|
In CMakeLists.txt of VTK 6.2, I could see only one Qt option and it is for Android and IOS builds.
---------------------------------------------------------------------------------------------- if (ANDROID OR APPLE_IOS) .... .... option(VTK_Group_Qt "off for embedded" OFF) .... ..... endif() ------------------------------------------------------------------------------------------------ You find the CMakeLists.txt here https://gitlab.kitware.com/vtk/vtk/blob/v6.2.0/CMakeLists.txt Also I tried configuring like below as mentioned in vtk doc but it didnt work. cmake -DVTK_QT_VERSION:STRING=5 -DQT_QMAKE_EXECUTABLE:PATH=/opt/Qt/5.5/gcc_64/bin/qmake DVTK_Group_Qt:BOOL=ON -DCMAKE_PREFIX_PATH:PATH=/opt/Qt/5.5/gcc_64/bin/lib/cmake -DBUILD_SHARED_LIBS:BOOL=ON .. Thanks for your help eventhough its not related to rtabmap. |
Administrator
|
Use "cmake-gui" to better see all options available on your platform:
$ cd VTK/build $ cmake-gui .VTK_Group_Qt should be there for normal build. |
This post was updated on .
Finally after enabling Qt (with version v5.6, not sure why v5.5 didnt work )in vtk bulid using ccmake(also updating Qt5 components paths properly, while I guess my Qt build system is corrupted), I am able to build and run(need to check more) rtabmap successfully.
Thanks for your help. |
Free forum by Nabble | Edit this page |