基于 RO2 humble 配置 robosense Helios 32(速腾) & xsense mti 300

博客地址:https://www.cnblogs.com/zylyehuo/
雷达型号:robosense Helios 32(速腾)
IMU 型号:xsense mti 300
使用环境: RO2 humble
首先将雷达以及 IMU 都连接到电脑上

配置 robosense Helios 32(速腾)

查看雷达 IP 地址

安装辅助工具

bash 复制代码
sudo apt install wireshark-qt

启动辅助工具

bash 复制代码
sudo wireshark


记录下 Who 和 Tell 后面的 IP 地址
Who 是要给电脑设置的 IP 地址
Tell 是雷达自身的 IP 地址

在网页中访问雷达 IP 地址


记录下这些配置

为电脑配置 IP 地址


测试电脑能否 ping 通雷达

配置 xsense mti 300

为 IMU 的 USB 接口赋予权限

bash 复制代码
ls /dev/tty  # 双击 Tab 键

sudo chmod 777 /dev/ttyUSB0

下载并编译驱动功能包

下载并编译雷达驱动功能包

bash 复制代码
sudo apt install libpcap-dev libyaml-cpp-dev

sudo apt-get update
bash 复制代码
mkdir -p driver_ws/src

cd driver_ws/src

git clone https://github.com/RoboSense-LiDAR/rslidar_sdk.git

cd rslidar_sdk

git submodule init

git submodule update
bash 复制代码
cd driver_ws/src

git clone https://github.com/RoboSense-LiDAR/rslidar_msg.git
bash 复制代码
cd driver_ws

colcon build

下载并编译 IMU 驱动功能包

参考文档

bash 复制代码
cd /home/zylyehuo/Downloads

git clone --branch ros2 https://github.com/xsenssupport/Xsens_MTi_ROS_Driver_and_Ntrip_Client.git

将下载下来的项目中的 ros2 驱动复制到工作空间的 src 路径下

bash 复制代码
sudo apt install ros-$ROS_DISTRO-nmea-msgs

sudo apt install ros-$ROS_DISTRO-mavros-msgs
bash 复制代码
cd driver_ws/src

sudo chmod -R o+rw xsens_mti_ros2_driver/

cd ..

pushd src/xsens_mti_ros2_driver/lib/xspublic && make && popd

colcon build

测试

雷达与 IMU 时间同步


bash 复制代码
sudo ptp4l -m -i enp11s0 -S

测试 robosense Helios 32(速腾)

修改 config.yaml 配置文件

与雷达网页上记录的配置参数相对应

yaml 复制代码
common:
  msg_source: 1                         # 0: not use Lidar
                                        # 1: packet message comes from online Lidar
                                        # 2: packet message comes from ROS or ROS2
                                        # 3: packet message comes from Pcap file
  send_packet_ros: false                # true: Send packets through ROS or ROS2(Used to record packet)
  send_point_cloud_ros: true            # true: Send point cloud through ROS or ROS2
lidar:
  - driver:
      lidar_type: RSHELIOS  # RSM1             #  LiDAR type - RS16, RS32, RSBP, RSAIRY, RSHELIOS, RSHELIOS_16P, RS128, RS80, RS48, RSP128, RSP80, RSP48, 
                                   #               RSM1, RSM1_JUMBO, RSM2, RSM3, RSE1, RSMX.
                                   
      msop_port: 6698  # 6699              #  Msop port of lidar
      difop_port: 7789  # 7788             #  Difop port of lidar
      imu_port: 0                  #  IMU port of lidar(only for RSAIRY, RSE1), 0 means no imu.
                                   #  If you want to use IMU, please first set ENABLE_IMU_DATA_PARSE to ON in CMakeLists.txt 
      user_layer_bytes: 0          #  Bytes of user layer. thers is no user layer if it is 0         
      tail_layer_bytes: 0          #  Bytes of tail layer. thers is no tail layer if it is 0


      min_distance: 0.2            #  Minimum distance of point cloud
      max_distance: 200            #  Maximum distance of point cloud
      use_lidar_clock: true        #  true--Use the lidar clock as the message timestamp
                                   #  false-- Use the system clock as the timestamp
      dense_points: false          #  true: discard NAN points; false: reserve NAN points
      
      ts_first_point: true         #  true: time-stamp point cloud with the first point; false: with the last point;   
                                   #  these parameters are used from mechanical lidar

      start_angle: 0               #  Start angle of point cloud
      end_angle: 360               #  End angle of point cloud

                                   #  When msg_source is 3, the following parameters will be used
      pcap_repeat: true            #  true: The pcap bag will repeat play   
      pcap_rate: 1.0               #  Rate to read the pcap file
      pcap_path: /home/robosense/lidar.pcap #The path of pcap file

    ros:
      ros_frame_id: rslidar                           #Frame id of packet message and point cloud message
      ros_recv_packet_topic: /rslidar_packets          #Topic used to receive lidar packets from ROS
      ros_send_packet_topic: /rslidar_packets          #Topic used to send lidar packets through ROS
      ros_send_imu_data_topic: /rslidar_imu_data         #Topic used to send imu data through ROS
      ros_send_point_cloud_topic: /rslidar_points      #Topic used to send point cloud through ROS
      ros_queue_length: 100                            #Topic QoS history depth

启动 launch 文件进行测试


bash 复制代码
cd driver_ws

source install/setup.bash

ros2 launch rslidar_sdk humble_start.py

Tips:速腾雷达可以选择点的类型

参考链接:速腾聚创雷达最新驱动安装(包含ring和timestamp)运行lio-sam


保存好之后,重新编译即可

测试 xsense mti 300

基于 MT软件套测试

1.安装依赖

安装 libdouble-conversion1
bash 复制代码
wget http://archive.ubuntu.com/ubuntu/pool/main/d/double-conversion/libdouble-conversion1_2.0.1-4ubuntu1_amd64.deb

sudo dpkg -i libdouble-conversion1_2.0.1-4ubuntu1_amd64.deb
安装 libicu60
bash 复制代码
wget http://security.ubuntu.com/ubuntu/pool/main/i/icu/libicu60_60.2-3ubuntu3.2_amd64.deb

sudo dpkg -i libicu60_60.2-3ubuntu3.2_amd64.deb

2.MT软件套下载

下载链接


3.执行.sh文件

将刚才下载的压缩文件手动解压,并将一共有三个文件需要解压,大文件解压后,点进去还有两个文件需要解压,解压完后将压缩包删了节省内存。


bash 复制代码
./mtsdk_linux-x64_2022.0.sh 

若报错"uudecond",执行以下安装命令

bash 复制代码
sudo apt-get update -y
 
sudo apt-get install -y sharutils

4.打开MT Manager界面

打开到以下路径的文件:
MT_Software_Suite_linuxx64_2022.0_b7085_r119802/MT_Software_Suite_linux-x64_2022.0/mtmanager_linux-x64_2022.0/mtmanager/linux-x64/bin
然后右键打开终端,执行如下命令

bash 复制代码
./mtmanager





记住这步设置的波特率

运行 launch 文件测试 IMU 节点数据

bash 复制代码
lsusb

看到Xscens ******

bash 复制代码
ls -l /dev/tty  # 双击 Tab 键

看到/dev/ttyUSB0

bash 复制代码
sudo chmod 777 /dev/ttyUSB0
bash 复制代码
groups
 
sudo usermod -G dialout -a $USER
 
newgrp dialout

单纯发布IMU的节点数据

bash 复制代码
cd driver_ws

source install/setup.bash
        
roslaunch xsens_mti_driver xsens_mti_node.launch

在 rviz 中可视化 IMU 数据

bash 复制代码
ros2 launch xsens_mti_ros2_driver display.launch.py
相关推荐
Felaim4 天前
【SLAM】人形机器人 VLN 相机与传感器配置调研
slam·传感器·人形机器人·vln·相机选型
kyle~8 天前
时间同步 --- PTP 与 Scheduled Action Command
c++·数码相机·机器人·传感器
盛世宏博智慧档案9 天前
算力机房多协议融合:Modbus TCP 温湿度变送器与 SNMP 设备混合组网方案
网络·网络协议·tcp/ip·传感器·温湿度
kyle~10 天前
系统设计 --- 基于运动相位的时间域稳像设计
计算机视觉·机器人·传感器
cnbestec12 天前
脊柱姿态数据难采集?MinkTec柔性弯曲形变传感器 FlexTail:±1°精度×18个3D节点走出实验室
传感器·minktec·柔性弯曲形变传感器·智能健康监测·flextail·minktec 智能监测衬衫·rectify 数据软件
星夜离尘5614 天前
MATLAB 多传感器时间对齐 用 interp1 建立公共时间网格并限制外推
matlab·插值·传感器·时间序列·interp1
kyle~14 天前
Fail-Safe 故障安全
机器人·传感器
kyle~15 天前
实时系统通信抖动(Jitter)
计算机视觉·机器人·接口隔离原则·传感器
kyle~15 天前
多模态传感器软件同步后的数据关联时序误差测算
计算机视觉·机器人·相机·传感器
北京盛世宏博17 天前
通信异常深度排查:以太网温湿度设备 TCP 粘包、UDP 丢包根治方案
单片机·网络协议·tcp/ip·udp·以太网·传感器·温湿度