scenario_simulator_v2 C++ API
traffic_lights.hpp
Go to the documentation of this file.
1 // Copyright 2024 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__TRAFFIC_LIGHTS_HPP_
16 #define TRAFFIC_SIMULATOR__UTILS__TRAFFIC_LIGHTS_HPP_
17 
19 
20 namespace traffic_simulator
21 {
22 namespace traffic_lights
23 {
24 auto wayIds(const lanelet::Id lanelet_id) -> lanelet::Ids;
25 
26 auto wayId(const lanelet::Id lanelet_id) -> lanelet::Id;
27 
28 auto trafficLightsIds(const lanelet::Id lanelet_id) -> lanelet::Ids;
29 
30 template <typename... Ts>
31 inline auto bulbPosition(Ts &&... xs)
32 {
34  std::forward<decltype(xs)>(xs)...);
35 }
36 
37 template <typename... Ts>
38 inline auto trafficLightIdsOnPath(Ts &&... xs)
39 {
40  return lanelet_wrapper::traffic_lights::trafficLightIdsOnPath(std::forward<decltype(xs)>(xs)...);
41 }
42 
43 template <typename... Ts>
45 {
47  std::forward<decltype(xs)>(xs)...);
48 }
49 } // namespace traffic_lights
50 } // namespace traffic_simulator
51 #endif // TRAFFIC_SIMULATOR__UTILS__TRAFFIC_LIGHTS_HPP_
auto trafficLightIdsOnPath(const lanelet::Ids &route_lanelets) -> lanelet::Ids
Definition: traffic_lights.cpp:230
auto trafficLightBulbPosition(const lanelet::Id traffic_light_id, const std::string &, const bool allow_infer_position=false) -> std::optional< Point >
Definition: traffic_lights.cpp:100
auto trafficLightRegulatoryElementIDsFromTrafficLight(const lanelet::Id traffic_light_way_id) -> lanelet::Ids
Definition: traffic_lights.cpp:193
auto bulbPosition(Ts &&... xs)
Definition: traffic_lights.hpp:31
auto wayId(const lanelet::Id lanelet_id) -> lanelet::Id
Definition: traffic_lights.cpp:43
auto trafficLightIdsOnPath(Ts &&... xs)
Definition: traffic_lights.hpp:38
auto trafficLightsIds(const lanelet::Id lanelet_id) -> lanelet::Ids
Definition: traffic_lights.cpp:50
auto trafficLightRegulatoryElementIdsFromTrafficLightId(Ts &&... xs)
Definition: traffic_lights.hpp:44
auto wayIds(const lanelet::Id lanelet_id) -> lanelet::Ids
Definition: traffic_lights.cpp:21
Definition: api.hpp:33
Definition: junit5.hpp:25