Apollo 11.0
自动驾驶开放平台
ndt_map_node.h
浏览该文件的文档.
1/******************************************************************************
2 * Copyright 2018 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
17#pragma once
18
19#include "Eigen/Core"
20
25
26namespace apollo {
27namespace localization {
28namespace msf {
29
30class NdtMapNode : public BaseMapNode {
31 public:
32 NdtMapNode();
34
36 inline float GetMapResolutionZ() const {
37 return static_cast<const NdtMapConfig*>(map_config_)
38 ->map_resolutions_z_[index_.resolution_id_];
39 }
40
44 Eigen::Vector3d GetCoordinate3D(unsigned int x, unsigned int y,
45 int altitude_index) const;
46
50 Eigen::Vector3d GetCoordinateCenter3D(unsigned int x, unsigned int y,
51 int altitude_index) const;
52
55 static void Reduce(NdtMapNode* map_node, const NdtMapNode& map_node_new);
56
58 unsigned int num_valid_cells_;
61};
62
63} // namespace msf
64} // namespace localization
65} // namespace apollo
The data structure of a Node in the map.
MapNodeIndex index_
The index of this node.
const BaseMapConfig * map_config_
The map settings.
unsigned int resolution_id_
The ID of the resolution.
The options of the reflectance map.
unsigned int num_valid_cells_
The number of cells with elements.
static void Reduce(NdtMapNode *map_node, const NdtMapNode &map_node_new)
Combine two map nodes (Reduce operation in mapreduce).
unsigned int num_valid_single_cells_
The number of single cells with elements.
float GetMapResolutionZ() const
Get the resolution of this map nodex.
Eigen::Vector3d GetCoordinateCenter3D(unsigned int x, unsigned int y, int altitude_index) const
Given the local x, y, altitude index, return the global coordinate.
Eigen::Vector3d GetCoordinate3D(unsigned int x, unsigned int y, int altitude_index) const
Given the local x, y, altitude index, return the global coordinate.
class register implement
Definition arena_queue.h:37