Class nebula::drivers::RobosenseSensor
template <typename PacketT, typename InfoPacketT>
ClassList > nebula > drivers > RobosenseSensor
Base class for all sensor definitions. More...
#include <robosense_sensor.hpp>
Public Types
Type | Name |
---|---|
typedef class AngleCorrectorCalibrationBased< PacketT::n_channels, PacketT::degree_subdivisions > | angle_corrector_t |
typedef InfoPacketT | info_t |
typedef PacketT | packet_t |
Public Functions
Type | Name |
---|---|
RobosenseSensor () = default |
|
int | get_earliest_point_time_offset_for_block (uint32_t start_block_id, const std::shared_ptr< const RobosenseSensorConfiguration > & sensor_configuration) 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 std::shared_ptr< const RobosenseSensorConfiguration > & sensor_configuration) = 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 ReturnMode | get_return_mode (const info_t & info_packet) = 0 |
virtual ReturnType | get_return_type (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 RobosenseCalibrationConfiguration | get_sensor_calibration (const info_t & info_packet) = 0 |
virtual std::map< std::string, std::string > | get_sensor_info (const info_t & info_packet) = 0 |
virtual bool | get_sync_status (const info_t & info_packet) = 0 |
virtual | ~RobosenseSensor () = default |
Public Static Functions
Type | Name |
---|---|
bool | is_duplicate (uint32_t return_idx, const std::vector< const typename PacketT::body_t::block_t::unit_t * > & return_units) Whether the unit given by return_idx is a duplicate of any other unit in return_units. |
Detailed Description
Template parameters:
PacketT
The packet type of the sensor
Public Types Documentation
typedef angle_corrector_t
typedef class AngleCorrectorCalibrationBased< PacketT::n_channels, PacketT::degree_subdivisions > nebula::drivers::RobosenseSensor< PacketT, InfoPacketT >::angle_corrector_t;
typedef info_t
typedef InfoPacketT nebula::drivers::RobosenseSensor< PacketT, InfoPacketT >::info_t;
typedef packet_t
typedef PacketT nebula::drivers::RobosenseSensor< PacketT, InfoPacketT >::packet_t;
Public Functions Documentation
function RobosenseSensor
nebula::drivers::RobosenseSensor::RobosenseSensor () = 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::RobosenseSensor::get_earliest_point_time_offset_for_block (
uint32_t start_block_id,
const std::shared_ptr< const RobosenseSensorConfiguration > & sensor_configuration
)
Parameters:
start_block_id
The index of the block in and after which to consider pointssensor_configuration
The sensor configuration
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::RobosenseSensor::get_packet_relative_point_time_offset (
uint32_t block_id,
uint32_t channel_id,
const std::shared_ptr< const RobosenseSensorConfiguration > & sensor_configuration
) = 0
Parameters:
block_id
The point's block idchannel_id
The point's channel idsensor_configuration
The sensor configuration
Returns:
The relative time offset in nanoseconds
function get_return_mode
virtual ReturnMode nebula::drivers::RobosenseSensor::get_return_mode (
const info_t & info_packet
) = 0
function get_return_type
Get the return type of the point given by return_idx.
inline virtual ReturnType nebula::drivers::RobosenseSensor::get_return_type (
ReturnMode return_mode,
unsigned int return_idx,
const std::vector< const typename PacketT::body_t::block_t::unit_t * > & return_units
)
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 get_sensor_calibration
virtual RobosenseCalibrationConfiguration nebula::drivers::RobosenseSensor::get_sensor_calibration (
const info_t & info_packet
) = 0
function get_sensor_info
virtual std::map< std::string, std::string > nebula::drivers::RobosenseSensor::get_sensor_info (
const info_t & info_packet
) = 0
function get_sync_status
virtual bool nebula::drivers::RobosenseSensor::get_sync_status (
const info_t & info_packet
) = 0
function ~RobosenseSensor
virtual nebula::drivers::RobosenseSensor::~RobosenseSensor () = default
Public Static Functions Documentation
function is_duplicate
Whether the unit given by return_idx is a duplicate of any other unit in return_units.
static inline bool nebula::drivers::RobosenseSensor::is_duplicate (
uint32_t return_idx,
const std::vector< const typename PacketT::body_t::block_t::unit_t * > & return_units
)
Parameters:
return_idx
The unit's index in the return_units vectorreturn_units
The vector of all the units corresponding to the same return group (i.e. length 2 for dual-return with both units having the same channel but coming from different blocks)
Returns:
true if the unit is identical to any other one in return_units, false otherwise
The documentation for this class was generated from the following file nebula_decoders/include/nebula_decoders/nebula_decoders_robosense/decoders/robosense_sensor.hpp