23 namespace localization {
69 void Init(
unsigned int rows,
unsigned int cols);
70 void Reset(
unsigned int rows,
unsigned int cols);
75 virtual unsigned int LoadBinary(
unsigned char* buf);
80 virtual unsigned int CreateBinary(
unsigned char* buf,
81 unsigned int buf_size)
const;
83 virtual unsigned int GetBinarySize()
const;
85 virtual void GetIntensityImg(cv::Mat* intensity_img)
const;
88 return map_cells_ + row * cols_;
91 return map_cells_ + row * cols_;
105 inline unsigned char EncodeIntensity(
const LossyMapCell2D& cell)
const;
106 inline void DecodeIntensity(
unsigned char data,
LossyMapCell2D* cell)
const;
109 inline uint16_t EncodeAltitudeGround(
const LossyMapCell2D& cell)
const;
110 inline void DecodeAltitudeGround(uint16_t data,
LossyMapCell2D* cell)
const;
111 inline uint16_t EncodeAltitudeAvg(
const LossyMapCell2D& cell)
const;
112 inline void DecodeAltitudeAvg(uint16_t data,
LossyMapCell2D* cell)
const;
113 inline unsigned char EncodeCount(
const LossyMapCell2D& cell)
const;
114 inline void DecodeCount(
unsigned char data,
LossyMapCell2D* cell)
const;
115 const int var_range_ = 1023;
116 const int var_ratio_ = 4;
118 const float alt_ground_interval_ = 0.04f;
119 const uint16_t ground_void_flag_ = 0xffff;
120 const float alt_avg_interval_ = 0.04f;
121 const int count_range_ = 2;
unsigned int cols_
The number of columns.
Definition: lossy_map_matrix_2d.h:100
The options of the reflectance map.
Definition: base_map_config.h:32
PlanningContext is the runtime context in planning. It is persistent across multiple frames...
Definition: atomic_hash_map.h:25
LossyMapCell2D * map_cells_
The matrix data structure.
Definition: lossy_map_matrix_2d.h:102
Definition: lossy_map_matrix_2d.h:26
float intensity
The average intensity value.
Definition: lossy_map_matrix_2d.h:48
float alt_avg_min_
Definition: lossy_map_matrix_2d.h:122
float alt_avg_max_
Definition: lossy_map_matrix_2d.h:123
The data structure of the map cells in a map node.
Definition: base_map_matrix.h:28
unsigned int rows_
The number of rows.
Definition: lossy_map_matrix_2d.h:98
bool is_ground_useful
is ground altitude usefu
Definition: lossy_map_matrix_2d.h:56
float intensity_var
The variance intensity value.
Definition: lossy_map_matrix_2d.h:50
void Reset()
Reset to default value.
LossyMapCell2D()
The default constructor.
bool Init(const char *binary_name)
const LossyMapCell2D * operator[](int row) const
Definition: lossy_map_matrix_2d.h:90
LossyMapCell2D * operator[](int row)
Definition: lossy_map_matrix_2d.h:87
float altitude
The average altitude of the cell.
Definition: lossy_map_matrix_2d.h:52
float alt_ground_min_
Definition: lossy_map_matrix_2d.h:124
Definition: lossy_map_matrix_2d.h:59
unsigned int count
The number of samples in the cell.
Definition: lossy_map_matrix_2d.h:46
float alt_ground_max_
Definition: lossy_map_matrix_2d.h:125
float altitude_ground
The ground altitude of the cell.
Definition: lossy_map_matrix_2d.h:54
LossyMapCell2D & operator=(const LossyMapCell2D &ref)
Load the map cell from a binary chunk.