Skip to content

Commit

Permalink
rename function
Browse files Browse the repository at this point in the history
Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>
  • Loading branch information
zulfaqar-azmi-t4 committed Aug 14, 2024
1 parent e2be56d commit a27ae47
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ double calc_dist_from_pose_to_terminal_end(
const Pose & src_pose);

/**
* @brief Calculates the backward buffer distance required for safe lane changing.
* @brief Calculates the minimum stopping distance to terminal start.
*
* This function computes the minimum required backward buffer distance based on the
* This function computes the minimum stopping distance to terminal start based on the
* minimum lane changing velocity and the minimum longitudinal acceleration. It then
* compares this calculated distance with a pre-defined backward length buffer parameter
* and returns the larger of the two values to ensure safe lane changing.
Expand All @@ -57,7 +57,7 @@ double calc_dist_from_pose_to_terminal_end(
*
* @return The required backward buffer distance in meters.
*/
double calc_backward_buffer(const LCParamPtr & lc_param_ptr);
double calc_stopping_distance(const LCParamPtr & lc_param_ptr);
} // namespace autoware::behavior_path_planner::utils::lane_change::calculation

#endif // AUTOWARE__BEHAVIOR_PATH_LANE_CHANGE_MODULE__UTILS__CALCULATION_HPP_
Original file line number Diff line number Diff line change
Expand Up @@ -783,7 +783,7 @@ bool NormalLaneChange::is_near_terminal() const
const auto min_lane_changing_distance = calcMinimumLaneChangeLength(

Check warning on line 783 in planning/behavior_path_planner/autoware_behavior_path_lane_change_module/src/scene.cpp

View check run for this annotation

Codecov / codecov/patch

planning/behavior_path_planner/autoware_behavior_path_lane_change_module/src/scene.cpp#L780-L783

Added lines #L780 - L783 were not covered by tests
route_handler_ptr, current_lanes_terminal, *lc_param_ptr, direction);

const auto backward_buffer = calculation::calc_backward_buffer(lc_param_ptr);
const auto backward_buffer = calculation::calc_stopping_distance(lc_param_ptr);

Check warning on line 786 in planning/behavior_path_planner/autoware_behavior_path_lane_change_module/src/scene.cpp

View check run for this annotation

Codecov / codecov/patch

planning/behavior_path_planner/autoware_behavior_path_lane_change_module/src/scene.cpp#L786

Added line #L786 was not covered by tests

const auto min_lc_dist_with_buffer =
backward_buffer + min_lane_changing_distance + lc_param_ptr->lane_change_finish_judge_buffer;

Check warning on line 789 in planning/behavior_path_planner/autoware_behavior_path_lane_change_module/src/scene.cpp

View check run for this annotation

Codecov / codecov/patch

planning/behavior_path_planner/autoware_behavior_path_lane_change_module/src/scene.cpp#L789

Added line #L789 was not covered by tests
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ double calc_dist_from_pose_to_terminal_end(
return utils::getDistanceToEndOfLane(src_pose, lanes);
}

double calc_backward_buffer(const LCParamPtr & lc_param_ptr)
double calc_stopping_distance(const LCParamPtr & lc_param_ptr)

Check warning on line 47 in planning/behavior_path_planner/autoware_behavior_path_lane_change_module/src/utils/calculation.cpp

View check run for this annotation

Codecov / codecov/patch

planning/behavior_path_planner/autoware_behavior_path_lane_change_module/src/utils/calculation.cpp#L47

Added line #L47 was not covered by tests
{
// v^2 = u^2 + 2ad
const auto min_lc_vel = lc_param_ptr->minimum_lane_changing_velocity;
Expand Down

0 comments on commit a27ae47

Please sign in to comment.