From b0dfa63fb73e1a7446b5ddeea610104f21288273 Mon Sep 17 00:00:00 2001 From: Matt Spencer Date: Fri, 17 Jul 2026 11:36:53 +0000 Subject: [PATCH] Update the livox patches. --- patches/livox_ros_driver2.patch | 12 ++++++++++++ patches/livox_sdk.patch | 25 +++++++++++++++++++++++++ 2 files changed, 37 insertions(+) diff --git a/patches/livox_ros_driver2.patch b/patches/livox_ros_driver2.patch index 44512c9..39e0e99 100644 --- a/patches/livox_ros_driver2.patch +++ b/patches/livox_ros_driver2.patch @@ -14,3 +14,15 @@ index 0000000..36804a4 @@ -0,0 +1 @@ +package_ROS2.xml \ No newline at end of file +diff --git a/package_ROS2.xml b/package_ROS2.xml +index 96f5762..c66785b 100644 +--- a/package_ROS2.xml ++++ b/package_ROS2.xml +@@ -28,6 +28,7 @@ + + git + apr ++ livox_sdk2 + + + ament_cmake diff --git a/patches/livox_sdk.patch b/patches/livox_sdk.patch index 3738761..fe33a0f 100644 --- a/patches/livox_sdk.patch +++ b/patches/livox_sdk.patch @@ -1,3 +1,28 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 05f84c5..4fb6f31 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1,7 +1,9 @@ +-cmake_minimum_required(VERSION 3.0) ++cmake_minimum_required(VERSION 3.5) + + project(livox_sdk2) + ++find_package(ament_cmake REQUIRED) ++ + set(CMAKE_CXX_STANDARD 11) + + message(STATUS "main project dir: " ${PROJECT_SOURCE_DIR}) +@@ -18,3 +20,9 @@ endif(UNIX) + + add_subdirectory(sdk_core) + add_subdirectory(samples) ++ ++# Export the installed headers/libraries so ament packages (e.g. livox_ros_driver2) ++# find the SDK from the colcon install space via CMAKE_PREFIX_PATH. ++ament_export_include_directories(include) ++ament_export_libraries(livox_lidar_sdk_shared) ++ament_package() diff --git a/sdk_core/comm/define.h b/sdk_core/comm/define.h index 0872328..28d989b 100644 --- a/sdk_core/comm/define.h