23namespace localization {
30 unsigned char intensity) {
33 *
map_config_, coordinate,
static_cast<unsigned int>(i), zone_id);
36 node->
SetValue(coordinate, intensity);
41 unsigned char intensity) {
44 *
map_config_, coordinate,
static_cast<unsigned int>(i), zone_id);
52 unsigned int resolution_id,
53 std::vector<unsigned char>* values) {
56 resolution_id, zone_id);
62 unsigned int resolution_id,
63 std::vector<unsigned char>* values) {
66 resolution_id, zone_id);
72 unsigned int resolution_id, std::vector<float>* vars) {
75 resolution_id, zone_id);
77 node->
GetVar(coordinate, vars);
81 unsigned int resolution_id,
82 std::vector<float>* vars) {
85 resolution_id, zone_id);
87 node->
GetVar(coordinate, vars);
91 unsigned int resolution_id, std::vector<float>* alts) {
94 resolution_id, zone_id);
96 node->
GetAlt(coordinate, alts);
100 unsigned int resolution_id,
101 std::vector<float>* alts) {
104 resolution_id, zone_id);
106 node->
GetAlt(coordinate, alts);
110 unsigned int resolution_id,
111 std::vector<float>* alt_vars) {
114 resolution_id, zone_id);
120 unsigned int resolution_id,
121 std::vector<float>* alt_vars) {
124 resolution_id, zone_id);
130 unsigned int resolution_id,
131 std::vector<unsigned int>* counts) {
134 resolution_id, zone_id);
140 unsigned int resolution_id,
141 std::vector<unsigned int>* counts) {
144 resolution_id, zone_id);
150 int zone_id,
unsigned int resolution_id) {
153 resolution_id, zone_id);
160 unsigned int resolution_id) {
163 resolution_id, zone_id);
169 unsigned int resolution_id) {
172 resolution_id, zone_id);
174 return node->
GetVar(coordinate);
178 unsigned int resolution_id) {
181 resolution_id, zone_id);
183 return node->
GetVar(coordinate);
187 unsigned int resolution_id) {
190 resolution_id, zone_id);
192 return node->
GetAlt(coordinate);
196 unsigned int resolution_id) {
199 resolution_id, zone_id);
201 return node->
GetAlt(coordinate);
205 unsigned int resolution_id) {
208 resolution_id, zone_id);
214 unsigned int resolution_id) {
217 resolution_id, zone_id);
223 int zone_id,
unsigned int resolution_id) {
226 resolution_id, zone_id);
233 unsigned int resolution_id) {
236 resolution_id, zone_id);
242 const Eigen::Vector3d& trans_diff,
243 unsigned int resolution_id,
244 unsigned int zone_id) {
249 unsigned int resolution_id,
unsigned int zone_id,
250 int filter_size_x,
int filter_size_y) {
std::vector< float > map_resolutions_
The pixel resolutions in the map in meters.
The data structure of the base map.
virtual bool LoadMapArea(const Eigen::Vector3d &seed_pt3d, unsigned int resolution_id, unsigned int zone_id, int filter_size_x, int filter_size_y)
Load map nodes for the location calculate of this frame.
BaseMapConfig * map_config_
The map settings.
BaseMapNode * GetMapNodeSafe(const MapNodeIndex &index)
Return the map node, if it's not in the cache, safely load it.
virtual void PreloadMapArea(const Eigen::Vector3d &location, const Eigen::Vector3d &trans_diff, unsigned int resolution_id, unsigned int zone_id)
Preload map nodes for the next frame location calculation.
BaseMapNode * GetMapNode(const MapNodeIndex &index)
Get the map node, if it's not in the cache, return false.
The options of the reflectance map.
void SetValue(const Eigen::Vector3d &coordinate, unsigned char intensity)
Set the value of a pixel in the map node.
void GetAlt(const Eigen::Vector3d &coordinate, std::vector< float > *alts) const
Given the 3D global coordinate, get the map cell's average altitude of each layer.
void SetValueLayer(const Eigen::Vector3d &coordinate, unsigned char intensity)
Set the value of a pixel in a layer in the map node.
void GetAltVar(const Eigen::Vector3d &coordinate, std::vector< float > *alt_vars) const
Given the 3D global coordinate, get the map cell's variance of the altitude of each layer.
void GetValue(const Eigen::Vector3d &coordinate, std::vector< unsigned char > *values) const
Given the 3D global coordinate, get the map cell average intensity of each layer.
void GetCount(const Eigen::Vector3d &coordinate, std::vector< unsigned int > *counts) const
Given the 3D global coordinate, get the map cell's count of the samples of each layer.
void GetVar(const Eigen::Vector3d &coordinate, std::vector< float > *vars) const
Given the 3D global coordinate, get the map cell variance of the intensity of each layer.
void SetValueLayer(const Eigen::Vector3d &coordinate, int zone_id, unsigned char intensity)
Set the vlaue of a pixel in a layer in the map node.
void GetValueSafe(const Eigen::Vector3d &coordinate, int zone_id, unsigned int resolution_id, std::vector< unsigned char > *values)
Given the 3D global coordinate, this function loads the corresponding map node in the cache thread sa...
void GetVar(const Eigen::Vector3d &coordinate, int zone_id, unsigned int resolution_id, std::vector< float > *vars)
Given the 3D global coordinate, this function loads the corresponding map node in the cache and retur...
virtual void PreloadMapArea(const Eigen::Vector3d &location, const Eigen::Vector3d &trans_diff, unsigned int resolution_id, unsigned int zone_id)
Preload map nodes for the next frame location calculation.
void GetCount(const Eigen::Vector3d &coordinate, int zone_id, unsigned int resolution_id, std::vector< unsigned int > *counts)
Get the number of samples in the map cell.
void GetAltSafe(const Eigen::Vector3d &coordinate, int zone_id, unsigned int resolution_id, std::vector< float > *alts)
Given the 3D global coordinate, this function loads the corresponding map node in the cache thread sa...
void GetAltVarSafe(const Eigen::Vector3d &coordinate, int zone_id, unsigned int resolution_id, std::vector< float > *alt_vars)
Given the 3D global coordinate, this function loads the corresponding map node in the cache thread sa...
void GetCountSafe(const Eigen::Vector3d &coordinate, int zone_id, unsigned int resolution_id, std::vector< unsigned int > *counts)
Get the number of samples in the map cell thread safely.
void GetVarSafe(const Eigen::Vector3d &coordinate, int zone_id, unsigned int resolution_id, std::vector< float > *vars)
Given the 3D global coordinate, this function loads the corresponding map node in the cache thread sa...
void GetAlt(const Eigen::Vector3d &coordinate, int zone_id, unsigned int resolution_id, std::vector< float > *alts)
Given the 3D global coordinate, this function loads the corresponding map node in the cache and retur...
void GetAltVar(const Eigen::Vector3d &coordinate, int zone_id, unsigned int resolution_id, std::vector< float > *alt_vars)
Given the 3D global coordinate, this function loads the corresponding map node in the cache and retur...
virtual bool LoadMapArea(const Eigen::Vector3d &seed_pt3d, unsigned int resolution_id, unsigned int zone_id, int filter_size_x, int filter_size_y)
Load map nodes for the location calculate of this frame.
LosslessMap(LosslessMapConfig *config)
void GetValue(const Eigen::Vector3d &coordinate, int zone_id, unsigned int resolution_id, std::vector< unsigned char > *values)
Given the 3D global coordinate, this function loads the corresponding map node in the cache and retur...
void SetValue(const Eigen::Vector3d &coordinate, int zone_id, unsigned char intensity)
Set the value of a pixel in the map, including all the resolution levels.
static MapNodeIndex GetMapNodeIndex(const BaseMapConfig &option, const Eigen::Vector3d &coordinate, unsigned int resolution_id, int zone_id)
Construct a map node index, given a global coordinate, eigen version.