scenario_simulator_v2 C++ API
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
traffic_simulator::traffic::TrafficSource::Validator Struct Reference

#include <traffic_source.hpp>

Public Member Functions

 Validator (const std::shared_ptr< hdmap_utils::HdMapUtils > &, const geometry_msgs::msg::Pose &, const double source_radius, const bool include_crosswalk)
 
auto operator() (const std::vector< geometry_msgs::msg::Point > &, lanelet::Id) const -> bool
 whether the 2D polygon does fit inside the lanelet with the given id More...
 

Public Attributes

const lanelet::Ids ids
 
const lanelet::Lanelets lanelets
 

Static Public Attributes

static constexpr std::size_t spawning_lanes_limit = 1000
 

Constructor & Destructor Documentation

◆ Validator()

traffic_simulator::traffic::TrafficSource::Validator::Validator ( const std::shared_ptr< hdmap_utils::HdMapUtils > &  hdmap_utils,
const geometry_msgs::msg::Pose &  pose,
const double  source_radius,
const bool  include_crosswalk 
)
explicit

Member Function Documentation

◆ operator()()

auto traffic_simulator::traffic::TrafficSource::Validator::operator() ( const std::vector< geometry_msgs::msg::Point > &  points,
lanelet::Id  id 
) const -> bool

whether the 2D polygon does fit inside the lanelet with the given id

Note
Possibly undesirable behavior This implementation will consider cases like intersections as one big spawning area. If an Entity is positioned in the middle of the intersection (where it does not fit in any of the lanes alone, but it does fit in all of the lanes combined) it will be considered valid.
This implementation does not cover the case, when the Entity is on a curve and the curved lanelet bound intersects with en edge of the Entity's bounding box, but all corners are still inside the lanelet bounds. Example: . ______ . .| | . |. | . | . | . | . | . |. | . .| | . . |____| .

Member Data Documentation

◆ ids

const lanelet::Ids traffic_simulator::traffic::TrafficSource::Validator::ids

◆ lanelets

const lanelet::Lanelets traffic_simulator::traffic::TrafficSource::Validator::lanelets

◆ spawning_lanes_limit

constexpr std::size_t traffic_simulator::traffic::TrafficSource::Validator::spawning_lanes_limit = 1000
staticconstexpr

The documentation for this struct was generated from the following files: