build: Add Basalt as an external SLAM system

This commit is contained in:
Mateo de Mayo 2021-10-16 17:02:27 -03:00
parent 782aa11754
commit ab2da01631
4 changed files with 6 additions and 2 deletions

View file

@ -132,7 +132,7 @@ if(ANDROID)
endif()
# Find a external SLAM implementation
set(EXTERNAL_SLAM_SYSTEMS kimera_vio)
set(EXTERNAL_SLAM_SYSTEMS kimera_vio basalt)
foreach(slam_system IN LISTS EXTERNAL_SLAM_SYSTEMS)
if(PKGCONFIG_FOUND)
pkg_check_modules(${slam_system} ${slam_system})
@ -212,6 +212,7 @@ cmake_dependent_option(XRT_HAVE_SYSTEM_CJSON "Enable cJSON from system, instead
cmake_dependent_option(XRT_HAVE_GST "Enable gstreamer" ON "GST_FOUND" OFF)
cmake_dependent_option(XRT_HAVE_ONNXRUNTIME "Enable ONNX runtime support" ON "ONNXRUNTIME_FOUND" OFF)
cmake_dependent_option(XRT_HAVE_KIMERA_SLAM "Enable Kimera support" ON "kimera_vio_FOUND" OFF)
cmake_dependent_option(XRT_HAVE_BASALT_SLAM "Enable Basalt support" ON "basalt_FOUND" OFF)
cmake_dependent_option(XRT_HAVE_SLAM "Enable SLAM tracking support" ON "SLAM;XRT_HAVE_OPENCV" OFF)
cmake_dependent_option(XRT_BUILD_DRIVER_PSVR "Enable PSVR HMD driver" ON "HIDAPI_FOUND" OFF)
cmake_dependent_option(XRT_BUILD_DRIVER_RS "Enable RealSense device driver" ON "realsense2_FOUND" OFF)
@ -389,6 +390,7 @@ message(STATUS "# PERCETTO: ${XRT_HAVE_PERCETTO}")
message(STATUS "# ONNXRUNTIME: ${XRT_HAVE_ONNXRUNTIME}")
message(STATUS "# SYSTEM_CJSON: ${XRT_HAVE_SYSTEM_CJSON}")
message(STATUS "# KIMERA: ${XRT_HAVE_KIMERA_SLAM}")
message(STATUS "# BASALT: ${XRT_HAVE_BASALT_SLAM}")
message(STATUS "# SLAM: ${XRT_HAVE_SLAM}")
message(STATUS "#")
message(STATUS "# FEATURE_COMPOSITOR_MAIN: ${XRT_FEATURE_COMPOSITOR_MAIN}")

View file

@ -93,7 +93,7 @@ if not opencv.found()
endif
# Find an external SLAM implementation
external_slam_systems = ['kimera_vio']
external_slam_systems = ['kimera_vio', 'basalt']
foreach slam_system : external_slam_systems
slam = dependency(slam_system, required: false)
if slam.found()

View file

@ -107,6 +107,7 @@ endif
if slam.found() and build_tracking
have_conf.set('XRT_HAVE_SLAM', true)
have_conf.set('XRT_HAVE_KIMERA_SLAM', slam.name() == 'kimera_vio')
have_conf.set('XRT_HAVE_BASALT_SLAM', slam.name() == 'basalt')
endif
if build_wayland

View file

@ -27,6 +27,7 @@
#cmakedefine XRT_HAVE_VULKAN
#cmakedefine XRT_HAVE_PERCETTO
#cmakedefine XRT_HAVE_KIMERA_SLAM
#cmakedefine XRT_HAVE_BASALT_SLAM
#cmakedefine XRT_HAVE_SLAM
#cmakedefine XRT_HAVE_WAYLAND
#cmakedefine XRT_HAVE_WAYLAND_DIRECT