Skip to content

Commit

Permalink
feat(goal_planner): cut stop path to goal (#9829)
Browse files Browse the repository at this point in the history
Signed-off-by: kosuke55 <[email protected]>
  • Loading branch information
kosuke55 authored Jan 10, 2025
1 parent 23a7764 commit 00892a1
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1671,7 +1671,10 @@ PathWithLaneId GoalPlannerModule::generateStopPath(
const auto reference_path = std::invoke([&]() -> PathWithLaneId {
const auto s_current = lanelet::utils::getArcCoordinates(current_lanes, current_pose).length;
const double s_start = std::max(0.0, s_current - common_parameters.backward_path_length);
const double s_end = s_current + common_parameters.forward_path_length;
const double s_end = std::clamp(
lanelet::utils::getArcCoordinates(current_lanes, route_handler->getGoalPose()).length,
s_current + std::numeric_limits<double>::epsilon(),
s_current + common_parameters.forward_path_length);
return route_handler->getCenterLinePath(current_lanes, s_start, s_end, true);
});

Expand Down

0 comments on commit 00892a1

Please sign in to comment.