Skip to content

Commit

Permalink
fix speling
Browse files Browse the repository at this point in the history
Signed-off-by: Yuki Takagi <[email protected]>
  • Loading branch information
yuki-takagi-66 committed Mar 13, 2024
1 parent d5d089e commit 055e68c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -357,9 +357,9 @@ class DynamicAvoidanceModule : public SceneModuleInterface
ObjectBehaviorType getLabelAsTargetObstacle(const uint8_t label) const;
void registerLaneDriveObjects(const std::vector<DynamicAvoidanceObject> & prev_objects);
void registerFreeRunObjects(const std::vector<DynamicAvoidanceObject> & prev_objects);
void determineWheterToAvoidAgainstLaneDriveObjects(
void determineWhetherToAvoidAgainstLaneDriveObjects(
const std::vector<DynamicAvoidanceObject> & prev_objects);
void determineWheterToAvoidAgainstFreeRunObjects(
void determineWhetherToAvoidAgainstFreeRunObjects(
const std::vector<DynamicAvoidanceObject> & prev_objects);
LatFeasiblePaths generateLateralFeasiblePaths(
const geometry_msgs::msg::Pose & ego_pose, const double ego_vel) const;
Expand Down
8 changes: 4 additions & 4 deletions planning/behavior_path_dynamic_avoidance_module/src/scene.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -353,8 +353,8 @@ void DynamicAvoidanceModule::updateData()
target_objects_manager_.finalize(ego_lat_feasible_paths);

// 2. Precise filtering of target objects and check if they should be avoided
determineWheterToAvoidAgainstLaneDriveObjects(prev_objects);
determineWheterToAvoidAgainstFreeRunObjects(prev_objects);
determineWhetherToAvoidAgainstLaneDriveObjects(prev_objects);
determineWhetherToAvoidAgainstFreeRunObjects(prev_objects);

const auto target_objects_candidate = target_objects_manager_.getValidObjects();
target_objects_.clear();
Expand Down Expand Up @@ -640,7 +640,7 @@ void DynamicAvoidanceModule::registerFreeRunObjects(
}
}

Check warning on line 641 in planning/behavior_path_dynamic_avoidance_module/src/scene.cpp

View check run for this annotation

CodeScene Delta Analysis / CodeScene Cloud Delta Analysis (main)

❌ New issue: Complex Method

DynamicAvoidanceModule::registerFreeRunObjects has a cyclomatic complexity of 15, threshold = 9. 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 641 in planning/behavior_path_dynamic_avoidance_module/src/scene.cpp

View check run for this annotation

CodeScene Delta Analysis / CodeScene Cloud Delta Analysis (main)

❌ New issue: Bumpy Road Ahead

DynamicAvoidanceModule::registerFreeRunObjects has 2 blocks with nested conditional logic. Any nesting of 2 or deeper is considered. Threshold is one single, nested block per function. The Bumpy Road code smell is a function that contains multiple chunks of nested conditional logic. The deeper the nesting and the more bumps, the lower the code health.

void DynamicAvoidanceModule::determineWheterToAvoidAgainstLaneDriveObjects(
void DynamicAvoidanceModule::determineWhetherToAvoidAgainstLaneDriveObjects(
const std::vector<DynamicAvoidanceObject> & prev_objects)
{
const auto & input_path = getPreviousModuleOutput().path;
Expand Down Expand Up @@ -799,7 +799,7 @@ void DynamicAvoidanceModule::determineWheterToAvoidAgainstLaneDriveObjects(
// prev_input_ref_path_points_ = input_ref_path_points;
}

Check warning on line 800 in planning/behavior_path_dynamic_avoidance_module/src/scene.cpp

View check run for this annotation

CodeScene Delta Analysis / CodeScene Cloud Delta Analysis (main)

❌ New issue: Complex Method

DynamicAvoidanceModule::determineWhetherToAvoidAgainstLaneDriveObjects has a cyclomatic complexity of 30, threshold = 9. 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 800 in planning/behavior_path_dynamic_avoidance_module/src/scene.cpp

View check run for this annotation

CodeScene Delta Analysis / CodeScene Cloud Delta Analysis (main)

❌ New issue: Bumpy Road Ahead

DynamicAvoidanceModule::determineWhetherToAvoidAgainstLaneDriveObjects has 2 blocks with nested conditional logic. Any nesting of 2 or deeper is considered. Threshold is one single, nested block per function. The Bumpy Road code smell is a function that contains multiple chunks of nested conditional logic. The deeper the nesting and the more bumps, the lower the code health.

void DynamicAvoidanceModule::determineWheterToAvoidAgainstFreeRunObjects(
void DynamicAvoidanceModule::determineWhetherToAvoidAgainstFreeRunObjects(
const std::vector<DynamicAvoidanceObject> & prev_objects)
{
const auto & input_path = getPreviousModuleOutput().path;
Expand Down

0 comments on commit 055e68c

Please sign in to comment.