-
Notifications
You must be signed in to change notification settings - Fork 787
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
Segmentation Fault with 3D map view (PCL 1.14) #1385
Comments
Update: added OctoMap as that looks like a conditional dependency, no change; next steps: build older VTK versions and recompile. |
rtabmap/guilib/src/CloudViewer.cpp Line 3808 in b2e26e8
One of the failing lines. I did discover, as part of my spamming of log messages, I did find there were other locations which I shall try to identify the exact locations of prior to attempting fixes. |
You are using PCL 1.14.1 built from source. That could be related to that. Are you using Ubuntu 22.04 or 24.04? |
24.04, but I've also tried to get this running on a Raspberry Pi 5 with oddly similar results. |
I am currently investigating what is happening when building latest PCL with c++17. Could also be related to this: PointCloudLibrary/pcl#6126 I can reproduce seg faults with https://github.com/introlab/rtabmap/blob/master/docker/latest_deps/Dockerfile, though in my case the app won't even show up before crashing, mainly inside gtsam or g2o related functions (using Eigen). In compile info:
rtabmap is built with c++17 on a PCL built with c++14. There is a potential issue described here: https://github.com/PointCloudLibrary/pcl/blob/75ef8c57fb5d187c0792dcdc24e83a41d0e04992/cmake/pcl_pclconfig.cmake#L19-L24 I think the problem is that if PCL is built with EIGEN_HAS_CXX17_OVERALIGN=0, we should build g2o and gtsam with same flag. GTSAM seems not having the option to do so, and g2o seems using EIGEN_HAS_CXX17_OVERALIGN=1 by default. |
So I updated this Dockerfile to show a working example when building latest PCL version on recent machines. In particular, to be most portable, try building PCL with:
I think it is the closest you can get from the ubuntu official pcl binaries. |
I'm encountering the exact same issue with a clean image Raspberry Pi 5 running Raspbian and only official binaries for dependencies. (Wayland doesn't work, I had to switch the UI to X prior to it even loading)
|
Could it be similar to this issue? introlab/rtabmap_ros#1230 (or this comment #1062 (comment)) I would build without Qt on RPI ( |
Quite probably related; I won't be using ROS as I am only interested in utilizing the point clouds for now. I see lots of compiling from source in my future. FWIW, the RPi 4 and RPi 5 CPU and GPU performance difference is pretty stark. But yes, I won't be using it as my final platform (AGX Orin + cameras + LiDAR). |
Any interaction or change in the 3D Map window causes a segmentation fault. I suspect this has something to do with VTK9.1, but I haven't worked with C++ in about 10 years, so I'm a little rusty. Logging was pretty useless unless there's a logging flag not in the main preferences screen. Haven't had time to build all the dependencies from source to really nail down where the issue is occurring, but figured I'd log this until I can get more time to dive into it.
Configuration:
MOBILE_BUILD=OFF
-- Found OpenMP: TRUE (found version "4.5") found components: CXX
-- Found flann version 1.9.2
-- Found Qhull version 8.0.2
-- PCL definitions don't contain "-march=native", make sure all libraries using Eigen are also compiled without that flag to avoid some segmentation faults (with gdb referring to some Eigen functions).
-- Found SQLite3: /usr/include /usr/lib/aarch64-linux-gnu/libsqlite3.so
-- Found OpenMP: TRUE (found version "4.5") found components: C CXX
-- Found OpenMP: /usr/lib/gcc/aarch64-linux-gnu/11/libgomp.so;/usr/lib/aarch64-linux-gnu/libpthread.a
-- Add PCL_OMP to definitions
-- Found OpenCV: /usr/include/opencv4
-- Found PCL: /usr/local/include/pcl-1.14;/usr/include/eigen3;/usr/include
-- Found ZLIB: /usr/include
-- Found Eigen3: /usr/include/eigen3 (found version "3.4.0")
-- VTK>=9 detected, will use VTK_QT_VERSION=5 for Qt version.
-- VTK_RENDERING_BACKEND=
-- Found Freenect: /usr/include
-- Found OpenNI2: /usr/include/openni2
-- Found DC1394: /usr/include/dc1394
-- Found g2o (targets)
-- g2o include dir: /usr/local/include/g2o/core;/usr/local/include
-- Latest g2o factory version detected with shared ptr (factory file: /usr/local/include/g2o/core/factory.h).
-- FlyCapture2_INCLUDE_DIR=FlyCapture2_INCLUDE_DIR-NOTFOUND
-- FlyCapture2_LIBRARY=FlyCapture2_LIBRARY-NOTFOUND
-- Triclops_INCLUDE_DIR=Triclops_INCLUDE_DIR-NOTFOUND
-- Triclops_LIBRARY=Triclops_LIBRARY-NOTFOUND
-- FlyCaptureBridge_LIBRARY=FlyCaptureBridge_LIBRARY-NOTFOUND
-- Architecture: aarch64
-- Found Pthreads
-- yaml-cpp not found, euroc_dataset tool won't be built...
CMake Deprecation Warning at examples/LidarMapping/CMakeLists.txt:1 (cmake_minimum_required):
Compatibility with CMake < 2.8.12 will be removed from a future version of
CMake.
Update the VERSION argument value or use a ... suffix to tell
CMake that the project does not need compatibility with older versions.
-- Info :
-- RTAB-Map Version = 0.21.8
-- CMAKE_VERSION = 3.25.1
-- CMAKE_INSTALL_PREFIX = /usr/local
-- CMAKE_BUILD_TYPE = Release
-- CMAKE_INSTALL_LIBDIR = lib
-- BUILD_APP = ON
-- BUILD_TOOLS = ON
-- BUILD_EXAMPLES = ON
-- BUILD_SHARED_LIBS = ON
-- CMAKE_CXX_FLAGS = -fmessage-length=0 -fopenmp -std=c++17
-- FLANN_KDTREE_MEM_OPT = OFF
-- PCL_DEFINITIONS = -DEIGEN_HAS_CXX17_OVERALIGN=0
-- PCL_VERSION = 1.14.1
-- Optional dependencies ('*' affects some default parameters) :
-- *With OpenCV 4.6.0 xfeatures2d = NO, nonfree = NO (License: Apache 2)
-- With Qt 5.15.8 = YES (License: Open Source or Commercial)
-- With VTK 9.1 = YES (License: BSD)
-- With external SQLite3 = YES (License: Public Domain)
-- With ORB OcTree = YES (License: GPLv3)
-- With SupertPoint = NO (WITH_TORCH=OFF)
-- With Python3 = NO (WITH_PYTHON=OFF)
-- With Madgwick = YES (License: GPL)
-- With FastCV = NO (FastCV not found)
-- With PDAL = NO (PDAL not found)
-- With libLAS = NO (WITH_LIBLAS=OFF)
-- With CudaSift = NO (WITH_CUDASIFT=OFF)
-- Solvers:
-- With TORO = YES (License: Creative Commons [Attribution-NonCommercial-ShareAlike])
-- *With g2o 1.0.0 = YES (License: BSD)
-- *With GTSAM = NO (GTSAM not found)
-- *With Ceres = NO (WITH_CERES=OFF)
-- With MRPT = NO (MRPT not found)
-- With VERTIGO = YES (License: GPLv3)
-- With cvsba = NO (WITH_CVSBA=OFF)
-- *With libpointmatcher = NO (libpointmatcher not found)
-- With CCCoreLib = NO (WITH_CCCORELIB=OFF)
-- With Open3D = NO (WITH_OPEN3D=OFF)
-- With OpenGV = NO (OpenGV not found)
-- Reconstruction Approaches:
-- With OctoMap = NO (octomap not found)
-- With GridMap = NO (grid_map_core not found)
-- With CPUTSDF = NO (WITH_CPUTSDF=OFF)
-- With OpenChisel = NO (WITH_OPENCHISEL=OFF)
-- With AliceVision = NO (WITH_ALICE_VISION=OFF)
-- Camera Drivers:
-- With Freenect = YES (License: Apache v2 and/or GPLv2)
-- With OpenNI = NO (OpenNI not found)
-- With OpenNI2 = YES (License: Apache v2)
-- With Freenect2 = NO (libfreenect2 not found)
-- With Kinect for Windows 2 = NO (Kinect for Windows 2 SDK not found)
-- With Kinect for Azure = NO (Kinect for Azure SDK not found)
-- With dc1394 = YES (License: LGPL)
-- With FlyCapture2/Triclops = NO (Point Grey SDK not found)
-- With ZED = NO (ZED sdk and/or cuda not found)
-- With ZEDOC = NO (ZED Open Capture not found)
-- With RealSense = NO (librealsense not found)
-- With RealSense2 = NO (librealsense2 not found)
-- With MyntEyeS = NO (mynteye s sdk not found)
-- With DepthAI = NO (WITH_DEPTHAI=OFF)
-- With XVisio SDK = NO (WITH_XVSDK=OFF)
-- Odometry Approaches:
-- With loam_velodyne = NO (WITH_LOAM=OFF)
-- With floam = NO (WITH_FLOAM=OFF)
-- With libfovis = NO (WITH_FOVIS=OFF)
-- With libviso2 = NO (WITH_VISO2=OFF)
-- With dvo_core = NO (WITH_DVO=OFF)
-- With okvis = NO (WITH_OKVIS=OFF)
-- With msckf_vio = NO (WITH_MSCKF_VIO=OFF)
-- With VINS-Fusion = NO (WITH_VINS=OFF)
-- With OpenVINS = NO (WITH_OPENVINS=OFF)
-- With ORB_SLAM = NO (WITH_ORB_SLAM=OFF)
-- Show all options with: cmake -LA | grep WITH_
-- Configuring done
-- Generating done
The text was updated successfully, but these errors were encountered: