Robosense解码pcap包并使用ros发布

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

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值