Apollo  6.0
Open source self driving car software
Public Member Functions | Public Attributes | List of all members
apollo::localization::msf::LosslessMapCell Struct Reference

The multiple layers of the cell. More...

#include <lossless_map_matrix.h>

Collaboration diagram for apollo::localization::msf::LosslessMapCell:
Collaboration graph

Public Member Functions

 LosslessMapCell ()
 The default constructor. More...
 
void Reset ()
 Reset to default value. More...
 
void SetValueLayer (double altitude, unsigned char intensity, double altitude_thres=10.0)
 Set the value of a layer that layer_id > 0. The target layer is found according to the altitude. More...
 
void SetValue (double altitude, unsigned char intensity)
 Set the value. More...
 
unsigned int LoadBinary (unsigned char *buf)
 Load the map cell from a binary chunk. More...
 
unsigned int CreateBinary (unsigned char *buf, unsigned int buf_size) const
 Create the binary. Serialization of the object. More...
 
unsigned int GetBinarySize () const
 Get the binary size of the object. More...
 
unsigned int GetLayerId (double altitude) const
 Match a layer in the map cell given an altitude. More...
 
void GetValue (std::vector< unsigned char > *values) const
 Load the map cell from a binary chunk. More...
 
void GetVar (std::vector< float > *vars) const
 Get the variance of the intensity of all layers in the map cell. More...
 
void GetAlt (std::vector< float > *alts) const
 Get the average altitude of all layers in the map cell. More...
 
void GetAltVar (std::vector< float > *alt_vars) const
 Get the variance of the altitude of all layers in the map cell. More...
 
void GetCount (std::vector< unsigned int > *counts) const
 Get the count of the samples of all layers in the map cell. More...
 
unsigned char GetValue () const
 Get the average intensity of the map cell. More...
 
float GetVar () const
 Get the variance of the intensity of the map cell. More...
 
float GetAlt () const
 Get the average altitude of the map cell. More...
 
float GetAltVar () const
 Get the variance of the altitude of the map cell. More...
 
unsigned int GetCount () const
 Get the count of the samples in the map cell. More...
 
LosslessMapSingleCellGetLayer (unsigned int layer_id)
 Get a particular layer in the map cell. The layer 0 is the layer includes all the samples. More...
 
const LosslessMapSingleCellGetLayer (unsigned int layer_id) const
 Get a perticular layer in the map cell. The layer 0 is the layer includes all the samples. More...
 

Public Attributes

unsigned int layer_num
 The layers of the cell. More...
 
LosslessMapSingleCell map_cells [IDL_CAR_NUM_RESERVED_MAP_LAYER]
 The multiple layers of the cell. The first layer (layer 0) includes all the intensities from any layers. Other layers only include the samples from a layer. More...
 

Detailed Description

The multiple layers of the cell.

Constructor & Destructor Documentation

◆ LosslessMapCell()

apollo::localization::msf::LosslessMapCell::LosslessMapCell ( )

The default constructor.

Member Function Documentation

◆ CreateBinary()

unsigned int apollo::localization::msf::LosslessMapCell::CreateBinary ( unsigned char *  buf,
unsigned int  buf_size 
) const

Create the binary. Serialization of the object.

Parameters
<buf,buf_size>The buffer and its size.
<return>The required or the used size of is returned.

◆ GetAlt() [1/2]

void apollo::localization::msf::LosslessMapCell::GetAlt ( std::vector< float > *  alts) const

Get the average altitude of all layers in the map cell.

◆ GetAlt() [2/2]

float apollo::localization::msf::LosslessMapCell::GetAlt ( ) const
inline

Get the average altitude of the map cell.

◆ GetAltVar() [1/2]

void apollo::localization::msf::LosslessMapCell::GetAltVar ( std::vector< float > *  alt_vars) const

Get the variance of the altitude of all layers in the map cell.

◆ GetAltVar() [2/2]

float apollo::localization::msf::LosslessMapCell::GetAltVar ( ) const
inline

Get the variance of the altitude of the map cell.

◆ GetBinarySize()

unsigned int apollo::localization::msf::LosslessMapCell::GetBinarySize ( ) const

Get the binary size of the object.

◆ GetCount() [1/2]

void apollo::localization::msf::LosslessMapCell::GetCount ( std::vector< unsigned int > *  counts) const

Get the count of the samples of all layers in the map cell.

◆ GetCount() [2/2]

unsigned int apollo::localization::msf::LosslessMapCell::GetCount ( ) const
inline

Get the count of the samples in the map cell.

◆ GetLayer() [1/2]

LosslessMapSingleCell& apollo::localization::msf::LosslessMapCell::GetLayer ( unsigned int  layer_id)
inline

Get a particular layer in the map cell. The layer 0 is the layer includes all the samples.

◆ GetLayer() [2/2]

const LosslessMapSingleCell& apollo::localization::msf::LosslessMapCell::GetLayer ( unsigned int  layer_id) const
inline

Get a perticular layer in the map cell. The layer 0 is the layer includes all the samples.

◆ GetLayerId()

unsigned int apollo::localization::msf::LosslessMapCell::GetLayerId ( double  altitude) const

Match a layer in the map cell given an altitude.

Returns
The valid layer ID is 1 ~ N (The layer 0 is the layer includes all the samples). If there is no existing layer, return 0.

◆ GetValue() [1/2]

void apollo::localization::msf::LosslessMapCell::GetValue ( std::vector< unsigned char > *  values) const

Load the map cell from a binary chunk.

Parameters
<return>The size read (the real size of object).Get the average intensity of all layers in the map cell.

◆ GetValue() [2/2]

unsigned char apollo::localization::msf::LosslessMapCell::GetValue ( ) const
inline

Get the average intensity of the map cell.

◆ GetVar() [1/2]

void apollo::localization::msf::LosslessMapCell::GetVar ( std::vector< float > *  vars) const

Get the variance of the intensity of all layers in the map cell.

◆ GetVar() [2/2]

float apollo::localization::msf::LosslessMapCell::GetVar ( ) const
inline

Get the variance of the intensity of the map cell.

◆ LoadBinary()

unsigned int apollo::localization::msf::LosslessMapCell::LoadBinary ( unsigned char *  buf)

Load the map cell from a binary chunk.

Parameters
<return>The size read (the real size of object).

◆ Reset()

void apollo::localization::msf::LosslessMapCell::Reset ( )

Reset to default value.

◆ SetValue()

void apollo::localization::msf::LosslessMapCell::SetValue ( double  altitude,
unsigned char  intensity 
)

Set the value.

Parameters
<altitude>The altitude of the cell.
<intensity>The reflectance intensity.

◆ SetValueLayer()

void apollo::localization::msf::LosslessMapCell::SetValueLayer ( double  altitude,
unsigned char  intensity,
double  altitude_thres = 10.0 
)

Set the value of a layer that layer_id > 0. The target layer is found according to the altitude.

Member Data Documentation

◆ layer_num

unsigned int apollo::localization::msf::LosslessMapCell::layer_num

The layers of the cell.

◆ map_cells

LosslessMapSingleCell apollo::localization::msf::LosslessMapCell::map_cells[IDL_CAR_NUM_RESERVED_MAP_LAYER]

The multiple layers of the cell. The first layer (layer 0) includes all the intensities from any layers. Other layers only include the samples from a layer.


The documentation for this struct was generated from the following file: