Class LidarScan
Defined in File lidar_scan.h
Nested Relationships
Nested Types
Class Documentation
-
class LidarScan
Datastructure for efficient operations on aggregated lidar data.
Stores each field (range, intensity, etc.) contiguously as a H x W block of 4-byte unsigned integers, where H is the number of beams and W is the horizontal resolution (e.g. 512, 1024, 2048).
Note: this is the “staggered” representation where each column corresponds to a single measurement in time. Use the destagger() function to create an image where columns correspond to a single azimuth angle.
Public Types
-
enum Field
Data fields reported per channel
Values:
-
enumerator RANGE
-
enumerator INTENSITY
-
enumerator AMBIENT
-
enumerator REFLECTIVITY
-
enumerator RANGE
-
using raw_t = uint32_t
-
using ts_t = std::chrono::nanoseconds
-
using DynStride = Eigen::Stride<Eigen::Dynamic, Eigen::Dynamic>
-
using Points = Eigen::Array<double, Eigen::Dynamic, 3>
XYZ coordinates with dimensions arranged contiguously in columns
Public Functions
-
LidarScan() = default
The default constructor creates an invalid 0 x 0 scan
-
inline LidarScan(size_t w, size_t h)
Initialize an empty scan with the given horizontal / vertical resolution.
- Parameters:
w – horizontal resoulution, i.e. the number of measurements per scan
h – vertical resolution, i.e. the number of channels
-
inline std::vector<LidarScan::ts_t> timestamps() const
Access timestamps as a vector.
- Returns:
copy of the measurement timestamps as a vector
-
inline BlockHeader &header(size_t m_id)
Access measurement block header fields.
- Returns:
the header values for the specified measurement id
-
inline const BlockHeader &header(size_t m_id) const
Access measurement block header fields.
- Returns:
the header values for the specified measurement id
-
inline Eigen::Map<data_t, Eigen::Unaligned, DynStride> block(size_t m_id)
Access measurement block data.
- Parameters:
m_id – the measurement id of the desired block
- Returns:
a view of the measurement block data
-
inline Eigen::Map<const data_t, Eigen::Unaligned, DynStride> block(size_t m_id) const
Access measurement block data.
- Parameters:
m_id – the measurement id of the desired block
- Returns:
a view of the measurement block data
Public Members
-
std::ptrdiff_t w = {0}
-
std::ptrdiff_t h = {0}
-
std::vector<BlockHeader> headers = {}
-
int32_t frame_id = {-1}
Public Static Attributes
-
static constexpr int N_FIELDS = 4
-
struct BlockHeader
Measurement block information, other than the channel data
-
enum Field