scenario_simulator_v2 C++ API
lanelet_loader.hpp
Go to the documentation of this file.
1 // Copyright 2015 TIER IV, Inc. All rights reserved.
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 #ifndef TRAFFIC_SIMULATOR__LANELET_LOADER_HPP_
15 #define TRAFFIC_SIMULATOR__LANELET_LOADER_HPP_
16 
17 #include <lanelet2_io/Io.h>
18 
19 #include <autoware_map_msgs/msg/lanelet_map_bin.hpp>
20 #include <filesystem>
21 
22 namespace traffic_simulator
23 {
24 namespace lanelet_wrapper
25 {
27 {
28 public:
29  static auto load(const std::filesystem::path & lanelet_map_path) -> lanelet::LaneletMapPtr;
30  static auto convertMapToBin(const lanelet::LaneletMapPtr lanelet_map_ptr)
31  -> autoware_map_msgs::msg::LaneletMapBin;
32 
33 private:
34  static auto overwriteLaneletsCenterline(lanelet::LaneletMapPtr) -> void;
35  static auto resamplePoints(
36  const lanelet::ConstLineString3d & line_string, const std::int32_t num_segments)
37  -> lanelet::BasicPoints3d;
38  static auto calculateAccumulatedLengths(const lanelet::ConstLineString3d & line_string)
39  -> std::vector<double>;
40 };
41 } // namespace lanelet_wrapper
42 } // namespace traffic_simulator
43 #endif // TRAFFIC_SIMULATOR__LANELET_LOADER_HPP_
Definition: lanelet_loader.hpp:27
static auto load(const std::filesystem::path &lanelet_map_path) -> lanelet::LaneletMapPtr
Definition: lanelet_loader.cpp:56
static auto convertMapToBin(const lanelet::LaneletMapPtr lanelet_map_ptr) -> autoware_map_msgs::msg::LaneletMapBin
Definition: lanelet_loader.cpp:120
Definition: api.hpp:32