scenario_simulator_v2 C++ API
Functions
traffic_simulator::lanelet_wrapper::lanelet_map Namespace Reference

Functions

auto isInLanelet (const lanelet::Id lanelet_id, const double lanelet_pose_s) -> bool
 
auto isInLanelet (const lanelet::Id lanelet_id, const Point point) -> bool
 
auto laneletLength (const lanelet::Id lanelet_id) -> double
 
auto laneletAltitude (const lanelet::Id &lanelet_id, const geometry_msgs::msg::Pose &pose, const double matching_distance) -> std::optional< double >
 
template<typename Lanelet >
auto laneletIds (const std::vector< Lanelet > &lanelets) -> lanelet::Ids
 
auto laneletIds () -> lanelet::Ids
 
auto nearbyLaneletIds (const Point &point, const double distance_threshold, const bool include_crosswalk, const std::size_t search_count) -> lanelet::Ids
 
auto centerPoints (const lanelet::Ids &lanelet_ids) -> std::vector< Point >
 
auto centerPoints (const lanelet::Id lanelet_id) -> std::vector< Point >
 
auto centerPointsSpline (const lanelet::Id lanelet_id) -> std::shared_ptr< Spline >
 
auto nextLaneletIds (const lanelet::Id lanelet_id, const RoutingGraphType type=RoutingConfiguration().routing_graph_type) -> lanelet::Ids
 
auto nextLaneletIds (const lanelet::Ids &lanelet_ids, const RoutingGraphType type=RoutingConfiguration().routing_graph_type) -> lanelet::Ids
 
auto nextLaneletIds (const lanelet::Id lanelet_id, std::string_view turn_direction, const RoutingGraphType type=RoutingConfiguration().routing_graph_type) -> lanelet::Ids
 
auto nextLaneletIds (const lanelet::Ids &lanelet_ids, std::string_view turn_direction, const RoutingGraphType type=RoutingConfiguration().routing_graph_type) -> lanelet::Ids
 
auto previousLaneletIds (const lanelet::Id lanelet_id, const RoutingGraphType type=RoutingConfiguration().routing_graph_type) -> lanelet::Ids
 
auto previousLaneletIds (const lanelet::Ids &lanelet_ids, const RoutingGraphType type=RoutingConfiguration().routing_graph_type) -> lanelet::Ids
 
auto previousLaneletIds (const lanelet::Id lanelet_id, std::string_view turn_direction, const RoutingGraphType type=RoutingConfiguration().routing_graph_type) -> lanelet::Ids
 
auto previousLaneletIds (const lanelet::Ids &lanelet_ids, std::string_view turn_direction, const RoutingGraphType type=RoutingConfiguration().routing_graph_type) -> lanelet::Ids
 
auto leftBound (const lanelet::Id lanelet_id) -> std::vector< Point >
 
auto rightBound (const lanelet::Id lanelet_id) -> std::vector< Point >
 
auto laneletPolygon (const lanelet::Id lanelet_id) -> std::vector< Point >
 
auto stopLinePolygon (const lanelet::Id lanelet_id) -> std::vector< Point >
 
auto toPolygon (const lanelet::ConstLineString3d &line_string) -> std::vector< Point >
 
auto rightOfWayLaneletIds (const lanelet::Ids &lanelet_ids) -> std::unordered_map< lanelet::Id, lanelet::Ids >
 
auto rightOfWayLaneletIds (const lanelet::Id lanelet_id) -> lanelet::Ids
 
auto conflictingCrosswalkIds (const lanelet::Ids &lanelet_ids) -> lanelet::Ids
 
auto conflictingLaneIds (const lanelet::Ids &lanelet_ids, const RoutingGraphType type=RoutingConfiguration().routing_graph_type) -> lanelet::Ids
 
auto trafficSignsOnPath (const lanelet::Ids &lanelet_ids) -> std::vector< std::shared_ptr< const lanelet::TrafficSign >>
 
auto trafficSigns () -> std::vector< std::shared_ptr< const lanelet::TrafficSign >>
 
auto stopLines () -> lanelet::ConstLineStrings3d
 
auto stopLinesOnPath (const lanelet::Ids &lanelet_ids) -> lanelet::ConstLineStrings3d
 
auto stopLineIds () -> lanelet::Ids
 
auto stopLineIdsOnPath (const lanelet::Ids &lanelet_ids) -> lanelet::Ids
 

Function Documentation

◆ centerPoints() [1/2]

auto traffic_simulator::lanelet_wrapper::lanelet_map::centerPoints ( const lanelet::Id  lanelet_id) -> std::vector<Point>

◆ centerPoints() [2/2]

auto traffic_simulator::lanelet_wrapper::lanelet_map::centerPoints ( const lanelet::Ids &  lanelet_ids) -> std::vector<Point>
Note
We intentionally do not sort here, because only consecutive duplicates are supposed to be removed
We intentionally do not sort here, because only consecutive duplicates are supposed to be removed

◆ centerPointsSpline()

auto traffic_simulator::lanelet_wrapper::lanelet_map::centerPointsSpline ( const lanelet::Id  lanelet_id) -> std::shared_ptr<Spline>

◆ conflictingCrosswalkIds()

auto traffic_simulator::lanelet_wrapper::lanelet_map::conflictingCrosswalkIds ( const lanelet::Ids &  lanelet_ids) -> lanelet::Ids
Note
it is not clear if the distinction for crosswalks only is implemented here
it is not clear if the distinction for crosswalks only is implemented here

◆ conflictingLaneIds()

auto traffic_simulator::lanelet_wrapper::lanelet_map::conflictingLaneIds ( const lanelet::Ids &  lanelet_ids,
const RoutingGraphType  type = RoutingConfiguration().routing_graph_type 
) -> lanelet::Ids

◆ isInLanelet() [1/2]

auto traffic_simulator::lanelet_wrapper::lanelet_map::isInLanelet ( const lanelet::Id  lanelet_id,
const double  lanelet_pose_s 
) -> bool

◆ isInLanelet() [2/2]

auto traffic_simulator::lanelet_wrapper::lanelet_map::isInLanelet ( const lanelet::Id  lanelet_id,
const Point  point 
) -> bool

◆ laneletAltitude()

auto traffic_simulator::lanelet_wrapper::lanelet_map::laneletAltitude ( const lanelet::Id &  lanelet_id,
const geometry_msgs::msg::Pose &  pose,
const double  matching_distance 
) -> std::optional<double>

◆ laneletIds() [1/2]

auto traffic_simulator::lanelet_wrapper::lanelet_map::laneletIds ( ) -> lanelet::Ids

◆ laneletIds() [2/2]

template<typename Lanelet >
auto traffic_simulator::lanelet_wrapper::lanelet_map::laneletIds ( const std::vector< Lanelet > &  lanelets) -> lanelet::Ids

◆ laneletLength()

auto traffic_simulator::lanelet_wrapper::lanelet_map::laneletLength ( const lanelet::Id  lanelet_id) -> double

◆ laneletPolygon()

auto traffic_simulator::lanelet_wrapper::lanelet_map::laneletPolygon ( const lanelet::Id  lanelet_id) -> std::vector<Point>

◆ leftBound()

auto traffic_simulator::lanelet_wrapper::lanelet_map::leftBound ( const lanelet::Id  lanelet_id) -> std::vector<Point>

◆ nearbyLaneletIds()

auto traffic_simulator::lanelet_wrapper::lanelet_map::nearbyLaneletIds ( const Point point,
const double  distance_threshold,
const bool  include_crosswalk,
const std::size_t  search_count 
) -> lanelet::Ids
Note
check for current content, if not empty then optionally apply filter
check again
check for current content, if not empty then optionally apply filter
check again

◆ nextLaneletIds() [1/4]

auto traffic_simulator::lanelet_wrapper::lanelet_map::nextLaneletIds ( const lanelet::Id  lanelet_id,
const RoutingGraphType  type = RoutingConfiguration().routing_graph_type 
) -> lanelet::Ids

◆ nextLaneletIds() [2/4]

auto traffic_simulator::lanelet_wrapper::lanelet_map::nextLaneletIds ( const lanelet::Id  lanelet_id,
std::string_view  turn_direction,
const RoutingGraphType  type = RoutingConfiguration().routing_graph_type 
) -> lanelet::Ids

◆ nextLaneletIds() [3/4]

auto traffic_simulator::lanelet_wrapper::lanelet_map::nextLaneletIds ( const lanelet::Ids &  lanelet_ids,
const RoutingGraphType  type = RoutingConfiguration().routing_graph_type 
) -> lanelet::Ids

◆ nextLaneletIds() [4/4]

auto traffic_simulator::lanelet_wrapper::lanelet_map::nextLaneletIds ( const lanelet::Ids &  lanelet_ids,
std::string_view  turn_direction,
const RoutingGraphType  type = RoutingConfiguration().routing_graph_type 
) -> lanelet::Ids

◆ previousLaneletIds() [1/4]

auto traffic_simulator::lanelet_wrapper::lanelet_map::previousLaneletIds ( const lanelet::Id  lanelet_id,
const RoutingGraphType  type = RoutingConfiguration().routing_graph_type 
) -> lanelet::Ids

◆ previousLaneletIds() [2/4]

auto traffic_simulator::lanelet_wrapper::lanelet_map::previousLaneletIds ( const lanelet::Id  lanelet_id,
std::string_view  turn_direction,
const RoutingGraphType  type = RoutingConfiguration().routing_graph_type 
) -> lanelet::Ids

◆ previousLaneletIds() [3/4]

auto traffic_simulator::lanelet_wrapper::lanelet_map::previousLaneletIds ( const lanelet::Ids &  lanelet_ids,
const RoutingGraphType  type = RoutingConfiguration().routing_graph_type 
) -> lanelet::Ids

◆ previousLaneletIds() [4/4]

auto traffic_simulator::lanelet_wrapper::lanelet_map::previousLaneletIds ( const lanelet::Ids &  lanelet_ids,
std::string_view  turn_direction,
const RoutingGraphType  type = RoutingConfiguration().routing_graph_type 
) -> lanelet::Ids

◆ rightBound()

auto traffic_simulator::lanelet_wrapper::lanelet_map::rightBound ( const lanelet::Id  lanelet_id) -> std::vector<Point>

◆ rightOfWayLaneletIds() [1/2]

auto traffic_simulator::lanelet_wrapper::lanelet_map::rightOfWayLaneletIds ( const lanelet::Id  lanelet_id) -> lanelet::Ids

◆ rightOfWayLaneletIds() [2/2]

auto traffic_simulator::lanelet_wrapper::lanelet_map::rightOfWayLaneletIds ( const lanelet::Ids &  lanelet_ids) -> std::unordered_map<lanelet::Id, lanelet::Ids>

◆ stopLineIds()

auto traffic_simulator::lanelet_wrapper::lanelet_map::stopLineIds ( ) -> lanelet::Ids

◆ stopLineIdsOnPath()

auto traffic_simulator::lanelet_wrapper::lanelet_map::stopLineIdsOnPath ( const lanelet::Ids &  lanelet_ids) -> lanelet::Ids

◆ stopLinePolygon()

auto traffic_simulator::lanelet_wrapper::lanelet_map::stopLinePolygon ( const lanelet::Id  lanelet_id) -> std::vector<Point>
Todo:
here you should probably add a verify if the passed lanelet_id is indeed a stop_line
Todo:
here you should probably add a verify if the passed lanelet_id is indeed a stop_line

◆ stopLines()

auto traffic_simulator::lanelet_wrapper::lanelet_map::stopLines ( ) -> lanelet::ConstLineStrings3d

◆ stopLinesOnPath()

auto traffic_simulator::lanelet_wrapper::lanelet_map::stopLinesOnPath ( const lanelet::Ids &  lanelet_ids) -> lanelet::ConstLineStrings3d

◆ toPolygon()

auto traffic_simulator::lanelet_wrapper::lanelet_map::toPolygon ( const lanelet::ConstLineString3d &  line_string) -> std::vector<Point>

◆ trafficSigns()

auto traffic_simulator::lanelet_wrapper::lanelet_map::trafficSigns ( ) -> std::vector<std::shared_ptr<const lanelet::TrafficSign>>

◆ trafficSignsOnPath()

auto traffic_simulator::lanelet_wrapper::lanelet_map::trafficSignsOnPath ( const lanelet::Ids &  lanelet_ids) -> std::vector<std::shared_ptr<const lanelet::TrafficSign>>