Apollo 11.0
自动驾驶开放平台
pyramid_map.cc
浏览该文件的文档.
1/******************************************************************************
2 * Copyright 2019 The Apollo Authors. All Rights Reserved.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 *****************************************************************************/
16
18
20
21namespace apollo {
22namespace localization {
23namespace msf {
24namespace pyramid_map {
25
27
29
30float PyramidMap::GetIntensitySafe(const Eigen::Vector3d& coordinate,
31 int zone_id, unsigned int resolution_id,
32 unsigned int level) {
34 resolution_id, zone_id);
35 PyramidMapNode* node = dynamic_cast<PyramidMapNode*>(GetMapNodeSafe(index));
36 return node->GetIntensitySafe(coordinate, level);
37}
38
39float PyramidMap::GetIntensityVarSafe(const Eigen::Vector3d& coordinate,
40 int zone_id, unsigned int resolution_id,
41 unsigned int level) {
43 resolution_id, zone_id);
44 PyramidMapNode* node = dynamic_cast<PyramidMapNode*>(GetMapNodeSafe(index));
45 return node->GetIntensityVarSafe(coordinate, level);
46}
47
48float PyramidMap::GetAltitudeSafe(const Eigen::Vector3d& coordinate,
49 int zone_id, unsigned int resolution_id,
50 unsigned int level) {
52 resolution_id, zone_id);
53 PyramidMapNode* node = dynamic_cast<PyramidMapNode*>(GetMapNodeSafe(index));
54 return node->GetAltitudeSafe(coordinate, level);
55}
56
57float PyramidMap::GetAltitudeVarSafe(const Eigen::Vector3d& coordinate,
58 int zone_id, unsigned int resolution_id,
59 unsigned int level) {
61 resolution_id, zone_id);
62 PyramidMapNode* node = dynamic_cast<PyramidMapNode*>(GetMapNodeSafe(index));
63 return node->GetAltitudeVarSafe(coordinate, level);
64}
65
66float PyramidMap::GetGroundAltitudeSafe(const Eigen::Vector3d& coordinate,
67 int zone_id, unsigned int resolution_id,
68 unsigned int level) {
70 resolution_id, zone_id);
71 PyramidMapNode* node = dynamic_cast<PyramidMapNode*>(GetMapNodeSafe(index));
72 return node->GetGroundAltitudeSafe(coordinate, level);
73}
74
75unsigned int PyramidMap::GetCountSafe(const Eigen::Vector3d& coordinate,
76 int zone_id, unsigned int resolution_id,
77 unsigned int level) {
79 resolution_id, zone_id);
80 PyramidMapNode* node = dynamic_cast<PyramidMapNode*>(GetMapNodeSafe(index));
81 return node->GetCountSafe(coordinate, level);
82}
83
84unsigned int PyramidMap::GetGroundCountSafe(const Eigen::Vector3d& coordinate,
85 int zone_id,
86 unsigned int resolution_id,
87 unsigned int level) {
89 resolution_id, zone_id);
90 PyramidMapNode* node = dynamic_cast<PyramidMapNode*>(GetMapNodeSafe(index));
91 return node->GetGroundCountSafe(coordinate, level);
92}
93
94} // namespace pyramid_map
95} // namespace msf
96} // namespace localization
97} // namespace apollo
The data structure of the base map.
Definition base_map.h:38
BaseMapNode * GetMapNodeSafe(const MapNodeIndex &index)
Return the map node, if it's not in the cache, safely load it.
Definition base_map.cc:63
const BaseMapConfig & GetMapConfig() const
Get the map config.
Definition base_map.h:97
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.
float GetAltitudeVarSafe(const Eigen::Vector3d &coordinate, unsigned int level=0) const
Given the 3D global coordinate, get the map cell's variance of the altitude with check.
float GetAltitudeSafe(const Eigen::Vector3d &coordinate, unsigned int level=0) const
Given the 3D global coordinate, get the map cell's average altitude with check.
unsigned int GetGroundCountSafe(const Eigen::Vector3d &coordinate, unsigned int level=0) const
Given the 3D global coordinate, get the map cell's count of the ground samples with check.
unsigned int GetCountSafe(const Eigen::Vector3d &coordinate, unsigned int level=0) const
Given the 3D global coordinate, get the map cell's count of the samples with check.
float GetIntensitySafe(const Eigen::Vector3d &coordinate, unsigned int level=0) const
Given the 3D global coordinate, get the map cell intensity with check.
float GetIntensityVarSafe(const Eigen::Vector3d &coordinate, unsigned int level=0) const
Given the 3D global coordinate, get the map cell variance of the intensity with check.
float GetGroundAltitudeSafe(const Eigen::Vector3d &coordinate, unsigned int level=0) const
Given the 3D global coordinate, get the map cell's average ground altitude with check.
unsigned int GetGroundCountSafe(const Eigen::Vector3d &coordinate, int zone_id, unsigned int resolution_id, unsigned int level=0)
Get the number of ground samples in the map cell thread safely.
float GetAltitudeVarSafe(const Eigen::Vector3d &coordinate, int zone_id, unsigned int resolution_id, unsigned int level=0)
Given the 3D global coordinate, this function loads the corresponding map node in the cache thread sa...
float GetGroundAltitudeSafe(const Eigen::Vector3d &coordinate, int zone_id, unsigned int resolution_id, unsigned int level=0)
Given the 3D global coordinate, this function loads the corresponding map node in the cache thread sa...
float GetIntensityVarSafe(const Vector3d &coordinate, int zone_id, unsigned int resolution_id, unsigned int level=0)
Given the 3D global coordinate, this function loads the corresponding map node in the cache and retur...
unsigned int GetCountSafe(const Eigen::Vector3d &coordinate, int zone_id, unsigned int resolution_id, unsigned int level=0)
Get the number of samples in the map cell thread safely.
float GetAltitudeSafe(const Eigen::Vector3d &coordinate, int zone_id, unsigned int resolution_id, unsigned int level=0)
Given the 3D global coordinate, this function loads the corresponding map node in the cache thread sa...
float GetIntensitySafe(const Eigen::Vector3d &coordinate, int zone_id, unsigned int resolution_id, unsigned int level=0)
Given the 3D global coordinate, this function loads the corresponding map node in the cache thread sa...
class register implement
Definition arena_queue.h:37