Introduction to Robosense Sagitar lidar drive file parameters

Posted by michelledebeer on Sun, 02 Jan 2022 22:15:02 +0100

Introduction to Robosense Sagitar lidar drive file parameters

Before reading this article, please study the following article The use of Robosense in LIOSAM, And install and compile the driver.
The Robosense driver file has only one parameter file, config Yaml, stored in rslidar_sdk/config folder. The whole parameter file can be divided into two parts: common part and lidar part. In the case of multiple radars, the parameter settings of the common part will be shared by all radars, and the lidar part needs to be set separately according to the actual situation of each radar.
Parameter file config Yaml has strict requirements for indentation! Please ensure that the indent at the beginning of each line remains the same after modifying the parameters!

1 Common part

common:
  msg_source: 1                                         
  send_packet_ros: false                               
  send_point_cloud_ros: false                           
  send_packet_proto: false                              
  send_point_cloud_proto: false                         
  pcap_path: /home/robosense/lidar.pcap                 
  • msg_source

1 – connect online radar For more details, please refer to Read radar data online and send it to ROS.
2 – analyze the packet of ROS or ROS2 offline. For more details, please refer to recording ROS packets & offline parsing ROS packets.
3 – offline parsing pcap package. For more details, please refer to offline parsing pcap package and sending it to ROS.
4 – the radar message source is the packet message of Protobuf UDP. For more details, please refer to sending & receiving using Protobuf.
5 – the radar message source is the point cloud message of Protobuf UDP. For more details, please refer to sending & receiving using Protobuf.

send_packet_ros

true -- radar packet Message will pass ROS or ROS2 issue

Due to radar ROS packet Custom message for Sagitar juchuang ROS Message, so the user cannot directly echo Topic view the specific content of the message. actually packet Mainly used for recording offline ROS Bag, because packet The volume of is smaller than the point cloud.
  • send_point_cloud_ros

    true – the radar point cloud message will be sent through ROS or ROS2

The point cloud message type is the point cloud type sensor officially defined by ROS_ Msgs / pointcloud2, so users can view the point cloud directly using Rviz. At the same time, users can also choose to record the point cloud directly when recording the package, but the volume of the package will be very large. Therefore, we recommend recording the packet message when recording the ROS package offline.

  • send_packet_proto

    true – radar packet message will be sent through protobuf UDP

send_point_cloud_proto

true -- Radar point cloud messages will pass through Protobuf-UDP issue

We recommend sending packet messages instead of point cloud messages because the size of point cloud messages is too large and requires high bandwidth

  • pcap_path

If msg_dource = 3, please make sure this parameter is set to the correct path of pcap package.

2 lidar

This part needs to be set according to different radars (when there are multiple radars).

lidar:
  - driver:
      lidar_type: RS128           
      frame_id: /rslidar           
      msop_port: 6699             
      difop_port: 7788            
      start_angle: 0              
      end_angle: 360               
      min_distance: 0.2            
      max_distance: 200            
      use_lidar_clock: false        
    ros:
      ros_recv_packet_topic: /rslidar_packets    
      ros_send_packet_topic: /rslidar_packets    
      ros_send_point_cloud_topic: /rslidar_points      
    proto:
      point_cloud_recv_port: 60021                     
      point_cloud_send_port: 60021                     
      msop_recv_port: 60022                       
      msop_send_port: 60022                       
      difop_recv_port: 60023                      
      difop_send_port: 60023       
      point_cloud_send_ip: 127.0.0.1                   
      packet_send_ip: 127.0.0.1                   

lidar_type
Currently supported radar models are available in README Listed in.

frame_id

Frame of point cloud message_ id.

msop_port, difop_port

Port number and foop point number of the cloud. If no message is received, please first confirm whether these two parameters are configured correctly.

start_angle, end_angle

The start angle and end angle of point cloud messages are set as software shielding here. The volume of point cloud per frame cannot be reduced. Only points outside the area will be set as NAN points. The starting angle and ending angle shall range from 0 ° to 360 °. (the starting angle can be greater than the ending angle)

min_distance, max_distance

The minimum distance and maximum distance of the point cloud are set as software shielding here. The volume of the point cloud per frame cannot be reduced. Only the points outside the area will be set as NAN points.

use_lidar_clock
true – use radar time as message timestamp.
false – use the system time as the message timestamp.

3 example

Connect a radar online and send the point cloud to ROS.

common:
  msg_source: 1                                         
  send_packet_ros: false                               
  send_point_cloud_ros: true                           
  send_packet_proto: false                              
  send_point_cloud_proto: false                         
  pcap_path: /home/robosense/lidar.pcap 
lidar:
  - driver:
      lidar_type: RS128           
      frame_id: /rslidar           
      msop_port: 6699             
      difop_port: 7788            
      start_angle: 0              
      end_angle: 360               
      min_distance: 0.2            
      max_distance: 200            
      use_lidar_clock: false        
    ros:
      ros_recv_packet_topic: /rslidar_packets    
      ros_send_packet_topic: /rslidar_packets    
      ros_send_point_cloud_topic: /rslidar_points      
    proto:
      point_cloud_recv_port: 60021                     
      point_cloud_send_port: 60021                     
      msop_recv_port: 60022                       
      msop_send_port: 60022                       
      difop_recv_port: 60023                      
      difop_send_port: 60023       
      point_cloud_send_ip: 127.0.0.1                   
      packet_send_ip: 127.0.0.1                

Connect 3 radars online and send point cloud to ROS.

Note the indentation of the lidar parameter

common:
  msg_source: 1                                         
  send_packet_ros: false                               
  send_point_cloud_ros: true                           
  send_packet_proto: false                              
  send_point_cloud_proto: false                         
  pcap_path: /home/robosense/lidar.pcap 
lidar:
  - driver:
      lidar_type: RS128           
      frame_id: /rslidar           
      msop_port: 6699             
      difop_port: 7788            
      start_angle: 0              
      end_angle: 360               
      min_distance: 0.2            
      max_distance: 200            
      use_lidar_clock: false        
    ros:
      ros_recv_packet_topic: /middle/rslidar_packets    
      ros_send_packet_topic: /middle/rslidar_packets    
      ros_send_point_cloud_topic: /middle/rslidar_points      
    proto:
      point_cloud_recv_port: 60021                     
      point_cloud_send_port: 60021                     
      msop_recv_port: 60022                       
      msop_send_port: 60022                       
      difop_recv_port: 60023                      
      difop_send_port: 60023       
      point_cloud_send_ip: 127.0.0.1                   
      packet_send_ip: 127.0.0.1    
  - driver:
      lidar_type: RSBP           
      frame_id: /rslidar           
      msop_port: 1990             
      difop_port: 1991            
      start_angle: 0              
      end_angle: 360               
      min_distance: 0.2            
      max_distance: 200            
      use_lidar_clock: false        
    ros:
      ros_recv_packet_topic: /left/rslidar_packets    
      ros_send_packet_topic: /left/rslidar_packets    
      ros_send_point_cloud_topic: /left/rslidar_points      
    proto:
      point_cloud_recv_port: 60024                     
      point_cloud_send_port: 60024                     
      msop_recv_port: 60025                       
      msop_send_port: 60025                       
      difop_recv_port: 60026                      
      difop_send_port: 60026       
      point_cloud_send_ip: 127.0.0.1                   
      packet_send_ip: 127.0.0.1   
  - driver:
      lidar_type: RSBP           
      frame_id: /rslidar           
      msop_port: 2010             
      difop_port: 2011            
      start_angle: 0              
      end_angle: 360               
      min_distance: 0.2            
      max_distance: 200            
      use_lidar_clock: false        
    ros:
      ros_recv_packet_topic: /right/rslidar_packets    
      ros_send_packet_topic: /right/rslidar_packets    
      ros_send_point_cloud_topic: /right/rslidar_points      
    proto:
      point_cloud_recv_port: 60027                     
      point_cloud_send_port: 60027                     
      msop_recv_port: 60028                       
      msop_send_port: 60028                       
      difop_recv_port: 60029                      
      difop_send_port: 60029       
      point_cloud_send_ip: 127.0.0.1                   
      packet_send_ip: 127.0.0.1    

reference resources

Parameters Introduction

Topics: Ubuntu Machine Learning AI slam Autonomous vehicles