Skip to content

Commit

Permalink
avoid adjusting thresholds if success history size is 0
Browse files Browse the repository at this point in the history
  • Loading branch information
rsoussan committed Jul 2, 2024
1 parent 07e874a commit 4a29e63
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion astrobee/config/localization.config
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ brisk_too_many_ratio = 1.25
brisk_too_few_ratio = 0.8
brisk_detection_retries = 1
-- Localizer Threshold Params
brisk_success_history_size = 10
brisk_success_history_size = 0
brisk_min_success_rate = 0
brisk_max_success_rate = 1
brisk_adjust_num_similar = false
Expand Down
1 change: 1 addition & 0 deletions localization/localization_node/src/localization.cc
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ bool Localizer::Localize(cv_bridge::CvImageConstPtr image_ptr, ff_msgs::VisualLa
}

void Localizer::AdjustThresholds() {
if (successes_.size() == 0 || params_.success_history_size == 0) return;
if (successes_.size() < params_.success_history_size) return;
while (successes_.size() > params_.success_history_size) {
successes_.pop_front();
Expand Down

0 comments on commit 4a29e63

Please sign in to comment.