The parameters are defined in the file rs_driver/src/rs_driver/driver_param.h
.
Basically, there are 3 structures:
RSDriverParam contains RSDecoderParam and RSInputParam.
typedef struct RSDriverParam
{
LidarType lidar_type = LidarType::RS16; ///< Lidar type
InputType input_type = InputType::ONLINE_LIDAR; ///< Input type
RSInputParam input_param;
RSDecoderParam decoder_param;
} RSDriverParam;
enum LidarType
{
RS16 = 1,
RS32,
RSBP,
RS128,
RS80,
RSHELIOS,
RSM1
};
rs_driver
API.enum InputType
{
ONLINE_LIDAR = 1,
PCAP_FILE,
RAW_PACKET
};
RSInputParam specifies the detail paramters of packet source.
The following parameters are for ONLINE_LIDAR
and PCAP_FILE
.
The following parameters are only for ONLINE_LIDAR.
rs_driver
make host_address
join it.The following parameters are only for PCAP_FILE.
rs_driver
replay the PCAP file by the theological frame rate. pcap_rate
gives a rate to it, so as to speed up or slow down.use_vlan
=true
to skip it.typedef struct RSInputParam
{
uint16_t msop_port = 6699;
uint16_t difop_port = 7788;
std::string host_address = "0.0.0.0";
std::string group_address = "0.0.0.0";
// The following parameters are only for PCAP_FILE
std::string pcap_path = "";
bool pcap_repeat = true;
float pcap_rate = 1.0;
bool use_vlan = false;
} RSInputParam;
RSDecoderParam specifies how rs_driver decode LiDAR's packets.
typedef struct RSDecoderParam
{
bool use_lidar_clock = false;
bool dense_points = false;
bool ts_first_point = false;
bool wait_for_difop = true;
RSTransformParam transform_param;
bool config_from_file = false;
std::string angle_path = "";
float min_distance = 0.2f;
float max_distance = 200.0f;
// The following parameters are only for mechanical Lidars.
SplitFrameMode split_frame_mode = SplitFrameMode::SPLIT_BY_ANGLE;
float split_angle = 0.0f;
uint16_t num_blks_split = 1;
float start_angle = 0.0f;
float end_angle = 360.0f;
} RSDecoderParam;
The following parameters are for all LiDARs。
rs_driver
on the host?
use_lidar_clock
=true
,use the LiDAR timestamp, else use the host one.dense_points
=false
, then point cloud contains NAN points, else discard them.ts_first_point
=false
, then stamp it with the last point, else with the first point。wait_for_difop
=false
. It might help to locate the problem.ENABLE_TRANSFORM
=ON
.typedef struct RSTransformParam
{
float x = 0.0f; ///< unit, m
float y = 0.0f; ///< unit, m
float z = 0.0f; ///< unit, m
float roll = 0.0f; ///< unit, radian
float pitch = 0.0f; ///< unit, radian
float yaw = 0.0f; ///< unit, radian
} RSTransformParam;
The following parameters are only for mechanical LiDARs.
SPLIT_BY_ANGLE
is by a user requested angle. User can specify it. This is default and suggested.SPLIT_BY_FIXED_BLKS
is by blocks theologically;SPLIT_BY_CUSTOM_BLKS
is by user requested blocks.enum SplitFrameMode
{
SPLIT_BY_ANGLE = 1,
SPLIT_BY_FIXED_BLKS,
SPLIT_BY_CUSTOM_BLKS
};
split_frame_mode
=SPLIT_BY_ANGLE
, then split_angle
is the requested angle to split.num_blks_split - If split_frame_mode
=SPLIT_BY_CUSTOM_BLKS
,then num_blks_split
is blocks.
start_angle、end_angle - Generally, mechanical LiDARs's point cloud's azimuths are in the range of [0
, 360
]. Here you may assign a smaller range of [start_angle
, end_angle
).