add Lslidar_ROS2_driver/

This commit is contained in:
X-lanni
2025-06-06 10:44:28 +08:00
parent b2fc659c53
commit d398ba0a22
24 changed files with 3192 additions and 0 deletions
@@ -0,0 +1,39 @@
cmake_minimum_required(VERSION 3.5)
project(lslidar_msgs)
# Default to C99
if(NOT CMAKE_C_STANDARD)
set(CMAKE_C_STANDARD 99)
endif()
# Default to C++14
if(NOT CMAKE_CXX_STANDARD)
set(CMAKE_CXX_STANDARD 14)
endif()
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
add_compile_options(-Wall -Wextra -Wpedantic)
endif()
# find dependencies
find_package(ament_cmake REQUIRED)
find_package(std_msgs REQUIRED)
find_package(sensor_msgs REQUIRED)
find_package(builtin_interfaces REQUIRED)
find_package(rosidl_default_generators REQUIRED)
if(BUILD_TESTING)
find_package(ament_lint_auto REQUIRED)
ament_lint_auto_find_test_dependencies()
endif()
rosidl_generate_interfaces(lslidar_msgs
"msg/LslidarDifop.msg"
"msg/LslidarPacket.msg"
"msg/LslidarPoint.msg"
"msg/LslidarScan.msg"
"msg/LslidarSweep.msg"
DEPENDENCIES builtin_interfaces std_msgs
)
ament_package()
@@ -0,0 +1,2 @@
int64 temperature
int64 rpm
@@ -0,0 +1,5 @@
# Raw Leishen LIDAR packet.
builtin_interfaces/Time stamp # packet timestamp
uint8[2000] data # packet contents
@@ -0,0 +1,12 @@
# Time when the point is captured
float32 time
# Converted distance in the sensor frame
float64 x
float64 y
float64 z
# Raw measurement from Leishen M10
float64 azimuth
float64 distance
float64 intensity
@@ -0,0 +1,6 @@
# Altitude of all the points within this scan
float64 altitude
# The valid points in this scan sorted by azimuth
# from 0 to 359.99
LslidarPoint[] points
@@ -0,0 +1,4 @@
std_msgs/Header header
# The 0th scan is at the bottom
LslidarScan[16] scans
@@ -0,0 +1,25 @@
<?xml version="1.0"?>
<package format="3">
<name>lslidar_msgs</name>
<version>1.2.0</version>
<description>ROS message definitions for Leishen LIDARs.</description>
<maintainer email="shaohuashu@lslidar.com">Nick Shu</maintainer>
<author>Nick Shu</author>
<license>GNU General Public License V3.0</license>
<buildtool_depend>ament_cmake</buildtool_depend>
<buildtool_depend>rosidl_default_generators</buildtool_depend>
<exec_depend>rosidl_default_runtime</exec_depend>
<exec_depend>builtin_interfaces</exec_depend>
<depend>std_msgs</depend>
<test_depend>ament_lint_auto</test_depend>
<test_depend>ament_lint_common</test_depend>
<member_of_group>rosidl_interface_packages</member_of_group>
<export>
<build_type>ament_cmake</build_type>
</export>
</package>