@@ -846,8 +846,7 @@ std::vector<PullOverPath> GoalPlannerModule::sortPullOverPathCandidatesByGoalPri
846
846
847
847
std::optional<std::pair<PullOverPath, GoalCandidate>> GoalPlannerModule::selectPullOverPath (
848
848
const std::vector<PullOverPath> & pull_over_path_candidates,
849
- const GoalCandidates & goal_candidates, const std::vector<double > & reference_path_directions,
850
- const double collision_check_margin) const
849
+ const GoalCandidates & goal_candidates, const double collision_check_margin) const
851
850
{
852
851
for (const auto & pull_over_path : pull_over_path_candidates) {
853
852
// check if goal is safe
@@ -860,7 +859,7 @@ std::optional<std::pair<PullOverPath, GoalCandidate>> GoalPlannerModule::selectP
860
859
continue ;
861
860
}
862
861
863
- if (!hasEnoughDistance (pull_over_path, reference_path_directions )) {
862
+ if (!hasEnoughDistance (pull_over_path)) {
864
863
continue ;
865
864
}
866
865
@@ -1187,13 +1186,8 @@ BehaviorModuleOutput GoalPlannerModule::planPullOverAsOutput()
1187
1186
thread_safe_data_.get_pull_over_path_candidates (), goal_candidates);
1188
1187
1189
1188
// select pull over path which is safe against static objects and get it's goal
1190
- std::vector<double > reference_path_directions;
1191
- for (const auto & point : getPreviousModuleOutput ().path .points ) {
1192
- reference_path_directions.push_back (
1193
- tf2::getYaw (tier4_autoware_utils::getPose (point).orientation ));
1194
- }
1195
1189
const auto path_and_goal_opt = selectPullOverPath (
1196
- pull_over_path_candidates, goal_candidates, reference_path_directions,
1190
+ pull_over_path_candidates, goal_candidates,
1197
1191
parameters_->object_recognition_collision_check_hard_margins .back ());
1198
1192
1199
1193
// update thread_safe_data_
@@ -1717,8 +1711,7 @@ bool GoalPlannerModule::checkObjectsCollision(
1717
1711
return utils::path_safety_checker::checkPolygonsIntersects (ego_polygons_expanded, obj_polygons);
1718
1712
}
1719
1713
1720
- bool GoalPlannerModule::hasEnoughDistance (
1721
- const PullOverPath & pull_over_path, const std::vector<double > & reference_path_directions) const
1714
+ bool GoalPlannerModule::hasEnoughDistance (const PullOverPath & pull_over_path) const
1722
1715
{
1723
1716
const Pose & current_pose = planner_data_->self_odometry ->pose .pose ;
1724
1717
const double current_vel = planner_data_->self_odometry ->twist .twist .linear .x ;
@@ -1728,23 +1721,6 @@ bool GoalPlannerModule::hasEnoughDistance(
1728
1721
// so need enough distance to restart.
1729
1722
// distance to restart should be less than decide_path_distance.
1730
1723
// otherwise, the goal would change immediately after departure.
1731
-
1732
- // reject outdated shift path on curved roads whose start pose direction is far from ego yaw
1733
- const double pull_over_path_start_direction = tf2::getYaw (pull_over_path.start_pose .orientation );
1734
- const bool isFollowableDirection = [&]() {
1735
- for (const auto reference_path_direction : reference_path_directions) {
1736
- if (
1737
- std::fabs (tier4_autoware_utils::normalizeRadian (
1738
- pull_over_path_start_direction - reference_path_direction)) < M_PI / 2 ) {
1739
- return true ;
1740
- }
1741
- }
1742
- return false ;
1743
- }();
1744
- if (!isFollowableDirection) {
1745
- return false ;
1746
- }
1747
-
1748
1724
const bool is_separated_path = pull_over_path.partial_paths .size () > 1 ;
1749
1725
const double distance_to_start = calcSignedArcLength (
1750
1726
pull_over_path.getFullPath ().points , current_pose.position , pull_over_path.start_pose .position );
0 commit comments