15 #ifndef TRAFFIC_SIMULATOR__LANELET_WRAPPER_POSE_HPP_
16 #define TRAFFIC_SIMULATOR__LANELET_WRAPPER_POSE_HPP_
18 #include <lanelet2_matching/LaneletMatching.h>
24 namespace lanelet_wrapper
30 constexpr
static double DEFAULT_MATCH_TO_LANE_REDUCTION_RATIO = 0.8;
34 auto isAltitudeMatching(
const double current_altitude,
const double target_altitude) -> bool;
37 const Pose & map_pose,
const lanelet::Id lanelet_id,
const double matching_distance = 1.0)
38 -> std::optional<LaneletPose>;
41 const Pose & map_pose,
const lanelet::Ids & lanelet_ids,
const double matching_distance = 1.0)
42 -> std::optional<LaneletPose>;
45 const Pose & map_pose,
const bool include_crosswalk,
const double matching_distance = 1.0)
46 -> std::optional<LaneletPose>;
49 const Pose & map_pose,
const BoundingBox & bounding_box,
const bool include_crosswalk,
50 const double matching_distance = 1.0,
52 -> std::optional<LaneletPose>;
55 const Pose & map_pose,
const lanelet::Id lanelet_id,
const double matching_distance = 5.0,
56 const bool include_opposite_direction =
true,
58 -> std::vector<LaneletPose>;
79 -> std::vector<LaneletPose>;
90 -> std::tuple<std::optional<LaneletPose>, std::optional<lanelet::Id>>;
93 -> std::tuple<std::optional<LaneletPose>, std::optional<lanelet::Id>>;
97 const bool include_crosswalk,
const double matching_distance = 1.0,
98 const double reduction_ratio = DEFAULT_MATCH_TO_LANE_REDUCTION_RATIO,
101 -> std::optional<std::set<std::pair<double, lanelet::Id>>>;
104 const Pose & map_pose,
const BoundingBox & bounding_box,
const bool include_crosswalk,
105 const double matching_distance = 1.0,
106 const double reduction_ratio = DEFAULT_MATCH_TO_LANE_REDUCTION_RATIO,
108 -> std::optional<lanelet::Id>;
111 const lanelet::Id lanelet_id,
const RoutingGraphType type,
const bool include_opposite_direction)
115 const lanelet::Id lanelet_id,
const RoutingGraphType type,
const bool include_opposite_direction)
auto distance(const geometry_msgs::Pose &pose1, const geometry_msgs::Pose &pose2)
Definition: detection_sensor.cpp:36
auto canonicalizeLaneletPose(const LaneletPose &lanelet_pose) -> std::tuple< std::optional< LaneletPose >, std::optional< lanelet::Id >>
Canonicalizes a given LaneletPose by adjusting the longitudinal position (s) to ensure it lies within...
Definition: pose.cpp:351
auto toLaneletPose(const Pose &map_pose, const lanelet::Id lanelet_id, const double matching_distance=1.0) -> std::optional< LaneletPose >
Definition: pose.cpp:89
auto alongLaneletPose(const LaneletPose &from_pose, const lanelet::Ids &route_lanelets, const double distance) -> LaneletPose
Definition: pose.cpp:310
auto matchToLane(const Pose &map_pose, const BoundingBox &bounding_box, const bool include_crosswalk, const double matching_distance=1.0, const double reduction_ratio=DEFAULT_MATCH_TO_LANE_REDUCTION_RATIO, const RoutingGraphType type=RoutingConfiguration().routing_graph_type) -> std::optional< lanelet::Id >
Definition: pose.cpp:461
auto toLaneletPoses(const Pose &map_pose, const lanelet::Id lanelet_id, const double matching_distance=5.0, const bool include_opposite_direction=true, const RoutingGraphType type=RoutingConfiguration().routing_graph_type) -> std::vector< LaneletPose >
Definition: pose.cpp:192
auto findMatchingLanes(const geometry_msgs::msg::Pose &, const traffic_simulator_msgs::msg::BoundingBox &, const bool include_crosswalk, const double matching_distance=1.0, const double reduction_ratio=DEFAULT_MATCH_TO_LANE_REDUCTION_RATIO, const traffic_simulator::RoutingGraphType type=traffic_simulator::RoutingConfiguration().routing_graph_type) -> std::optional< std::set< std::pair< double, lanelet::Id >>>
Definition: pose.cpp:410
auto alternativeLaneletPoses(const LaneletPose &reference_lanelet_pose) -> std::vector< LaneletPose >
Retrieves alternative lanelet poses based on the reference lanelet pose.
Definition: pose.cpp:213
auto rightLaneletIds(const lanelet::Id lanelet_id, const RoutingGraphType type, const bool include_opposite_direction) -> lanelet::Ids
Definition: pose.cpp:490
auto isAltitudeMatching(const double current_altitude, const double target_altitude) -> bool
Definition: pose.cpp:70
auto leftLaneletIds(const lanelet::Id lanelet_id, const RoutingGraphType type, const bool include_opposite_direction) -> lanelet::Ids
Definition: pose.cpp:476
auto toMapPose(const LaneletPose &lanelet_pose, const bool fill_pitch=true) -> PoseStamped
Definition: pose.cpp:33
geometry_msgs::msg::Pose Pose
Definition: lanelet_wrapper.hpp:65
traffic_simulator_msgs::msg::BoundingBox BoundingBox
Definition: lanelet_wrapper.hpp:61
traffic_simulator_msgs::msg::LaneletPose LaneletPose
Definition: lanelet_wrapper.hpp:63
geometry_msgs::msg::PoseStamped PoseStamped
Definition: lanelet_wrapper.hpp:66
RoutingGraphType
Definition: routing_graph_type.hpp:24
Definition: routing_configuration.hpp:24