diff --git a/simulation/traffic_simulator/include/traffic_simulator/lanelet_wrapper/pose.hpp b/simulation/traffic_simulator/include/traffic_simulator/lanelet_wrapper/pose.hpp index 47c7c8383a8..367a23cffbe 100644 --- a/simulation/traffic_simulator/include/traffic_simulator/lanelet_wrapper/pose.hpp +++ b/simulation/traffic_simulator/include/traffic_simulator/lanelet_wrapper/pose.hpp @@ -81,12 +81,12 @@ auto matchToLane( -> std::optional; auto leftLaneletIds( - const lanelet::Id lanelet_id, const RoutingGraphType type, - const bool include_opposite_direction = true) -> lanelet::Ids; + const lanelet::Id lanelet_id, const RoutingGraphType type, const bool include_opposite_direction) + -> lanelet::Ids; auto rightLaneletIds( - const lanelet::Id lanelet_id, const RoutingGraphType type, - const bool include_opposite_direction = true) -> lanelet::Ids; + const lanelet::Id lanelet_id, const RoutingGraphType type, const bool include_opposite_direction) + -> lanelet::Ids; } // namespace pose } // namespace lanelet_wrapper } // namespace traffic_simulator diff --git a/simulation/traffic_simulator/src/lanelet_wrapper/pose.cpp b/simulation/traffic_simulator/src/lanelet_wrapper/pose.cpp index 6cfc08acc07..609726441bd 100644 --- a/simulation/traffic_simulator/src/lanelet_wrapper/pose.cpp +++ b/simulation/traffic_simulator/src/lanelet_wrapper/pose.cpp @@ -425,10 +425,11 @@ auto leftLaneletIds( -> lanelet::Ids { if (include_opposite_direction) { - return lanelet_map::laneletIds(LaneletWrapper::routingGraph(type)->lefts( - LaneletWrapper::map()->laneletLayer.get(lanelet_id))); + throw common::Error( + "lanelet_wrapper::pose::leftLaneletIds with include_opposite_direction=true is not " + "implemented yet."); } else { - return lanelet_map::laneletIds(LaneletWrapper::routingGraph(type)->adjacentLefts( + return lanelet_map::laneletIds(LaneletWrapper::routingGraph(type)->lefts( LaneletWrapper::map()->laneletLayer.get(lanelet_id))); } } @@ -438,10 +439,12 @@ auto rightLaneletIds( -> lanelet::Ids { if (include_opposite_direction) { - return lanelet_map::laneletIds(LaneletWrapper::routingGraph(type)->rights( - LaneletWrapper::map()->laneletLayer.get(lanelet_id))); + throw common::Error( + "lanelet_wrapper::pose::rightLaneletIds with include_opposite_direction=true is not " + "implemented " + "yet."); } else { - return lanelet_map::laneletIds(LaneletWrapper::routingGraph(type)->adjacentRights( + return lanelet_map::laneletIds(LaneletWrapper::routingGraph(type)->rights( LaneletWrapper::map()->laneletLayer.get(lanelet_id))); } }