Skip to content

Commit

Permalink
Improves logging, fixes #94. (#41)
Browse files Browse the repository at this point in the history
  • Loading branch information
damonkohler committed Oct 11, 2016
1 parent 045f6a7 commit 8f5fc98
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions cartographer/common/ordered_multi_queue.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ class OrderedMultiQueue {
auto* queue = FindOrNull(queue_key);
if (queue == nullptr) {
// TODO(damonkohler): This will not work for every value of "queue_key".
LOG_EVERY_N(WARNING, 60) << "Ignored value for queue: '" << queue_key
<< "'";
LOG_EVERY_N(WARNING, 1000) << "Ignored value for queue: '" << queue_key
<< "'";
return;
}
queue->queue.Push(
Expand Down
5 changes: 3 additions & 2 deletions cartographer/mapping_3d/motion_filter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,9 @@ MotionFilter::MotionFilter(const proto::MotionFilterOptions& options)

bool MotionFilter::IsSimilar(const common::Time time,
const transform::Rigid3d& pose) {
LOG_EVERY_N(INFO, 500) << "Motion filter reduced the number of scans to "
<< 100. * num_different_ / num_total_ << "%.";
LOG_IF_EVERY_N(INFO, num_total_ >= 500, 500)
<< "Motion filter reduced the number of scans to "
<< 100. * num_different_ / num_total_ << "%.";
++num_total_;
if (num_total_ > 1 &&
time - last_time_ <= common::FromSeconds(options_.max_time_seconds()) &&
Expand Down

0 comments on commit 8f5fc98

Please sign in to comment.