ros2与传感器-整合LS-lidar-16线雷达(镭神)
ros2与传感器-整合LS-lidar-16线雷达(镭神)
说明:
- 介绍如何在ros2下使用LS-lidar-16线雷达
- 环境: ubuntu20.04 + ros2 galactic
- 具体产品,点击淘宝地址
步骤:
- 首先将激光雷达镭神LS-lidar-16与电脑相连
- LS-lidar-16上电(12v)
- LS-lidar-16官方默认的ip是192.168.1.200
- 通过以太网网口连接电脑
- 新增网络lslidar-16,以太网->ipv4设置->方法:手动,更改配置
address :192.168.1.102
netmask: 255.255.255.0
gateway: 192.168.1.1
然后打开浏览器输入192.168.1.200可以看到激光雷达的配置文件
安装ros工程包
cd ~/lslidar_ws/src
git clone https://gitee.com/ncnynl/lslidar_ros2
cd ~/lslidar_ws/
colcon build --symlink-install
- 测试
. ~/lslidar_ws/install/local_setup.bash
ros2 launch lslidar_driver lslidar_c16_launch.py
- 查看点云话题
ros2 topic echo /c16/lslidar_point_cloud
- 效果如下:
---
header:
stamp:
sec: 1664525064
nanosec: 920567000
frame_id: laser_link
height: 1
width: 32567
fields:
- name: x
offset: 0
datatype: 7
count: 1
- name: y
offset: 4
datatype: 7
count: 1
- name: z
offset: 8
datatype: 7
count: 1
- name: intensity
offset: 16
datatype: 7
count: 1
- name: ring
offset: 20
datatype: 4
count: 1
- name: time
offset: 24
datatype: 8
count: 1
is_bigendian: false
point_step: 32
row_step: 1042144
data:
- 151
- 83
- 51
- 188
- 40
- 216
- 154
- 63
- 98
- 108
- 61
- 62
- 0
- 0
- 0
- 0
- 0
- 0
- 244
- 66
- 12
- 0
- 0
- 0
- 54
- 43
- 46
- 194
- 168
- 205
- 216
- 65
- 151
- 83
- 51
- 188
- 140
- 126
- 155
- 63
- 134
- 45
- 210
- 189
- 0
- 0
- 0
- 0
- 0
- 0
- 250
- 66
- 5
- 0
- 0
- 0
- 67
- 43
- 46
- 194
- 168
- 205
- 216
- 65
- 225
- 221
- 47
- 188
- 155
- 222
- 154
- 63
- 33
- 131
- 104
- 62
- 0
- 0
- 0
- 0
- 0
- 0
- 248
- 66
- 13
- 0
- 0
- 0
- 81
- 43
- 46
- 194
- 168
- 205
- 216
- 65
- 97
- 214
- 47
- 188
- 93
- 46
- 156
- 63
- 79
- 244
- 124
- 189
- 0
- 0
- 0
- 0
- 0
- 0
- 3
- 67
- 6
- 0
- 0
- 0
- 95
- 43
- 46
- 194
- 168
- 205
- 216
- 65
- '...'
is_dense: true
RIVZ查看点云
- 效果图
RIVZ查看激光数据
- 效果图
获取最新文章: 扫一扫右上角的二维码加入“创客智造”公众号