| Xavia SDK c++ API 2.1.0 API description of the xavia library

Loading...
Searching...
No Matches
IPointCloud Class Referenceabstract

The interface of the point cloud object. More...

## Public Member Functions
virtual void | Deserialize (const std::uint8_t *pBuffer, const std::size_t size)=0
| Fill this point cloud object from binary data.
virtual void | Deserialize (const std::vector< std::uint8_t > &data)=0
| Fill this point cloud object from binary data.
virtual const std::vector< std::uint16_t > & | GetAmbient () const =0
| Get the background light of points of the current line.
virtual const std::vector< float > & | GetConfidence () const =0
| Get the confidence of points of the current line.
virtual const std::vector< float > & | GetDistanceMm () const =0
| Get the measured distance of the points of the current line.
virtual const ImuData & | GetImuData () const =0
| Get the IMU data of the current line.
virtual const MetaData & | GetMetaData () const =0
| Get the metadata of the current line.
virtual std::size_t | GetNrPoints () const =0
| Get the number of points in the current line.
virtual const OnboardProbes & | GetOnboardProbes () const =0
| Get the temperature and humidity of the current line.
virtual const std::vector< float > & | GetReflectivity () const =0
| Get the reflectivity of the points of the current line.
virtual const std::vector< float > & | GetXMm () const =0
| Get the x reconstruction of points of the current line.
virtual const std::vector< float > & | GetYMm () const =0
| Get the y reconstruction of points of the current line.
virtual const std::vector< float > & | GetZMm () const =0
| Get the z reconstruction of points of the current line.
virtual const std::vector< std::uint8_t > & | Serialize ()=0
| Convert this point cloud object into binary data.

## Detailed Description

The interface of the point cloud object.

Returned by the point cloud callback, each point cloud object represents a single line in the FOV of the sensor.

The point cloud object contains: the (x,y,z) reconstruction of each point, the measured distance from the sensor, the reflectivity and ambient light values, a confidence level for each point, and the metadata.

## Member Function Documentation

## ◆ Deserialize() [1/2]

virtual void Deserialize | ( | const std::uint8_t * | pBuffer,
|  | const std::size_t | size )
| pure virtual

Fill this point cloud object from binary data.

Parameters

  [in] | pBuffer | pointer to the start of the binary data.
  [in] | size | number of bytes to read from the buffer.

Use this to efficiently load the point cloud from the XenomatiX proprietary format. The opposite of the Serialize() function.

Note
  although it is acceptable to provide too many bytes, it is best that size matches exactly the required size. This function will keep an internal copy of the provided data.

## ◆ Deserialize() [2/2]

virtual void Deserialize | ( | const std::vector< std::uint8_t > & | data | ) |
| pure virtual

Fill this point cloud object from binary data.

Parameters

  [in] | data | vector of bytes that hold the point cloud information.

Use this to efficiently load the point cloud from the XenomatiX proprietary format. The opposite of the Serialize() function.

Note
  although it is acceptable to provide too many bytes, it is best that size matches exactly the required size. This function will keep an internal copy of the provided data.

## ◆ GetAmbient()

virtual const std::vector< std::uint16_t > & GetAmbient | ( |  | ) | const
| pure virtual

Get the background light of points of the current line.

Returns
  const reference to the vector with background light measurements. This vector holds GetNrPoints() elements.

## ◆ GetConfidence()

virtual const std::vector< float > & GetConfidence | ( |  | ) | const
| pure virtual

Get the confidence of points of the current line.

Returns
  const reference to the vector confidences (between 0 and 1, where 1 is 100% confidence). This vector holds GetNrPoints() elements.

## ◆ GetDistanceMm()

virtual const std::vector< float > & GetDistanceMm | ( |  | ) | const
| pure virtual

Get the measured distance of the points of the current line.

Returns
  const reference to the vector of radial distances from the sensor in mm. This vector holds GetNrPoints() elements.

## ◆ GetImuData()

virtual const ImuData & GetImuData | ( |  | ) | const
| pure virtual

Get the IMU data of the current line.

Returns
  const reference to the imuData struct,

See also
  ImuData.

Note
  ImuData is currently not yet released. Values will always be 0.

## ◆ GetMetaData()

virtual const MetaData & GetMetaData | ( |  | ) | const
| pure virtual

Get the metadata of the current line.

Returns
  const reference to the metadata struct,

See also
  MetaData.

## ◆ GetNrPoints()

virtual std::size_t GetNrPoints | ( |  | ) | const
| pure virtual

Get the number of points in the current line.

Returns
  number of points as unsigned integer. e.g. 192. This is the number of elements inside the other vector returns of the pointcloud.

## ◆ GetOnboardProbes()

virtual const OnboardProbes & GetOnboardProbes | ( |  | ) | const
| pure virtual

Get the temperature and humidity of the current line.

Returns
  const reference to the probes struct,

See also
  OnboardProbes.

## ◆ GetReflectivity()

virtual const std::vector< float > & GetReflectivity | ( |  | ) | const
| pure virtual

Get the reflectivity of the points of the current line.

Returns
  const reference to the vector reflectivity values. Expressed in % (can exceed 100%). This vector holds GetNrPoints() elements.

## ◆ GetXMm()

virtual const std::vector< float > & GetXMm | ( |  | ) | const
| pure virtual

Get the x reconstruction of points of the current line.

Returns
  const reference to the vector of x coordinates in mm, with the sensor as origin. This vector holds GetNrPoints() elements.

## ◆ GetYMm()

virtual const std::vector< float > & GetYMm | ( |  | ) | const
| pure virtual

Get the y reconstruction of points of the current line.

Returns
  const reference to the vector of y coordinates in mm, with the sensor as origin. This vector holds GetNrPoints() elements.

## ◆ GetZMm()

virtual const std::vector< float > & GetZMm | ( |  | ) | const
| pure virtual

Get the z reconstruction of points of the current line.

Returns
  const reference to the vector of z coordinates in mm, with the sensor as origin. This vector holds GetNrPoints() elements.

## ◆ Serialize()

virtual const std::vector< std::uint8_t > & Serialize | ( |  | ) |
| pure virtual

Convert this point cloud object into binary data.

Returns
  vector of bytes that hold the point cloud information

Use this to efficiently store the point cloud in the XenomatiX proprietary format. When dumping to disk, it accustomary to use the .xpc extension.

See also
  deserialize() functions to read the information back.