Function ouster::make_xyz_lut(size_t, size_t, double, double, const mat4d&, const std::vector<double>&, const std::vector<double>&)

Function Documentation

XYZLut ouster::make_xyz_lut(size_t w, size_t h, double range_unit, double lidar_origin_to_beam_origin_mm, const mat4d &transform, const std::vector<double> &azimuth_angles_deg, const std::vector<double> &altitude_angles_deg)

Generate a set of lookup tables useful for computing cartesian coordinates from ranges.

The lookup tables are:

  • direction: a matrix of unit vectors pointing radially outwards

  • offset: a matrix of offsets dependent on beam origin distance from lidar origin

Each table is an n x 3 array of doubles stored in column-major order where each row corresponds to the nth point in a lidar scan, with 0 <= n < h*w.

Parameters:
  • w – number of columns in the lidar scan. e.g. 512, 1024, or 2048

  • h – number of rows in the lidar scan

  • range_unit – the unit, in meters, of the range, e.g. sensor::range_unit

  • lidar_origin_to_beam_origin_mm – the radius to the beam origin point of the unit, in millimeters

  • transform – additional transformation to apply to resulting points

  • azimuth_angles_deg – azimuth offsets in degrees for each of h beams

  • altitude_angles_deg – altitude in degrees for each of h beams

Returns:

xyz direction and offset vectors for each point in the lidar scan