Skip to content

Commit

Permalink
fix: change remaning distance when the size of route is 1 (autowarefo…
Browse files Browse the repository at this point in the history
…undation#8852)

Signed-off-by: shulanbushangshu <[email protected]>
  • Loading branch information
shulanbushangshu authored Oct 30, 2024
1 parent e58a158 commit f3886e8
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,9 @@ void RemainingDistanceTimeCalculatorNode::calculate_remaining_distance()

for (auto & llt : remaining_shortest_path) {
if (remaining_shortest_path.size() == 1) {
remaining_distance_ += autoware::universe_utils::calcDistance2d(
current_vehicle_pose_.position, goal_pose_.position);
auto arc_coord_cur = lanelet::utils::getArcCoordinates({llt}, current_vehicle_pose_);
auto arc_coord_goal = lanelet::utils::getArcCoordinates({llt}, goal_pose_);
remaining_distance_ += arc_coord_goal.length - arc_coord_cur.length;
break;
}

Expand Down

0 comments on commit f3886e8

Please sign in to comment.