Class nebula::drivers::HesaiSensor
template <typename PacketT, AngleCorrectionType AngleCorrection>
ClassList > nebula > drivers > HesaiSensor
Base class for all sensor definitions. More...
#include <hesai_sensor.hpp>
Public Types
Type | Name |
---|---|
typedef typename std::conditional<(AngleCorrection==AngleCorrectionType::CALIBRATION), AngleCorrectorCalibrationBased< PacketT::n_channels, PacketT::degree_subdivisions >, AngleCorrectorCorrectionBased< PacketT::n_channels, PacketT::degree_subdivisions > >::type | angle_corrector_t |
typedef PacketT | packet_t |
Public Functions
Type | Name |
---|---|
HesaiSensor () = default |
|
int | get_earliest_point_time_offset_for_block (uint32_t start_block_id, const PacketT & packet) For a given start block index, find the earliest (lowest) relative time offset of any point in the packet in or after the start block. |
virtual int | get_packet_relative_point_time_offset (uint32_t block_id, uint32_t channel_id, const PacketT & packet) = 0 Computes the exact relative time between the timestamp of the given packet and the one of the point identified by the given block and channel, in nanoseconds. |
virtual ReturnType | get_return_type (hesai_packet::return_mode::ReturnMode return_mode, unsigned int return_idx, const std::vector< const typename PacketT::body_t::block_t::unit_t * > & return_units) Get the return type of the point given by return_idx. |
virtual | ~HesaiSensor () = default |
Detailed Description
Template parameters:
PacketT
The packet type of the sensor
Public Types Documentation
typedef angle_corrector_t
using nebula::drivers::HesaiSensor< PacketT, AngleCorrection >::angle_corrector_t = typename std::conditional< (AngleCorrection == AngleCorrectionType::CALIBRATION), AngleCorrectorCalibrationBased<PacketT::n_channels, PacketT::degree_subdivisions>, AngleCorrectorCorrectionBased<PacketT::n_channels, PacketT::degree_subdivisions> >::type;
typedef packet_t
using nebula::drivers::HesaiSensor< PacketT, AngleCorrection >::packet_t = PacketT;
Public Functions Documentation
function HesaiSensor
nebula::drivers::HesaiSensor::HesaiSensor () = default
function get_earliest_point_time_offset_for_block
For a given start block index, find the earliest (lowest) relative time offset of any point in the packet in or after the start block.
inline int nebula::drivers::HesaiSensor::get_earliest_point_time_offset_for_block (
uint32_t start_block_id,
const PacketT & packet
)
Parameters:
start_block_id
The index of the block in and after which to consider pointspacket
The packet
Returns:
The lowest point time offset (relative to the packet timestamp) of any point in or after the start block, in nanoseconds
function get_packet_relative_point_time_offset
Computes the exact relative time between the timestamp of the given packet and the one of the point identified by the given block and channel, in nanoseconds.
virtual int nebula::drivers::HesaiSensor::get_packet_relative_point_time_offset (
uint32_t block_id,
uint32_t channel_id,
const PacketT & packet
) = 0
Parameters:
block_id
The point's block idchannel_id
The point's channel idpacket
The packet
Returns:
The relative time offset in nanoseconds
function get_return_type
Get the return type of the point given by return_idx.
inline virtual ReturnType nebula::drivers::HesaiSensor::get_return_type (
hesai_packet::return_mode::ReturnMode return_mode,
unsigned int return_idx,
const std::vector< const typename PacketT::body_t::block_t::unit_t * > & return_units
)
For duplicate points, the return type is reported as ReturnType::IDENTICAL for all identical points. For DUAL_LAST_STRONGEST and DUAL_FIRST_STRONGEST, if the last/first point is also the strongest, it will be returned as ReturnType::LAST_STRONGEST / ReturnType::FIRST_STRONGEST respectively, with the second point being reported as ReturnType::SECONDSTRONGEST.
Parameters:
return_mode
The sensor's currently active return modereturn_idx
The block index of the point within the group of blocks that make up the return group (e.g. either 0 or 1 for dual return)return_units
The units corresponding to all the returns in the group. These are usually from the same column across adjascent blocks.
Returns:
The return type of the point
function ~HesaiSensor
virtual nebula::drivers::HesaiSensor::~HesaiSensor () = default
The documentation for this class was generated from the following file nebula_decoders/include/nebula_decoders/nebula_decoders_hesai/decoders/hesai_sensor.hpp