Autoware.Auto
lanelet2_map_provider.hpp
Go to the documentation of this file.
1 // Copyright 2020 The Autoware Foundation
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 //    http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14 
18 
19 #ifndef LANELET2_MAP_PROVIDER__LANELET2_MAP_PROVIDER_HPP_
20 #define LANELET2_MAP_PROVIDER__LANELET2_MAP_PROVIDER_HPP_
21 
22 #include <tf2_geometry_msgs/tf2_geometry_msgs.h>
23 #include <common/types.hpp>
24 #include <lanelet2_core/LaneletMap.h>
26 
27 #include <string>
28 #include <memory>
29 
30 #include "autoware_auto_mapping_msgs/msg/had_map_bin.hpp"
31 
33 
34 namespace autoware
35 {
38 {
39 
42 struct LatLonAlt
43 {
47 };
48 
51 class LANELET2_MAP_PROVIDER_PUBLIC Lanelet2MapProvider
52 {
53 public:
59  // TODO(nikolai.morin): Remove offsets as part of #849
61  const std::string & map_filename,
62  const geometry_msgs::msg::TransformStamped & stf, const float64_t offset_lat = 0.0,
63  const float64_t offset_lon = 0.0);
69  // TODO(nikolai.morin): Remove offsets as part of #849
71  const std::string & map_filename, const LatLonAlt map_frame_origin,
72  const float64_t offset_lat = 0.0,
73  const float64_t offset_lon = 0.0);
76  std::shared_ptr<lanelet::LaneletMap> m_map;
77 
78 private:
82  void load_map(
83  const std::string & map_filename, const LatLonAlt map_frame_origin);
84 };
85 
86 } // namespace lanelet2_map_provider
87 
88 } // namespace autoware
89 
90 #endif // LANELET2_MAP_PROVIDER__LANELET2_MAP_PROVIDER_HPP_
types.hpp
This file includes common type definition.
autoware::lanelet2_map_provider::Lanelet2MapProvider::m_map
std::shared_ptr< lanelet::LaneletMap > m_map
Definition: lanelet2_map_provider.hpp:76
autoware
This file defines the lanelet2_map_provider_node class.
Definition: quick_sort.hpp:24
autoware::localization::ndt::load_map
geocentric_pose_t NDT_PUBLIC load_map(const std::string &yaml_file_name, const std::string &pcl_file_name, sensor_msgs::msg::PointCloud2 &pc_out)
Read the pcd file with filename into a PointCloud2 message, transform it into an NDT representation a...
Definition: ndt_map_publisher.cpp:181
autoware::lanelet2_map_provider::LatLonAlt::lat
float64_t lat
latitude in degrees
Definition: lanelet2_map_provider.hpp:44
motion::motion_testing_nodes::TransformStamped
geometry_msgs::msg::TransformStamped TransformStamped
Definition: motion_testing_publisher.hpp:37
autoware::lanelet2_map_provider::LatLonAlt::lon
float64_t lon
longitude in degrees
Definition: lanelet2_map_provider.hpp:45
visibility_control.hpp
autoware::lanelet2_map_provider::LatLonAlt::alt
float64_t alt
altitude in meters
Definition: lanelet2_map_provider.hpp:46
lanelet2_map_provider
Definition: lanelet2_map_provider.launch.py:1
autoware::lanelet2_map_provider::Lanelet2MapProvider
Provides functoins to load and access a lanelet2 OSM map.
Definition: lanelet2_map_provider.hpp:51
autoware::lanelet2_map_provider::LatLonAlt
Definition: lanelet2_map_provider.hpp:42
autoware::common::types::float64_t
double float64_t
Definition: types.hpp:47