scenario_simulator_v2 C++ API
lanelet_map.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 
15 #ifndef TRAFFIC_SIMULATOR__UTILS__LANELET_MAP_HPP_
16 #define TRAFFIC_SIMULATOR__UTILS__LANELET_MAP_HPP_
17 
18 #include <autoware_lanelet2_extension/visualization/visualization.hpp>
19 #include <geometry_msgs/msg/point.hpp>
24 
25 namespace traffic_simulator
26 {
27 inline namespace lanelet_map
28 {
31 
32 template <typename... Ts>
33 inline auto activate(Ts &&... xs)
34 {
35  return lanelet_wrapper::LaneletWrapper::activate(std::forward<decltype(xs)>(xs)...);
36 }
37 
38 auto laneletLength(const lanelet::Id lanelet_id) -> double;
39 
40 auto laneletYaw(const Point & point, const lanelet::Id lanelet_id)
41  -> std::tuple<double, Point, Point>;
42 
43 auto laneletAltitude(
44  const lanelet::Id & lanelet_id, const geometry_msgs::msg::Pose & pose,
45  const double matching_distance) -> std::optional<double>;
46 
47 auto nearbyLaneletIds(
48  const Pose & pose, const double distance_threshold, const bool include_crosswalk,
49  const std::size_t search_count = 5) -> lanelet::Ids;
50 
53 auto noNextLaneletPoses() -> std::vector<std::pair<lanelet::Id, Pose>>;
54 
55 auto visualizationMarker() -> visualization_msgs::msg::MarkerArray;
56 } // namespace lanelet_map
57 } // namespace traffic_simulator
58 #endif // TRAFFIC_SIMULATOR__UTILS__LANELET_MAP_HPP_
static auto activate(const std::string &lanelet_map_path) -> void
Definition: lanelet_wrapper.cpp:23
auto activate(Ts &&... xs)
Definition: lanelet_map.hpp:33
geometry_msgs::msg::Pose Pose
Definition: lanelet_map.hpp:30
auto nearbyLaneletIds(const Pose &pose, const double distance_threshold, const bool include_crosswalk, const std::size_t search_count=5) -> lanelet::Ids
Definition: lanelet_map.cpp:38
auto visualizationMarker() -> visualization_msgs::msg::MarkerArray
Definition: lanelet_map.cpp:60
geometry_msgs::msg::Point Point
Definition: lanelet_map.hpp:29
auto laneletAltitude(const lanelet::Id &lanelet_id, const geometry_msgs::msg::Pose &pose, const double matching_distance) -> std::optional< double >
Definition: lanelet_map.cpp:25
auto laneletYaw(const Point &point, const lanelet::Id lanelet_id) -> std::tuple< double, Point, Point >
Definition: lanelet_map.cpp:32
auto noNextLaneletPoses() -> std::vector< std::pair< lanelet::Id, Pose >>
Calculates all poses on the map that have no next lanelet (dead ends)
Definition: lanelet_map.cpp:46
auto laneletLength(const lanelet::Id lanelet_id) -> double
Definition: lanelet_map.cpp:21
Definition: api.hpp:33
Definition: junit5.hpp:25