Files
agv_pro_ros2/patches/livox_sdk.patch
T
Matt Spencer 46f7cbb8b5 Migrate to ROS2 Lyrical for all non-lidar packages
- Switch base image / repos file / rosdep distro from jazzy to lyrical
  (ros:lyrical is built on Ubuntu resolute/26.04).
- Vendor transport_drivers (serial_driver/io_context/udp_driver) since
  lyrical apt packages for them are not yet published; patch removes
  the now-gone ament_target_dependencies() macro.
- Fix ament_target_dependencies() removal across agv_pro_base,
  agv_pro_hardware, agv_pro_rviz_plugins, and slam_gmapping by switching
  to target_link_libraries() with namespaced imported targets (or raw
  *_LIBRARIES/*_INCLUDE_DIRS variables for packages with no modern
  target: serial_driver, ASIO).
- Migrate agv_pro_rviz_plugins from Qt5 to Qt6.
- Fix Boost 1.90 dropping libboost-system-dev: use header-only
  Boost::boost instead of a system component.
- Rename boost::asio::io_service -> io_context and
  mutable_buffers_1 -> mutable_buffer (Asio API removal) in
  agv_pro_hardware and agv_pro_base.
- Update tf2/message_filters includes from removed .h shims to .hpp,
  and fix message_filters::Subscriber's QoS constructor signature.
- Regenerate rosdep-packages.txt for lyrical; skip cartographer_ros/
  orbbec_camera in rosdep install (exec_depend-only, not yet published
  as ros-lyrical-* apt packages -- tracked in TODO.md).
- Lidar packages (fast_lio, livox_*, lslidar_*, point_lio,
  unitree_lidar_*) are deferred; their patches are present but not
  verified yet under lyrical.

Verified: full docker build succeeds with colcon build reporting all
23 non-lidar/transport packages finished, 0 failed.
2026-10-19 17:48:21 +01:00

69 lines
2.3 KiB
Diff

diff --git a/package.xml b/package.xml
new file mode 100644
index 0000000..ffdf3ce
--- /dev/null
+++ b/package.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0"?>
+<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
+<package format="3">
+ <name>livox_sdk2</name>
+ <version>1.3.1</version>
+ <description>
+ Livox SDK2: official C++ library for Livox LiDAR sensors.
+ Provides the livox_sdk2 ament target consumed by livox_ros_driver2.
+ </description>
+ <maintainer email="sdk@livoxtech.com">Livox</maintainer>
+ <license>Apache-2.0</license>
+
+ <buildtool_depend>ament_cmake</buildtool_depend>
+
+ <export>
+ <build_type>ament_cmake</build_type>
+ </export>
+</package>
diff --git a/sdk_core/CMakeLists.txt b/sdk_core/CMakeLists.txt
index 15e960d..aa9e08a 100644
--- a/sdk_core/CMakeLists.txt
+++ b/sdk_core/CMakeLists.txt
@@ -142,3 +142,11 @@ install(TARGETS ${SDK_LIBRARY_STATIC} ${SDK_LIBRARY_SHARED}
PUBLIC_HEADER DESTINATION include
ARCHIVE DESTINATION lib
LIBRARY DESTINATION lib)
+
+# livox_ros_driver2's (unpatched, vendor) CMakeLists.txt looks for the shared library and
+# headers with a raw find_library()/find_path() call pinned to /usr/local, not via colcon's
+# per-package install prefix -- so also install there directly.
+install(TARGETS ${SDK_LIBRARY_STATIC} ${SDK_LIBRARY_SHARED}
+ PUBLIC_HEADER DESTINATION /usr/local/include
+ ARCHIVE DESTINATION /usr/local/lib
+ LIBRARY DESTINATION /usr/local/lib)
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/COLCON_IGNORE b/COLCON_IGNORE
new file mode 100644
index 0000000..e69de29