Autoware.Auto
autoware::drivers::velodyne_driver::VLP16Data Class Reference

Class implementing VLP16 specific computation and caches. More...

#include <vlp16_data.hpp>

Collaboration diagram for autoware::drivers::velodyne_driver::VLP16Data:

Public Types

using BlockFlag = uint8_t[2U]
 

Public Member Functions

 VLP16Data (const float32_t rpm)
 
uint32_t azimuth_offset (uint16_t num_banked_pts, uint32_t block_id, uint32_t pt_id) const
 
uint32_t altitude (uint16_t num_banked_pts, uint32_t block_id, uint32_t pt_id) const
 
uint16_t seq_id (uint16_t num_blocks, uint32_t pt_id) const noexcept
 
uint16_t num_blocks_per_revolution () const noexcept
 Get number of blocks generated in a single revolution. More...
 
std::pair< bool8_t, uint16_t > check_flag (const BlockFlag &flag)
 

Static Public Member Functions

static constexpr float32_t distance_resolution () noexcept
 Get distance resolution of VLP16. More...
 

Static Public Attributes

static constexpr float32_t FIRE_SEQ_OFFSET_US = 55.296F
 full (16 point) fire sequence takes this long to cycle More...
 
static constexpr float32_t FIRE_DURATION_US = 2.304F
 one laser fires for this long More...
 
static constexpr uint16_t NUM_LASERS {16U}
 
static constexpr float32_t NUM_SEQUENCES_PER_BLOCK {NUM_POINTS_PER_BLOCK / NUM_LASERS}
 
static constexpr float32_t DISTANCE_RESOLUTION {0.002f}
 

Detailed Description

Class implementing VLP16 specific computation and caches.

Member Typedef Documentation

◆ BlockFlag

Constructor & Destructor Documentation

◆ VLP16Data()

autoware::drivers::velodyne_driver::VLP16Data::VLP16Data ( const float32_t  rpm)
explicit

Member Function Documentation

◆ altitude()

uint32_t autoware::drivers::velodyne_driver::VLP16Data::altitude ( uint16_t  num_banked_pts,
uint32_t  block_id,
uint32_t  pt_id 
) const

Get the altitude angle for a given point in the given block.

Parameters
num_banked_ptsNumber of points from the sequence that were transferred on previous blocks.
block_idBlock ID within the packet.
pt_idPoint ID within the block.
Returns
Altitude angle for the given laser.

◆ azimuth_offset()

uint32_t autoware::drivers::velodyne_driver::VLP16Data::azimuth_offset ( uint16_t  num_banked_pts,
uint32_t  block_id,
uint32_t  pt_id 
) const

Get the azimuth offset for a given point in the given block.

Parameters
num_banked_ptsNumber of points from the sequence that were transferred on previous blocks.
block_idBlock ID within the packet.
pt_idPoint ID within the block.
Returns
Azimuth offset for the given laser.

◆ check_flag()

std::pair< bool8_t, uint16_t > autoware::drivers::velodyne_driver::VLP16Data::check_flag ( const BlockFlag flag)

Check the block flag for validity and return the number of banked points.

Parameters
flag2 byte flag from the block. Should be 0xFFEE
Returns
A pair that contains a bool representing the validity of the flag and an integer containing the number of banked poitns. For VLP16 a single block can contain a whole firing sequence, hence the value will be 0;

◆ distance_resolution()

static constexpr float32_t autoware::drivers::velodyne_driver::VLP16Data::distance_resolution ( )
inlinestaticconstexprnoexcept

Get distance resolution of VLP16.

◆ num_blocks_per_revolution()

uint16_t autoware::drivers::velodyne_driver::VLP16Data::num_blocks_per_revolution ( ) const
noexcept

Get number of blocks generated in a single revolution.

◆ seq_id()

uint16_t autoware::drivers::velodyne_driver::VLP16Data::seq_id ( uint16_t  num_blocks,
uint32_t  pt_id 
) const
noexcept

Get total number of firing sequences in the number of blocks + number of points.

Parameters
num_blocksTotal number of blocks.
pt_idResidue number of points
Returns
Total number of sequences (floor) in the range pointed by the given indices.

Member Data Documentation

◆ DISTANCE_RESOLUTION

constexpr float32_t autoware::drivers::velodyne_driver::VLP16Data::DISTANCE_RESOLUTION {0.002f}
staticconstexpr

◆ FIRE_DURATION_US

constexpr float32_t autoware::drivers::velodyne_driver::VLP16Data::FIRE_DURATION_US = 2.304F
staticconstexpr

one laser fires for this long

◆ FIRE_SEQ_OFFSET_US

constexpr float32_t autoware::drivers::velodyne_driver::VLP16Data::FIRE_SEQ_OFFSET_US = 55.296F
staticconstexpr

full (16 point) fire sequence takes this long to cycle

◆ NUM_LASERS

constexpr uint16_t autoware::drivers::velodyne_driver::VLP16Data::NUM_LASERS {16U}
staticconstexpr

◆ NUM_SEQUENCES_PER_BLOCK

constexpr float32_t autoware::drivers::velodyne_driver::VLP16Data::NUM_SEQUENCES_PER_BLOCK {NUM_POINTS_PER_BLOCK / NUM_LASERS}
staticconstexpr

The documentation for this class was generated from the following files: