Initial commit

This commit is contained in:
2026-07-27 13:51:19 +08:00
commit 7bec56ca51
5408 changed files with 1126933 additions and 0 deletions
@@ -0,0 +1,272 @@
# 2 Introduction to Parameters
rslidar_sdk reads parameters from the configuration file ```config.yaml```, which is stored in ```rslidar_sdk/config```.
`config.yaml` contains two parts, the `common` part and the `lidar` part.
rslidar_sdk supports multi-LiDARs case. The `common` part is shared by all LiDARs, while in the `lidar` part, each child node is for an individual Lidar.
**config.yaml is indentation sensitive! Please make sure the indentation is not changed after adjusting the parameters!**
## 2.1 Common
The `common` part specifies the source of LiDAR packets, and where to publish point clouds and packets.
```yaml
common:
msg_source: 1
send_packet_ros: false
send_point_cloud_ros: false
```
- msg_source
- 0 -- Unused. Never set this parameter to 0.
- 1 -- LiDAR packets come from on-line LiDARs. For more details, please refer to [Connect to online LiDAR and send point cloud through ROS](../howto/06_how_to_decode_online_lidar.md)
- 2 -- LiDAR packets come from ROS/ROS2. It is used to decode from an off-line rosbag. For more details, please refer to [Record rosbag & Replay it](../howto/11_how_to_record_replay_packet_rosbag.md)
- 3 -- LiDAR packets come from a PCAP bag. For more details, please refer to [Decode PCAP file and send point cloud through ROS](../howto/08_how_to_decode_pcap_file.md)
- send_packet_ros
- true -- LiDAR packets will be sent to ROS/ROS2.
*The ROS Packet message is of a customized message type, so you can't print its content via the ROS `echo` command. This option is used to record off-line Packet rosbags. For more details, please refer to the case of msg_source=2.*
- send_point_cloud_ros
- true -- The LiDAR point cloud will be sent to ROS/ROS2.
*The ROS point cloud type is the ROS official defined type -- sensor_msgs/PointCloud2, so it can be visualized on the ROS `rviz` tool directly. It is not suggested to record the point cloud to rosbag, because its size may be very large. Please record Packets instead. Refer to the case of msg_source=2.*
## 2.2 lidar
The `lidar` part needs to be adjusted for every LiDAR seperately.
```yaml
lidar:
- driver:
lidar_type: 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: 6699 # Msop port of lidar
difop_port: 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
```
- lidar_type
Supported LiDAR types are listed in the README file.
- msop_port, difop_port, imu_port
The MSOP/DIFOP/IMU port to receive LiDAR packets. *If no data is received, please check these parameters first.*
- user_layer_bytes, tail_layer_bytes
The number of bytes of the user layer and tail layer.
- min_distance, max_distance
The minimum distance and maximum distance of the point cloud.
- use_lidar_clock
- true -- Use the Lidar clock as the message timestamp
- false -- Use the host machine clock as the message timestamp
- dense_points
Whether to discard NAN points. The default value is ```false```.
- Discard if ```true```
- reserve if ```false```.
- ts_first_point
Stamp the point cloud with the first point or the last one. Stamp with the first point if ```true```, else stamp with the last point if ```false```. The default value is ```false```.
- start_angle, end_angle
The start angle and end angle of the point cloud, which should be in the range of 0~360°. *`start_angle` can be larger than `end_angle`*.
- pcap_path
The full path of the PCAP file. Valid if msg_source = 3.
- ros_send_by_rows
Meaningful only for Mechanical Lidars, and valid if dense_points = false。
- true -- send point cloud row by row
- false -- send point cloud clolumn by column
## 2.3 Examples
### 2.3.1 Single Lidar Case
Connect to 1 LiDAR of RSM1, and send point cloud to ROS.
```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: 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: 6699 # Msop port of lidar
difop_port: 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
```
### 2.3.2 Multi Lidar Case
Connect to 1 LiDAR of RSM1, and 1 LiDAR of RSE1, and send point cloud to ROS.
*Pay attention to the indentation of the `lidar` part*
```yaml
common:
msg_source: 1
send_packet_ros: false
send_point_cloud_ros: true
lidar:
- driver:
lidar_type: 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: 6699 # Msop port of lidar
difop_port: 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: /left/rslidar_packets #Topic used to receive lidar packets from ROS
ros_send_packet_topic: /left/rslidar_packets #Topic used to send lidar packets through ROS
ros_send_imu_data_topic: /left/rslidar_imu_data #Topic used to send imu data through ROS
ros_send_point_cloud_topic: /left/rslidar_points #Topic used to send point cloud through ROS
- driver:
lidar_type: RSE1 # LiDAR type - RS16, RS32, RSBP, RSAIRY, RSHELIOS, RSHELIOS_16P, RS128, RS80, RS48, RSP128, RSP80, RSP48,
# RSM1, RSM1_JUMBO, RSM2, RSM3, RSE1, RSMX.
msop_port: 6699 # Msop port of lidar
difop_port: 7788 # Difop port of lidar
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: /right/rslidar_packets #Topic used to receive lidar packets from ROS
ros_send_packet_topic: /right/rslidar_packets #Topic used to send lidar packets through ROS
ros_send_imu_data_topic: /right/rslidar_imu_data #Topic used to send imu data through ROS
ros_send_point_cloud_topic: /right/rslidar_points #Topic used to send point cloud through ROS
```
@@ -0,0 +1,276 @@
# 2 参数介绍
rslidar_sdk读取配置文件 ```config.yaml```,得到所有的参数。```config.yaml```在```rslidar_sdk/config```文件夹中。
**config.yaml遵循YAML格式。该格式对缩进有严格要求。修改config.yaml之后,请确保每行开头的缩进仍保持一致!**
config.yaml包括两部分:common部分 和 lidar部分。
rslidar_sdk支持多个雷达。common部分为所有雷达共享。lidar部分,每一个子节点对应一个雷达,针对这个雷达的实际情况分别设置。
## 2.1 common部分
common部分设置雷达消息的源(Packet或点云从哪来)和目标(Packet或点云发布到哪去)。
```yaml
common:
msg_source: 1
send_packet_ros: false
send_point_cloud_ros: false
```
- msg_source
- 1 -- 连接在线雷达。更多使用细节,请参考[连接在线雷达并发送点云到ROS](../howto/06_how_to_decode_online_lidar_CN.md)。
- 2 -- 离线解析ROS/ROS2的Packet包。更多使用细节,请参考 [录制ROS数据包然后播放它](../howto/11_how_to_record_replay_packet_rosbag_CN.md)。
- 3 -- 离线解析PCAP包。更多使用细节,请参考[离线解析PCAP包并发送点云到ROS](../howto/08_how_to_decode_pcap_file_CN.md)。
- send_packet_ros
- true -- 雷达Packet消息将通过ROS/ROS2发出
*雷达ROS packet消息为速腾聚创自定义ROS消息,用户使用ROS/ROS2 echo命令不能查看消息的具体内容。这个功能用于录制ROS/ROS2的Packet包,更多使用细节,请参考msg_source=2的情况。
- send_point_cloud_ros
- true -- 雷达点云消息将通过ROS/ROS2发出
*点云消息的类型为ROS官方定义的点云类型sensor_msgs/PointCloud2, 用户可以使用Rviz直接查看点云。用户可以录制ROS/ROS2的点云包,但点云包的体积非常大,所以不建议这么做。更好的方式是录制Packet包,请参考send_packet_ros=true的情况。*
## 2.2 lidar部分
lidar部分根据每个雷达的实际情况进行设置。
```yaml
lidar:
- driver:
lidar_type: 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: 6699 # Msop port of lidar
difop_port: 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
```
- lidar_type
支持的雷达型号在rslidar_sdk的README文件中列出。
- msop_port, difop_port, imu_port
接收MSOP/DIFOP/IMU Packet的msop端口号、difop端口号、 Imu端口号。 *若收不到消息,请优先确认这些参数是否配置正确。*
- user_layer_bytes, tail_layer_bytes
用户自定义层和尾部层的字节数。默认为0。
- min_distance, max_distance
点云的最小距离和最大距离。这个设置是软件屏蔽,会将区域外的点设置为NAN点,不会减小每帧点云的体积。
- use_lidar_clock
- true -- 使用雷达时间作为消息时间戳。
- false -- 使用电脑主机时间作为消息时间戳。
- dense_points
输出的点云中是否剔除NAN points。默认值为false。
- true 为剔除,
- false为不剔除。
- ts_first_point
默认值为false。点云的时间戳是否第一个点的时间。true使用第一个点的时间,false使用第一个点的时间。
- start_angle, end_angle
点云消息的起始角度和结束角度。这个设置是软件屏蔽,将区域外的点设置为NAN点,不会减小每帧点云的体积。 start_angle和end_angle的范围是0~360°,**起始角可以大于结束角**.
- pcap_path
pcap包的路径。当 msg_source=3 时有效。
- pcap_rate
pcap包播放的倍率。当 msg_source=3 时有效。
- pcap_repeat
pcap包是否重复播放。当 msg_source=3 时有效。
## 2.3 示例
### 2.3.1 单台雷达
在线连接1台RSM1雷达,并发送点云数据到ROS。
```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: 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: 6699 # Msop port of lidar
difop_port: 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
```
### 2.3.2 多台雷达
在线连接1台RSM1雷达和1台RSE1雷达,发送点云数据到ROS。
*注意lidar部分参数的缩进*
```yaml
common:
msg_source: 1
send_packet_ros: false
send_point_cloud_ros: true
lidar:
- driver:
lidar_type: 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: 6699 # Msop port of lidar
difop_port: 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: /left/rslidar_packets #Topic used to receive lidar packets from ROS
ros_send_packet_topic: /left/rslidar_packets #Topic used to send lidar packets through ROS
ros_send_imu_data_topic: /left/rslidar_imu_data #Topic used to send imu data through ROS
ros_send_point_cloud_topic: /left/rslidar_points #Topic used to send point cloud through ROS
- driver:
lidar_type: RSE1 # LiDAR type - RS16, RS32, RSBP, RSAIRY, RSHELIOS, RSHELIOS_16P, RS128, RS80, RS48, RSP128, RSP80, RSP48,
# RSM1, RSM1_JUMBO, RSM2, RSM3, RSE1, RSMX.
msop_port: 6699 # Msop port of lidar
difop_port: 7788 # Difop port of lidar
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: /right/rslidar_packets #Topic used to receive lidar packets from ROS
ros_send_packet_topic: /right/rslidar_packets #Topic used to send lidar packets through ROS
ros_send_imu_data_topic: /right/rslidar_imu_data #Topic used to send imu data through ROS
ros_send_point_cloud_topic: /right/rslidar_points #Topic used to send point cloud through ROS
```
@@ -0,0 +1,89 @@
# 3 Introduction to hidden parameters
In order to make the configuration file as simple as possible, we hide some parameters and use default values for them.
This document explains the meanings of these hidden parameters.
## 3.1 common
```yaml
common:
msg_source: 1
send_packet_ros: false
send_point_cloud_ros: false
send_point_cloud_proto: false
```
## 3.2 lidar
```yaml
lidar:
- driver:
lidar_type: 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: 6699 # Msop port of lidar
difop_port: 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
group_address: 0.0.0.0
host_address: 0.0.0.0
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
use_vlan: false
x: 0
y: 0
z: 0
roll: 0
pitch: 0
yaw: 0
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_send_by_rows: false
```
- ```config_from_file``` -- Whether to read Lidar configuration from file. Only used for debug purpose, and can be ignored.
- ```angle_path``` -- The path of the angle.csv. Only used for debug purpose and can be ignored.
- ```ts_first_point``` -- Stamp the point cloud with the first point or the last one. Stamp with the first point if ```true```, else stamp with the last point if ```false```. The default value is ```false```.
- ```split_frame_mode``` -- The way to split the LiDAR frames. Default value is ```1```.
- 1 -- Split frame depending on the split_angle
- 2 -- Split frame depending on a fixed number of blocks
- 3 -- Split frame depending on num_blks_split
- ```split_angle``` -- The angle(in degree) to split frames. Only be used when ```split_frame_mode = 1```. The default value is ```0```.
- ```num_blks_split``` -- The number of blocks in one frame. Only be used when ```split_frame_mode = 3```.
- ```wait_for_difop``` -- If ```false```, the driver will not wait for difop packet(including lidar configuration data, especially angle data to calculate x, y, z), and send out the point cloud immediately. The default value is ```true```.
- ```group_address``` -- If use multi-cast function, this parameter needs to be set correctly. For more details, please refer to [Online LiDAR - Advanced Topics](../howto/07_online_lidar_advanced_topics.md)
- ```host_address``` -- Needed in two conditions. If the host receives packets from multiple Lidars via different IP addresses, use this parameter to specify destination IPs of the Lidars; If group_address is set, it should be set, so it will be joined into the multicast group.
- ```x, y, z, roll, pitch, yaw ``` -- The parameters to do coordinate transformation. If the coordinate transformation function is enabled in driver core, the output point cloud will be transformed based on these parameters. For more details, please refer to [Coordinate Transformation](../howto/10_how_to_use_coordinate_transformation.md)
- ```use_vlan``` -- Whether to use VLAN. The default value is ```false```. This parameter is only needed for pcap file. If it contains packets with VLAN layer, ```use_vlan``` should set to true. In the case of online Lidar, the VLAN layer is stripped by the protocol layer, so use_vlan can be ignored.
- ```ros_send_by_rows```This only applies to mechanical lidar and is only valid when dense_points=false.
-True - When sending a point cloud, arrange the points in a row by row order
-False - When sending a point cloud, arrange the points in a column by column order
@@ -0,0 +1,86 @@
# 3 隐藏参数介绍
为了使配置文件config.yaml尽可能简洁,我们隐藏了部分不常用的参数,在代码中使用默认值。
本文档将详细介绍这些隐藏参数。用户可根据需要,将它们加入参数文件,重新设置。
## 3.1 common
```yaml
common:
msg_source: 1
send_packet_ros: false
send_point_cloud_ros: false
```
## 3.2 lidar
```yaml
lidar:
- driver:
lidar_type: 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: 6699 # Msop port of lidar
difop_port: 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
group_address: 0.0.0.0
host_address: 0.0.0.0
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
ros_send_by_rows:
# 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
use_vlan: false
x: 0
y: 0
z: 0
roll: 0
pitch: 0
yaw: 0
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_send_by_rows: false
```
- ```config_from_file``` -- 默认值为false, 是否从外参文件读入雷达配置信息,仅用于调试,可忽略。
- ```angle_path``` -- angle.csv外参文件的路径,仅用于调试,可忽略。
- ```split_frame_mode``` -- 分帧模式设置,默认值为```1```。
- 1 -- 角度分帧
- 2 -- 固定block数分帧
- 3 -- 自定义block数分帧
- ```split_angle``` -- 用于分帧的角度(单位为度), 在```split_frame_mode = 1``` 时才生效,默认值为```0```。
- ```num_blks_split``` -- 用于分帧的包数,在 ```split_frame_mode = 3```时才生效,默认值为1。
- ```wait_for_difop``` -- 若设置为false, 驱动将不会等待DIFOP包(包含配置数据,尤其是角度信息),而是立即解析MSOP包并发出点云。 默认值为```true```,也就是必须要有DIFOP包才会进行点云解析。
- ```group_address``` -- 如果雷达为组播模式,此参数需要被设置为组播的地址。具体使用方式可以参考[在线雷达 - 高级主题](../howto/07_online_lidar_advanced_topics_CN.md) 。
- ```host_address``` -- 有两种情况需要这个选项。如果主机上通过多个IP地址接收多个雷达的数据,则可以将此参数指定为雷达的目标IP;如果设置了group_address,那也需要设置host_address,以便将这个IP地址的网卡加入组播组。
- ```x, y, z, roll, pitch, yaw ``` -- 坐标变换参数,若启用了内核的坐标变换功能,将会使用此参数输出经过变换后的点云。x, y, z, 单位为```米```, roll, pitch, yaw, 单位为```弧度```。具体使用方式可以参考 [坐标变换功能](../howto/10_how_to_use_coordinate_transformation_CN.md) 。
- ```use_vlan``` -- 默认为false,指定是否使用vlan。如果pcap文件中的packet带vlan层,则需要设置这个选项为true。其他情况下不需要。在线雷达的情况下,协议层到达驱动时,已经剥离vlan层,所以不需要设置这个选项。
- ```ros_send_by_rows```只对机械式雷达有意义,且只有当dense_points = false时才有效。
- true -- 发送点云时,按照一行一行的顺序排列点
- false -- 发送点云时,按照一列一列的顺序排列点