Class LidarInfo

Inheritance Relationships

Base Type

Class Documentation

class LidarInfo : public ouster::sdk::core::SensorInfo

Stores parsed information from metadata.

Public Functions

LidarInfo(const LidarInfo&)

Copy constructor for LidarInfo.

LidarInfo(LidarInfo&&)

Move constructor for LidarInfo.

Not marked noexcept: it is defaulted out-of-line (see .cpp, required by the PIMPL cache_ member) and the SensorInfo base’s move is only conditionally noexcept (its Eigen mat4d members are not noexcept-movable on all supported toolchains). GCC rejects a defaulted move whose explicit exception-specification differs from the implicit one, so we let the compiler deduce it.

~LidarInfo() override
LidarInfo &operator=(const LidarInfo&)

Copy assignment operator.

Parameters:

other[in] LidarInfo to copy from.

Returns:

reference to this object.

LidarInfo &operator=(LidarInfo&&)

Move assignment operator.

Not marked noexcept for the same reason as the move constructor above.

Returns:

reference to this object.

explicit LidarInfo(const std::string &json_string)

Constructs a LidarInfo object by parsing a metadata.

Parameters:

json_string[in] JSON-formatted string representing sensor metadata.

Throws:

std::runtime_error – If the metadata string is empty.

LidarInfo()

Empty constructor, retained for compatibility.

virtual std::string to_json_string() const override

Return an updated version of the metadata string reflecting any changes to the LidarInfo.

Errors out if changes are incompatible but does not check for validity

Returns:

json serialized version of this object

Version get_version() const

Parse and return version info about this sensor.

Returns:

sensor version info

ProductInfo get_product_info() const

Extracts and returns parsed product information for the sensor.

Returns:

A ProductInfo object containing the form factor, beam count, and other relevant product metadata parsed from the LidarInfo.

bool has_fields_equal(const LidarInfo &other) const

Compares the current LidarInfo object to another and checks if the fields (excluding user metadata) are equal.

Parameters:

other[in] Another LidarInfo object to compare with.

Returns:

True if key fields are equal, false otherwise.

int num_returns() const

Get the number of returns output by the sensor in its current setup.

Returns:

number of returns

virtual size_t w() const override

Retrieves the width of a frame.

Returns:

width of a frame. returns the width of a frame (equivalent to format.columns_per_frame)

virtual size_t h() const override

Retrieves the height of a frame.

Returns:

height of a frame. returns the height of a frame (equivalent to format.pixels_per_column)

virtual int fps() const override

Frame rate of this lidar, taken from its data format.

Returns:

the value of format.fps, in frames per second.

virtual bool could_be_synchronized() const override

Whether this lidar can be synchronized with an external time source.

Returns:

true if the sensor’s timestamp mode uses an external source.

virtual double latency() const override

Delay between the start of a scan and the scan’s reported timestamp.

Returns:

capture latency in seconds.

virtual std::shared_ptr<SensorInfo> clone() const override

Polymorphic copy.

Returns a new SensorInfo of the concrete type (e.g. LidarInfo or CameraInfo), letting callers duplicate a sensor without knowing its kind.

Returns:

a shared_ptr to a copy of this SensorInfo.

Public Members

std::string fw_rev = {}

fw revision corresponding to build_rev in metadata.json

std::string prod_line = {}

prod line

DataFormat format = {}

data format of sensor

std::vector<double> beam_azimuth_angles = {}

beam azimuth angles for 3D projection (per row, len h)

std::vector<double> beam_altitude_angles = {}

beam altitude angles for 3D projection (per row, len h)

double lidar_origin_to_beam_origin_mm = {}

distance between lidar origin and beam origin in mm

mat4d beam_to_lidar_transform = mat4d::Zero()

transform between beam and lidar frame

mat4d lidar_to_sensor_transform = mat4d::Zero()

transform between lidar and sensor frame

uint32_t init_id = {}

initialization ID updated every reinit

std::string build_date = {}

build date from FW LidarInfo

std::string image_rev = {}

image rev from FW LidarInfo

std::string prod_pn = {}

prod pn

std::string status = {}

sensor status at time of pulling metadata

CalibrationStatus cal = {}

sensor calibration

LidarConfig config = {}

parsed sensor config if available from metadata

std::string user_data = {}

userdata from sensor if available

std::string client_version = {}

version of library that wrote metadata

nonstd::optional<ZoneSet> zone_set = {}

zone monitor configuration, if present

Public Static Functions

static std::shared_ptr<LidarInfo> from_default(LidarMode mode)

Get a default LidarInfo for the given lidar mode.

Parameters:

mode[in] lidar mode to generate default LidarInfo for.

Returns:

default LidarInfo for the OS1-64.