diff --git a/.appveyor.yml b/.appveyor.yml
index a77f758a7e..9f19d0ae55 100644
--- a/.appveyor.yml
+++ b/.appveyor.yml
@@ -17,6 +17,9 @@ init:
- call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86_amd64
install:
+ # To download from google drive
+ - set PATH=C:\Python38-x64;C:\Python38-x64\Scripts;%PATH%
+ - ps: py -m pip --disable-pip-version-check install gdown
# Qt
- set QTDIR=C:\Qt\5.10.1\msvc2015_64
# make sure Qt bin path is before cmake bin path to avoid copying qt5 dlls from cmake before qt installation
@@ -73,7 +76,7 @@ install:
- ps: "ls \"C:/Program Files/PCL\""
- set PATH=%PATH%;C:\Program Files\PCL\bin
# zlib
- - ps: wget 'https://docs.google.com/uc?authuser=0&id=0B46akLGdg-uaYm9MTTI4MUtUcmc&export=download' -outfile zlib-1.2.8-vc2010-x64.zip
+ - ps: gdown -q 0B46akLGdg-uaYm9MTTI4MUtUcmc
- ps: Expand-Archive zlib-1.2.8-vc2010-x64.zip -DestinationPath 'C:\Program Files'
- ECHO "Installed zlib:"
- ps: "ls \"C:/Program Files/zlib\""
diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json
new file mode 100644
index 0000000000..476d9718b7
--- /dev/null
+++ b/.devcontainer/devcontainer.json
@@ -0,0 +1,8 @@
+{
+ "image": "introlab3it/rtabmap:20.04",
+ "customizations": {
+ "vscode": {
+ "extensions": ["ms-vscode.cpptools-themes", "ms-vscode.cmake-tools", "vscjava.vscode-java-pack"]
+ }
+ }
+}
diff --git a/.github/workflows/cmake-ros.yml b/.github/workflows/cmake-ros.yml
index 4e29e0ef4f..c300841cf0 100644
--- a/.github/workflows/cmake-ros.yml
+++ b/.github/workflows/cmake-ros.yml
@@ -2,10 +2,10 @@ name: CMake-ROS
on:
push:
- branches:
- - '**'
+ branches:
+ - master
pull_request:
- branches:
+ branches:
- '**'
env:
@@ -22,33 +22,29 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
- ros_distribution: [melodic, noetic, foxy, galactic, humble, rolling]
+ ros_distribution: [ noetic, humble, iron, rolling]
include:
- - ros_distribution: 'melodic'
- os: ubuntu-18.04
- ros_distribution: 'noetic'
os: ubuntu-20.04
- - ros_distribution: 'foxy'
- os: ubuntu-20.04
- - ros_distribution: 'galactic'
- os: ubuntu-20.04
- ros_distribution: 'humble'
os: ubuntu-22.04
+ - ros_distribution: 'iron'
+ os: ubuntu-22.04
- ros_distribution: 'rolling'
os: ubuntu-22.04
- steps:
- - uses: ros-tooling/setup-ros@v0.4
+ steps:
+ - uses: ros-tooling/setup-ros@v0.6
with:
required-ros-distributions: ${{ matrix.ros_distribution }}
+ - uses: actions/checkout@v2
+
- name: Install dependencies
run: |
- sudo apt-get update
- sudo apt-get -y install ros-${{ matrix.ros_distribution }}-rtabmap
- sudo apt-get -y remove ros-${{ matrix.ros_distribution }}-rtabmap
-
- - uses: actions/checkout@v2
+ source /opt/ros/${{ matrix.ros_distribution }}/setup.bash
+ rosdep update
+ rosdep install --from-paths ${{github.workspace}} -y
- name: Configure CMake
run: |
diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml
index c24c3cff61..99e79ccd74 100644
--- a/.github/workflows/cmake.yml
+++ b/.github/workflows/cmake.yml
@@ -3,7 +3,7 @@ name: CMake
on:
push:
branches:
- - '**'
+ - master
pull_request:
branches:
- '**'
@@ -17,14 +17,14 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
- os: [ubuntu-22.04, ubuntu-20.04, ubuntu-18.04]
+ os: [ubuntu-22.04, ubuntu-20.04]
steps:
- name: Install dependencies
run: |
DEBIAN_FRONTEND=noninteractive
sudo apt-get update
- sudo apt-get -y install libopencv-dev libpcl-dev git cmake software-properties-common
+ sudo apt-get -y install libopencv-dev libpcl-dev git cmake software-properties-common libyaml-cpp-dev
- uses: actions/checkout@v2
diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml
index e6f65ec933..13a41ecba0 100644
--- a/.github/workflows/docker.yml
+++ b/.github/workflows/docker.yml
@@ -6,22 +6,72 @@ on:
- 'master'
jobs:
- docker:
+ docker_deps:
runs-on: ubuntu-latest
strategy:
matrix:
- docker_tag: [xenial, bionic, focal, android23, android24, android26, android30]
+ docker_tag: [focal-deps, jammy-deps, jammy-iron-deps]
include:
- - docker_tag: xenial
+ - docker_tag: focal-deps
docker_tags: |
- introlab3it/rtabmap:xenial
- introlab3it/rtabmap:16.04
- docker_args: |
- NOT_USED=0
+ introlab3it/rtabmap:focal-deps
+ docker_platforms: |
+ linux/amd64
+ linux/arm64
+ docker_path: 'focal/deps'
+ - docker_tag: jammy-deps
+ docker_tags: |
+ introlab3it/rtabmap:jammy-deps
docker_platforms: |
linux/amd64
- docker_path: 'xenial'
+ linux/arm64
+ docker_path: 'jammy/deps'
+ - docker_tag: jammy-iron-deps
+ docker_tags: |
+ introlab3it/rtabmap:jammy-iron-deps
+ docker_platforms: |
+ linux/amd64
+ docker_path: 'jammy-iron/deps'
+
+ steps:
+ -
+ name: Checkout
+ uses: actions/checkout@v2
+ -
+ name: Set up QEMU
+ uses: docker/setup-qemu-action@v1
+ with:
+ platforms: all
+ -
+ name: Set up Docker Buildx
+ uses: docker/setup-buildx-action@v1
+ -
+ name: Login to DockerHub
+ uses: docker/login-action@v1
+ with:
+ username: ${{ secrets.DOCKERHUB_USERNAME }}
+ password: ${{ secrets.DOCKERHUB_TOKEN }}
+ -
+ name: Build and push
+ uses: docker/build-push-action@v2
+ with:
+ context: .
+ push: true
+ platforms: ${{ matrix.docker_platforms }}
+ file: ./docker/${{ matrix.docker_path }}/Dockerfile
+ tags: ${{ matrix.docker_tags }}
+ cache-from: type=registry,ref=introlab3it/rtabmap:${{ matrix.docker_tag }}
+ cache-to: type=inline
+
+ docker:
+ needs: docker_deps
+ runs-on: ubuntu-latest
+
+ strategy:
+ matrix:
+ docker_tag: [bionic, focal, jammy, jammy-iron, android23, android24, android26, android30]
+ include:
- docker_tag: bionic
docker_tags: |
introlab3it/rtabmap:bionic
@@ -43,6 +93,24 @@ jobs:
linux/amd64
linux/arm64
docker_path: 'focal'
+ - docker_tag: jammy
+ docker_tags: |
+ introlab3it/rtabmap:jammy
+ introlab3it/rtabmap:22.04
+ docker_args: |
+ NOT_USED=0
+ docker_platforms: |
+ linux/amd64
+ linux/arm64
+ docker_path: 'jammy'
+ - docker_tag: jammy-iron
+ docker_tags: |
+ introlab3it/rtabmap:jammy-iron
+ docker_args: |
+ NOT_USED=0
+ docker_platforms: |
+ linux/amd64
+ docker_path: 'jammy-iron'
- docker_tag: android23
docker_tags: |
introlab3it/rtabmap:android23
diff --git a/.gitignore b/.gitignore
index 797bb421b5..5b6152a911 100644
--- a/.gitignore
+++ b/.gitignore
@@ -10,3 +10,5 @@ app/android/AndroidManifest.xml
app/android/res/raw/
compile_flags.txt
tags
+build_*
+*.bak
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b58dd88c33..3fdc00062a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,5 +1,5 @@
# Top-Level CmakeLists.txt
-cmake_minimum_required(VERSION 3.5)
+cmake_minimum_required(VERSION 3.10)
PROJECT( RTABMap )
SET(PROJECT_PREFIX rtabmap)
@@ -19,8 +19,8 @@ SET(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake_modules")
# VERSION
#######################
SET(RTABMAP_MAJOR_VERSION 0)
-SET(RTABMAP_MINOR_VERSION 20)
-SET(RTABMAP_PATCH_VERSION 22)
+SET(RTABMAP_MINOR_VERSION 21)
+SET(RTABMAP_PATCH_VERSION 2)
SET(RTABMAP_VERSION
${RTABMAP_MAJOR_VERSION}.${RTABMAP_MINOR_VERSION}.${RTABMAP_PATCH_VERSION})
@@ -69,7 +69,11 @@ if(POLICY CMP0020)
cmake_policy(SET CMP0020 NEW)
endif()
if(POLICY CMP0043)
- cmake_policy(SET CMP0043 OLD)
+ cmake_policy(SET CMP0043 NEW)
+endif()
+# To suppress g2o related opengl warning
+if(POLICY CMP0072)
+ cmake_policy(SET CMP0072 NEW)
endif()
IF(MINGW)
@@ -106,6 +110,7 @@ if(MSVC)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP${N}")
endif()
endif()
+ add_compile_options("/bigobj")
endif()
# [Eclipse] Automatic Discovery of Include directories (Optional, but handy)
@@ -145,7 +150,7 @@ endif()
set(INSTALL_CMAKE_DIR ${DEF_INSTALL_CMAKE_DIR})
####### BUILD OPTIONS #######
-
+include (GenerateExportHeader)
# ANDROID_PREBUILD (early exit if true)
OPTION( ANDROID_PREBUILD "Set to ON to build rtabmap resource build tool (required for android build)" OFF )
IF(ANDROID_PREBUILD)
@@ -182,6 +187,7 @@ option(WITH_G2O "Include g2o support" ON)
option(WITH_GTSAM "Include GTSAM support" ON)
option(WITH_TORO "Include TORO support" ON)
option(WITH_CERES "Include Ceres support" OFF)
+option(WITH_MRPT "Include MRPT support" ON)
option(WITH_VERTIGO "Include Vertigo support" ON)
option(WITH_CVSBA "Include cvsba support" OFF)
option(WITH_POINTMATCHER "Include libpointmatcher support" ON)
@@ -212,7 +218,7 @@ option(WITH_OPENVINS "Include OpenVINS support" OFF)
option(WITH_MADGWICK "Include Madgwick IMU filtering support" ON)
option(WITH_FASTCV "Include FastCV support" ON)
option(WITH_OPENMP "Include OpenMP support" ON)
-option(WITH_OPENGV "Include OpenGV support" OFF)
+option(WITH_OPENGV "Include OpenGV support" ON)
IF(MOBILE_BUILD)
option(PCL_OMP "With PCL OMP implementations" OFF)
ELSE()
@@ -220,9 +226,9 @@ option(PCL_OMP "With PCL OMP implementations" ON)
ENDIF()
set(RTABMAP_QT_VERSION AUTO CACHE STRING "Force a specific Qt version.")
-set_property(CACHE RTABMAP_QT_VERSION PROPERTY STRINGS AUTO 4 5)
+set_property(CACHE RTABMAP_QT_VERSION PROPERTY STRINGS AUTO 4 5 6)
-FIND_PACKAGE(OpenCV REQUIRED QUIET COMPONENTS core calib3d imgproc highgui stitching photo video OPTIONAL_COMPONENTS aruco xfeatures2d nonfree gpu cudafeatures2d)
+FIND_PACKAGE(OpenCV REQUIRED QUIET COMPONENTS core calib3d imgproc highgui stitching photo video videoio OPTIONAL_COMPONENTS aruco xfeatures2d nonfree gpu cudafeatures2d)
IF(WITH_QT)
FIND_PACKAGE(PCL 1.7 REQUIRED QUIET COMPONENTS common io kdtree search surface filters registration sample_consensus segmentation visualization)
@@ -291,35 +297,55 @@ IF(WITH_QT)
ENDIF(NOT VTK_FOUND)
# If Qt is here, the GUI will be built
- # look for Qt5 (if vtk>5 is installed) before Qt4
- IF("${VTK_MAJOR_VERSION}" GREATER 5)
- if(RTABMAP_QT_VERSION STREQUAL "AUTO" OR RTABMAP_QT_VERSION STREQUAL "5")
- FIND_PACKAGE(Qt5 COMPONENTS Widgets Core Gui QUIET)
- IF(Qt5_FOUND)
- FIND_PACKAGE(Qt5 COMPONENTS Widgets Core Gui OPTIONAL_COMPONENTS Svg)
- ENDIF(Qt5_FOUND)
+ IF(NOT(${VTK_MAJOR_VERSION} LESS 9))
+ IF(NOT VTK_QT_VERSION)
+ MESSAGE(FATAL_ERROR "WITH_QT option is ON, but VTK ${VTK_MAJOR_VERSION} has not been built with Qt support, disabling Qt.")
+ ENDIF()
+ MESSAGE(STATUS "VTK>=9 detected, will use VTK_QT_VERSION=${VTK_QT_VERSION} for Qt version.")
+ IF(${VTK_QT_VERSION} EQUAL 6)
+ FIND_PACKAGE(Qt6 COMPONENTS Widgets Core Gui OpenGL PrintSupport QUIET OPTIONAL_COMPONENTS Svg)
+ ELSEIF(${VTK_QT_VERSION} EQUAL 5)
+ FIND_PACKAGE(Qt5 COMPONENTS Widgets Core Gui OpenGL PrintSupport QUIET OPTIONAL_COMPONENTS Svg)
+ ELSE()
+ FIND_PACKAGE(Qt4 COMPONENTS QtCore QtGui OPTIONAL_COMPONENTS QtSvg)
+ ENDIF()
+ ELSE()
+ # look for Qt5 (if vtk>5 is installed) before Qt4
+ IF("${VTK_MAJOR_VERSION}" GREATER 5)
+ IF(RTABMAP_QT_VERSION STREQUAL "AUTO" OR RTABMAP_QT_VERSION STREQUAL "5")
+ FIND_PACKAGE(Qt5 COMPONENTS Widgets Core Gui OpenGL PrintSupport QUIET OPTIONAL_COMPONENTS Svg)
ENDIF(RTABMAP_QT_VERSION STREQUAL "AUTO" OR RTABMAP_QT_VERSION STREQUAL "5")
- ENDIF("${VTK_MAJOR_VERSION}" GREATER 5)
+ ENDIF("${VTK_MAJOR_VERSION}" GREATER 5)
- IF(NOT Qt5_FOUND)
+ IF(NOT Qt5_FOUND)
IF(RTABMAP_QT_VERSION STREQUAL "AUTO" OR RTABMAP_QT_VERSION STREQUAL "4")
- FIND_PACKAGE(Qt4 COMPONENTS QtCore QtGui OPTIONAL_COMPONENTS QtSvg)
+ FIND_PACKAGE(Qt4 COMPONENTS QtCore QtGui OPTIONAL_COMPONENTS QtSvg)
ENDIF(RTABMAP_QT_VERSION STREQUAL "AUTO" OR RTABMAP_QT_VERSION STREQUAL "4")
- ENDIF(NOT Qt5_FOUND)
+ ENDIF(NOT Qt5_FOUND)
+ ENDIF()
- IF(QT4_FOUND OR Qt5_FOUND)
+ IF(QT4_FOUND OR Qt5_FOUND OR Qt6_FOUND)
+ # For VCPKG build, set those global variables to off,
+ # we will enable them for jsut specific targets
+ set(CMAKE_AUTOMOC OFF)
+ set(CMAKE_AUTORCC OFF)
+ set(CMAKE_AUTOUIC OFF)
IF("${VTK_MAJOR_VERSION}" EQUAL 5)
FIND_PACKAGE(QVTK REQUIRED) # only for VTK 5
ELSE()
- list(FIND PCL_LIBRARIES VTK::GUISupportQt value)
- IF(value EQUAL -1)
+ list(FIND PCL_LIBRARIES VTK::GUISupportQt value)
+ IF(value EQUAL -1)
list(FIND PCL_LIBRARIES vtkGUISupportQt value)
IF(value EQUAL -1)
- SET(PCL_LIBRARIES "${PCL_LIBRARIES};vtkGUISupportQt")
+ IF(NOT(${VTK_MAJOR_VERSION} LESS 9))
+ SET(PCL_LIBRARIES "${PCL_LIBRARIES};VTK::GUISupportQt")
+ ELSE()
+ SET(PCL_LIBRARIES "${PCL_LIBRARIES};vtkGUISupportQt")
+ ENDIF()
SET(ADD_VTK_GUI_SUPPORT_QT_TO_CONF TRUE)
ENDIF(value EQUAL -1)
- ENDIF(value EQUAL -1)
-
+ ENDIF(value EQUAL -1)
+
MESSAGE(STATUS "VTK_RENDERING_BACKEND=${VTK_RENDERING_BACKEND}")
IF(VTK_RENDERING_BACKEND STREQUAL "OpenGL2")
@@ -337,17 +363,17 @@ IF(WITH_QT)
ENDIF(value EQUAL -1)
ELSEIF("${VTK_MAJOR_VERSION}" EQUAL 9)
list(FIND PCL_LIBRARIES VTK::RenderingOpenGL2 value)
- IF(NOT value EQUAL -1)
- list(FIND PCL_LIBRARIES VTK::RenderingVolumeOpenGL2 value)
+ IF(NOT value EQUAL -1)
+ list(FIND PCL_LIBRARIES VTK::RenderingVolumeOpenGL2 value)
IF(value EQUAL -1)
SET(PCL_LIBRARIES "${PCL_LIBRARIES};VTK::RenderingVolumeOpenGL2")
ENDIF(value EQUAL -1)
- ENDIF(NOT value EQUAL -1)
+ ENDIF(NOT value EQUAL -1)
ENDIF()
ENDIF()
ADD_DEFINITIONS(-DQT_NO_KEYWORDS) # To avoid conflicts with boost signals/foreach and Qt macros
- ENDIF(QT4_FOUND OR Qt5_FOUND)
+ ENDIF(QT4_FOUND OR Qt5_FOUND OR Qt6_FOUND)
ENDIF(WITH_QT)
IF(NOT VTK_FOUND)
@@ -368,6 +394,7 @@ IF(WITH_PYTHON)
FIND_PACKAGE(Python3 COMPONENTS Interpreter Development NumPy)
IF(Python3_FOUND)
MESSAGE(STATUS "Found Python3")
+ FIND_PACKAGE(pybind11 REQUIRED)
ENDIF(Python3_FOUND)
ENDIF(WITH_PYTHON)
@@ -405,7 +432,7 @@ ENDIF(WITH_FREENECT2)
IF(WITH_K4W2 AND WIN32)
FIND_PACKAGE(KinectSDK2 QUIET)
- IF(KinectSDK2_FOUND)
+ IF(KinectSDK2_FOUND)
MESSAGE(STATUS "Found Kinect for Windows 2: ${KinectSDK2_INCLUDE_DIRS}")
ENDIF(KinectSDK2_FOUND)
ENDIF(WITH_K4W2 AND WIN32)
@@ -420,7 +447,7 @@ IF(WITH_K4A)
SET(k4a_FOUND FALSE)
ENDIF(NOT (k4a_FOUND AND k4arecord_FOUND))
ENDIF()
- IF(k4a_FOUND)
+ IF(k4a_FOUND)
MESSAGE(STATUS "Found Kinect for Azure: ${k4a_INCLUDE_DIRS}")
ENDIF(k4a_FOUND)
ENDIF(WITH_K4A)
@@ -441,13 +468,13 @@ IF(WITH_DC1394)
ENDIF(WITH_DC1394)
IF(WITH_G2O)
- FIND_PACKAGE(g2o QUIET NO_MODULE)
+ FIND_PACKAGE(g2o NO_MODULE)
IF(g2o_FOUND)
MESSAGE(STATUS "Found g2o (targets)")
- SET(G2O_FOUND ${g2o_FOUND})
- get_target_property(G2O_INCLUDES g2o::core INTERFACE_INCLUDE_DIRECTORIES)
- MESSAGE(STATUS "g2o include dir: ${G2O_INCLUDES}")
- FIND_FILE(G2O_FACTORY_FILE g2o/core/factory.h
+ SET(G2O_FOUND ${g2o_FOUND})
+ get_target_property(G2O_INCLUDES g2o::core INTERFACE_INCLUDE_DIRECTORIES)
+ MESSAGE(STATUS "g2o include dir: ${G2O_INCLUDES}")
+ FIND_FILE(G2O_FACTORY_FILE g2o/core/factory.h
PATHS ${G2O_INCLUDES}
NO_DEFAULT_PATH)
FILE(READ ${G2O_FACTORY_FILE} TMPTXT)
@@ -472,6 +499,14 @@ IF(WITH_GTSAM)
FIND_PACKAGE(GTSAM CONFIG QUIET)
ENDIF(WITH_GTSAM)
+IF(WITH_MRPT)
+ FIND_PACKAGE(MRPT COMPONENTS poses QUIET)
+ IF(MRPT_FOUND)
+ message(STATUS "MRPT_VERSION: ${MRPT_VERSION}")
+ message(STATUS "MRPT_LIBRARIES: ${MRPT_LIBRARIES}")
+ ENDIF(MRPT_FOUND)
+ENDIF(WITH_MRPT)
+
IF(WITH_FLYCAPTURE2)
FIND_PACKAGE(FlyCapture2 QUIET)
IF(FlyCapture2_FOUND)
@@ -489,7 +524,14 @@ ENDIF(WITH_CVSBA)
IF(WITH_POINTMATCHER)
find_package(libpointmatcher QUIET)
IF(libpointmatcher_FOUND)
- MESSAGE(STATUS "Found libpointmatcher: ${libpointmatcher_INCLUDE_DIRS}")
+ MESSAGE(STATUS "Found libpointmatcher: ${libpointmatcher_INCLUDE_DIRS}")
+ string(FIND "${libpointmatcher_LIBRARIES}" "libnabo" value)
+ IF(value EQUAL -1)
+ # Find libnabo (Issue #1117):
+ find_package(libnabo REQUIRED PATHS ${LIBNABO_INSTALL_DIR})
+ message(STATUS "libnabo found, version ${libnabo_VERSION} (Config mode)")
+ SET(libpointmatcher_LIBRARIES "${libpointmatcher_LIBRARIES};libnabo::nabo")
+ ENDIF(value EQUAL -1)
ENDIF(libpointmatcher_FOUND)
ENDIF(WITH_POINTMATCHER)
@@ -499,8 +541,8 @@ IF(libpointmatcher_FOUND OR GTSAM_FOUND)
find_package(Boost COMPONENTS thread filesystem system program_options date_time chrono timer serialization REQUIRED)
ENDIF(Boost_MINOR_VERSION GREATER 47)
IF(WIN32)
- MESSAGE(STATUS "Boost_LIBRARY_DIRS=${Boost_LIBRARY_DIRS}")
- link_directories(${Boost_LIBRARY_DIRS})
+ MESSAGE(STATUS "Boost_LIBRARY_DIRS=${Boost_LIBRARY_DIRS}")
+ link_directories(${Boost_LIBRARY_DIRS})
ENDIF(WIN32)
ENDIF(libpointmatcher_FOUND OR GTSAM_FOUND)
@@ -737,51 +779,63 @@ IF(WITH_ORB_SLAM AND NOT G2O_FOUND)
ENDIF(WITH_ORB_SLAM AND NOT G2O_FOUND)
IF(NOT MSVC)
- IF((NOT WITH_MSCKF_VIO OR NOT msckf_vio_FOUND) AND (loam_velodyne_FOUND OR floam_FOUND OR PCL_VERSION VERSION_GREATER "1.9.1" OR TORCH_FOUND OR G2O_FOUND OR CCCoreLib_FOUND OR Open3D_FOUND))
- #LOAM, PCL>=1.10, latest g2o and CCCoreLib require c++14, but MSCKF_VIO requires c++11
- include(CheckCXXCompilerFlag)
- CHECK_CXX_COMPILER_FLAG("-std=c++14" COMPILER_SUPPORTS_CXX14)
- IF(COMPILER_SUPPORTS_CXX14)
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14")
- set(CMAKE_CXX_STANDARD 14)
- ELSE()
- message(STATUS "The compiler ${CMAKE_CXX_COMPILER} has no C++14 support. Please use a different C++ compiler if you want to use LOAM, latest PCL or g2o.")
- ENDIF()
- ENDIF()
-
- IF( (NOT (${CMAKE_CXX_STANDARD} STREQUAL "14")) AND (
- G2O_FOUND OR
- GTSAM_FOUND OR
- CERES_FOUND OR
- ZED_FOUND OR
- ZEDOC_FOUND OR
- ANDROID OR
- RealSense_FOUND OR
- realsense2_FOUND OR
- ORB_SLAM_FOUND OR
- okvis_FOUND OR
- open_chisel_FOUND OR
- msckf_vio_FOUND OR
- vins_FOUND OR
- ov_msckf_FOUND OR
- libpointmatcher_FOUND))
- #Newest versions require std11
- include(CheckCXXCompilerFlag)
- CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11)
- CHECK_CXX_COMPILER_FLAG("-std=c++0x" COMPILER_SUPPORTS_CXX0X)
- IF(COMPILER_SUPPORTS_CXX11)
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
- ELSEIF(COMPILER_SUPPORTS_CXX0X)
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
- ELSE()
- message(STATUS "The compiler ${CMAKE_CXX_COMPILER} has no C++11 support. Please use a different C++ compiler.")
- ENDIF()
- ENDIF()
+ IF(Qt6_FOUND OR (G2O_FOUND AND G2O_CPP11 EQUAL 1) OR TORCH_FOUND)
+ # Qt6 requires c++17
+ include(CheckCXXCompilerFlag)
+ CHECK_CXX_COMPILER_FLAG("-std=c++17" COMPILER_SUPPORTS_CXX17)
+ IF(COMPILER_SUPPORTS_CXX17)
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17")
+ set(CMAKE_CXX_STANDARD 17)
+ ELSE()
+ message(STATUS "The compiler ${CMAKE_CXX_COMPILER} has no C++17 support. Please use a different C++ compiler if you want to use Qt6.")
+ ENDIF()
+ ENDIF()
+ IF((NOT (${CMAKE_CXX_STANDARD} STREQUAL "17")) AND (msckf_vio_FOUND OR loam_velodyne_FOUND OR floam_FOUND OR PCL_VERSION VERSION_GREATER "1.9.1" OR G2O_FOUND OR CCCoreLib_FOUND OR Open3D_FOUND))
+ #MSCKF_VIO, LOAM, PCL>=1.10, latest g2o and CCCoreLib require c++14
+ include(CheckCXXCompilerFlag)
+ CHECK_CXX_COMPILER_FLAG("-std=c++14" COMPILER_SUPPORTS_CXX14)
+ IF(COMPILER_SUPPORTS_CXX14)
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14")
+ set(CMAKE_CXX_STANDARD 14)
+ ELSE()
+ message(STATUS "The compiler ${CMAKE_CXX_COMPILER} has no C++14 support. Please use a different C++ compiler if you want to use LOAM, latest PCL or g2o.")
+ ENDIF()
+ ENDIF()
+
+ IF( (NOT (${CMAKE_CXX_STANDARD} STREQUAL "17") AND NOT (${CMAKE_CXX_STANDARD} STREQUAL "14")) AND (
+ G2O_FOUND OR
+ GTSAM_FOUND OR
+ CERES_FOUND OR
+ ZED_FOUND OR
+ ZEDOC_FOUND OR
+ ANDROID OR
+ RealSense_FOUND OR
+ realsense2_FOUND OR
+ ORB_SLAM_FOUND OR
+ okvis_FOUND OR
+ open_chisel_FOUND OR
+ vins_FOUND OR
+ ov_msckf_FOUND OR
+ msckf_vio_FOUND OR
+ libpointmatcher_FOUND))
+ #Newest versions require std11
+ include(CheckCXXCompilerFlag)
+ CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11)
+ CHECK_CXX_COMPILER_FLAG("-std=c++0x" COMPILER_SUPPORTS_CXX0X)
+ IF(COMPILER_SUPPORTS_CXX11)
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
+ ELSEIF(COMPILER_SUPPORTS_CXX0X)
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
+ ELSE()
+ message(STATUS "The compiler ${CMAKE_CXX_COMPILER} has no C++11 support. Please use a different C++ compiler.")
+ ENDIF()
+ ENDIF()
ENDIF()
+
####### OSX BUNDLE CMAKE_INSTALL_PREFIX #######
IF(APPLE AND BUILD_AS_BUNDLE)
- IF(Qt5_FOUND OR (QT4_FOUND AND QT_QTCORE_FOUND AND QT_QTGUI_FOUND))
+ IF(Qt6_FOUND OR Qt5_FOUND OR (QT4_FOUND AND QT_QTCORE_FOUND AND QT_QTGUI_FOUND))
# Required when packaging, and set CMAKE_INSTALL_PREFIX to "/".
SET(CMAKE_INSTALL_PREFIX "/")
@@ -809,11 +863,6 @@ ENDIF(APPLE AND BUILD_AS_BUNDLE)
####### SOURCES (Projects) #######
-# CONF_DEPENDENCIES contains only dependencies not required by the headers
-SET(CONF_DEPENDENCIES
- ${ZLIB_LIBRARIES}
-)
-
# OpenCV2 has nonfree if OPENCV_NONFREE_FOUND
# OpenCV<=3.4.2 has nonfree if OPENCV_XFEATURES2D_FOUND
# OpenCV>3.4.2 has nonfree if OPENCV_XFEATURES2D_FOUND and OPENCV_ENABLE_NONFREE is defined
@@ -834,16 +883,16 @@ IF(NOT G2O_FOUND)
SET(G2O "//")
SET(G2O_CPP_CONF "//")
ELSE()
- SET(CONF_DEPENDENCIES ${CONF_DEPENDENCIES} ${G2O_LIBRARIES})
IF(NOT G2O_CPP11)
- SET(G2O_CPP_CONF "//")
+ SET(G2O_CPP_CONF "//")
ENDIF(NOT G2O_CPP11)
ENDIF()
IF(NOT GTSAM_FOUND)
SET(GTSAM "//")
-ELSE()
- SET(CONF_DEPENDENCIES ${CONF_DEPENDENCIES} ${GTSAM_LIBRARIES})
ENDIF()
+IF(NOT MRPT_FOUND)
+ SET(MRPT "//")
+ENDIF(NOT MRPT_FOUND)
IF(NOT CERES_FOUND)
SET(CERES "//")
ENDIF(NOT CERES_FOUND)
@@ -855,8 +904,6 @@ IF(NOT WITH_VERTIGO)
ENDIF(NOT WITH_VERTIGO)
IF(NOT cvsba_FOUND)
SET(CVSBA "//")
-ELSE()
- SET(CONF_DEPENDENCIES ${CONF_DEPENDENCIES} ${cvsba_LIBRARIES})
ENDIF()
IF(NOT libpointmatcher_FOUND)
SET(POINTMATCHER "//")
@@ -870,9 +917,9 @@ ENDIF(NOT Open3D_FOUND)
IF(NOT FastCV_FOUND)
SET(FASTCV "//")
ENDIF(NOT FastCV_FOUND)
-IF(NOT opengv_FOUND)
+IF(NOT opengv_FOUND OR NOT WITH_OPENGV)
SET(OPENGV "//")
-ENDIF(NOT opengv_FOUND)
+ENDIF(NOT opengv_FOUND OR NOT WITH_OPENGV)
IF(NOT PDAL_FOUND)
SET(PDAL "//")
ENDIF(NOT PDAL_FOUND)
@@ -884,129 +931,109 @@ IF(NOT floam_FOUND)
ENDIF(NOT floam_FOUND)
IF(NOT Freenect_FOUND)
SET(FREENECT "//")
-ELSE()
- SET(CONF_DEPENDENCIES ${CONF_DEPENDENCIES} ${Freenect_LIBRARIES})
ENDIF()
IF(NOT freenect2_FOUND)
SET(FREENECT2 "//")
-ELSE()
- SET(CONF_DEPENDENCIES ${CONF_DEPENDENCIES} ${freenect2_LIBRARIES})
ENDIF()
IF(NOT KinectSDK2_FOUND)
SET(K4W2 "//")
-ELSE()
- SET(CONF_DEPENDENCIES ${CONF_DEPENDENCIES} ${KinectSDK2_LIBRARIES})
ENDIF()
IF(NOT k4a_FOUND)
SET(K4A "//")
-ELSE()
- SET(CONF_DEPENDENCIES ${CONF_DEPENDENCIES} ${k4a_LIBRARIES})
+ SET(CONF_WITH_K4A 0)
+ELSE()
+ SET(CONF_WITH_K4A 1)
+ IF(WIN32)
+ install(
+ FILES
+ "${CMAKE_CURRENT_SOURCE_DIR}/cmake_modules/FindK4A.cmake"
+ DESTINATION ${INSTALL_CMAKE_DIR}/Modules/.
+ COMPONENT devel
+ )
+ ENDIF(WIN32)
ENDIF()
IF(NOT OpenNI2_FOUND)
SET(OPENNI2 "//")
-ELSE()
- SET(CONF_DEPENDENCIES ${CONF_DEPENDENCIES} ${OpenNI2_LIBRARIES})
ENDIF()
IF(NOT DC1394_FOUND)
SET(DC1394 "//")
-ELSE()
- SET(CONF_DEPENDENCIES ${CONF_DEPENDENCIES} ${DC1394_LIBRARIES})
ENDIF()
IF(NOT FlyCapture2_FOUND)
SET(FLYCAPTURE2 "//")
-ELSE()
- SET(CONF_DEPENDENCIES ${CONF_DEPENDENCIES} ${FlyCapture2_LIBRARIES})
ENDIF()
IF(NOT ZED_FOUND)
SET(ZED "//")
-ELSE()
- SET(CONF_DEPENDENCIES ${CONF_DEPENDENCIES} ${ZED_LIBRARIES} ${CUDA_LIBRARIES})
ENDIF()
IF(NOT ZEDOC_FOUND)
SET(ZEDOC "//")
-ELSE()
- SET(CONF_DEPENDENCIES ${CONF_DEPENDENCIES} ${ZEDOC_LIBRARIES})
ENDIF()
IF(NOT RealSense_FOUND)
SET(REALSENSE "//")
-ELSE()
- SET(CONF_DEPENDENCIES ${CONF_DEPENDENCIES} ${RealSense_LIBRARIES})
ENDIF()
IF(NOT RealSenseSlam_FOUND)
SET(REALSENSESLAM "//")
ENDIF(NOT RealSenseSlam_FOUND)
IF(NOT realsense2_FOUND)
SET(REALSENSE2 "//")
-ELSE()
- SET(CONF_DEPENDENCIES ${CONF_DEPENDENCIES} ${realsense2_LIBRARIES})
+ SET(CONF_WITH_REALSENSE2 0)
+ELSE()
+ SET(CONF_WITH_REALSENSE2 1)
+ IF(WIN32)
+ install(
+ FILES
+ "${CMAKE_CURRENT_SOURCE_DIR}/cmake_modules/FindRealSense2.cmake"
+ DESTINATION ${INSTALL_CMAKE_DIR}/Modules/.
+ COMPONENT devel
+ )
+ ENDIF(WIN32)
ENDIF()
IF(NOT mynteye_FOUND)
SET(MYNTEYE "//")
ENDIF(NOT mynteye_FOUND)
IF(NOT depthai_FOUND)
- SET(CONF_DEPTH_AI OFF)
+ SET(CONF_WITH_DEPTH_AI 0)
SET(DEPTHAI "//")
ELSE()
- SET(CONF_DEPTH_AI ON)
- SET(CONF_DEPENDENCIES ${CONF_DEPENDENCIES} depthai::core depthai::opencv)
+ SET(CONF_WITH_DEPTH_AI 1)
ENDIF()
IF(NOT octomap_FOUND)
SET(OCTOMAP "//")
+ SET(CONF_WITH_OCTOMAP 0)
ELSE()
- SET(CONF_DEPENDENCIES ${CONF_DEPENDENCIES} ${OCTOMAP_LIBRARIES})
+ SET(CONF_WITH_OCTOMAP 1)
ENDIF()
IF(NOT CPUTSDF_FOUND)
SET(CPUTSDF "//")
-ELSE()
- SET(CONF_DEPENDENCIES ${CONF_DEPENDENCIES} ${CPUTSDF_LIBRARIES})
ENDIF()
IF(NOT open_chisel_FOUND)
SET(OPENCHISEL "//")
-ELSE()
- SET(CONF_DEPENDENCIES ${CONF_DEPENDENCIES} ${open_chisel_LIBRARIES})
ENDIF()
IF(NOT AliceVision_FOUND)
SET(ALICE_VISION "//")
ENDIF(NOT AliceVision_FOUND)
IF(NOT libfovis_FOUND)
SET(FOVIS "//")
-ELSE()
- SET(CONF_DEPENDENCIES ${CONF_DEPENDENCIES} ${libfovis_LIBRARIES})
ENDIF()
IF(NOT libviso2_FOUND)
SET(VISO2 "//")
-ELSE()
- SET(CONF_DEPENDENCIES ${CONF_DEPENDENCIES} ${libviso2_LIBRARIES})
ENDIF()
IF(NOT dvo_core_FOUND)
SET(DVO "//")
-ELSE()
- SET(CONF_DEPENDENCIES ${CONF_DEPENDENCIES} ${dvo_core_LIBRARIES})
ENDIF()
IF(NOT okvis_FOUND)
SET(OKVIS "//")
-ELSE()
- SET(CONF_DEPENDENCIES ${CONF_DEPENDENCIES} ${OKVIS_LIBRARIES})
ENDIF()
IF(NOT msckf_vio_FOUND)
SET(MSCKF_VIO "//")
-ELSE()
- SET(CONF_DEPENDENCIES ${CONF_DEPENDENCIES} ${msckf_vio_LIBRARIES})
ENDIF()
IF(NOT vins_FOUND)
SET(VINS "//")
-ELSE()
- SET(CONF_DEPENDENCIES ${CONF_DEPENDENCIES} ${vins_LIBRARIES})
ENDIF()
IF(NOT ov_msckf_FOUND)
SET(OPENVINS "//")
-ELSE()
- SET(CONF_DEPENDENCIES ${CONF_DEPENDENCIES} ${ov_msckf_LIBRARIES})
ENDIF()
IF(NOT ORB_SLAM_FOUND)
SET(ORB_SLAM "//")
-ELSE()
- SET(CONF_DEPENDENCIES ${CONF_DEPENDENCIES} ${ORB_SLAM_LIBRARIES})
ENDIF()
IF(NOT WITH_ORB_OCTREE)
SET(ORB_OCTREE "//")
@@ -1016,21 +1043,20 @@ IF(NOT TORCH_FOUND)
ENDIF()
IF(NOT WITH_PYTHON OR NOT Python3_FOUND)
SET(PYTHON "//")
+ SET(CONF_WITH_PYTHON 0)
+ELSE()
+ SET(CONF_WITH_PYTHON 1)
ENDIF()
IF(ADD_VTK_GUI_SUPPORT_QT_TO_CONF)
SET(CONF_VTK_QT true)
- SET(CONF_DEPENDENCIES ${CONF_DEPENDENCIES} vtkGUISupportQt)
ELSE()
SET(CONF_VTK_QT false)
ENDIF()
-IF(VTK_USE_QVTK)
- SET(CONF_DEPENDENCIES ${CONF_DEPENDENCIES} ${QVTK_LIBRARY})
-ENDIF(VTK_USE_QVTK)
IF(NOT WITH_MADGWICK)
SET(MADGWICK "//")
ENDIF()
-CONFIGURE_FILE(Version.h.in ${CMAKE_CURRENT_BINARY_DIR}/corelib/include/${PROJECT_PREFIX}/core/Version.h)
+CONFIGURE_FILE(Version.h.in ${CMAKE_CURRENT_BINARY_DIR}/corelib/src/include/${PROJECT_PREFIX}/core/Version.h)
ADD_SUBDIRECTORY( utilite )
ADD_SUBDIRECTORY( corelib )
@@ -1039,7 +1065,7 @@ IF(ANDROID)
IF(BUILD_APP)
ADD_SUBDIRECTORY( app )
ENDIF(BUILD_APP)
-ELSEIF(Qt5_FOUND OR (QT4_FOUND AND QT_QTCORE_FOUND AND QT_QTGUI_FOUND))
+ELSEIF(Qt6_FOUND OR Qt5_FOUND OR (QT4_FOUND AND QT_QTCORE_FOUND AND QT_QTGUI_FOUND))
ADD_SUBDIRECTORY( guilib )
IF(BUILD_APP)
ADD_SUBDIRECTORY( app )
@@ -1067,55 +1093,84 @@ ADD_CUSTOM_TARGET(uninstall
"${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake")
####
-# Setup RTABMapConfig.cmake
+# Global Export Target
####
-# Create the RTABMapConfig.cmake and RTABMapConfigVersion files
-file(RELATIVE_PATH REL_INCLUDE_DIR "${CMAKE_INSTALL_PREFIX}/${INSTALL_CMAKE_DIR}" "${CMAKE_INSTALL_PREFIX}/${INSTALL_INCLUDE_DIR}")
-file(RELATIVE_PATH REL_LIB_DIR "${CMAKE_INSTALL_PREFIX}/${INSTALL_CMAKE_DIR}" "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}")
-
-# ... for the build tree
-set(CONF_INCLUDE_DIRS "${PROJECT_BINARY_DIR}/corelib/include"
- "${PROJECT_SOURCE_DIR}/corelib/include"
- "${PROJECT_SOURCE_DIR}/guilib/include"
- "${PROJECT_SOURCE_DIR}/utilite/include")
-set(CONF_LIB_DIR "${CMAKE_ARCHIVE_OUTPUT_DIRECTORY} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}")
-IF(QT4_FOUND OR Qt5_FOUND)
+add_library(rtabmap INTERFACE)
+add_library(rtabmap::rtabmap ALIAS rtabmap)
+IF(QT4_FOUND OR Qt5_FOUND OR Qt6_FOUND)
set(CONF_WITH_GUI ON)
IF(QT4_FOUND)
set(CONF_QT_VERSION 4)
- ELSE()
+ ELSEIF(Qt5_FOUND)
set(CONF_QT_VERSION 5)
+ ELSE()
+ set(CONF_QT_VERSION 6)
ENDIF()
+ target_link_libraries(rtabmap INTERFACE rtabmap_utilite rtabmap_core rtabmap_gui)
ELSE()
set(CONF_WITH_GUI OFF)
+ target_link_libraries(rtabmap INTERFACE rtabmap_utilite rtabmap_core)
ENDIF()
-configure_file(RTABMapConfig.cmake.in
- "${PROJECT_BINARY_DIR}/RTABMapConfig.cmake" @ONLY)
-
-# ... for the install tree
-set(CONF_INCLUDE_DIRS "\${RTABMap_CMAKE_DIR}/${REL_INCLUDE_DIR}")
-set(CONF_LIB_DIR "\${RTABMap_CMAKE_DIR}/${REL_LIB_DIR}")
-configure_file(RTABMapConfig.cmake.in
- "${PROJECT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/RTABMapConfig.cmake" @ONLY)
+install(TARGETS rtabmap EXPORT rtabmapTargets)
+export(EXPORT rtabmapTargets
+ FILE "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}Targets.cmake"
+ NAMESPACE rtabmap::
+)
+install(EXPORT rtabmapTargets
+ FILE
+ ${PROJECT_NAME}Targets.cmake
+ DESTINATION
+ ${INSTALL_CMAKE_DIR}
+ NAMESPACE rtabmap::
+ COMPONENT
+ devel
+)
+
+####
+# Setup RTABMapConfig.cmake
+####
+include(CMakePackageConfigHelpers)
+write_basic_package_version_file(
+ "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake"
+ VERSION ${PROJECT_VERSION}
+ COMPATIBILITY AnyNewerVersion
+)
+
+# Build tree:
+SET(CONF_MODULES_DIR "../cmake_modules")
+configure_file(
+ ${PROJECT_NAME}Config.cmake.in
+ "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}Config.cmake"
+ @ONLY
+)
+
+# Install tree:
+SET(CONF_MODULES_DIR "Modules")
+configure_file(
+ ${PROJECT_NAME}Config.cmake.in
+ "${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/${PROJECT_NAME}Config.cmake"
+ @ONLY
+)
+install(
+ FILES
+ "${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/${PROJECT_NAME}Config.cmake"
+ "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake"
+ DESTINATION
+ ${INSTALL_CMAKE_DIR}
+ COMPONENT
+ devel
+)
-# ... for both
-configure_file(RTABMapConfigVersion.cmake.in
- "${PROJECT_BINARY_DIR}/RTABMapConfigVersion.cmake" @ONLY)
-
-# Install the RTABMapConfig.cmake and RTABMapConfigVersion.cmake
-install(FILES
- "${PROJECT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/RTABMapConfig.cmake"
- "${PROJECT_BINARY_DIR}/RTABMapConfigVersion.cmake"
- DESTINATION "${INSTALL_CMAKE_DIR}" COMPONENT devel)
####
### Install package.xml for catkin
-install(FILES package.xml DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/${PROJECT_PREFIX}")
+install(FILES package.xml DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/${PROJECT_PREFIX}" COMPONENT devel)
#######################
# CPACK (Packaging)
#######################
IF(BUILD_AS_BUNDLE)
+ SET(CMAKE_INSTALL_SYSTEM_RUNTIME_COMPONENT runtime)
INCLUDE(InstallRequiredSystemLibraries)
ENDIF(BUILD_AS_BUNDLE)
@@ -1132,6 +1187,7 @@ SET(CPACK_PACKAGE_VERSION_PATCH "${PROJECT_VERSION_PATCH}")
#SET(CPACK_SOURCE_PACKAGE_FILE_NAME "${PROJECT_NAME}-${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
SET(CPACK_PACKAGE_CONTACT "matlabbe@gmail.com")
+
set(CPACK_SOURCE_IGNORE_FILES
"\\\\.svn/"
"\\\\.settings/"
@@ -1259,6 +1315,9 @@ MESSAGE(STATUS " With VTK ${VTK_MAJOR_VERSION}.${VTK_MINOR_VERSION}
ELSEIF(Qt5_FOUND)
MESSAGE(STATUS " With Qt ${Qt5_VERSION} = YES (License: Open Source or Commercial)")
MESSAGE(STATUS " With VTK ${VTK_MAJOR_VERSION}.${VTK_MINOR_VERSION} = YES (License: BSD)")
+ELSEIF(Qt6_FOUND)
+MESSAGE(STATUS " With Qt ${Qt6_VERSION} = YES (License: Open Source or Commercial)")
+MESSAGE(STATUS " With VTK ${VTK_MAJOR_VERSION}.${VTK_MINOR_VERSION} = YES (License: BSD)")
ELSEIF(NOT WITH_QT)
MESSAGE(STATUS " With Qt = NO (WITH_QT=OFF)")
@@ -1309,7 +1368,7 @@ MESSAGE(STATUS " With FastCV = NO (FastCV not found)")
ENDIF()
IF(PDAL_FOUND)
-MESSAGE(STATUS " With PDAL = YES (License: BSD)")
+MESSAGE(STATUS " With PDAL ${PDAL_VERSION} = YES (License: BSD)")
ELSEIF(NOT WITH_PDAL)
MESSAGE(STATUS " With PDAL = NO (WITH_PDAL=OFF)")
ELSE()
@@ -1325,7 +1384,7 @@ MESSAGE(STATUS " With TORO = NO (WITH_TORO=OFF)")
ENDIF()
IF(G2O_FOUND)
-MESSAGE(STATUS " *With g2o = YES (License: BSD)")
+MESSAGE(STATUS " *With g2o ${g2o_VERSION} = YES (License: BSD)")
ELSEIF(NOT WITH_G2O)
MESSAGE(STATUS " *With g2o = NO (WITH_G2O=OFF)")
ELSE()
@@ -1333,7 +1392,7 @@ MESSAGE(STATUS " *With g2o = NO (g2o not found)")
ENDIF()
IF(GTSAM_FOUND)
-MESSAGE(STATUS " *With GTSAM = YES (License: BSD)")
+MESSAGE(STATUS " *With GTSAM ${GTSAM_VERSION} = YES (License: BSD)")
ELSEIF(NOT WITH_GTSAM)
MESSAGE(STATUS " *With GTSAM = NO (WITH_GTSAM=OFF)")
ELSE()
@@ -1342,9 +1401,9 @@ ENDIF()
IF(CERES_FOUND)
IF(WITH_CERES)
-MESSAGE(STATUS " *With Ceres ${Ceres_VERSION} = YES (License: BSD)")
+MESSAGE(STATUS " *With Ceres ${Ceres_VERSION} = YES (License: BSD)")
ELSE()
-MESSAGE(STATUS " *With Ceres ${Ceres_VERSION} = YES (License: BSD, WITH_CERES=OFF but it is enabled by okvis or floam dependencies)")
+MESSAGE(STATUS " *With Ceres ${Ceres_VERSION} = YES (License: BSD, WITH_CERES=OFF but it is enabled by okvis or floam dependencies)")
ENDIF()
ELSEIF(NOT WITH_CERES)
MESSAGE(STATUS " *With Ceres = NO (WITH_CERES=OFF)")
@@ -1352,6 +1411,14 @@ ELSE()
MESSAGE(STATUS " *With Ceres = NO (Ceres not found)")
ENDIF()
+IF(MRPT_FOUND)
+MESSAGE(STATUS " With MRPT ${MRPT_VERSION} = YES (License: BSD)")
+ELSEIF(NOT WITH_MRPT)
+MESSAGE(STATUS " With MRPT = NO (WITH_MRPT=OFF)")
+ELSE()
+MESSAGE(STATUS " With MRPT = NO (MRPT not found)")
+ENDIF()
+
IF(G2O_FOUND OR GTSAM_FOUND)
IF(WITH_VERTIGO)
MESSAGE(STATUS " With VERTIGO = YES (License: GPLv3)")
@@ -1371,7 +1438,7 @@ MESSAGE(STATUS " With cvsba = NO (cvsba not found)")
ENDIF()
IF(libpointmatcher_FOUND)
-MESSAGE(STATUS " *With libpointmatcher = YES (License: BSD)")
+MESSAGE(STATUS " *With libpointmatcher ${libpointmatcher_VERSION} = YES (License: BSD)")
ELSEIF(NOT WITH_POINTMATCHER)
MESSAGE(STATUS " *With libpointmatcher = NO (WITH_POINTMATCHER=OFF)")
ELSE()
@@ -1396,8 +1463,8 @@ ELSE()
MESSAGE(STATUS " With Open3D = NO (Open3D not found)")
ENDIF()
-IF(opengv_FOUND)
-MESSAGE(STATUS " With OpenGV = YES (License: BSD)")
+IF(opengv_FOUND AND WITH_OPENGV)
+MESSAGE(STATUS " With OpenGV ${opengv_VERSION} = YES (License: BSD)")
ELSEIF(NOT WITH_OPENGV)
MESSAGE(STATUS " With OpenGV = NO (WITH_OPENGV=OFF)")
ELSE()
@@ -1407,7 +1474,7 @@ ENDIF()
MESSAGE(STATUS "")
MESSAGE(STATUS " Reconstruction Approaches:")
IF(octomap_FOUND)
-MESSAGE(STATUS " With OCTOMAP = YES (License: BSD)")
+MESSAGE(STATUS " With OCTOMAP ${octomap_VERSION} = YES (License: BSD)")
ELSEIF(NOT WITH_OCTOMAP)
MESSAGE(STATUS " With OCTOMAP = NO (WITH_OCTOMAP=OFF)")
ELSE()
@@ -1528,7 +1595,11 @@ MESSAGE(STATUS " With RealSense = NO (librealsense not found)")
ENDIF()
IF(realsense2_FOUND)
+IF(WIN32)
MESSAGE(STATUS " With RealSense2 = YES (License: Apache-2)")
+ELSE()
+MESSAGE(STATUS " With RealSense2 ${realsense2_VERSION} = YES (License: Apache-2)")
+ENDIF()
ELSEIF(NOT WITH_REALSENSE2)
MESSAGE(STATUS " With RealSense2 = NO (WITH_REALSENSE2=OFF)")
ELSE()
@@ -1544,7 +1615,7 @@ MESSAGE(STATUS " With MyntEyeS = NO (mynteye s sdk not found)")
ENDIF()
IF(depthai_FOUND)
-MESSAGE(STATUS " With DepthAI = YES (License: MIT)")
+MESSAGE(STATUS " With DepthAI ${depthai_VERSION} = YES (License: MIT)")
ELSEIF(NOT WITH_DEPTHAI)
MESSAGE(STATUS " With DepthAI = NO (WITH_DEPTHAI=OFF)")
ELSE()
diff --git a/README.md b/README.md
index a344baa179..7e40900a89 100644
--- a/README.md
+++ b/README.md
@@ -4,11 +4,15 @@ rtabmap
[![RTAB-Map Logo](https://raw.githubusercontent.com/introlab/rtabmap/master/guilib/src/images/RTAB-Map100.png)](http://introlab.github.io/rtabmap)
[![Release][release-image]][releases]
+[![Downloads][downloads-image]][downloads]
[![License][license-image]][license]
-[release-image]: https://img.shields.io/badge/release-0.20.16-green.svg?style=flat
+[release-image]: https://img.shields.io/badge/release-0.21.0-green.svg?style=flat
[releases]: https://github.com/introlab/rtabmap/releases
+[downloads-image]: https://img.shields.io/github/downloads/introlab/rtabmap/total?label=downloads
+[downloads]: https://github.com/introlab/rtabmap/releases
+
[license-image]: https://img.shields.io/badge/license-BSD-green.svg?style=flat
[license]: https://github.com/introlab/rtabmap/blob/master/LICENSE
@@ -50,31 +54,29 @@ This project is supported by [IntRoLab - Intelligent / Interactive / Integrated
- ROS 1 |
- Melodic |
- |
-
-
+ ROS 1 |
Noetic |
|
- ROS 2 |
- Foxy |
- |
-
-
- Galactic |
- |
-
-
+ ROS 2 |
Humble |
|
+
+ Iron |
+ |
+
Rolling |
|
+
+ Docker |
+
+ rtabmap
+ |
+ |
+
-
diff --git a/RTABMapConfig.cmake.in b/RTABMapConfig.cmake.in
index da95aeecae..5c6c947e0b 100644
--- a/RTABMapConfig.cmake.in
+++ b/RTABMapConfig.cmake.in
@@ -1,99 +1,99 @@
-# - Config file for the RTABMap package
-# Components:
-# core (required)
-# gui (optional)
-# utilite (required)
-# It defines the following variables
-# RTABMap_INCLUDE_DIRS - include directories for RTABMap
-# RTABMap_LIBRARIES - libraries to link against
-# RTABMap_CORE - core library
-# RTABMap_UTILITE - utilite library
-# RTABMap_GUI - gui library (set if RTABMap is built with Qt)
+include(CMakeFindDependencyMacro)
-# Compute paths
-get_filename_component(RTABMap_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
-set(RTABMap_INCLUDE_DIRS "@CONF_INCLUDE_DIRS@")
+# Mandatory dependencies
+find_dependency(OpenCV COMPONENTS core calib3d imgproc highgui stitching photo video OPTIONAL_COMPONENTS aruco xfeatures2d nonfree gpu cudafeatures2d)
-#core lib
-find_library(RTABMap_CORE_RELEASE NAMES rtabmap_core NO_DEFAULT_PATH HINTS @CONF_LIB_DIR@)
-find_library(RTABMap_CORE_DEBUG NAMES rtabmap_cored NO_DEFAULT_PATH HINTS @CONF_LIB_DIR@)
-
-IF(RTABMap_CORE_DEBUG AND RTABMap_CORE_RELEASE)
- SET(RTABMap_CORE
- debug ${RTABMap_CORE_DEBUG}
- optimized ${RTABMap_CORE_RELEASE}
- )
-ELSEIF(RTABMap_CORE_DEBUG)
- SET(RTABMap_CORE ${RTABMap_CORE_DEBUG})
+if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/RTABMap_guiTargets.cmake")
+ find_dependency(PCL 1.7 COMPONENTS common io kdtree search surface filters registration sample_consensus segmentation visualization)
+
+ if(@CONF_QT_VERSION@ EQUAL 6)
+ find_dependency(Qt6 COMPONENTS Widgets Core Gui OpenGL)
+ elseif(@CONF_QT_VERSION@ EQUAL 5)
+ find_dependency(Qt5 COMPONENTS Widgets Core Gui OpenGL)
+ else() # Qt4
+ find_dependency(Qt4 COMPONENTS QtCore QtGui)
+ endif()
+ set(RTABMap_QT_VERSION @CONF_QT_VERSION@)
ELSE()
- SET(RTABMap_CORE ${RTABMap_CORE_RELEASE})
+ find_dependency(PCL 1.7 COMPONENTS common io kdtree search surface filters registration sample_consensus segmentation)
ENDIF()
+set(RTABMap_DEFINITIONS ${PCL_DEFINITIONS})
+add_definitions(${RTABMap_DEFINITIONS}) # To include -march=native if set
-#utilite lib
-find_library(RTABMap_UTILITE_RELEASE NAMES rtabmap_utilite NO_DEFAULT_PATH HINTS @CONF_LIB_DIR@)
-find_library(RTABMap_UTILITE_DEBUG NAMES rtabmap_utilited NO_DEFAULT_PATH HINTS @CONF_LIB_DIR@)
+# Optional dependencies
+IF(EXISTS "${CMAKE_CURRENT_LIST_DIR}/@CONF_MODULES_DIR@")
+ list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/@CONF_MODULES_DIR@")
+ENDIF()
-IF(RTABMap_UTILITE_DEBUG AND RTABMap_UTILITE_RELEASE)
- SET(RTABMap_UTILITE
- debug ${RTABMap_UTILITE_DEBUG}
- optimized ${RTABMap_UTILITE_RELEASE}
- )
-ELSEIF(RTABMap_UTILITE_DEBUG)
- SET(RTABMap_UTILITE ${RTABMap_UTILITE_DEBUG})
-ELSE()
- SET(RTABMap_UTILITE ${RTABMap_UTILITE_RELEASE})
+IF(@CONF_WITH_REALSENSE2@)
+ IF(WIN32)
+ find_dependency(RealSense2)
+ ELSE()
+ find_dependency(realsense2)
+ ENDIF()
ENDIF()
-set(RTABMap_LIBRARIES ${RTABMap_CORE} ${RTABMap_UTILITE})
+IF(@CONF_WITH_K4A@)
+ IF(WIN32)
+ find_dependency(K4A)
+ ELSE()
+ find_dependency(k4a)
+ find_dependency(k4arecord)
+ ENDIF()
+ENDIF()
-list(LENGTH RTABMap_FIND_COMPONENTS RTABMap_FIND_COMPONENTS_LENGTH)
-set(WITH_GUI ON)
-if(${RTABMap_FIND_COMPONENTS_LENGTH} GREATER 0)
- list (FIND RTABMap_FIND_COMPONENTS "gui" _index)
- if (${_index} EQUAL -1)
- set(WITH_GUI OFF)
- endif()
-endif(${RTABMap_FIND_COMPONENTS_LENGTH} GREATER 0)
+IF(@CONF_WITH_DEPTH_AI@)
+ find_dependency(depthai 2)
+ENDIF()
+
+IF(@CONF_WITH_OCTOMAP@)
+ find_dependency(octomap)
+ENDIF()
+
+IF(@CONF_WITH_PYTHON@)
+ find_dependency(Python3 COMPONENTS Interpreter Development NumPy)
+ENDIF()
+# Provide those for backward compatibilities (e.g., catkin requires them to propagate dependencies)
+set(RTABMap_INCLUDE_DIRS "")
+set(RTABMap_LIBRARIES "")
+set(RTABMap_TARGETS "")
-#gui lib (OFF if RTAB-Map is not built with Qt)
-if(@CONF_WITH_GUI@ AND ${WITH_GUI})
- find_library(RTABMap_GUI_RELEASE NAMES rtabmap_gui NO_DEFAULT_PATH HINTS @CONF_LIB_DIR@)
- find_library(RTABMap_GUI_DEBUG NAMES rtabmap_guid NO_DEFAULT_PATH HINTS @CONF_LIB_DIR@)
-
- IF(RTABMap_GUI_DEBUG AND RTABMap_GUI_RELEASE)
- SET(RTABMap_GUI
- debug ${RTABMap_GUI_DEBUG}
- optimized ${RTABMap_GUI_RELEASE}
- )
- ELSEIF(RTABMap_GUI_RELEASE)
- SET(RTABMap_GUI ${RTABMap_GUI_RELEASE})
- ELSEIF(RTABMap_GUI_DEBUG)
- SET(RTABMap_GUI ${RTABMap_GUI_DEBUG})
- ENDIF()
-
- set(RTABMap_LIBRARIES ${RTABMap_LIBRARIES} ${RTABMap_GUI})
-elseif(${WITH_GUI})
- MESSAGE(WARNING "Asked for \"gui\" module but RTABMap hasn't been built with gui support.")
-endif()
+set(_RTABMap_supported_components utilite core gui)
-# Dependencies
-if(@CONF_VTK_QT@ AND ${WITH_GUI})
- find_package(VTK COMPONENTS vtkGUISupportQt NO_MODULE) # to define vtkGUISupportQt target
-endif(@CONF_VTK_QT@ AND ${WITH_GUI})
-if(@CONF_DEPTH_AI@)
- FIND_PACKAGE(depthai 2 QUIET REQUIRED)
-endif(@CONF_DEPTH_AI@)
-SET(RTABMap_LIBRARIES ${RTABMap_LIBRARIES} "@CONF_DEPENDENCIES@")
+foreach(_comp ${_RTABMap_supported_components})
+ if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/RTABMap_${_comp}Targets.cmake")
+ include("${CMAKE_CURRENT_LIST_DIR}/RTABMap_${_comp}Targets.cmake")
+ set(RTABMap_${_comp}_FOUND True)
+ set(RTABMap_TARGETS
+ ${RTABMap_TARGETS}
+ rtabmap::${_comp})
+ get_target_property(RTABMap_${_comp}_INCLUDE_DIRS rtabmap::${_comp} INTERFACE_INCLUDE_DIRECTORIES)
+ get_target_property(RTABMap_${_comp}_LIBRARIES rtabmap::${_comp} INTERFACE_LINK_LIBRARIES)
+ set(RTABMap_INCLUDE_DIRS
+ ${RTABMap_INCLUDE_DIRS}
+ ${RTABMap_${_comp}_INCLUDE_DIRS})
+ set(RTABMap_LIBRARIES
+ ${RTABMap_LIBRARIES}
+ rtabmap::${_comp})
+ if(RTABMap_${_comp}_LIBRARIES)
+ set(RTABMap_LIBRARIES
+ ${RTABMap_LIBRARIES}
+ ${RTABMap_${_comp}_LIBRARIES})
+ endif()
+ else()
+ set(RTABMap_${_comp}_FOUND False)
+ endif()
+endforeach()
-#backward compatibilities
-set(RTABMAP_CORE ${RTABMap_CORE})
-set(RTABMAP_UTILITE ${RTABMap_UTILITE})
-if(RTABMap_GUI)
- set(RTABMAP_GUI ${RTABMap_GUI})
- set(RTABMAP_QT_VERSION @CONF_QT_VERSION@)
-endif(RTABMap_GUI)
+include("${CMAKE_CURRENT_LIST_DIR}/RTABMapTargets.cmake")
-include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(RTABMap DEFAULT_MSG RTABMap_LIBRARIES RTABMap_INCLUDE_DIRS)
-mark_as_advanced(RTABMap_LIBRARIES RTABMap_INCLUDE_DIRS RTABMap_LIBRARY_DIRS)
\ No newline at end of file
+foreach(_comp ${RTABMap_FIND_COMPONENTS})
+ if (NOT ";${_RTABMap_supported_components};" MATCHES ";${_comp};")
+ set(RTABMap_${_comp}_FOUND False)
+ if(${RTABMap_FIND_REQUIRED_${_comp}})
+ set(RTABMap_FOUND False)
+ set(RTABMap_NOT_FOUND_MESSAGE "Unsupported or not found required component: ${_comp}")
+ endif()
+ endif()
+endforeach()
diff --git a/RTABMapConfigVersion.cmake.in b/RTABMapConfigVersion.cmake.in
deleted file mode 100644
index 4b0a3ae1f5..0000000000
--- a/RTABMapConfigVersion.cmake.in
+++ /dev/null
@@ -1,11 +0,0 @@
-set(PACKAGE_VERSION "@RTABMAP_VERSION@")
-
-# Check whether the requested PACKAGE_FIND_VERSION is compatible
-if("${PACKAGE_VERSION}" VERSION_LESS "${PACKAGE_FIND_VERSION}")
- set(PACKAGE_VERSION_COMPATIBLE FALSE)
-else()
- set(PACKAGE_VERSION_COMPATIBLE TRUE)
- if ("${PACKAGE_VERSION}" VERSION_EQUAL "${PACKAGE_FIND_VERSION}")
- set(PACKAGE_VERSION_EXACT TRUE)
- endif()
-endif()
diff --git a/Version.h.in b/Version.h.in
index 42b16a1bfa..97e04b77e0 100644
--- a/Version.h.in
+++ b/Version.h.in
@@ -43,6 +43,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@G2O_CPP_CONF@#define RTABMAP_G2O_CPP11 @G2O_CPP11@
@GTSAM@#define RTABMAP_GTSAM
@CERES@#define RTABMAP_CERES
+@MRPT@#define RTABMAP_MRPT
@VERTIGO@#define RTABMAP_VERTIGO
@OPENNI2@#define RTABMAP_OPENNI2
@FREENECT@#define RTABMAP_FREENECT
diff --git a/app/android/jni/CameraMobile.cpp b/app/android/jni/CameraMobile.cpp
index 9e859dce69..98f9491679 100644
--- a/app/android/jni/CameraMobile.cpp
+++ b/app/android/jni/CameraMobile.cpp
@@ -432,23 +432,25 @@ LaserScan CameraMobile::scanFromPointCloudData(
//get color from rgb image
cv::Point3f org= pt;
pt = util3d::transformPoint(pt, opticalRotationInv);
- int u,v;
- model.reproject(pt.x, pt.y, pt.z, u, v);
- unsigned char r=255,g=255,b=255;
- if(model.inFrame(u, v))
+ if(pt.z > 0)
{
- b=rgb.at(v,u).val[0];
- g=rgb.at(v,u).val[1];
- r=rgb.at(v,u).val[2];
- if(kpts)
- kpts->push_back(cv::KeyPoint(u,v,kptsSize));
- if(kpts3D)
- kpts3D->push_back(org);
-
- *(int*)&ptr[oi*4 + 3] = int(b) | (int(g) << 8) | (int(r) << 16);
- ++oi;
+ int u,v;
+ model.reproject(pt.x, pt.y, pt.z, u, v);
+ unsigned char r=255,g=255,b=255;
+ if(model.inFrame(u, v))
+ {
+ b=rgb.at(v,u).val[0];
+ g=rgb.at(v,u).val[1];
+ r=rgb.at(v,u).val[2];
+ if(kpts)
+ kpts->push_back(cv::KeyPoint(u,v,kptsSize));
+ if(kpts3D)
+ kpts3D->push_back(org);
+
+ *(int*)&ptr[oi*4 + 3] = int(b) | (int(g) << 8) | (int(r) << 16);
+ ++oi;
+ }
}
-
//confidence
//*(int*)&ptr[i*4 + 3] = (int(pointCloudData[i*4 + 3] * 255.0f) << 8) | (int(255) << 16);
diff --git a/app/android/jni/RTABMapApp.cpp b/app/android/jni/RTABMapApp.cpp
index 51b731a4fe..2346bb43f9 100644
--- a/app/android/jni/RTABMapApp.cpp
+++ b/app/android/jni/RTABMapApp.cpp
@@ -649,9 +649,9 @@ int RTABMapApp::openDatabase(const std::string & databasePath, bool databaseInMe
UWARN("Cloud %d is empty", id);
}
}
- else
+ else if(!data.depthOrRightCompressed().empty() || !data.laserScanCompressed().isEmpty())
{
- UERROR("Failed to uncompress data!");
+ UERROR("Failed to uncompress data! (rgb=%d, depth=%d, scan=%d)", data.imageCompressed().cols, data.depthOrRightCompressed().cols, data.laserScanCompressed().size());
status=-2;
}
}
diff --git a/app/ios/RTABMapApp.xcodeproj/project.pbxproj b/app/ios/RTABMapApp.xcodeproj/project.pbxproj
index 22dae846d5..ac31de3e37 100644
--- a/app/ios/RTABMapApp.xcodeproj/project.pbxproj
+++ b/app/ios/RTABMapApp.xcodeproj/project.pbxproj
@@ -1007,7 +1007,7 @@
"$(PROJECT_DIR)/RTABMapApp/Libraries/lib",
"$(PROJECT_DIR)/RTABMapApp/Libraries/share/OpenCV/3rdparty/lib",
);
- MARKETING_VERSION = 0.20.19;
+ MARKETING_VERSION = 0.21.0;
OTHER_CFLAGS = "";
PRODUCT_BUNDLE_IDENTIFIER = com.introlab.rtabmap;
PRODUCT_NAME = "$(TARGET_NAME)";
@@ -1020,7 +1020,7 @@
"\"$(SRCROOT)/RTABMapApp/Libraries/include\"",
"\"$(SRCROOT)/RTABMapApp/Libraries/include/eigen3\"",
"\"$(SRCROOT)/RTABMapApp/Libraries/include/pcl-1.11\"",
- "\"$(SRCROOT)/RTABMapApp/Libraries/include/rtabmap-0.20\"",
+ "\"$(SRCROOT)/RTABMapApp/Libraries/include/rtabmap-0.21\"",
"\"$(SRCROOT)/../android/jni/tango-gl/include\"",
"\"$(SRCROOT)/../android/jni/third-party/include\"",
"\"$(SRCROOT)/RTABMapApp/Libraries/lib/vtk.framework/Headers\"",
@@ -1064,7 +1064,7 @@
"$(PROJECT_DIR)/RTABMapApp/Libraries/lib",
"$(PROJECT_DIR)/RTABMapApp/Libraries/share/OpenCV/3rdparty/lib",
);
- MARKETING_VERSION = 0.20.19;
+ MARKETING_VERSION = 0.21.0;
ONLY_ACTIVE_ARCH = YES;
OTHER_CFLAGS = "";
PRODUCT_BUNDLE_IDENTIFIER = com.introlab.rtabmap;
@@ -1078,7 +1078,7 @@
"\"$(SRCROOT)/RTABMapApp/Libraries/include\"",
"\"$(SRCROOT)/RTABMapApp/Libraries/include/eigen3\"",
"\"$(SRCROOT)/RTABMapApp/Libraries/include/pcl-1.11\"",
- "\"$(SRCROOT)/RTABMapApp/Libraries/include/rtabmap-0.20\"",
+ "\"$(SRCROOT)/RTABMapApp/Libraries/include/rtabmap-0.21\"",
"\"$(SRCROOT)/../android/jni/tango-gl/include\"",
"\"$(SRCROOT)/../android/jni/third-party/include\"",
"\"$(SRCROOT)/RTABMapApp/Libraries/lib/vtk.framework/Headers\"",
diff --git a/app/ios/RTABMapApp/NativeWrapper.cpp b/app/ios/RTABMapApp/NativeWrapper.cpp
index 145e3a8e30..dfe1259552 100644
--- a/app/ios/RTABMapApp/NativeWrapper.cpp
+++ b/app/ios/RTABMapApp/NativeWrapper.cpp
@@ -489,13 +489,6 @@ void setGridVisibleNative(const void *object, bool visible)
else
UERROR("object is null!");
}
-void setRawScanSavedNative(const void *object, bool enabled)
-{
- if(object)
- native(object)->setRawScanSaved(enabled);
- else
- UERROR("object is null!");
-}
void setFullResolutionNative(const void *object, bool enabled)
{
if(object)
diff --git a/app/ios/RTABMapApp/NativeWrapper.hpp b/app/ios/RTABMapApp/NativeWrapper.hpp
index 574295117b..3b36a29563 100644
--- a/app/ios/RTABMapApp/NativeWrapper.hpp
+++ b/app/ios/RTABMapApp/NativeWrapper.hpp
@@ -97,7 +97,6 @@ void setGraphOptimizationNative(const void *object, bool enabled);
void setNodesFilteringNative(const void *object, bool enabled);
void setGraphVisibleNative(const void *object, bool visible);
void setGridVisibleNative(const void *object, bool visible);
-void setRawScanSavedNative(const void *object, bool enabled);
void setFullResolutionNative(const void *object, bool enabled);
void setSmoothingNative(const void *object, bool enabled);
void setAppendModeNative(const void *object, bool enabled);
diff --git a/app/ios/RTABMapApp/RTABMap.swift b/app/ios/RTABMapApp/RTABMap.swift
index 52430941b4..2ca01745f6 100644
--- a/app/ios/RTABMapApp/RTABMap.swift
+++ b/app/ios/RTABMapApp/RTABMap.swift
@@ -405,9 +405,6 @@ class RTABMap {
func setGridVisible(visible: Bool) {
setGridVisibleNative(native_rtabmap, visible)
}
- func setRawScanSaved(enabled: Bool) {
- setRawScanSavedNative(native_rtabmap, enabled)
- }
func setFullResolution(enabled: Bool) {
setFullResolutionNative(native_rtabmap, enabled)
}
diff --git a/app/ios/RTABMapApp/ViewController.swift b/app/ios/RTABMapApp/ViewController.swift
index dabfe15063..40ebfbaca9 100644
--- a/app/ios/RTABMapApp/ViewController.swift
+++ b/app/ios/RTABMapApp/ViewController.swift
@@ -1319,7 +1319,6 @@ class ViewController: GLKViewController, ARSessionDelegate, RTABMapObserver, UIP
// update preference
rtabmap!.setOnlineBlending(enabled: defaults.bool(forKey: "Blending"));
rtabmap!.setNodesFiltering(enabled: defaults.bool(forKey: "NodesFiltering"));
- rtabmap!.setRawScanSaved(enabled: defaults.bool(forKey: "SaveRawScan"));
rtabmap!.setFullResolution(enabled: defaults.bool(forKey: "HDMode"));
rtabmap!.setSmoothing(enabled: defaults.bool(forKey: "Smoothing"));
rtabmap!.setAppendMode(enabled: defaults.bool(forKey: "AppendMode"));
diff --git a/app/ios/RTABMapApp/install_deps.sh b/app/ios/RTABMapApp/install_deps.sh
index 5c0b6de250..0e8debd167 100755
--- a/app/ios/RTABMapApp/install_deps.sh
+++ b/app/ios/RTABMapApp/install_deps.sh
@@ -122,7 +122,7 @@ git clone https://github.com/PointCloudLibrary/pcl.git
cd pcl
git checkout tags/pcl-1.11.1
# patch
-curl -L https://gist.github.com/matlabbe/f3ba9366eb91e1b855dadd2ddce5746d/raw/4a66ebb9faa1dfe997a0860d733bc5473cff20ee/pcl_1_11_1_vtk_ios_support.patch -o pcl_1_11_1_vtk_ios_support.patch
+curl -L https://gist.github.com/matlabbe/f3ba9366eb91e1b855dadd2ddce5746d/raw/6869cf26211ab15492599e557b0e729b23b2c119/pcl_1_11_1_vtk_ios_support.patch -o pcl_1_11_1_vtk_ios_support.patch
git apply pcl_1_11_1_vtk_ios_support.patch
mkdir build
cd build
diff --git a/app/ios/Settings.bundle/License.plist b/app/ios/Settings.bundle/License.plist
index 3c600aa4a3..dc827e966a 100644
--- a/app/ios/Settings.bundle/License.plist
+++ b/app/ios/Settings.bundle/License.plist
@@ -13,7 +13,7 @@
======= RTAB-Map =======
RTAB-Map - https://github.com/introlab/rtabmap
-Copyright (c) 2010-2022, Mathieu Labbe - IntRoLab - Universite de Sherbrooke, all rights reserved.
+Copyright (c) 2010-2023, Mathieu Labbe - IntRoLab - Universite de Sherbrooke, all rights reserved.
Copyright (c) XXX, contributors, all rights reserved.
Redistribution and use in source and binary forms, with or without
diff --git a/app/ios/Settings.bundle/Mapping.plist b/app/ios/Settings.bundle/Mapping.plist
index f84ed83b9c..0f2dc059b6 100644
--- a/app/ios/Settings.bundle/Mapping.plist
+++ b/app/ios/Settings.bundle/Mapping.plist
@@ -552,50 +552,50 @@
DefaultValue
-
- Type
- PSGroupSpecifier
- FooterText
- Used only in localization mode (when clicking First-P. View during visualization). This is used to get smoother localizations and to verify localization transforms (when Max Optimization Error is not disabled) to make sure we don't teleport to a location very similar to one we previously localized on.
-
-
- Type
- PSMultiValueSpecifier
- Title
- Maximum odometry cache size
- Key
- MaximumOdometryCacheSize
- DefaultValue
- 10
- Titles
-
- 500
- 200
- 100
- 75
- 50
- 40
- 30
- 20
- 10
- 5
- Disabled
-
- Values
-
- 500
- 200
- 100
- 75
- 50
- 40
- 30
- 20
- 10
- 5
- 0
-
-
+
+ Type
+ PSGroupSpecifier
+ FooterText
+ Used only in localization mode (when clicking First-P. View during visualization). This is used to get smoother localizations and to verify localization transforms (when Max Optimization Error is not disabled) to make sure we don't teleport to a location very similar to one we previously localized on.
+
+
+ Type
+ PSMultiValueSpecifier
+ Title
+ Maximum odometry cache size
+ Key
+ MaximumOdometryCacheSize
+ DefaultValue
+ 10
+ Titles
+
+ 500
+ 200
+ 100
+ 75
+ 50
+ 40
+ 30
+ 20
+ 10
+ 5
+ Disabled
+
+ Values
+
+ 500
+ 200
+ 100
+ 75
+ 50
+ 40
+ 30
+ 20
+ 10
+ 5
+ 0
+
+
Type
PSGroupSpecifier
@@ -752,22 +752,6 @@
DefaultValue
-
- Type
- PSGroupSpecifier
- FooterText
- Save raw point clouds in database.
-
-
- Type
- PSToggleSwitchSpecifier
- Title
- Save Raw Scan
- Key
- SaveRawScan
- DefaultValue
-
-
Type
PSGroupSpecifier
diff --git a/app/ios/Settings.bundle/Root.plist b/app/ios/Settings.bundle/Root.plist
index 39b71e84be..bc9360fe97 100644
--- a/app/ios/Settings.bundle/Root.plist
+++ b/app/ios/Settings.bundle/Root.plist
@@ -454,7 +454,7 @@
FooterText
- Copyright (c) 2010-2022, Mathieu Labbe - IntRoLab - Université de Sherbrooke. All rights reserved.
+ Copyright (c) 2010-2023, Mathieu Labbe - IntRoLab - Université de Sherbrooke. All rights reserved.
Title
About
Type
@@ -462,7 +462,7 @@
DefaultValue
- 0.20.19
+ 0.21.0
Key
Version
Title
diff --git a/app/src/CMakeLists.txt b/app/src/CMakeLists.txt
index b20a07d42b..5bc79a1529 100644
--- a/app/src/CMakeLists.txt
+++ b/app/src/CMakeLists.txt
@@ -3,32 +3,6 @@ SET(SRC_FILES
main.cpp
)
-SET(INCLUDE_DIRS
- ${PROJECT_BINARY_DIR}/corelib/include
- ${PROJECT_SOURCE_DIR}/utilite/include
- ${PROJECT_SOURCE_DIR}/corelib/include
- ${PROJECT_SOURCE_DIR}/guilib/include
- ${CMAKE_CURRENT_SOURCE_DIR}
- ${OpenCV_INCLUDE_DIRS}
- ${PCL_INCLUDE_DIRS}
-)
-
-IF(QT4_FOUND)
- INCLUDE(${QT_USE_FILE})
-ENDIF(QT4_FOUND)
-
-SET(LIBRARIES
- ${QT_LIBRARIES}
- ${OpenCV_LIBS}
- ${PCL_LIBRARIES}
-)
-
-# rc.exe has problems with these defintions... commented!
-#add_definitions(${PCL_DEFINITIONS})
-
-# Make sure the compiler can find include files from our library.
-INCLUDE_DIRECTORIES(${INCLUDE_DIRS})
-
# For Apple set the icns file containing icons
IF(APPLE AND BUILD_AS_BUNDLE)
# set how it shows up in the Info.plist file
@@ -50,40 +24,37 @@ IF(WIN32)
ELSE( MINGW )
SET(SRC_FILES ${SRC_FILES} ${PROJECT_NAME}.rc)
ENDIF( MINGW )
-ENDIF(WIN32)
+ENDIF(WIN32)
+
+IF(BUILD_AS_BUNDLE)
+ ADD_DEFINITIONS("-DBUILD_AS_BUNDLE")
+ENDIF()
# Add binary
IF(APPLE AND BUILD_AS_BUNDLE)
- ADD_EXECUTABLE(rtabmap MACOSX_BUNDLE ${SRC_FILES})
-ELSEIF(MINGW)
- ADD_EXECUTABLE(rtabmap WIN32 ${SRC_FILES})
+ ADD_EXECUTABLE(rtabmap_app MACOSX_BUNDLE ${SRC_FILES})
+ELSEIF(WIN32 AND BUILD_AS_BUNDLE)
+ ADD_EXECUTABLE(rtabmap_app WIN32 ${SRC_FILES})
ELSE()
- ADD_EXECUTABLE(rtabmap ${SRC_FILES})
+ ADD_EXECUTABLE(rtabmap_app ${SRC_FILES})
ENDIF()
-TARGET_LINK_LIBRARIES(rtabmap rtabmap_core rtabmap_gui rtabmap_utilite ${LIBRARIES})
-IF(Qt5_FOUND)
- IF(Qt5Svg_FOUND)
- QT5_USE_MODULES(rtabmap Widgets Core Gui Svg PrintSupport)
- ELSE()
- QT5_USE_MODULES(rtabmap Widgets Core Gui PrintSupport)
- ENDIF()
-ENDIF(Qt5_FOUND)
+TARGET_LINK_LIBRARIES(rtabmap_app rtabmap_gui)
IF(APPLE AND BUILD_AS_BUNDLE)
- SET_TARGET_PROPERTIES(rtabmap PROPERTIES
+ SET_TARGET_PROPERTIES(rtabmap_app PROPERTIES
OUTPUT_NAME ${CMAKE_BUNDLE_NAME})
ELSEIF(WIN32)
- SET_TARGET_PROPERTIES(rtabmap PROPERTIES
+ SET_TARGET_PROPERTIES(rtabmap_app PROPERTIES
OUTPUT_NAME ${PROJECT_NAME})
ELSE()
- SET_TARGET_PROPERTIES(rtabmap PROPERTIES
+ SET_TARGET_PROPERTIES(rtabmap_app PROPERTIES
OUTPUT_NAME ${PROJECT_PREFIX})
ENDIF()
#---------------------------
# Installation stuff
#---------------------------
-INSTALL(TARGETS rtabmap
+INSTALL(TARGETS rtabmap_app
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT runtime
BUNDLE DESTINATION "${CMAKE_BUNDLE_LOCATION}" COMPONENT runtime)
@@ -154,16 +125,32 @@ IF(BUILD_AS_BUNDLE AND (APPLE OR WIN32))
ENDIF(WIN32 AND CUDA_FOUND)
ENDIF(Torch_FOUND)
- # Install needed Qt plugins by copying directories from the qt installation
- # One can cull what gets copied by using 'REGEX "..." EXCLUDE'
- # Exclude debug libraries
- IF(QT_PLUGINS_DIR)
- INSTALL(DIRECTORY "${QT_PLUGINS_DIR}/imageformats"
- DESTINATION ${plugin_dest_dir}/plugins
- COMPONENT runtime
- REGEX ".*d4.dll" EXCLUDE
- REGEX ".*d4.a" EXCLUDE)
- ELSE()
+ IF(Qt6_FOUND)
+ # Reference: https://doc-snapshots.qt.io/qt6-6.4/qt-deploy-runtime-dependencies.html
+ # The following script must only be executed at install time
+ set(deploy_script "${CMAKE_CURRENT_BINARY_DIR}/deploy_app$.cmake")
+ file(GENERATE OUTPUT ${deploy_script} CONTENT "
+ # Including the file pointed to by QT_DEPLOY_SUPPORT ensures the generated
+ # deployment script has access to qt_deploy_runtime_dependencies()
+ include(\"${QT_DEPLOY_SUPPORT}\")
+ qt_deploy_runtime_dependencies(
+ EXECUTABLE \"${APPS}\"
+ VERBOSE
+ PLUGINS_DIR ${plugin_dest_dir}/plugins
+ )")
+ install(SCRIPT "${CMAKE_CURRENT_BINARY_DIR}/deploy_appDebug.cmake"
+ CONFIGURATIONS Debug
+ COMPONENT runtime)
+ install(SCRIPT "${CMAKE_CURRENT_BINARY_DIR}/deploy_appRelease.cmake"
+ CONFIGURATIONS Release
+ COMPONENT runtime)
+ install(SCRIPT "${CMAKE_CURRENT_BINARY_DIR}/deploy_appRelWithDebInfo.cmake"
+ CONFIGURATIONS RelWithDebInfo
+ COMPONENT runtime)
+ install(SCRIPT "${CMAKE_CURRENT_BINARY_DIR}/deploy_appMinSizeRel.cmake"
+ CONFIGURATIONS MinSizeRel
+ COMPONENT runtime)
+ ELSEIF(Qt5_FOUND)
#Qt5
foreach(plugin ${Qt5Gui_PLUGINS})
get_target_property(plugin_loc ${plugin} LOCATION)
@@ -175,8 +162,8 @@ IF(BUILD_AS_BUNDLE AND (APPLE OR WIN32))
ENDIF(NOT plugin_root)
#MESSAGE(STATUS "Qt5 plugin \"${plugin_loc}\" installed in \"${plugin_dest_dir}/plugins${plugin_type}\"")
INSTALL(FILES ${plugin_loc}
- DESTINATION ${plugin_dest_dir}/plugins${plugin_type}
- COMPONENT runtime)
+ DESTINATION ${plugin_dest_dir}/plugins${plugin_type}
+ COMPONENT runtime)
endforeach()
IF(NOT Qt5Widgets_VERSION VERSION_LESS 5.10.0)
IF(WIN32)
@@ -194,22 +181,31 @@ IF(BUILD_AS_BUNDLE AND (APPLE OR WIN32))
#MESSAGE(STATUS "Qt5 plugin \"${plugin_loc}\" installed in \"${plugin_dest_dir}/plugins${plugin_type}\"")
ENDIF(EXISTS ${plugin_loc})
ENDIF(NOT Qt5Widgets_VERSION VERSION_LESS 5.10.0)
+ ELSEIF(QT_PLUGINS_DIR) # Qt4
+ # Install needed Qt plugins by copying directories from the qt installation
+ # One can cull what gets copied by using 'REGEX "..." EXCLUDE'
+ # Exclude debug libraries
+ INSTALL(DIRECTORY "${QT_PLUGINS_DIR}/imageformats"
+ DESTINATION ${plugin_dest_dir}/plugins
+ COMPONENT runtime
+ REGEX ".*d4.dll" EXCLUDE
+ REGEX ".*d4.a" EXCLUDE)
ENDIF()
-
+
# install a qt.conf file
# this inserts some cmake code into the install script to write the file
SET(QT_CONF_FILE [Paths]\nPlugins=plugins)
IF(APPLE)
- SET(QT_CONF_FILE [Paths]\nPlugins=MacOS/plugins)
+ SET(QT_CONF_FILE [Paths]\nPlugins=MacOS/plugins)
ENDIF(APPLE)
INSTALL(CODE "
- file(WRITE \"\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/${qtconf_dest_dir}/qt.conf\" \"${QT_CONF_FILE}\")
- " COMPONENT runtime)
-
+ file(WRITE \"\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/${qtconf_dest_dir}/qt.conf\" \"${QT_CONF_FILE}\")
+ " COMPONENT runtime)
+
# directories to look for dependencies
- SET(DIRS ${QT_LIBRARY_DIRS} ${PROJECT_SOURCE_DIR}/bin)
+ SET(DIRS ${QT_LIBRARY_DIRS} ${PROJECT_BINARY_DIR}/bin)
IF(APPLE)
- SET(DIRS ${DIRS} /usr/local /usr/local/lib)
+ SET(DIRS ${DIRS} /usr/local /usr/local/lib /opt/homebrew /opt/homebrew/lib /opt/homebrew/lib/gcc/current)
ENDIF(APPLE)
# Now the work of copying dependencies into the bundle/package
diff --git a/app/src/main.cpp b/app/src/main.cpp
index 2ffa401134..3603aca065 100644
--- a/app/src/main.cpp
+++ b/app/src/main.cpp
@@ -36,8 +36,13 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "rtabmap/utilite/UFile.h"
#include "rtabmap/utilite/UConversion.h"
+#include
#include
+#if VTK_MAJOR_VERSION > 9 || (VTK_MAJOR_VERSION==9 && VTK_MINOR_VERSION >= 1)
+#include
+#endif
+
using namespace rtabmap;
int main(int argc, char* argv[])
@@ -50,9 +55,13 @@ int main(int argc, char* argv[])
CoInitialize(nullptr);
#endif
-#if VTK_MAJOR_VERSION >= 8
+#if VTK_MAJOR_VERSION >= 8 && defined(BUILD_AS_BUNDLE)
vtkObject::GlobalWarningDisplayOff();
#endif
+#if VTK_MAJOR_VERSION > 9 || (VTK_MAJOR_VERSION==9 && VTK_MINOR_VERSION >= 1)
+ // needed to ensure appropriate OpenGL context is created for VTK rendering.
+ QSurfaceFormat::setDefaultFormat(QVTKRenderWidget::defaultFormat());
+#endif
/* Create tasks */
QApplication * app = new QApplication(argc, argv);
diff --git a/build/.gitignore b/build/.gitignore
index 5e7d2734cf..86d0cb2726 100644
--- a/build/.gitignore
+++ b/build/.gitignore
@@ -1,4 +1,4 @@
# Ignore everything in this directory
*
# Except this file
-!.gitignore
+!.gitignore
\ No newline at end of file
diff --git a/cmake_modules/FindEigen3.cmake b/cmake_modules/FindEigen3.cmake
new file mode 100644
index 0000000000..0b36805e75
--- /dev/null
+++ b/cmake_modules/FindEigen3.cmake
@@ -0,0 +1,107 @@
+# - Try to find Eigen3 lib
+#
+# This module supports requiring a minimum version, e.g. you can do
+# find_package(Eigen3 3.1.2)
+# to require version 3.1.2 or newer of Eigen3.
+#
+# Once done this will define
+#
+# EIGEN3_FOUND - system has eigen lib with correct version
+# EIGEN3_INCLUDE_DIR - the eigen include directory
+# EIGEN3_VERSION - eigen version
+#
+# and the following imported target:
+#
+# Eigen3::Eigen - The header-only Eigen library
+#
+# This module reads hints about search locations from
+# the following environment variables:
+#
+# EIGEN3_ROOT
+# EIGEN3_ROOT_DIR
+
+# Copyright (c) 2006, 2007 Montel Laurent,
+# Copyright (c) 2008, 2009 Gael Guennebaud,
+# Copyright (c) 2009 Benoit Jacob
+# Redistribution and use is allowed according to the terms of the 2-clause BSD license.
+
+if(NOT Eigen3_FIND_VERSION)
+ if(NOT Eigen3_FIND_VERSION_MAJOR)
+ set(Eigen3_FIND_VERSION_MAJOR 2)
+ endif()
+ if(NOT Eigen3_FIND_VERSION_MINOR)
+ set(Eigen3_FIND_VERSION_MINOR 91)
+ endif()
+ if(NOT Eigen3_FIND_VERSION_PATCH)
+ set(Eigen3_FIND_VERSION_PATCH 0)
+ endif()
+
+ set(Eigen3_FIND_VERSION "${Eigen3_FIND_VERSION_MAJOR}.${Eigen3_FIND_VERSION_MINOR}.${Eigen3_FIND_VERSION_PATCH}")
+endif()
+
+macro(_eigen3_check_version)
+ file(READ "${EIGEN3_INCLUDE_DIR}/Eigen/src/Core/util/Macros.h" _eigen3_version_header)
+
+ string(REGEX MATCH "define[ \t]+EIGEN_WORLD_VERSION[ \t]+([0-9]+)" _eigen3_world_version_match "${_eigen3_version_header}")
+ set(EIGEN3_WORLD_VERSION "${CMAKE_MATCH_1}")
+ string(REGEX MATCH "define[ \t]+EIGEN_MAJOR_VERSION[ \t]+([0-9]+)" _eigen3_major_version_match "${_eigen3_version_header}")
+ set(EIGEN3_MAJOR_VERSION "${CMAKE_MATCH_1}")
+ string(REGEX MATCH "define[ \t]+EIGEN_MINOR_VERSION[ \t]+([0-9]+)" _eigen3_minor_version_match "${_eigen3_version_header}")
+ set(EIGEN3_MINOR_VERSION "${CMAKE_MATCH_1}")
+
+ set(EIGEN3_VERSION ${EIGEN3_WORLD_VERSION}.${EIGEN3_MAJOR_VERSION}.${EIGEN3_MINOR_VERSION})
+ if(${EIGEN3_VERSION} VERSION_LESS ${Eigen3_FIND_VERSION})
+ set(EIGEN3_VERSION_OK FALSE)
+ else()
+ set(EIGEN3_VERSION_OK TRUE)
+ endif()
+
+ if(NOT EIGEN3_VERSION_OK)
+
+ message(STATUS "Eigen3 version ${EIGEN3_VERSION} found in ${EIGEN3_INCLUDE_DIR}, "
+ "but at least version ${Eigen3_FIND_VERSION} is required")
+ endif()
+endmacro()
+
+if (EIGEN3_INCLUDE_DIR)
+
+ # in cache already
+ _eigen3_check_version()
+ set(EIGEN3_FOUND ${EIGEN3_VERSION_OK})
+ set(Eigen3_FOUND ${EIGEN3_VERSION_OK})
+
+else ()
+
+ # search first if an Eigen3Config.cmake is available in the system,
+ # if successful this would set EIGEN3_INCLUDE_DIR and the rest of
+ # the script will work as usual
+ find_package(Eigen3 ${Eigen3_FIND_VERSION} NO_MODULE QUIET)
+
+ if(NOT EIGEN3_INCLUDE_DIR)
+ find_path(EIGEN3_INCLUDE_DIR NAMES signature_of_eigen3_matrix_library
+ HINTS
+ ENV EIGEN3_ROOT
+ ENV EIGEN3_ROOT_DIR
+ PATHS
+ ${CMAKE_INSTALL_PREFIX}/include
+ ${KDE4_INCLUDE_DIR}
+ PATH_SUFFIXES eigen3 eigen
+ )
+ endif()
+
+ if(EIGEN3_INCLUDE_DIR)
+ _eigen3_check_version()
+ endif()
+
+ include(FindPackageHandleStandardArgs)
+ find_package_handle_standard_args(Eigen3 DEFAULT_MSG EIGEN3_INCLUDE_DIR EIGEN3_VERSION_OK)
+
+ mark_as_advanced(EIGEN3_INCLUDE_DIR)
+
+endif()
+
+if(EIGEN3_FOUND AND NOT TARGET Eigen3::Eigen)
+ add_library(Eigen3::Eigen INTERFACE IMPORTED)
+ set_target_properties(Eigen3::Eigen PROPERTIES
+ INTERFACE_INCLUDE_DIRECTORIES "${EIGEN3_INCLUDE_DIR}")
+endif()
diff --git a/cmake_modules/FindORB_SLAM.cmake b/cmake_modules/FindORB_SLAM.cmake
index 1e89348b73..f9ccdc0d57 100644
--- a/cmake_modules/FindORB_SLAM.cmake
+++ b/cmake_modules/FindORB_SLAM.cmake
@@ -12,6 +12,7 @@ find_path(ORB_SLAM_INCLUDE_DIR NAMES System.h PATHS $ENV{ORB_SLAM_ROOT_DIR}/incl
find_library(ORB_SLAM2_LIBRARY NAMES ORB_SLAM2 PATHS $ENV{ORB_SLAM_ROOT_DIR}/lib)
find_library(ORB_SLAM3_LIBRARY NAMES ORB_SLAM3 PATHS $ENV{ORB_SLAM_ROOT_DIR}/lib)
find_path(g2o_INCLUDE_DIR NAMES g2o/core/sparse_optimizer.h PATHS $ENV{ORB_SLAM_ROOT_DIR}/Thirdparty/g2o NO_DEFAULT_PATH)
+find_path(sophus_INCLUDE_DIR NAMES sophus/se3.hpp PATHS $ENV{ORB_SLAM_ROOT_DIR}/Thirdparty/Sophus NO_DEFAULT_PATH)
find_library(g2o_LIBRARY NAMES g2o PATHS $ENV{ORB_SLAM_ROOT_DIR}/Thirdparty/g2o/lib NO_DEFAULT_PATH)
find_library(DBoW2_LIBRARY NAMES DBoW2 PATHS $ENV{ORB_SLAM_ROOT_DIR}/Thirdparty/DBoW2/lib NO_DEFAULT_PATH)
@@ -21,6 +22,9 @@ IF(ORB_SLAM2_LIBRARY)
ELSEIF(ORB_SLAM3_LIBRARY)
SET(ORB_SLAM_VERSION 3)
SET(ORB_SLAM_LIBRARY ${ORB_SLAM3_LIBRARY})
+ IF(g2o_INCLUDE_DIR AND sophus_INCLUDE_DIR) # ORB_SLAM3 v1
+ SET(g2o_INCLUDE_DIR ${g2o_INCLUDE_DIR} ${sophus_INCLUDE_DIR})
+ ENDIF(g2o_INCLUDE_DIR AND sophus_INCLUDE_DIR)
ENDIF()
IF (ORB_SLAM_INCLUDE_DIR AND ORB_SLAM_LIBRARY AND DBoW2_LIBRARY AND g2o_INCLUDE_DIR AND g2o_LIBRARY)
diff --git a/cmake_modules/FindZEDOC.cmake b/cmake_modules/FindZEDOC.cmake
index 76563ed943..8c96c2bd1c 100644
--- a/cmake_modules/FindZEDOC.cmake
+++ b/cmake_modules/FindZEDOC.cmake
@@ -17,7 +17,7 @@ ENDIF (ZEDOC_INCLUDE_DIR AND ZEDOC_LIBRARY)
IF (ZEDOC_FOUND)
# show which ZEDOC was found only if not quiet
- IF (NOT _FIND_QUIETLY)
+ IF (NOT ZEDOC_FIND_QUIETLY)
MESSAGE(STATUS "Found ZEDOC: ${ZEDOC_LIBRARIES}")
ENDIF (NOT ZEDOC_FIND_QUIETLY)
ELSE (ZEDOC_FOUND)
diff --git a/corelib/include/rtabmap/core/BayesFilter.h b/corelib/include/rtabmap/core/BayesFilter.h
index 01f4fe30bf..ac2533903b 100644
--- a/corelib/include/rtabmap/core/BayesFilter.h
+++ b/corelib/include/rtabmap/core/BayesFilter.h
@@ -28,7 +28,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef BAYESFILTER_H_
#define BAYESFILTER_H_
-#include "rtabmap/core/RtabmapExp.h" // DLL export/import defines
+#include "rtabmap/core/rtabmap_core_export.h" // DLL export/import defines
#include
#include
@@ -41,7 +41,7 @@ namespace rtabmap {
class Memory;
class Signature;
-class RTABMAP_EXP BayesFilter
+class RTABMAP_CORE_EXPORT BayesFilter
{
public:
BayesFilter(const ParametersMap & parameters = ParametersMap());
diff --git a/corelib/include/rtabmap/core/Camera.h b/corelib/include/rtabmap/core/Camera.h
index 114273bff9..708584809e 100644
--- a/corelib/include/rtabmap/core/Camera.h
+++ b/corelib/include/rtabmap/core/Camera.h
@@ -27,7 +27,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#pragma once
-#include "rtabmap/core/RtabmapExp.h" // DLL export/import defines
+#include "rtabmap/core/rtabmap_core_export.h" // DLL export/import defines
#include
namespace rtabmap
@@ -37,7 +37,7 @@ namespace rtabmap
* Class Camera
*
*/
-class RTABMAP_EXP Camera : public SensorCapture
+class RTABMAP_CORE_EXPORT Camera : public SensorCapture
{
public:
virtual ~Camera() {}
diff --git a/corelib/include/rtabmap/core/CameraModel.h b/corelib/include/rtabmap/core/CameraModel.h
index ae36a37291..b24b971b4d 100644
--- a/corelib/include/rtabmap/core/CameraModel.h
+++ b/corelib/include/rtabmap/core/CameraModel.h
@@ -30,12 +30,12 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include
-#include "rtabmap/core/RtabmapExp.h" // DLL export/import defines
+#include "rtabmap/core/rtabmap_core_export.h" // DLL export/import defines
#include "rtabmap/core/Transform.h"
namespace rtabmap {
-class RTABMAP_EXP CameraModel
+class RTABMAP_CORE_EXPORT CameraModel
{
public:
/**
@@ -159,7 +159,7 @@ class RTABMAP_EXP CameraModel
Transform localTransform_;
};
-RTABMAP_EXP std::ostream& operator<<(std::ostream& os, const CameraModel& model);
+RTABMAP_CORE_EXPORT std::ostream& operator<<(std::ostream& os, const CameraModel& model);
} /* namespace rtabmap */
#endif /* CAMERAMODEL_H_ */
diff --git a/corelib/include/rtabmap/core/Compression.h b/corelib/include/rtabmap/core/Compression.h
index dcab29dddd..9ff69a3a71 100644
--- a/corelib/include/rtabmap/core/Compression.h
+++ b/corelib/include/rtabmap/core/Compression.h
@@ -28,7 +28,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef COMPRESSION_H_
#define COMPRESSION_H_
-#include "rtabmap/core/RtabmapExp.h" // DLL export/import defines
+#include "rtabmap/core/rtabmap_core_export.h" // DLL export/import defines
#include
#include
@@ -52,7 +52,7 @@ namespace rtabmap {
* ct.join();
* cv::Mat image = ct.getUncompressedData();
*/
-class RTABMAP_EXP CompressionThread : public UThread
+class RTABMAP_CORE_EXPORT CompressionThread : public UThread
{
public:
// format : ".png" ".jpg" "" (empty is general)
@@ -70,21 +70,21 @@ class RTABMAP_EXP CompressionThread : public UThread
bool compressMode_;
};
-std::vector RTABMAP_EXP compressImage(const cv::Mat & image, const std::string & format = ".png");
-cv::Mat RTABMAP_EXP compressImage2(const cv::Mat & image, const std::string & format = ".png");
+std::vector RTABMAP_CORE_EXPORT compressImage(const cv::Mat & image, const std::string & format = ".png");
+cv::Mat RTABMAP_CORE_EXPORT compressImage2(const cv::Mat & image, const std::string & format = ".png");
-cv::Mat RTABMAP_EXP uncompressImage(const cv::Mat & bytes);
-cv::Mat RTABMAP_EXP uncompressImage(const std::vector & bytes);
+cv::Mat RTABMAP_CORE_EXPORT uncompressImage(const cv::Mat & bytes);
+cv::Mat RTABMAP_CORE_EXPORT uncompressImage(const std::vector & bytes);
-std::vector RTABMAP_EXP compressData(const cv::Mat & data);
-cv::Mat RTABMAP_EXP compressData2(const cv::Mat & data);
+std::vector RTABMAP_CORE_EXPORT compressData(const cv::Mat & data);
+cv::Mat RTABMAP_CORE_EXPORT compressData2(const cv::Mat & data);
-cv::Mat RTABMAP_EXP uncompressData(const cv::Mat & bytes);
-cv::Mat RTABMAP_EXP uncompressData(const std::vector & bytes);
-cv::Mat RTABMAP_EXP uncompressData(const unsigned char * bytes, unsigned long size);
+cv::Mat RTABMAP_CORE_EXPORT uncompressData(const cv::Mat & bytes);
+cv::Mat RTABMAP_CORE_EXPORT uncompressData(const std::vector & bytes);
+cv::Mat RTABMAP_CORE_EXPORT uncompressData(const unsigned char * bytes, unsigned long size);
-cv::Mat RTABMAP_EXP compressString(const std::string & str);
-std::string RTABMAP_EXP uncompressString(const cv::Mat & bytes);
+cv::Mat RTABMAP_CORE_EXPORT compressString(const std::string & str);
+std::string RTABMAP_CORE_EXPORT uncompressString(const cv::Mat & bytes);
} /* namespace rtabmap */
#endif /* COMPRESSION_H_ */
diff --git a/corelib/include/rtabmap/core/DBDriver.h b/corelib/include/rtabmap/core/DBDriver.h
index 7499189c62..1335189272 100644
--- a/corelib/include/rtabmap/core/DBDriver.h
+++ b/corelib/include/rtabmap/core/DBDriver.h
@@ -28,7 +28,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef DBDRIVER_H_
#define DBDRIVER_H_
-#include "rtabmap/core/RtabmapExp.h" // DLL export/import defines
+#include "rtabmap/core/rtabmap_core_export.h" // DLL export/import defines
#include
#include
@@ -59,7 +59,7 @@ class VisualWord;
//but never, never try to use the same connection simultaneously in
//two or more threads."
//
-class RTABMAP_EXP DBDriver : public UThreadNode
+class RTABMAP_CORE_EXPORT DBDriver : public UThreadNode
{
public:
static DBDriver * create(const ParametersMap & parameters = ParametersMap());
diff --git a/corelib/include/rtabmap/core/DBDriverSqlite3.h b/corelib/include/rtabmap/core/DBDriverSqlite3.h
index 56abb750df..463e916817 100644
--- a/corelib/include/rtabmap/core/DBDriverSqlite3.h
+++ b/corelib/include/rtabmap/core/DBDriverSqlite3.h
@@ -28,7 +28,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef DBDRIVERSQLITE3_H_
#define DBDRIVERSQLITE3_H_
-#include "rtabmap/core/RtabmapExp.h" // DLL export/import defines
+#include "rtabmap/core/rtabmap_core_export.h" // DLL export/import defines
#include "rtabmap/core/DBDriver.h"
#include
@@ -37,7 +37,7 @@ typedef struct sqlite3 sqlite3;
namespace rtabmap {
-class RTABMAP_EXP DBDriverSqlite3: public DBDriver {
+class RTABMAP_CORE_EXPORT DBDriverSqlite3: public DBDriver {
public:
DBDriverSqlite3(const ParametersMap & parameters = ParametersMap());
virtual ~DBDriverSqlite3();
diff --git a/corelib/include/rtabmap/core/DBReader.h b/corelib/include/rtabmap/core/DBReader.h
index 857935d323..5bdc0e2008 100644
--- a/corelib/include/rtabmap/core/DBReader.h
+++ b/corelib/include/rtabmap/core/DBReader.h
@@ -28,7 +28,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef DBREADER_H_
#define DBREADER_H_
-#include "rtabmap/core/RtabmapExp.h" // DLL export/import defines
+#include "rtabmap/core/rtabmap_core_export.h" // DLL export/import defines
#include
#include
@@ -43,7 +43,7 @@ namespace rtabmap {
class DBDriver;
-class RTABMAP_EXP DBReader : public Camera {
+class RTABMAP_CORE_EXPORT DBReader : public Camera {
public:
DBReader(const std::string & databasePath,
float frameRate = 0.0f, // -1 = use Database stamps, 0 = inf
@@ -57,7 +57,8 @@ class RTABMAP_EXP DBReader : public Camera {
bool landmarksIgnored = false,
bool featuresIgnored = false,
int startMapId = 0,
- int stopMapId = -1);
+ int stopMapId = -1,
+ bool priorsIgnored = false);
DBReader(const std::list & databasePaths,
float frameRate = 0.0f, // -1 = use Database stamps, 0 = inf
bool odometryIgnored = false,
@@ -70,7 +71,8 @@ class RTABMAP_EXP DBReader : public Camera {
bool landmarksIgnored = false,
bool featuresIgnored = false,
int startMapId = 0,
- int stopMapId = -1);
+ int stopMapId = -1,
+ bool priorsIgnored = false);
virtual ~DBReader();
virtual bool init(
@@ -100,6 +102,7 @@ class RTABMAP_EXP DBReader : public Camera {
bool _intermediateNodesIgnored;
bool _landmarksIgnored;
bool _featuresIgnored;
+ bool _priorsIgnored;
int _startMapId;
int _stopMapId;
diff --git a/corelib/include/rtabmap/core/EpipolarGeometry.h b/corelib/include/rtabmap/core/EpipolarGeometry.h
index 7f13c734be..e9408cd83c 100644
--- a/corelib/include/rtabmap/core/EpipolarGeometry.h
+++ b/corelib/include/rtabmap/core/EpipolarGeometry.h
@@ -27,7 +27,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#pragma once
-#include "rtabmap/core/RtabmapExp.h" // DLL export/import defines
+#include "rtabmap/core/rtabmap_core_export.h" // DLL export/import defines
#include "rtabmap/core/Parameters.h"
#include "rtabmap/utilite/UStl.h"
#include
@@ -42,7 +42,7 @@ namespace rtabmap
class Signature;
-class RTABMAP_EXP EpipolarGeometry
+class RTABMAP_CORE_EXPORT EpipolarGeometry
{
public:
EpipolarGeometry(const ParametersMap & parameters = ParametersMap());
diff --git a/corelib/include/rtabmap/core/Features2d.h b/corelib/include/rtabmap/core/Features2d.h
index 0d9d838f57..81ac630d72 100644
--- a/corelib/include/rtabmap/core/Features2d.h
+++ b/corelib/include/rtabmap/core/Features2d.h
@@ -28,7 +28,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef FEATURES2D_H_
#define FEATURES2D_H_
-#include "rtabmap/core/RtabmapExp.h" // DLL export/import defines
+#include "rtabmap/core/rtabmap_core_export.h" // DLL export/import defines
#include
#include
@@ -103,7 +103,7 @@ class CV_ORB;
#endif
// Feature2D
-class RTABMAP_EXP Feature2D {
+class RTABMAP_CORE_EXPORT Feature2D {
public:
enum Type {kFeatureUndef=-1,
kFeatureSurf=0,
@@ -247,7 +247,7 @@ class RTABMAP_EXP Feature2D {
};
//SURF
-class RTABMAP_EXP SURF : public Feature2D
+class RTABMAP_CORE_EXPORT SURF : public Feature2D
{
public:
SURF(const ParametersMap & parameters = ParametersMap());
@@ -274,7 +274,7 @@ class RTABMAP_EXP SURF : public Feature2D
};
//SIFT
-class RTABMAP_EXP SIFT : public Feature2D
+class RTABMAP_CORE_EXPORT SIFT : public Feature2D
{
public:
SIFT(const ParametersMap & parameters = ParametersMap());
@@ -298,7 +298,7 @@ class RTABMAP_EXP SIFT : public Feature2D
};
//ORB
-class RTABMAP_EXP ORB : public Feature2D
+class RTABMAP_CORE_EXPORT ORB : public Feature2D
{
public:
ORB(const ParametersMap & parameters = ParametersMap());
@@ -329,7 +329,7 @@ class RTABMAP_EXP ORB : public Feature2D
};
//FAST
-class RTABMAP_EXP FAST : public Feature2D
+class RTABMAP_CORE_EXPORT FAST : public Feature2D
{
public:
FAST(const ParametersMap & parameters = ParametersMap());
@@ -365,7 +365,7 @@ class RTABMAP_EXP FAST : public Feature2D
};
//FAST_BRIEF
-class RTABMAP_EXP FAST_BRIEF : public FAST
+class RTABMAP_CORE_EXPORT FAST_BRIEF : public FAST
{
public:
FAST_BRIEF(const ParametersMap & parameters = ParametersMap());
@@ -384,7 +384,7 @@ class RTABMAP_EXP FAST_BRIEF : public FAST
};
//FAST_FREAK
-class RTABMAP_EXP FAST_FREAK : public FAST
+class RTABMAP_CORE_EXPORT FAST_FREAK : public FAST
{
public:
FAST_FREAK(const ParametersMap & parameters = ParametersMap());
@@ -406,7 +406,7 @@ class RTABMAP_EXP FAST_FREAK : public FAST
};
//GFTT
-class RTABMAP_EXP GFTT : public Feature2D
+class RTABMAP_CORE_EXPORT GFTT : public Feature2D
{
public:
GFTT(const ParametersMap & parameters = ParametersMap());
@@ -428,7 +428,7 @@ class RTABMAP_EXP GFTT : public Feature2D
};
//GFTT_BRIEF
-class RTABMAP_EXP GFTT_BRIEF : public GFTT
+class RTABMAP_CORE_EXPORT GFTT_BRIEF : public GFTT
{
public:
GFTT_BRIEF(const ParametersMap & parameters = ParametersMap());
@@ -447,7 +447,7 @@ class RTABMAP_EXP GFTT_BRIEF : public GFTT
};
//GFTT_FREAK
-class RTABMAP_EXP GFTT_FREAK : public GFTT
+class RTABMAP_CORE_EXPORT GFTT_FREAK : public GFTT
{
public:
GFTT_FREAK(const ParametersMap & parameters = ParametersMap());
@@ -469,7 +469,7 @@ class RTABMAP_EXP GFTT_FREAK : public GFTT
};
//SURF_FREAK
-class RTABMAP_EXP SURF_FREAK : public SURF
+class RTABMAP_CORE_EXPORT SURF_FREAK : public SURF
{
public:
SURF_FREAK(const ParametersMap & parameters = ParametersMap());
@@ -491,7 +491,7 @@ class RTABMAP_EXP SURF_FREAK : public SURF
};
//GFTT_ORB
-class RTABMAP_EXP GFTT_ORB : public GFTT
+class RTABMAP_CORE_EXPORT GFTT_ORB : public GFTT
{
public:
GFTT_ORB(const ParametersMap & parameters = ParametersMap());
@@ -508,7 +508,7 @@ class RTABMAP_EXP GFTT_ORB : public GFTT
};
//BRISK
-class RTABMAP_EXP BRISK : public Feature2D
+class RTABMAP_CORE_EXPORT BRISK : public Feature2D
{
public:
BRISK(const ParametersMap & parameters = ParametersMap());
@@ -530,7 +530,7 @@ class RTABMAP_EXP BRISK : public Feature2D
};
//KAZE
-class RTABMAP_EXP KAZE : public Feature2D
+class RTABMAP_CORE_EXPORT KAZE : public Feature2D
{
public:
KAZE(const ParametersMap & parameters = ParametersMap());
@@ -557,7 +557,7 @@ class RTABMAP_EXP KAZE : public Feature2D
};
//ORB OCTREE
-class RTABMAP_EXP ORBOctree : public Feature2D
+class RTABMAP_CORE_EXPORT ORBOctree : public Feature2D
{
public:
ORBOctree(const ParametersMap & parameters = ParametersMap());
@@ -583,7 +583,7 @@ class RTABMAP_EXP ORBOctree : public Feature2D
};
//SuperPointTorch
-class RTABMAP_EXP SuperPointTorch : public Feature2D
+class RTABMAP_CORE_EXPORT SuperPointTorch : public Feature2D
{
public:
SuperPointTorch(const ParametersMap & parameters = ParametersMap());
@@ -606,7 +606,7 @@ class RTABMAP_EXP SuperPointTorch : public Feature2D
};
//GFTT_DAISY
-class RTABMAP_EXP GFTT_DAISY : public GFTT
+class RTABMAP_CORE_EXPORT GFTT_DAISY : public GFTT
{
public:
GFTT_DAISY(const ParametersMap & parameters = ParametersMap());
@@ -630,7 +630,7 @@ class RTABMAP_EXP GFTT_DAISY : public GFTT
};
//SURF_DAISY
-class RTABMAP_EXP SURF_DAISY : public SURF
+class RTABMAP_CORE_EXPORT SURF_DAISY : public SURF
{
public:
SURF_DAISY(const ParametersMap & parameters = ParametersMap());
diff --git a/corelib/include/rtabmap/core/FlannIndex.h b/corelib/include/rtabmap/core/FlannIndex.h
index 6552a07109..a1cd253e56 100644
--- a/corelib/include/rtabmap/core/FlannIndex.h
+++ b/corelib/include/rtabmap/core/FlannIndex.h
@@ -28,23 +28,23 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef CORELIB_SRC_FLANNINDEX_H_
#define CORELIB_SRC_FLANNINDEX_H_
-#include "rtabmap/core/RtabmapExp.h" // DLL export/import defines
+#include "rtabmap/core/rtabmap_core_export.h" // DLL export/import defines
#include
#include
namespace rtabmap {
-class RTABMAP_EXP FlannIndex
+class RTABMAP_CORE_EXPORT FlannIndex
{
public:
FlannIndex();
virtual ~FlannIndex();
void release();
- unsigned int indexedFeatures() const;
+ size_t indexedFeatures() const;
// return Bytes
- unsigned long memoryUsed() const;
+ size_t memoryUsed() const;
// Note that useDistanceL1 doesn't have any effect if LSH is used
void buildLinearIndex(
diff --git a/corelib/include/rtabmap/core/GainCompensator.h b/corelib/include/rtabmap/core/GainCompensator.h
index 27602344d0..ee4e3c6482 100644
--- a/corelib/include/rtabmap/core/GainCompensator.h
+++ b/corelib/include/rtabmap/core/GainCompensator.h
@@ -28,7 +28,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef CORELIB_SRC_GAINCOMPENSATOR_H_
#define CORELIB_SRC_GAINCOMPENSATOR_H_
-#include "rtabmap/core/RtabmapExp.h" // DLL export/import defines
+#include "rtabmap/core/rtabmap_core_export.h" // DLL export/import defines
#include
#include
@@ -41,7 +41,7 @@ namespace rtabmap {
/**
* Works like cv::GainCompensator but with point clouds
*/
-class RTABMAP_EXP GainCompensator {
+class RTABMAP_CORE_EXPORT GainCompensator {
public:
GainCompensator(double maxCorrespondenceDistance = 0.02, double minOverlap = 0.0, double alpha = 0.01, double beta = 10);
virtual ~GainCompensator();
diff --git a/corelib/include/rtabmap/core/GeodeticCoords.h b/corelib/include/rtabmap/core/GeodeticCoords.h
index 6234dd00a1..d2c67c59ec 100644
--- a/corelib/include/rtabmap/core/GeodeticCoords.h
+++ b/corelib/include/rtabmap/core/GeodeticCoords.h
@@ -43,13 +43,13 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef GEODETICCOORDS_H_
#define GEODETICCOORDS_H_
-#include
+#include
#include
namespace rtabmap {
-class RTABMAP_EXP GeodeticCoords
+class RTABMAP_CORE_EXPORT GeodeticCoords
{
public:
GeodeticCoords();
diff --git a/corelib/include/rtabmap/core/Graph.h b/corelib/include/rtabmap/core/Graph.h
index f2d76acd4a..324323d252 100644
--- a/corelib/include/rtabmap/core/Graph.h
+++ b/corelib/include/rtabmap/core/Graph.h
@@ -28,7 +28,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef GRAPH_H_
#define GRAPH_H_
-#include "rtabmap/core/RtabmapExp.h" // DLL export/import defines
+#include "rtabmap/core/rtabmap_core_export.h" // DLL export/import defines
#include