Apollo 10.0
自动驾驶开放平台
|
The data structure of a Node in the map. 更多...
#include <base_map_node.h>
Public 成员函数 | |
BaseMapNode (BaseMapMatrix *matrix, CompressionStrategy *strategy) | |
Construct a map node. | |
virtual | ~BaseMapNode () |
Destruct a map node. | |
virtual void | Init (const BaseMapConfig *map_config, const MapNodeIndex &index, bool create_map_cells=true) |
Initialize the map node. | |
virtual void | InitMapMatrix (const BaseMapConfig *map_config) |
Initialize the map matrix. | |
virtual void | Finalize () |
call before deconstruction or reset. | |
virtual void | ResetMapNode () |
Reset map cells data. | |
bool | Save () |
Save the map node to the disk. | |
bool | SaveIntensityImage () const |
Save intensity image of node. | |
bool | Load () |
Load the map node from the disk. | |
bool | Load (const char *filename) |
const BaseMapMatrix & | GetMapCellMatrix () const |
Get map cell matrix. | |
BaseMapMatrix & | GetMapCellMatrix () |
const BaseMapConfig & | GetMapConfig () const |
Get the map settings. | |
void | SetMapNodeIndex (const MapNodeIndex &index) |
Set the map node index. | |
const MapNodeIndex & | GetMapNodeIndex () const |
Get the map node index. | |
void | SetIsReserved (bool is_reserved) |
Set if the map node is reserved. | |
bool | GetIsReserved () const |
Get if the map node is reserved. | |
bool | GetIsChanged () const |
Get if the map data has changed. | |
void | SetIsChanged (bool is) |
Set if the map node data has changed. | |
bool | GetIsReady () const |
Get if the map node data is ready | |
const Eigen::Vector2d & | GetLeftTopCorner () const |
Get the left top corner of the map node. | |
void | SetLeftTopCorner (double x, double y) |
float | GetMapResolution () const |
Get the resolution of this map nodex. | |
bool | GetCoordinate (const Eigen::Vector2d &coordinate, unsigned int *x, unsigned int *y) const |
Given the global coordinate, get the local 2D coordinate of the map cell matrix. | |
bool | GetCoordinate (const Eigen::Vector3d &coordinate, unsigned int *x, unsigned int *y) const |
Eigen::Vector2d | GetCoordinate (unsigned int x, unsigned int y) const |
Given the local 2D coordinate, return the global coordinate, eigen version. | |
静态 Public 成员函数 | |
static Eigen::Vector2d | GetLeftTopCorner (const BaseMapConfig &option, const MapNodeIndex &index) |
Protected 成员函数 | |
virtual unsigned int | LoadBinary (FILE *file) |
Load the map cell from a binary chunk. | |
virtual unsigned int | CreateBinary (FILE *file) const |
Create the binary. | |
virtual unsigned int | GetBinarySize () const |
Get the binary size of the object. | |
virtual unsigned int | LoadHeaderBinary (unsigned char *buf) |
Load the map node header from a binary chunk. | |
virtual unsigned int | CreateHeaderBinary (unsigned char *buf, unsigned int buf_size) const |
Create the binary header. | |
virtual unsigned int | GetHeaderBinarySize () const |
Get the size of the header in bytes. | |
virtual unsigned int | LoadBodyBinary (std::vector< unsigned char > *buf) |
Load the map node body from a binary chunk. | |
virtual unsigned int | CreateBodyBinary (std::vector< unsigned char > *buf) const |
Create the binary body. | |
virtual unsigned int | GetBodyBinarySize () const |
Get the size of the body in bytes. | |
bool | SaveIntensityImage (const std::string &path) const |
Save intensity image of node. | |
Protected 属性 | |
const BaseMapConfig * | map_config_ = nullptr |
The map settings. | |
MapNodeIndex | index_ |
The index of this node. | |
Eigen::Vector2d | left_top_corner_ |
The left top corner of the map node in the global coordinate system. | |
BaseMapMatrix * | map_matrix_ |
The data structure of the map datas, which is a matrix. | |
bool | is_reserved_ = false |
If the node is reserved in map. | |
bool | is_changed_ = false |
Has the map node been changed. | |
bool | data_is_ready_ = false |
unsigned int | file_body_binary_size_ = 0 |
The body binary size in file. | |
CompressionStrategy * | compression_strategy_ = nullptr |
@bried The compression strategy. | |
float | min_altitude_ = 1e6 |
The min altitude of point cloud in the node. | |
The data structure of a Node in the map.
在文件 base_map_node.h 第 32 行定义.
apollo::localization::msf::BaseMapNode::BaseMapNode | ( | BaseMapMatrix * | matrix, |
CompressionStrategy * | strategy | ||
) |
Construct a map node.
在文件 base_map_node.cc 第 30 行定义.
|
virtual |
|
protectedvirtual |
Create the binary.
Serialization of the object.
<return> | The the used size of binary is returned. |
在文件 base_map_node.cc 第 204 行定义.
|
protectedvirtual |
Create the binary body.
<buf,buf_size> | The buffer and its size. |
<return> | The required or the used size of is returned. |
在文件 base_map_node.cc 第 310 行定义.
|
protectedvirtual |
Create the binary header.
<buf,buf_size> | The buffer and its size. |
<return> | The required or the used size of is returned. |
在文件 base_map_node.cc 第 254 行定义.
|
virtual |
call before deconstruction or reset.
在文件 base_map_node.cc 第 60 行定义.
|
protectedvirtual |
Get the binary size of the object.
在文件 base_map_node.cc 第 230 行定义.
|
protectedvirtual |
Get the size of the body in bytes.
在文件 base_map_node.cc 第 329 行定义.
bool apollo::localization::msf::BaseMapNode::GetCoordinate | ( | const Eigen::Vector2d & | coordinate, |
unsigned int * | x, | ||
unsigned int * | y | ||
) | const |
Given the global coordinate, get the local 2D coordinate of the map cell matrix.
<return> If global coordinate (x, y) belongs to this map node.
Given the local 2D coordinate, return the global coordinate.
Given the global coordinate, get the local 2D coordinate of the map cell matrix. <return> If global coordinate (x, y) belongs to this map node, eigen version.
在文件 base_map_node.cc 第 352 行定义.
bool apollo::localization::msf::BaseMapNode::GetCoordinate | ( | const Eigen::Vector3d & | coordinate, |
unsigned int * | x, | ||
unsigned int * | y | ||
) | const |
在文件 base_map_node.cc 第 379 行定义.
Eigen::Vector2d apollo::localization::msf::BaseMapNode::GetCoordinate | ( | unsigned int | x, |
unsigned int | y | ||
) | const |
Given the local 2D coordinate, return the global coordinate, eigen version.
在文件 base_map_node.cc 第 394 行定义.
|
protectedvirtual |
Get the size of the header in bytes.
在文件 base_map_node.cc 第 274 行定义.
|
inline |
|
inline |
Get if the map node data is ready
在文件 base_map_node.h 第 79 行定义.
|
inline |
Get if the map node is reserved.
在文件 base_map_node.h 第 73 行定义.
|
inline |
Get the left top corner of the map node.
在文件 base_map_node.h 第 86 行定义.
|
static |
在文件 base_map_node.cc 第 415 行定义.
|
inline |
在文件 base_map_node.h 第 62 行定义.
|
inline |
|
inline |
|
inline |
|
inline |
Get the resolution of this map nodex.
在文件 base_map_node.h 第 98 行定义.
|
virtual |
Initialize the map node.
Call this function first before use it!
在文件 base_map_node.cc 第 42 行定义.
|
virtual |
Initialize the map matrix.
在文件 base_map_node.cc 第 55 行定义.
bool apollo::localization::msf::BaseMapNode::Load | ( | ) |
Load the map node from the disk.
在文件 base_map_node.cc 第 131 行定义.
bool apollo::localization::msf::BaseMapNode::Load | ( | const char * | filename | ) |
在文件 base_map_node.cc 第 170 行定义.
|
protectedvirtual |
Load the map cell from a binary chunk.
<return> | The size read (the real size of object). |
在文件 base_map_node.cc 第 187 行定义.
|
protectedvirtual |
Load the map node body from a binary chunk.
<return> | The size read (the real size of body). |
在文件 base_map_node.cc 第 294 行定义.
|
protectedvirtual |
Load the map node header from a binary chunk.
<return> | The size read (the real size of header). |
在文件 base_map_node.cc 第 235 行定义.
|
virtual |
Reset map cells data.
在文件 base_map_node.cc 第 67 行定义.
bool apollo::localization::msf::BaseMapNode::Save | ( | ) |
Save the map node to the disk.
在文件 base_map_node.cc 第 80 行定义.
bool apollo::localization::msf::BaseMapNode::SaveIntensityImage | ( | ) | const |
Save intensity image of node.
在文件 base_map_node.cc 第 431 行定义.
|
protected |
Save intensity image of node.
在文件 base_map_node.cc 第 470 行定义.
|
inline |
|
inline |
|
inline |
在文件 base_map_node.h 第 90 行定义.
|
inline |
|
protected |
@bried The compression strategy.
在文件 base_map_node.h 第 189 行定义.
|
protected |
在文件 base_map_node.h 第 184 行定义.
|
mutableprotected |
The body binary size in file.
It's useful when reading and writing files.
在文件 base_map_node.h 第 187 行定义.
|
protected |
The index of this node.
在文件 base_map_node.h 第 172 行定义.
|
protected |
Has the map node been changed.
在文件 base_map_node.h 第 182 行定义.
|
protected |
If the node is reserved in map.
在文件 base_map_node.h 第 180 行定义.
|
protected |
The left top corner of the map node in the global coordinate system.
在文件 base_map_node.h 第 176 行定义.
|
protected |
The map settings.
在文件 base_map_node.h 第 170 行定义.
|
protected |
The data structure of the map datas, which is a matrix.
在文件 base_map_node.h 第 178 行定义.
|
protected |
The min altitude of point cloud in the node.
在文件 base_map_node.h 第 191 行定义.