Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HdMapUtils refactor (PR 2/6) - extend lanelet_wrapper: add ::distance and necessary parts of ::route, ::lanelet_map, ::traffic_lights #1478

Open
wants to merge 55 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
4624a23
feat(traffic_simulator): expand lanelet_wrapper: add ::distance and n…
dmoszynski Dec 5, 2024
a83b14d
feat(traffic_simulator, behavior_tree_plugin, openscenario_intepreter…
dmoszynski Dec 5, 2024
5921ecf
feat(traffic_simulator): adapt test for lanelet_wrapper
dmoszynski Dec 5, 2024
91f6ad3
reftraffic_simulator): use lanelet_wrapper in hdmap_utils, remove sep…
dmoszynski Dec 5, 2024
4b3a45c
ref(traffic_simulator): little lanelet_wrapper refactor
dmoszynski Dec 5, 2024
b418a3a
ref(clang): revert undesired changes
dmoszynski Dec 5, 2024
44d4896
Trigger CI pipeline
dmoszynski Dec 9, 2024
c447c53
Merge branch 'ref/RJD-1387-hdmap-utils-to-lanelet-wrapper-pose' into …
dmoszynski Dec 9, 2024
24cb803
Merge branch 'ref/RJD-1387-hdmap-utils-to-lanelet-wrapper-pose' into …
dmoszynski Dec 9, 2024
2f5132e
Merge branch 'ref/RJD-1387-hdmap-utils-to-lanelet-wrapper-pose' into …
dmoszynski Dec 10, 2024
768b84e
ref(traffic_simulator): improve hdmaputils::countLaneChanges
dmoszynski Dec 10, 2024
c33adff
Merge remote-tracking branch 'origin/ref/RJD-1387-hdmap-utils-to-lane…
dmoszynski Dec 10, 2024
fa0acce
Merge remote-tracking branch 'origin/ref/RJD-1387-hdmap-utils-to-lane…
dmoszynski Dec 10, 2024
ab01032
Merge branch 'ref/RJD-1387-hdmap-utils-to-lanelet-wrapper-pose' into …
dmoszynski Dec 11, 2024
318cfcf
Merge remote-tracking branch 'origin/ref/RJD-1387-hdmap-utils-to-lane…
dmoszynski Dec 18, 2024
0394908
fix(traffic_simulator): fix after merge
dmoszynski Dec 18, 2024
1539dd9
Merge branch 'ref/RJD-1387-hdmap-utils-to-lanelet-wrapper-pose' into …
dmoszynski Jan 7, 2025
9b0b06e
Merge remote-tracking branch 'origin/ref/RJD-1387-hdmap-utils-to-lane…
TauTheLepton Jan 7, 2025
e7896f4
Merge remote-tracking branch 'origin/ref/RJD-1387-hdmap-utils-to-lane…
TauTheLepton Jan 15, 2025
bb85f13
Merge branch 'ref/RJD-1387-hdmap-utils-to-lanelet-wrapper-pose' into …
dmoszynski Jan 21, 2025
be5cac9
Merge branch 'ref/RJD-1387-hdmap-utils-to-lanelet-wrapper-pose' into …
TauTheLepton Jan 22, 2025
90b3446
Utilize other overloads and add named constexpr parameters
TauTheLepton Jan 22, 2025
f3b3782
Use vector instead of set when many values are inserted and search is…
TauTheLepton Jan 22, 2025
a642982
Merge branch 'ref/RJD-1387-hdmap-utils-to-lanelet-wrapper-pose' into …
TauTheLepton Jan 23, 2025
f80a5f4
Code improvement: change `emplace_back` to `push_back` where emplacin…
TauTheLepton Jan 23, 2025
ff3ed61
Code improvement: add const reference wherever applicable and reserve…
TauTheLepton Jan 23, 2025
cd884fb
Code improvement: avoid unnecessary storage of data and computational…
TauTheLepton Jan 23, 2025
ee60f4c
Code improvement: add missing check in one overload of function `lane…
TauTheLepton Jan 23, 2025
56dfddd
Code improvement(lanelet_wrapper::traffic_lights): minor improvements
TauTheLepton Jan 23, 2025
3b32dcd
Code improvement(lanelet_wrapper::traffic_lights): avoid adding the s…
TauTheLepton Jan 23, 2025
f235ada
Code improvement(lanelet_wrapper::traffic_lights): add const ref to l…
TauTheLepton Jan 23, 2025
03ba3ce
Sort before std::unique, so that all duplicates are removed correctly
TauTheLepton Jan 29, 2025
e21760c
Return const ref to a vector from `CenterPointsCache::centerPoints` a…
TauTheLepton Jan 29, 2025
d28d911
Trigger CI
TauTheLepton Jan 29, 2025
c803a87
Fix typo
TauTheLepton Jan 29, 2025
5d76858
Merge branch 'ref/RJD-1387-hdmap-utils-to-lanelet-wrapper-distance-st…
TauTheLepton Jan 29, 2025
dd67e63
Merge remote-tracking branch 'tier4/master' into ref/RJD-1387-hdmap-u…
TauTheLepton Jan 30, 2025
952c87a
Merge branch 'master' into ref/RJD-1387-hdmap-utils-to-lanelet-wrappe…
TauTheLepton Jan 31, 2025
73189e9
Revert "Sort before std::unique, so that all duplicates are removed c…
TauTheLepton Jan 31, 2025
7321812
Add note with the intention
TauTheLepton Jan 31, 2025
c4bc79e
Change copyright date to 2015
TauTheLepton Feb 3, 2025
a22057b
Implement Sonar suggestions
TauTheLepton Feb 3, 2025
1d2453b
Code improvement: avoid unnecessary storage of data in some distance …
TauTheLepton Feb 3, 2025
2c3430e
Merge remote-tracking branch 'tier4/master' into ref/RJD-1387-hdmap-u…
TauTheLepton Feb 4, 2025
92f2cf2
Merge remote-tracking branch 'tier4/master' into ref/RJD-1387-hdmap-u…
TauTheLepton Feb 5, 2025
a7e12f3
Trigger SonarCloud
TauTheLepton Feb 5, 2025
dfced8b
Merge branch 'master' into ref/RJD-1387-hdmap-utils-to-lanelet-wrappe…
TauTheLepton Feb 6, 2025
f4c8343
Merge remote-tracking branch 'tier4/master' into ref/RJD-1387-hdmap-u…
TauTheLepton Feb 11, 2025
78b6dd1
Merge branch 'master' into ref/RJD-1387-hdmap-utils-to-lanelet-wrappe…
TauTheLepton Feb 12, 2025
95be978
Merge branch 'master' into ref/RJD-1387-hdmap-utils-to-lanelet-wrappe…
TauTheLepton Feb 13, 2025
03553ad
Merge branch 'master' into ref/RJD-1387-hdmap-utils-to-lanelet-wrappe…
yamacir-kit Feb 17, 2025
e17a8ed
Merge branch 'master' into ref/RJD-1387-hdmap-utils-to-lanelet-wrappe…
TauTheLepton Feb 18, 2025
86e2876
Merge remote-tracking branch 'tier4/master' into ref/RJD-1387-hdmap-u…
TauTheLepton Feb 20, 2025
1716b33
Merge tag '12.0.2' into ref/RJD-1387-hdmap-utils-to-lanelet-wrapper-d…
robomic Mar 4, 2025
848adf0
Merge branch 'master' into ref/RJD-1387-hdmap-utils-to-lanelet-wrappe…
robomic Mar 5, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,7 @@ class GetDistanceInLaneCoordinateScenario : public cpp_mock_scenarios::CppScenar
if (from_entity.isInLanelet() && to_entity.isInLanelet()) {
return traffic_simulator::distance::lateralDistance(
from_entity.getCanonicalizedLaneletPose().value(),
to_entity.getCanonicalizedLaneletPose().value(), traffic_simulator::RoutingConfiguration(),
api_.getHdmapUtils());
to_entity.getCanonicalizedLaneletPose().value(), traffic_simulator::RoutingConfiguration());
}
return std::nullopt;
};
Expand All @@ -66,7 +65,7 @@ class GetDistanceInLaneCoordinateScenario : public cpp_mock_scenarios::CppScenar
if (from_entity_lanelet_pose && to_entity_lanelet_pose) {
return traffic_simulator::distance::lateralDistance(
from_entity_lanelet_pose.value(), to_entity_lanelet_pose.value(),
traffic_simulator::RoutingConfiguration(), api_.getHdmapUtils());
traffic_simulator::RoutingConfiguration());
}
return std::nullopt;
};
Expand All @@ -81,7 +80,7 @@ class GetDistanceInLaneCoordinateScenario : public cpp_mock_scenarios::CppScenar
return traffic_simulator::distance::longitudinalDistance(
from_entity.getCanonicalizedLaneletPose().value(),
to_entity.getCanonicalizedLaneletPose().value(), false, false,
traffic_simulator::RoutingConfiguration(), api_.getHdmapUtils());
traffic_simulator::RoutingConfiguration());
}
return std::nullopt;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ class SimulatorCore
routing_configuration.allow_lane_change =
(routing_algorithm == RoutingAlgorithm::value_type::shortest);
return traffic_simulator::pose::relativeLaneletPose(
from_lanelet_pose, to_lanelet_pose, routing_configuration, core->getHdmapUtils());
from_lanelet_pose, to_lanelet_pose, routing_configuration);
}

static auto makeNativeBoundingBoxRelativeLanePosition(
Expand Down Expand Up @@ -230,7 +230,7 @@ class SimulatorCore
(routing_algorithm == RoutingAlgorithm::value_type::shortest);
return traffic_simulator::pose::boundingBoxRelativeLaneletPose(
from_lanelet_pose, from_bounding_box, to_lanelet_pose, to_bounding_box,
routing_configuration, core->getHdmapUtils());
routing_configuration);
}

static auto makeNativeBoundingBoxRelativeWorldPosition(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,20 +55,17 @@ class ActionNode : public BT::ActionNodeBase
-> double;
auto getDistanceToFrontEntity(const math::geometry::CatmullRomSplineInterface & spline) const
-> std::optional<double>;
auto getDistanceToStopLine(
const lanelet::Ids & route_lanelets,
const std::vector<geometry_msgs::msg::Point> & waypoints) const -> std::optional<double>;
auto getDistanceToTrafficLightStopLine(
const lanelet::Ids & route_lanelets,
const math::geometry::CatmullRomSplineInterface & spline) const -> std::optional<double>;
auto getRightOfWayEntities() const -> std::vector<traffic_simulator::CanonicalizedEntityStatus>;
auto getRightOfWayEntities(const lanelet::Ids & following_lanelets) const
-> std::vector<traffic_simulator::CanonicalizedEntityStatus>;
auto getYieldStopDistance(const lanelet::Ids & following_lanelets) const -> std::optional<double>;
auto getOtherEntityStatus(lanelet::Id lanelet_id) const
-> std::vector<traffic_simulator::CanonicalizedEntityStatus>;
auto stopEntity() const -> void;
auto getHorizon() const -> double;
auto getOtherEntitiesCanonicalizedLaneletPoses() const
-> std::vector<traffic_simulator::CanonicalizedLaneletPose>;

/// throws if the derived class return RUNNING.
auto executeTick() -> BT::NodeStatus override;
Expand Down
79 changes: 29 additions & 50 deletions simulation/behavior_tree_plugin/src/action_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,18 @@ auto ActionNode::getBlackBoardValues() -> void
}
}

auto ActionNode::getOtherEntitiesCanonicalizedLaneletPoses() const
-> std::vector<traffic_simulator::CanonicalizedLaneletPose>
{
std::vector<traffic_simulator::CanonicalizedLaneletPose> other_canonicalized_lanelet_poses;
for (const auto & [name, status] : other_entity_status) {
if (auto const & canonicalized_lanelet_pose = status.getCanonicalizedLaneletPose()) {
other_canonicalized_lanelet_poses.push_back(canonicalized_lanelet_pose.value());
}
}
return other_canonicalized_lanelet_poses;
}

auto ActionNode::getHorizon() const -> double
{
return std::clamp(canonicalized_entity_status->getTwist().linear.x * 5.0, 20.0, 50.0);
Expand All @@ -112,41 +124,16 @@ auto ActionNode::setCanonicalizedEntityStatus(const traffic_simulator::EntitySta
entity_status, default_matching_distance_for_lanelet_pose_calculation);
}

auto ActionNode::getOtherEntityStatus(lanelet::Id lanelet_id) const
-> std::vector<traffic_simulator::CanonicalizedEntityStatus>
{
std::vector<traffic_simulator::CanonicalizedEntityStatus> ret;
for (const auto & [name, status] : other_entity_status) {
if (status.isInLanelet() && traffic_simulator::isSameLaneletId(status, lanelet_id)) {
ret.emplace_back(status);
}
}
return ret;
}

auto ActionNode::getYieldStopDistance(const lanelet::Ids & following_lanelets) const
-> std::optional<double>
{
std::set<double> distances;
for (const auto & lanelet : following_lanelets) {
const auto right_of_way_ids = hdmap_utils->getRightOfWayLaneletIds(lanelet);
for (const auto right_of_way_id : right_of_way_ids) {
const auto other_status = getOtherEntityStatus(right_of_way_id);
if (!other_status.empty() && canonicalized_entity_status->isInLanelet()) {
const auto lanelet_pose = canonicalized_entity_status->getLaneletPose();
const auto distance_forward = hdmap_utils->getLongitudinalDistance(
lanelet_pose, traffic_simulator::helper::constructLaneletPose(lanelet, 0));
const auto distance_backward = hdmap_utils->getLongitudinalDistance(
traffic_simulator::helper::constructLaneletPose(lanelet, 0), lanelet_pose);
if (distance_forward) {
distances.insert(distance_forward.value());
} else if (distance_backward) {
distances.insert(-distance_backward.value());
}
}
}
if (distances.size() != 0) {
return *distances.begin();
if (
const auto canonicalized_lanelet_pose =
canonicalized_entity_status->getCanonicalizedLaneletPose()) {
if (const auto other_canonicalized_lanelet_poses = getOtherEntitiesCanonicalizedLaneletPoses();
!other_canonicalized_lanelet_poses.empty()) {
traffic_simulator::distance::distanceToYieldStop(
canonicalized_lanelet_pose.value(), following_lanelets, other_canonicalized_lanelet_poses);
}
}
return std::nullopt;
Expand Down Expand Up @@ -212,7 +199,7 @@ auto ActionNode::getDistanceToTrafficLightStopLine(
if (traffic_lights->isRequiredStopTrafficLightState(traffic_light_id)) {
if (
const auto collision_point =
hdmap_utils->getDistanceToTrafficLightStopLine(spline, traffic_light_id)) {
traffic_simulator::distance::distanceToTrafficLightStopLine(spline, traffic_light_id)) {
collision_points.insert(collision_point.value());
}
}
Expand All @@ -224,13 +211,6 @@ auto ActionNode::getDistanceToTrafficLightStopLine(
return std::nullopt;
}

auto ActionNode::getDistanceToStopLine(
const lanelet::Ids & route_lanelets,
const std::vector<geometry_msgs::msg::Point> & waypoints) const -> std::optional<double>
{
return hdmap_utils->getDistanceToStopLine(route_lanelets, waypoints);
}

auto ActionNode::getDistanceToFrontEntity(
const math::geometry::CatmullRomSplineInterface & spline) const -> std::optional<double>
{
Expand Down Expand Up @@ -297,17 +277,17 @@ auto ActionNode::getEntityStatus(const std::string & target_name) const

/**
* @note getDistanceToTargetEntity working schematics
*
* 1. Check if route to target entity from reference entity exists, if not try to transform pose to other
*
* 1. Check if route to target entity from reference entity exists, if not try to transform pose to other
* routable lanelet, within matching distance (findRoutableAlternativeLaneletPoseFrom).
* 2. Calculate longitudinal distance between entities bounding boxes -> bounding_box_distance.
* 3. Calculate longitudinal distance between entities poses -> position_distance.
* 4. Calculate target entity bounding box distance to reference entity spline (minimal distance from all corners)
* 4. Calculate target entity bounding box distance to reference entity spline (minimal distance from all corners)
* -> target_to_spline_distance.
* 5. If target_to_spline_distance is less than half width of reference entity target entity is conflicting.
* 6. Check corner case where target entity width is bigger than width of entity and target entity
* is exactly on the spline -> spline.getCollisionPointIn2D
* 7. If target entity is conflicting return bounding_box_distance enlarged by half of the entity
* 7. If target entity is conflicting return bounding_box_distance enlarged by half of the entity
* length.
*/
auto ActionNode::getDistanceToTargetEntity(
Expand All @@ -319,9 +299,9 @@ auto ActionNode::getDistanceToTargetEntity(
!isOtherEntityAtConsideredAltitude(status)) {
return std::nullopt;
}
/**
* boundingBoxLaneLongitudinalDistance requires routing_configuration,
* 'allow_lane_change = true' is needed to check distances to entities on neighbour lanelets
/**
* boundingBoxLaneLongitudinalDistance requires routing_configuration,
* 'allow_lane_change = true' is needed to check distances to entities on neighbour lanelets
*/
traffic_simulator::RoutingConfiguration routing_configuration;
routing_configuration.allow_lane_change = true;
Expand All @@ -341,13 +321,12 @@ auto ActionNode::getDistanceToTargetEntity(
if (const auto bounding_box_distance =
traffic_simulator::distance::boundingBoxLaneLongitudinalDistance(
*from_lanelet_pose, from_bounding_box, *target_lanelet_pose, target_bounding_box,
include_adjacent_lanelet, include_opposite_direction, routing_configuration,
hdmap_utils);
include_adjacent_lanelet, include_opposite_direction, routing_configuration);
!bounding_box_distance || bounding_box_distance.value() < 0.0) {
return std::nullopt;
} else if (const auto position_distance = traffic_simulator::distance::longitudinalDistance(
*from_lanelet_pose, *target_lanelet_pose, include_adjacent_lanelet,
include_opposite_direction, routing_configuration, hdmap_utils);
include_opposite_direction, routing_configuration);
!position_distance) {
return std::nullopt;
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ auto FollowPolylineTrajectoryAction::tick() -> BT::NodeStatus
} else if (
const auto entity_status_updated = traffic_simulator::follow_trajectory::makeUpdatedStatus(
static_cast<traffic_simulator::EntityStatus>(*canonicalized_entity_status),
*polyline_trajectory, behavior_parameter, hdmap_utils, step_time,
*polyline_trajectory, behavior_parameter, step_time,
default_matching_distance_for_lanelet_pose_calculation, getTargetSpeed())) {
setCanonicalizedEntityStatus(entity_status_updated.value());
setOutput("waypoints", calculateWaypoints());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,8 @@ BT::NodeStatus FollowFrontEntityAction::tick()
if (trajectory == nullptr) {
return BT::NodeStatus::FAILURE;
}
auto distance_to_stopline = hdmap_utils->getDistanceToStopLine(route_lanelets, *trajectory);
auto distance_to_stopline =
traffic_simulator::distance::distanceToStopLine(route_lanelets, *trajectory);
auto distance_to_conflicting_entity = getDistanceToConflictingEntity(route_lanelets, *trajectory);
const auto front_entity_name = getFrontEntityName(*trajectory);
if (!front_entity_name) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,8 @@ BT::NodeStatus FollowLaneAction::tick()
return BT::NodeStatus::FAILURE;
}
}
auto distance_to_stopline = hdmap_utils->getDistanceToStopLine(route_lanelets, *trajectory);
auto distance_to_stopline =
traffic_simulator::distance::distanceToStopLine(route_lanelets, *trajectory);
auto distance_to_conflicting_entity =
getDistanceToConflictingEntity(route_lanelets, *trajectory);
if (distance_to_stopline) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,8 @@ BT::NodeStatus StopAtCrossingEntityAction::tick()
return BT::NodeStatus::FAILURE;
}
distance_to_stop_target_ = getDistanceToConflictingEntity(route_lanelets, *trajectory);
auto distance_to_stopline = hdmap_utils->getDistanceToStopLine(route_lanelets, *trajectory);
auto distance_to_stopline =
traffic_simulator::distance::distanceToStopLine(route_lanelets, *trajectory);
const auto distance_to_front_entity = getDistanceToFrontEntity(*trajectory);
if (!distance_to_stop_target_) {
in_stop_sequence_ = false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,8 @@ BT::NodeStatus StopAtStopLineAction::tick()
if (trajectory == nullptr) {
return BT::NodeStatus::FAILURE;
}
distance_to_stopline_ = hdmap_utils->getDistanceToStopLine(route_lanelets, *trajectory);
distance_to_stopline_ =
traffic_simulator::distance::distanceToStopLine(route_lanelets, *trajectory);
const auto distance_to_stop_target = getDistanceToConflictingEntity(route_lanelets, *trajectory);
const auto distance_to_front_entity = getDistanceToFrontEntity(*trajectory);
if (!distance_to_stopline_) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ auto FollowPolylineTrajectoryAction::tick() -> BT::NodeStatus
} else if (
const auto entity_status_updated = traffic_simulator::follow_trajectory::makeUpdatedStatus(
static_cast<traffic_simulator::EntityStatus>(*canonicalized_entity_status),
*polyline_trajectory, behavior_parameter, hdmap_utils, step_time,
*polyline_trajectory, behavior_parameter, step_time,
default_matching_distance_for_lanelet_pose_calculation, getTargetSpeed())) {
setCanonicalizedEntityStatus(entity_status_updated.value());
setOutput("waypoints", calculateWaypoints());
Expand Down
2 changes: 2 additions & 0 deletions simulation/traffic_simulator/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,13 @@ ament_auto_add_library(traffic_simulator SHARED
src/helper/ostream_helpers.cpp
src/job/job.cpp
src/job/job_list.cpp
src/lanelet_wrapper/distance.cpp
src/lanelet_wrapper/lanelet_loader.cpp
src/lanelet_wrapper/lanelet_map.cpp
src/lanelet_wrapper/lanelet_wrapper.cpp
src/lanelet_wrapper/pose.cpp
src/lanelet_wrapper/route.cpp
src/lanelet_wrapper/traffic_lights.cpp
src/lanelet_wrapper/traffic_rules.cpp
src/simulation_clock/simulation_clock.cpp
src/traffic/traffic_controller.cpp
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ namespace follow_trajectory
auto makeUpdatedStatus(
const traffic_simulator_msgs::msg::EntityStatus &,
traffic_simulator_msgs::msg::PolylineTrajectory &,
const traffic_simulator_msgs::msg::BehaviorParameter &,
const std::shared_ptr<hdmap_utils::HdMapUtils> &, double, double,
const traffic_simulator_msgs::msg::BehaviorParameter &, double, double,
std::optional<double> target_speed = std::nullopt) -> std::optional<EntityStatus>;
} // namespace follow_trajectory
} // namespace traffic_simulator
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ namespace traffic_simulator
{
struct RoutingConfiguration
{
RoutingConfiguration() = default;
explicit RoutingConfiguration(const bool allow_lane_change)
: allow_lane_change(allow_lane_change){};

bool allow_lane_change = false;
traffic_simulator::RoutingGraphType routing_graph_type =
traffic_simulator::RoutingGraphType::VEHICLE_WITH_ROAD_SHOULDER;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,30 +106,6 @@ class HdMapUtils
traffic_simulator::RoutingConfiguration().routing_graph_type) const
-> lanelet::Ids;

auto getDistanceToStopLine(
const lanelet::Ids & route_lanelets,
const math::geometry::CatmullRomSplineInterface & spline) const -> std::optional<double>;

auto getDistanceToStopLine(
const lanelet::Ids & route_lanelets,
const std::vector<geometry_msgs::msg::Point> & waypoints) const -> std::optional<double>;

auto getDistanceToTrafficLightStopLine(
const lanelet::Ids & route_lanelets,
const math::geometry::CatmullRomSplineInterface & spline) const -> std::optional<double>;

auto getDistanceToTrafficLightStopLine(
const lanelet::Ids & route_lanelets,
const std::vector<geometry_msgs::msg::Point> & waypoints) const -> std::optional<double>;

auto getDistanceToTrafficLightStopLine(
const math::geometry::CatmullRomSplineInterface & spline,
const lanelet::Id traffic_light_id) const -> std::optional<double>;

auto getDistanceToTrafficLightStopLine(
const std::vector<geometry_msgs::msg::Point> & waypoints,
const lanelet::Id traffic_light_id) const -> std::optional<double>;

auto getFollowingLanelets(
const lanelet::Id current_lanelet_id, const lanelet::Ids & route, const double horizon = 100,
const bool include_current_lanelet_id = true,
Expand Down Expand Up @@ -173,18 +149,6 @@ class HdMapUtils

auto getLanelets(const lanelet::Ids &) const -> lanelet::Lanelets;

auto getLateralDistance(
const traffic_simulator_msgs::msg::LaneletPose & from,
const traffic_simulator_msgs::msg::LaneletPose & to,
const traffic_simulator::RoutingConfiguration & routing_configuration =
traffic_simulator::RoutingConfiguration()) const -> std::optional<double>;

auto getLongitudinalDistance(
const traffic_simulator_msgs::msg::LaneletPose & from_pose,
const traffic_simulator_msgs::msg::LaneletPose & to_pose,
const traffic_simulator::RoutingConfiguration & routing_configuration =
traffic_simulator::RoutingConfiguration()) const -> std::optional<double>;

auto getNearbyLaneletIds(
const geometry_msgs::msg::Point &, const double distance_threshold,
const bool include_crosswalk, const std::size_t search_count = 5) const -> lanelet::Ids;
Expand Down Expand Up @@ -213,12 +177,6 @@ class HdMapUtils
traffic_simulator::RoutingConfiguration().routing_graph_type) const
-> double;

auto getStopLineIds() const -> lanelet::Ids;

auto getStopLineIdsOnPath(const lanelet::Ids & route_lanelets) const -> lanelet::Ids;

auto getStopLinePolygon(const lanelet::Id) const -> std::vector<geometry_msgs::msg::Point>;

auto getTangentVector(const lanelet::Id, const double s) const
-> std::optional<geometry_msgs::msg::Vector3>;

Expand Down Expand Up @@ -350,10 +308,6 @@ class HdMapUtils
const traffic_simulator::lane_change::TrajectoryShape,
const double tangent_vector_size = 100) const -> math::geometry::HermiteCurve;

auto getStopLines() const -> lanelet::ConstLineStrings3d;

auto getStopLinesOnPath(const lanelet::Ids &) const -> lanelet::ConstLineStrings3d;

auto getTrafficLightRegulatoryElementsOnPath(const lanelet::Ids &) const
-> std::vector<std::shared_ptr<const lanelet::autoware::AutowareTrafficLight>>;

Expand Down
Loading
Loading