Apollo 10.0
自动驾驶开放平台
base_map_node_index.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 <string>
20
23
24namespace apollo {
25namespace localization {
26namespace msf {
27
28class MapNodeIndex;
29
30std::ostream& operator<<(std::ostream& cout, const MapNodeIndex& index);
31
33 public:
37 bool operator<(const MapNodeIndex& index) const;
39 bool operator==(const MapNodeIndex& index) const;
41 bool operator!=(const MapNodeIndex& index) const;
42 std::string ToString() const;
43
44 // /**@brief Construct a map node index, given a global coordinate. */
45 // static MapNodeIndex GetMapNodeIndex(const BaseMapConfig& option,
46 // const
47 // idl::car::core::numerical::Vector3D&
48 // coordinate, unsigned int
49 // resolution_id, int zone_id);
50 // static MapNodeIndex GetMapNodeIndex(const BaseMapConfig& option,
51 // const
52 // idl::car::core::numerical::Vector2D&
53 // coordinate, unsigned int
54 // resolution_id, int zone_id);
55
58 static MapNodeIndex GetMapNodeIndex(const BaseMapConfig& option,
59 const Eigen::Vector3d& coordinate,
60 unsigned int resolution_id, int zone_id);
61 static MapNodeIndex GetMapNodeIndex(const BaseMapConfig& option,
62 const Eigen::Vector2d& coordinate,
63 unsigned int resolution_id, int zone_id);
64
67 static unsigned int GetMapIndexRangeEast(const BaseMapConfig& option,
68 unsigned int resolution_id);
71 static unsigned int GetMapIndexRangeNorth(const BaseMapConfig& option,
72 unsigned int resolution_id);
73
74 friend std::ostream& operator<<(std::ostream& cout,
75 const MapNodeIndex& index);
76
79 unsigned int resolution_id_ = 0;
82 int zone_id_ = 50;
84 unsigned int m_ = 0;
86 unsigned int n_ = 0;
87};
88
89} // namespace msf
90} // namespace localization
91} // namespace apollo
The options of the reflectance map.
bool operator!=(const MapNodeIndex &index) const
Overload the unequal operator.
unsigned int m_
The map node ID at the northing direction.
unsigned int n_
The map node ID at the easting direction.
bool operator<(const MapNodeIndex &index) const
Overload the less than operator.
static unsigned int GetMapIndexRangeNorth(const BaseMapConfig &option, unsigned int resolution_id)
Get the index range (maximum possible index + 1) in the north direction.
bool operator==(const MapNodeIndex &index) const
Overload the equal operator.
friend std::ostream & operator<<(std::ostream &cout, const MapNodeIndex &index)
static unsigned int GetMapIndexRangeEast(const BaseMapConfig &option, unsigned int resolution_id)
Get the index range (maximum possible index + 1) in the east direction.
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.
unsigned int resolution_id_
The ID of the resolution.
std::ostream & operator<<(std::ostream &cerr, const MapNodeIndex &index)
apollo::localization::msf::pyramid_map::MapNodeIndex MapNodeIndex
class register implement
Definition arena_queue.h:37