< >
Home » ROS2与传感器教程 » ros2与传感器-整合RS-lidar-16线雷达(速腾)

ros2与传感器-整合RS-lidar-16线雷达(速腾)

ros2与传感器-整合RS-lidar-16线雷达

说明:

  • 介绍如何在ros2下使用RS-lidar-16线雷达
  • 环境: ubuntu20.04 + ros2 galactic
  • 具体产品,点击淘宝地址

步骤:

  • 首先将激光雷达速腾RS-lidar-16与电脑相连
  • RS-lidar-16上电(12v) 
  • RS-lidar-16官方默认的ip是192.168.1.200
  • 通过以太网网口连接电脑  
  • 新增网络rslidar-16,以太网->ipv4设置->方法:手动,更改配置
address :192.168.1.102 
netmask: 255.255.255.0   
gateway: 192.168.1.1 
  • 然后打开浏览器输入192.168.1.200可以看到激光雷达的配置文件

  • 安装相关包

sudo apt-get install libboost-dev libpcap-dev libpcl-dev libeigen3-dev
  • 安装ros工程包
cd ~/rslidar_ws/src
git clone https://github.com/RoboSense-LiDAR/rslidar_sdk
cd ~/rslidar_ws/
colcon build --symlink-install
  • 配置雷达类型参数,其他参数配置说明,参考
  • 修改rslidar_sdk/config/config.yaml
  • 配置lidar_type为RS16
lidar:
    - driver:
        lidar_type: RS16            #LiDAR type - RS16, RS32, RSBP, RS128, RS128_40, RS80, RSM1, RSHELIOS
        frame_id: /rslidar           #Frame id of message
  • 测试
. ~/rslidar_ws/install/local_setup.bash
ros2 launch rslidar_sdk start.py
  • 查看点云话题
ros2 topic echo /rslidar_points
  • 效果如下:
---
header:
  stamp:
    sec: 1664437253
    nanosec: 820659161
  frame_id: /rslidar
height: 16
width: 1992
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
is_bigendian: false
point_step: 32
row_step: 63744
data:
- 0
- 0
- 192
- 127
- 0
- 0
- 192
- 127
- 0
- 0
- 192
- 127
- 0
- 0
- 128
- 63
- 0
- 0
- 0
- 0
- 66
- 127
- 0
- 0
- 32
- 106
- 0
- 8
- 66
- 127
- 0
- 0
- 0
- 0
- 192
- 127
- 0
- 0
- 192
- 127
- 0
- 0
- 192
- 127
- 0
- 0
- 128
- 63
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 112
- 28
- 177
- 123
- 184
- 85
- 0
- 0
- 0
- 0
- 192
- 127
- 0
- 0
- 192
- 127
- 0
- 0
- 192
- 127
- 0
- 0
- 128
- 63
- 0
- 0
- 0
- 0
- 65
- 127
- 0
- 0
- 0
- 59
- 181
- 0
- 40
- 228
- 0
- 31
- 0
- 0
- 192
- 127
- 0
- 0
- 192
- 127
- 0
- 0
- 192
- 127
- 0
- 0
- 128
- 63
- 0
- 0
- 0
- 0
- 65
- 127
- 0
- 0
- 6
- 1
- 70
- 6
- 1
- 70
- 4
- 1
- '...'
is_dense: false

RIVZ查看点云

  • 效果图

请输入图片描述

纠错,疑问,交流: 请进入讨论区点击加入Q群

获取最新文章: 扫一扫右上角的二维码加入“创客智造”公众号


标签: ros2与传感器