- LidarManager facade (liblidar_manager.so): dlopen plugin discovery, available_drivers map<driver_id, PluginRegistry>, create_lidar_device, config.json load/save with legacy lidarlib migration - Common LidarDriverInterface + DriverInfo/DeviceConfig plugin ABI (extern C get_driver_info / create_driver_instance) - Plugins: driver_rplidar (ported from xlocd, Slamtec SDK), driver_olei, driver_sick_code (TiM CoLa-A), driver_sick_safety (nanoScan3), driver_espe - Diagnostics extended with rplidar health + firmware; FOV filter window, range override and legacy remap window unified in DeviceConfig - Rewritten README, diagnostics doc and examples (list_drivers, example, lidar_app) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
36 lines
1.4 KiB
CMake
36 lines
1.4 KiB
CMake
# The rplidar plugin compiles the vendor SDK straight into the plugin .so.
|
|
# XLIDAR_RPLIDAR_SDK_DIR must point at a directory holding include/ + src/;
|
|
# when unset, common local layouts are probed. Without an SDK the plugin is
|
|
# skipped (the rest of the build is unaffected).
|
|
|
|
if(NOT XLIDAR_RPLIDAR_SDK_DIR)
|
|
foreach(candidate
|
|
${CMAKE_SOURCE_DIR}/third_party/rplidar_sdk
|
|
${CMAKE_SOURCE_DIR}/../rplidar_sdk/sdk
|
|
${CMAKE_SOURCE_DIR}/../xloc-monorepo/xlocd/deps/rplidar_sdk)
|
|
if(EXISTS ${candidate}/include/sl_lidar.h)
|
|
set(XLIDAR_RPLIDAR_SDK_DIR ${candidate})
|
|
break()
|
|
endif()
|
|
endforeach()
|
|
endif()
|
|
|
|
if(NOT XLIDAR_RPLIDAR_SDK_DIR OR NOT EXISTS ${XLIDAR_RPLIDAR_SDK_DIR}/include/sl_lidar.h)
|
|
message(WARNING "driver_rplidar: Slamtec SDK not found "
|
|
"(set -DXLIDAR_RPLIDAR_SDK_DIR=...) — plugin skipped")
|
|
return()
|
|
endif()
|
|
|
|
message(STATUS "driver_rplidar: using SDK at ${XLIDAR_RPLIDAR_SDK_DIR}")
|
|
|
|
file(GLOB_RECURSE RPLIDAR_SDK_SOURCES CONFIGURE_DEPENDS
|
|
${XLIDAR_RPLIDAR_SDK_DIR}/src/*.cpp)
|
|
# The SDK ships win32/macOS arch files; keep Linux only.
|
|
list(FILTER RPLIDAR_SDK_SOURCES EXCLUDE REGEX "arch/(win32|macOS)/")
|
|
|
|
xlidar_add_plugin(driver_rplidar rplidar_driver.cpp ${RPLIDAR_SDK_SOURCES})
|
|
target_include_directories(driver_rplidar SYSTEM PRIVATE
|
|
${XLIDAR_RPLIDAR_SDK_DIR}/include
|
|
${XLIDAR_RPLIDAR_SDK_DIR}/src
|
|
)
|