scenario_simulator_v2 C++ API
Functions
traffic_simulator::distance Namespace Reference

Functions

auto lateralDistance (const CanonicalizedLaneletPose &from, const CanonicalizedLaneletPose &to, const traffic_simulator::RoutingConfiguration &routing_configuration, const std::shared_ptr< hdmap_utils::HdMapUtils > &hdmap_utils_ptr) -> std::optional< double >
 
auto lateralDistance (const CanonicalizedLaneletPose &from, const CanonicalizedLaneletPose &to, double matching_distance, const traffic_simulator::RoutingConfiguration &routing_configuration, const std::shared_ptr< hdmap_utils::HdMapUtils > &hdmap_utils_ptr) -> std::optional< double >
 
auto countLaneChanges (const CanonicalizedLaneletPose &from, const CanonicalizedLaneletPose &to, const traffic_simulator::RoutingConfiguration &routing_configuration, const std::shared_ptr< hdmap_utils::HdMapUtils > &hdmap_utils_ptr) -> std::optional< std::pair< int, int >>
 
auto longitudinalDistance (const CanonicalizedLaneletPose &from, const CanonicalizedLaneletPose &to, bool include_adjacent_lanelet, bool include_opposite_direction, const traffic_simulator::RoutingConfiguration &routing_configuration, const std::shared_ptr< hdmap_utils::HdMapUtils > &hdmap_utils_ptr) -> std::optional< double >
 
auto boundingBoxDistance (const geometry_msgs::msg::Pose &from, const traffic_simulator_msgs::msg::BoundingBox &from_bounding_box, const geometry_msgs::msg::Pose &to, const traffic_simulator_msgs::msg::BoundingBox &to_bounding_box) -> std::optional< double >
 
auto boundingBoxLaneLateralDistance (const CanonicalizedLaneletPose &from, const traffic_simulator_msgs::msg::BoundingBox &from_bounding_box, const CanonicalizedLaneletPose &to, const traffic_simulator_msgs::msg::BoundingBox &to_bounding_box, const traffic_simulator::RoutingConfiguration &routing_configuration, const std::shared_ptr< hdmap_utils::HdMapUtils > &hdmap_utils_ptr) -> std::optional< double >
 
auto boundingBoxLaneLongitudinalDistance (const CanonicalizedLaneletPose &from, const traffic_simulator_msgs::msg::BoundingBox &from_bounding_box, const CanonicalizedLaneletPose &to, const traffic_simulator_msgs::msg::BoundingBox &to_bounding_box, bool include_adjacent_lanelet, bool include_opposite_direction, const traffic_simulator::RoutingConfiguration &routing_configuration, const std::shared_ptr< hdmap_utils::HdMapUtils > &hdmap_utils_ptr) -> std::optional< double >
 
auto distanceToLaneBound (const geometry_msgs::msg::Pose &map_pose, const traffic_simulator_msgs::msg::BoundingBox &bounding_box, lanelet::Id lanelet_id, const std::shared_ptr< hdmap_utils::HdMapUtils > &hdmap_utils_ptr) -> double
 
auto distanceToLaneBound (const geometry_msgs::msg::Pose &map_pose, const traffic_simulator_msgs::msg::BoundingBox &bounding_box, const lanelet::Ids &lanelet_ids, const std::shared_ptr< hdmap_utils::HdMapUtils > &hdmap_utils_ptr) -> double
 
auto distanceToLeftLaneBound (const geometry_msgs::msg::Pose &map_pose, const traffic_simulator_msgs::msg::BoundingBox &bounding_box, lanelet::Id lanelet_id, const std::shared_ptr< hdmap_utils::HdMapUtils > &hdmap_utils_ptr) -> double
 
auto distanceToLeftLaneBound (const geometry_msgs::msg::Pose &map_pose, const traffic_simulator_msgs::msg::BoundingBox &bounding_box, const lanelet::Ids &lanelet_ids, const std::shared_ptr< hdmap_utils::HdMapUtils > &hdmap_utils_ptr) -> double
 
auto distanceToRightLaneBound (const geometry_msgs::msg::Pose &map_pose, const traffic_simulator_msgs::msg::BoundingBox &bounding_box, lanelet::Id lanelet_id, const std::shared_ptr< hdmap_utils::HdMapUtils > &hdmap_utils_ptr) -> double
 
auto distanceToRightLaneBound (const geometry_msgs::msg::Pose &map_pose, const traffic_simulator_msgs::msg::BoundingBox &bounding_box, const lanelet::Ids &lanelet_ids, const std::shared_ptr< hdmap_utils::HdMapUtils > &hdmap_utils_ptr) -> double
 
auto distanceToCrosswalk (const traffic_simulator_msgs::msg::WaypointsArray &waypoints_array, const lanelet::Id target_crosswalk_id, const std::shared_ptr< hdmap_utils::HdMapUtils > &hdmap_utils_ptr) -> std::optional< double >
 
auto distanceToStopLine (const traffic_simulator_msgs::msg::WaypointsArray &waypoints_array, const lanelet::Id target_stop_line_id, const std::shared_ptr< hdmap_utils::HdMapUtils > &hdmap_utils_ptr) -> std::optional< double >
 

Function Documentation

◆ boundingBoxDistance()

auto traffic_simulator::distance::boundingBoxDistance ( const geometry_msgs::msg::Pose &  from,
const traffic_simulator_msgs::msg::BoundingBox &  from_bounding_box,
const geometry_msgs::msg::Pose &  to,
const traffic_simulator_msgs::msg::BoundingBox &  to_bounding_box 
) -> std::optional<double>

◆ boundingBoxLaneLateralDistance()

auto traffic_simulator::distance::boundingBoxLaneLateralDistance ( const CanonicalizedLaneletPose from,
const traffic_simulator_msgs::msg::BoundingBox &  from_bounding_box,
const CanonicalizedLaneletPose to,
const traffic_simulator_msgs::msg::BoundingBox &  to_bounding_box,
const traffic_simulator::RoutingConfiguration routing_configuration,
const std::shared_ptr< hdmap_utils::HdMapUtils > &  hdmap_utils_ptr 
) -> std::optional<double>

◆ boundingBoxLaneLongitudinalDistance()

auto traffic_simulator::distance::boundingBoxLaneLongitudinalDistance ( const CanonicalizedLaneletPose from,
const traffic_simulator_msgs::msg::BoundingBox &  from_bounding_box,
const CanonicalizedLaneletPose to,
const traffic_simulator_msgs::msg::BoundingBox &  to_bounding_box,
bool  include_adjacent_lanelet,
bool  include_opposite_direction,
const traffic_simulator::RoutingConfiguration routing_configuration,
const std::shared_ptr< hdmap_utils::HdMapUtils > &  hdmap_utils_ptr 
) -> std::optional<double>

◆ countLaneChanges()

auto traffic_simulator::distance::countLaneChanges ( const CanonicalizedLaneletPose from,
const CanonicalizedLaneletPose to,
const traffic_simulator::RoutingConfiguration routing_configuration,
const std::shared_ptr< hdmap_utils::HdMapUtils > &  hdmap_utils_ptr 
) -> std::optional<std::pair<int, int>>

◆ distanceToCrosswalk()

auto traffic_simulator::distance::distanceToCrosswalk ( const traffic_simulator_msgs::msg::WaypointsArray &  waypoints_array,
const lanelet::Id  target_crosswalk_id,
const std::shared_ptr< hdmap_utils::HdMapUtils > &  hdmap_utils_ptr 
) -> std::optional<double>

◆ distanceToLaneBound() [1/2]

auto traffic_simulator::distance::distanceToLaneBound ( const geometry_msgs::msg::Pose &  map_pose,
const traffic_simulator_msgs::msg::BoundingBox &  bounding_box,
const lanelet::Ids &  lanelet_ids,
const std::shared_ptr< hdmap_utils::HdMapUtils > &  hdmap_utils_ptr 
) -> double

◆ distanceToLaneBound() [2/2]

auto traffic_simulator::distance::distanceToLaneBound ( const geometry_msgs::msg::Pose &  map_pose,
const traffic_simulator_msgs::msg::BoundingBox &  bounding_box,
lanelet::Id  lanelet_id,
const std::shared_ptr< hdmap_utils::HdMapUtils > &  hdmap_utils_ptr 
) -> double

◆ distanceToLeftLaneBound() [1/2]

auto traffic_simulator::distance::distanceToLeftLaneBound ( const geometry_msgs::msg::Pose &  map_pose,
const traffic_simulator_msgs::msg::BoundingBox &  bounding_box,
const lanelet::Ids &  lanelet_ids,
const std::shared_ptr< hdmap_utils::HdMapUtils > &  hdmap_utils_ptr 
) -> double

◆ distanceToLeftLaneBound() [2/2]

auto traffic_simulator::distance::distanceToLeftLaneBound ( const geometry_msgs::msg::Pose &  map_pose,
const traffic_simulator_msgs::msg::BoundingBox &  bounding_box,
lanelet::Id  lanelet_id,
const std::shared_ptr< hdmap_utils::HdMapUtils > &  hdmap_utils_ptr 
) -> double

◆ distanceToRightLaneBound() [1/2]

auto traffic_simulator::distance::distanceToRightLaneBound ( const geometry_msgs::msg::Pose &  map_pose,
const traffic_simulator_msgs::msg::BoundingBox &  bounding_box,
const lanelet::Ids &  lanelet_ids,
const std::shared_ptr< hdmap_utils::HdMapUtils > &  hdmap_utils_ptr 
) -> double

◆ distanceToRightLaneBound() [2/2]

auto traffic_simulator::distance::distanceToRightLaneBound ( const geometry_msgs::msg::Pose &  map_pose,
const traffic_simulator_msgs::msg::BoundingBox &  bounding_box,
lanelet::Id  lanelet_id,
const std::shared_ptr< hdmap_utils::HdMapUtils > &  hdmap_utils_ptr 
) -> double

◆ distanceToStopLine()

auto traffic_simulator::distance::distanceToStopLine ( const traffic_simulator_msgs::msg::WaypointsArray &  waypoints_array,
const lanelet::Id  target_stop_line_id,
const std::shared_ptr< hdmap_utils::HdMapUtils > &  hdmap_utils_ptr 
) -> std::optional<double>

◆ lateralDistance() [1/2]

auto traffic_simulator::distance::lateralDistance ( const CanonicalizedLaneletPose from,
const CanonicalizedLaneletPose to,
const traffic_simulator::RoutingConfiguration routing_configuration,
const std::shared_ptr< hdmap_utils::HdMapUtils > &  hdmap_utils_ptr 
) -> std::optional<double>

◆ lateralDistance() [2/2]

auto traffic_simulator::distance::lateralDistance ( const CanonicalizedLaneletPose from,
const CanonicalizedLaneletPose to,
double  matching_distance,
const traffic_simulator::RoutingConfiguration routing_configuration,
const std::shared_ptr< hdmap_utils::HdMapUtils > &  hdmap_utils_ptr 
) -> std::optional<double>

◆ longitudinalDistance()

auto traffic_simulator::distance::longitudinalDistance ( const CanonicalizedLaneletPose from,
const CanonicalizedLaneletPose to,
bool  include_adjacent_lanelet,
bool  include_opposite_direction,
const traffic_simulator::RoutingConfiguration routing_configuration,
const std::shared_ptr< hdmap_utils::HdMapUtils > &  hdmap_utils_ptr 
) -> std::optional< double >
See also
https://github.com/tier4/scenario_simulator_v2/blob/729e4e6372cdba60e377ae097d032905b80763a9/docs/developer_guide/lane_pose_calculation/GetLongitudinalDistance.md

A matching distance of about 1.5*lane widths is given as the matching distance to match the Entity present on the adjacent Lanelet. The length of the horizontal bar must intersect with the adjacent lanelet, so it is always 10m regardless of the entity type.

A matching distance of about 1.5*lane widths is given as the matching distance to match the Entity present on the adjacent Lanelet. The length of the horizontal bar must intersect with the adjacent lanelet, so it is always 10m regardless of the entity type.