Skip to content

Commit

Permalink
fix check algorithm
Browse files Browse the repository at this point in the history
  • Loading branch information
ismetatabay committed Nov 24, 2022
1 parent 390beac commit 387285f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,6 @@ class AvoidanceModule : public SceneModuleInterface
// for raw_shift_line registration
AvoidLineArray registered_raw_shift_lines_;
AvoidLineArray current_raw_shift_lines_;
AvoidLineArray init_raw_shift_lines_;
void registerRawShiftLines(const AvoidLineArray & future_registered);
void updateRegisteredRawShiftLines();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,8 @@ bool AvoidanceModule::isAvoidanceManeuverRunning() const
{
const auto path_idx = avoidance_data_.ego_closest_path_index;

for (const auto & al : init_raw_shift_lines_) {
if (path_idx > al.start_idx) {
for (const auto & al : registered_raw_shift_lines_) {
if (path_idx > al.start_idx || registered_raw_shift_lines_.size() == 1) {
return true;
}
}
Expand Down Expand Up @@ -546,7 +546,6 @@ void AvoidanceModule::registerRawShiftLines(const AvoidLineArray & future)
}
}

init_raw_shift_lines_ = registered_raw_shift_lines_;
DEBUG_PRINT("registered object size: %lu -> %lu", old_size, registered_raw_shift_lines_.size());
}

Expand Down

0 comments on commit 387285f

Please sign in to comment.