Apollo 10.0
自动驾驶开放平台
|
#include <lossless_map.h>
Public 成员函数 | |
LosslessMap (LosslessMapConfig *config) | |
~LosslessMap () | |
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. | |
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 | 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 return the value, if necessary. | |
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 safely and return the value, if necessary. | |
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 return the value, if necessary. | |
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 safely and return the value, if necessary. | |
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 return the value, if necessary. | |
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 safely and return the value, if necessary. | |
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 return the value, if necessary. | |
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 safely and return the value, if necessary. | |
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 | 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. | |
unsigned char | GetValue (const Eigen::Vector3d &coordinate, int zone_id, unsigned int resolution_id) |
Given the 3D global coordinate, this function loads the corresponding map node in the cache and return the value, if necessary. | |
unsigned char | GetValueSafe (const Eigen::Vector3d &coordinate, int zone_id, unsigned int resolution_id) |
Given the 3D global coordinate, this function loads the corresponding map node in the cache thread safely and return the value, if necessary. | |
float | GetVar (const Eigen::Vector3d &coordinate, int zone_id, unsigned int resolution_id) |
Given the 3D global coordinate, this function loads the corresponding map node in the cache and return the value, if necessary. | |
float | GetVarSafe (const Eigen::Vector3d &coordinate, int zone_id, unsigned int resolution_id) |
Given the 3D global coordinate, this function loads the corresponding map node in the cache thread safely and return the value, if necessary. | |
float | GetAlt (const Eigen::Vector3d &coordinate, int zone_id, unsigned int resolution_id) |
Given the 3D global coordinate, this function loads the corresponding map node in the cache and return the value, if necessary. | |
float | GetAltSafe (const Eigen::Vector3d &coordinate, int zone_id, unsigned int resolution_id) |
Given the 3D global coordinate, this function loads the corresponding map node in the cache thread safely and return the value, if necessary. | |
float | GetAltVar (const Eigen::Vector3d &coordinate, int zone_id, unsigned int resolution_id) |
Given the 3D global coordinate, this function loads the corresponding map node in the cache and return the value, if necessary. | |
float | GetAltVarSafe (const Eigen::Vector3d &coordinate, int zone_id, unsigned int resolution_id) |
Given the 3D global coordinate, this function loads the corresponding map node in the cache thread safely and return the value, if necessary. | |
unsigned int | GetCount (const Eigen::Vector3d &coordinate, int zone_id, unsigned int resolution_id) |
Get the number of samples in the map cell. | |
unsigned int | GetCountSafe (const Eigen::Vector3d &coordinate, int zone_id, unsigned int resolution_id) |
Get the number of samples in the map cell thread safely. | |
void | SetGroundHeightOffset (double height_offset) |
Set the ground height offset. | |
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. | |
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. | |
![]() | |
BaseMap (BaseMapConfig *map_config) | |
The constructor. | |
virtual | ~BaseMap () |
The destructor. | |
virtual void | InitMapNodeCaches (int cacheL1_size, int cahceL2_size) |
Init load threadpool and preload threadpool. | |
BaseMapNode * | GetMapNode (const MapNodeIndex &index) |
Get the map node, if it's not in the cache, return false. | |
BaseMapNode * | GetMapNodeSafe (const MapNodeIndex &index) |
Return the map node, if it's not in the cache, safely load it. | |
bool | IsMapNodeExist (const MapNodeIndex &index) const |
Check if the map node in the cache. | |
bool | SetMapFolderPath (const std::string folder_path) |
Set the directory of the map. | |
void | AddDataset (const std::string dataset_path) |
Add a dataset path to the map config. | |
void | AttachMapNodePool (BaseMapNodePool *p_map_node_pool) |
Attach map node pointer. | |
void | WriteBinary (FILE *file) |
Write all the map nodes to a single binary file stream. | |
void | LoadBinary (FILE *file, std::string map_folder_path="") |
Load all the map nodes from a single binary file stream. | |
const BaseMapConfig & | GetConfig () const |
Get the map config. | |
BaseMapConfig & | GetConfig () |
Get the map config. | |
额外继承的成员函数 | |
![]() | |
void | LoadMapNodes (std::set< MapNodeIndex > *map_ids) |
Load map node by index. | |
void | PreloadMapNodes (std::set< MapNodeIndex > *map_ids) |
Load map node by index. | |
void | LoadMapNodeThreadSafety (MapNodeIndex index, bool is_reserved=false) |
Load map node by index, thread_safety. | |
![]() | |
BaseMapConfig * | map_config_ |
The map settings. | |
std::list< MapNodeIndex > | map_nodes_disk_ |
All the map nodes in the Map (in the disk). | |
MapNodeCache< MapNodeIndex, BaseMapNode >::DestroyFunc | destroy_func_lvl1_ |
MapNodeCache< MapNodeIndex, BaseMapNode >::DestroyFunc | destroy_func_lvl2_ |
MapNodeCache< MapNodeIndex, BaseMapNode > * | map_node_cache_lvl1_ |
The cache for map node preload. | |
MapNodeCache< MapNodeIndex, BaseMapNode > * | map_node_cache_lvl2_ |
brief The dynamic map node preloading thread pool pointer. | |
BaseMapNodePool * | map_node_pool_ |
The map node memory pool pointer. | |
std::set< MapNodeIndex > | map_preloading_task_index_ |
@bried Keep the index of preloading nodes. | |
boost::recursive_mutex | map_load_mutex_ |
The mutex for preload map node. | |
在文件 lossless_map.h 第 28 行定义.
|
explicit |
在文件 lossless_map.cc 第 25 行定义.
apollo::localization::msf::LosslessMap::~LosslessMap | ( | ) |
在文件 lossless_map.cc 第 27 行定义.
float apollo::localization::msf::LosslessMap::GetAlt | ( | const Eigen::Vector3d & | coordinate, |
int | zone_id, | ||
unsigned int | resolution_id | ||
) |
Given the 3D global coordinate, this function loads the corresponding map node in the cache and return the value, if necessary.
在文件 lossless_map.cc 第 186 行定义.
void apollo::localization::msf::LosslessMap::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 return the value, if necessary.
This function returns the value of each layer in the map cell.
在文件 lossless_map.cc 第 90 行定义.
float apollo::localization::msf::LosslessMap::GetAltSafe | ( | const Eigen::Vector3d & | coordinate, |
int | zone_id, | ||
unsigned int | resolution_id | ||
) |
Given the 3D global coordinate, this function loads the corresponding map node in the cache thread safely and return the value, if necessary.
在文件 lossless_map.cc 第 195 行定义.
void apollo::localization::msf::LosslessMap::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 safely and return the value, if necessary.
This function returns the value of each layer in the map cell.
在文件 lossless_map.cc 第 99 行定义.
float apollo::localization::msf::LosslessMap::GetAltVar | ( | const Eigen::Vector3d & | coordinate, |
int | zone_id, | ||
unsigned int | resolution_id | ||
) |
Given the 3D global coordinate, this function loads the corresponding map node in the cache and return the value, if necessary.
在文件 lossless_map.cc 第 204 行定义.
void apollo::localization::msf::LosslessMap::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 return the value, if necessary.
This function returns the value of each layer in the map cell.
在文件 lossless_map.cc 第 109 行定义.
float apollo::localization::msf::LosslessMap::GetAltVarSafe | ( | const Eigen::Vector3d & | coordinate, |
int | zone_id, | ||
unsigned int | resolution_id | ||
) |
Given the 3D global coordinate, this function loads the corresponding map node in the cache thread safely and return the value, if necessary.
在文件 lossless_map.cc 第 213 行定义.
void apollo::localization::msf::LosslessMap::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 safely and return the value, if necessary.
This function returns the value of each layer in the map cell.
在文件 lossless_map.cc 第 119 行定义.
unsigned int apollo::localization::msf::LosslessMap::GetCount | ( | const Eigen::Vector3d & | coordinate, |
int | zone_id, | ||
unsigned int | resolution_id | ||
) |
Get the number of samples in the map cell.
在文件 lossless_map.cc 第 222 行定义.
void apollo::localization::msf::LosslessMap::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.
在文件 lossless_map.cc 第 129 行定义.
unsigned int apollo::localization::msf::LosslessMap::GetCountSafe | ( | const Eigen::Vector3d & | coordinate, |
int | zone_id, | ||
unsigned int | resolution_id | ||
) |
Get the number of samples in the map cell thread safely.
在文件 lossless_map.cc 第 231 行定义.
void apollo::localization::msf::LosslessMap::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.
在文件 lossless_map.cc 第 139 行定义.
unsigned char apollo::localization::msf::LosslessMap::GetValue | ( | const Eigen::Vector3d & | coordinate, |
int | zone_id, | ||
unsigned int | resolution_id | ||
) |
Given the 3D global coordinate, this function loads the corresponding map node in the cache and return the value, if necessary.
在文件 lossless_map.cc 第 149 行定义.
void apollo::localization::msf::LosslessMap::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 return the value, if necessary.
This function returns the value of each layer in the map cell.
在文件 lossless_map.cc 第 51 行定义.
unsigned char apollo::localization::msf::LosslessMap::GetValueSafe | ( | const Eigen::Vector3d & | coordinate, |
int | zone_id, | ||
unsigned int | resolution_id | ||
) |
Given the 3D global coordinate, this function loads the corresponding map node in the cache thread safely and return the value, if necessary.
在文件 lossless_map.cc 第 158 行定义.
void apollo::localization::msf::LosslessMap::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 safely and return the value, if necessary.
This function returns the value of each layer in the map cell.
在文件 lossless_map.cc 第 61 行定义.
float apollo::localization::msf::LosslessMap::GetVar | ( | const Eigen::Vector3d & | coordinate, |
int | zone_id, | ||
unsigned int | resolution_id | ||
) |
Given the 3D global coordinate, this function loads the corresponding map node in the cache and return the value, if necessary.
在文件 lossless_map.cc 第 168 行定义.
void apollo::localization::msf::LosslessMap::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 return the value, if necessary.
This function returns the value of each layer in the map cell.
在文件 lossless_map.cc 第 71 行定义.
float apollo::localization::msf::LosslessMap::GetVarSafe | ( | const Eigen::Vector3d & | coordinate, |
int | zone_id, | ||
unsigned int | resolution_id | ||
) |
Given the 3D global coordinate, this function loads the corresponding map node in the cache thread safely and return the value, if necessary.
在文件 lossless_map.cc 第 177 行定义.
void apollo::localization::msf::LosslessMap::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 safely and return the value, if necessary.
This function returns the value of each layer in the map cell.
在文件 lossless_map.cc 第 80 行定义.
|
virtual |
Load map nodes for the location calculate of this frame.
If the forecasts are correct in last frame, these nodes will be all in cache, if not, then need to create loading tasks, and wait for the loading finish, in order to the nodes which the following calculate needed are all in the memory, eigen version.
重载 apollo::localization::msf::BaseMap .
在文件 lossless_map.cc 第 248 行定义.
|
virtual |
Preload map nodes for the next frame location calculation.
It will forecasts the nodes by the direction of the car moving. Because the progress of loading will cost a long time (over 100ms), it must do this for a period of time in advance. After the index of nodes calculate finished, it will create loading tasks, but will not wait for the loading finished, eigen version.
重载 apollo::localization::msf::BaseMap .
在文件 lossless_map.cc 第 241 行定义.
void apollo::localization::msf::LosslessMap::SetGroundHeightOffset | ( | double | height_offset | ) |
Set the ground height offset.
void apollo::localization::msf::LosslessMap::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.
<coordinate> | The 3D global coordinate. |
<intensity> | The reflectance intensity. |
在文件 lossless_map.cc 第 29 行定义.
void apollo::localization::msf::LosslessMap::SetValueLayer | ( | const Eigen::Vector3d & | coordinate, |
int | zone_id, | ||
unsigned char | intensity | ||
) |
Set the vlaue of a pixel in a layer in the map node.
<coordinate> | The 3D global coordinate. The z is used as the altitude for the layer match. |
<intensity> | The reflectance intensity. |
在文件 lossless_map.cc 第 40 行定义.