Template Class RobosenseSensor
Defined in File robosense_sensor.hpp
Class Documentation
-
template<typename PacketT, typename InfoPacketT>
class RobosenseSensor Base class for all sensor definitions.
- Template Parameters:
PacketT – The packet type of the sensor
Public Types
-
typedef InfoPacketT info_t
Public Functions
-
RobosenseSensor() = default
-
virtual ~RobosenseSensor() = default
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.
- Parameters:
block_id – The point’s block id
channel_id – The point’s channel id
sensor_configuration – The sensor configuration
- Returns:
The relative time offset in nanoseconds
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.
- Parameters:
start_block_id – The index of the block in and after which to consider points
sensor_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
-
inline 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.
- Parameters:
return_mode – The sensor’s currently active return mode
return_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
Public Static Functions
-
static inline 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.
- Parameters:
return_idx – The unit’s index in the return_units vector
return_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