Skip to content

Commit

Permalink
fix(behavior_path_planner): fix geometric pull out lane id for overla…
Browse files Browse the repository at this point in the history
…pping (autowarefoundation#2828) (autowarefoundation#274)

Signed-off-by: kosuke55 <kosuke.tnp@gmail.com>
  • Loading branch information
kosuke55 authored Mar 3, 2023
1 parent ec86e6a commit d9ffc5f
Showing 1 changed file with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,16 @@ std::vector<PathWithLaneId> GeometricParallelParking::planOneTrial(
}

// combine road and shoulder lanes
lanelet::ConstLanelets lanes = road_lanes;
// cut the road lanes up to start_pose to prevent unintended processing for overlapped lane
lanelet::ConstLanelets lanes{};
tier4_autoware_utils::Point2d start_point2d(start_pose.position.x, start_pose.position.y);
for (const auto & lane : road_lanes) {
if (boost::geometry::within(start_point2d, lane.polygon2d().basicPolygon())) {
lanes.push_back(lane);
break;
}
lanes.push_back(lane);
}
lanes.insert(lanes.end(), shoulder_lanes.begin(), shoulder_lanes.end());

// If start_pose is parallel to goal_pose, we can know lateral deviation of edges of vehicle,
Expand Down

0 comments on commit d9ffc5f

Please sign in to comment.