Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(goal_planner): cut stop path to goal #9829

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2021 Tier IV, Inc.

Check notice on line 1 in planning/behavior_path_planner/autoware_behavior_path_goal_planner_module/src/goal_planner_module.cpp

View check run for this annotation

CodeScene Delta Analysis / CodeScene Cloud Delta Analysis (main)

ℹ Getting worse: Lines of Code in a Single File

The lines of code increases from 1878 to 1881, improve code health by reducing it to 1000. The number of Lines of Code in a single file. More Lines of Code lowers the code health.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -1673,7 +1673,10 @@
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);

Check warning on line 1679 in planning/behavior_path_planner/autoware_behavior_path_goal_planner_module/src/goal_planner_module.cpp

View check run for this annotation

CodeScene Delta Analysis / CodeScene Cloud Delta Analysis (main)

❌ Getting worse: Complex Method

GoalPlannerModule::generateStopPath already has high cyclomatic complexity, and now it increases in Lines of Code from 72 to 75. This function has many conditional statements (e.g. if, for, while), leading to lower code health. Avoid adding more conditionals and code to it without refactoring.

Check warning on line 1679 in planning/behavior_path_planner/autoware_behavior_path_goal_planner_module/src/goal_planner_module.cpp

View check run for this annotation

Codecov / codecov/patch

planning/behavior_path_planner/autoware_behavior_path_goal_planner_module/src/goal_planner_module.cpp#L1677-L1679

Added lines #L1677 - L1679 were not covered by tests
return route_handler->getCenterLinePath(current_lanes, s_start, s_end, true);
});

Expand Down
Loading