scenario_simulator_v2 C++ API
traffic_lights.hpp
Go to the documentation of this file.
1 
2 
3 // Copyright 2015 Tier IV, Inc. All rights reserved.
4 //
5 // Licensed under the Apache License, Version 2.0 (the "License");
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
8 //
9 // http://www.apache.org/licenses/LICENSE-2.0
10 //
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an "AS IS" BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
16 
17 #ifndef TRAFFIC_SIMULATOR__LANELET_WRAPPER_TRAFFIC_LIGHTS_HPP_
18 #define TRAFFIC_SIMULATOR__LANELET_WRAPPER_TRAFFIC_LIGHTS_HPP_
19 
20 #include <autoware_lanelet2_extension/utility/query.hpp>
22 
23 namespace traffic_simulator
24 {
25 namespace lanelet_wrapper
26 {
27 namespace traffic_lights
28 {
29 auto isTrafficLight(const lanelet::Id lanelet_id) -> bool;
30 
31 auto isTrafficLightRegulatoryElement(const lanelet::Id lanelet_id) -> bool;
32 
33 auto toTrafficLightRegulatoryElement(const lanelet::Id traffic_light_regulatory_element_id)
34  -> lanelet::TrafficLight::Ptr;
35 
36 auto toAutowareTrafficLights(const lanelet::Id traffic_light_id)
37  -> std::vector<lanelet::AutowareTrafficLightConstPtr>;
38 
39 auto trafficLightIds() -> lanelet::Ids;
40 
42  const lanelet::Id traffic_light_id, const std::string &, const bool allow_infer_position = false)
43  -> std::optional<Point>;
44 
45 auto trafficLightStopLineIds(const lanelet::Id traffic_light_id) -> lanelet::Ids;
46 
47 auto trafficLightStopLinesPoints(const lanelet::Id traffic_light_id)
48  -> std::vector<std::vector<Point>>;
49 
50 auto trafficLightRegulatoryElementIDsFromTrafficLight(const lanelet::Id traffic_light_way_id)
51  -> lanelet::Ids;
52 
53 // On path
54 auto autowareTrafficLightsOnPath(const lanelet::Ids & lanelet_ids)
55  -> std::vector<lanelet::AutowareTrafficLightConstPtr>;
56 
57 auto trafficLightIdsOnPath(const lanelet::Ids & route_lanelets) -> lanelet::Ids;
58 } // namespace traffic_lights
59 } // namespace lanelet_wrapper
60 } // namespace traffic_simulator
61 #endif // TRAFFIC_SIMULATOR__LANELET_WRAPPER_TRAFFIC_LIGHTS_HPP_
auto trafficLightStopLineIds(const lanelet::Id traffic_light_id) -> lanelet::Ids
Definition: traffic_lights.cpp:165
auto autowareTrafficLightsOnPath(const lanelet::Ids &lanelet_ids) -> std::vector< lanelet::AutowareTrafficLightConstPtr >
Definition: traffic_lights.cpp:216
auto trafficLightIdsOnPath(const lanelet::Ids &route_lanelets) -> lanelet::Ids
Definition: traffic_lights.cpp:230
auto isTrafficLightRegulatoryElement(const lanelet::Id lanelet_id) -> bool
Definition: traffic_lights.cpp:34
auto toAutowareTrafficLights(const lanelet::Id traffic_light_id) -> std::vector< lanelet::AutowareTrafficLightConstPtr >
Definition: traffic_lights.cpp:70
auto isTrafficLight(const lanelet::Id lanelet_id) -> bool
Definition: traffic_lights.cpp:23
auto trafficLightStopLinesPoints(const lanelet::Id traffic_light_id) -> std::vector< std::vector< Point >>
Definition: traffic_lights.cpp:176
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 trafficLightIds() -> lanelet::Ids
Definition: traffic_lights.cpp:41
auto toTrafficLightRegulatoryElement(const lanelet::Id traffic_light_regulatory_element_id) -> lanelet::TrafficLight::Ptr
Definition: traffic_lights.cpp:58
Definition: api.hpp:33
std::string string
Definition: junit5.hpp:26