1、 获取pcap包参数
读取pcap包数据获取其中的msop端口号和difop端口号,默认值为msop-6699, difop-7788。
使用wireshark打开pcap包。
下图中的6690为msop端口号
在上面的过滤框中输入 data:data[0:1] == a5,出现如下图的结果,其中的7779为difop端口号。
2、 config文件配置
config配置文件具体如下所示:
common:
msg_source: 3 #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
#4: packet message comes from Protobuf-UDP
#5: point cloud comes from Protobuf-UDP
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
send_packet_proto: false #true: Send packets through Protobuf-UDP
send_point_cloud_proto: false #true: Send point cloud through Protobuf-UDP
pcap_path: /home/robosense/data/data.pcap #The path of pcap file
lidar:
- driver:
lidar_type: RSM1 #LiDAR type - RS16, RS32, RSBP, RS128, RS80, RSM1, RSHELIOS
frame_id: /rslidar #Frame id of message
msop_port: 6690 #Msop port of lidar
difop_port: 7779 #Difop port of lidar
start_angle: 0 #Start angle of point cloud
end_angle: 360 #End angle of point cloud
min_distance: 0.2 #Minimum distance of point cloud
max_distance: 200 #Maximum distance of point cloud
use_lidar_clock: false #True--Use the lidar clock as the message timestamp
#False-- Use the system clock as the timestamp
ros:
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_point_cloud_topic: /rslidar #Topic used to send point cloud through ROS
proto:
point_cloud_recv_port: 60021 #Port number used for receiving point cloud
point_cloud_send_port: 60021 #Port number which the point cloud will be send to
msop_recv_port: 60022 #Port number used for receiving lidar msop packets
msop_send_port: 60022 #Port number which the msop packets will be send to
difop_recv_port: 60023 #Port number used for receiving lidar difop packets
difop_send_port: 60023 #Port number which the difop packets will be send to
point_cloud_send_ip: 127.0.0.1 #Ip address which the point cloud will be send to
packet_send_ip: 127.0.0.1 #Ip address which the lidar packets will be send to