Skip to content

Commit

Permalink
fix(behavior_path_planner): fix pull out length to lane end (autoware…
Browse files Browse the repository at this point in the history
…foundation#2692)

Signed-off-by: kosuke55 <[email protected]>

Signed-off-by: kosuke55 <[email protected]>
Signed-off-by: Alexey Panferov <[email protected]>
  • Loading branch information
kosuke55 authored and lexavtanke committed Jan 31, 2023
1 parent 22ec3f9 commit a4e4677
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -557,8 +557,10 @@ std::vector<Pose> PullOutModule::searchBackedPoses()
// check the back pose is near the lane end
const double length_to_backed_pose =
lanelet::utils::getArcCoordinates(status_.pull_out_lanes, *backed_pose).length;
const double length_to_lane_end =
lanelet::utils::getLaneletLength2d(status_.pull_out_lanes.back());
double length_to_lane_end = 0.0;
for (const auto & lane : status_.pull_out_lanes) {
length_to_lane_end += lanelet::utils::getLaneletLength2d(lane);
}
const double distance_from_lane_end = length_to_lane_end - length_to_backed_pose;
if (distance_from_lane_end < parameters_.ignore_distance_from_lane_end) {
RCLCPP_WARN_THROTTLE(
Expand Down

0 comments on commit a4e4677

Please sign in to comment.