ethz-asl / wavemap

Fast, efficient and accurate multi-resolution, multi-sensor 3D occupancy mapping
https://ethz-asl.github.io/wavemap/
BSD 3-Clause "New" or "Revised" License
434 stars 38 forks source link

Config option to suppress debug output #36

Closed astumpf closed 11 months ago

astumpf commented 1 year ago

Context When running Wavemap we are seeing a lot of output spam

INFO|1695678518.782757590|/wavemap|ros.wavemap_ros: Integrated new pointcloud in 0.00649134s. Total integration time: 12.584s.
INFO|1695678518.826786662|/wavemap|ros.wavemap_ros: Inserting pointcloud with 28800 points. Remaining pointclouds in queue: 0.
INFO|1695678518.833032240|/wavemap|ros.wavemap_ros: Integrated new pointcloud in 0.00619076s. Total integration time: 12.5902s.
INFO|1695678518.976278673|/wavemap|ros.wavemap_ros: Inserting pointcloud with 28800 points. Remaining pointclouds in queue: 0.

Requested feature

Add an option to suppress any debug messages such as those:

https://github.com/ethz-asl/wavemap/blob/7fd41f70ea260e2ecfe379383caaf3bfab024b56/ros/wavemap_ros/src/input_handler/pointcloud_input_handler.cc#L230

https://github.com/ethz-asl/wavemap/blob/7fd41f70ea260e2ecfe379383caaf3bfab024b56/ros/wavemap_ros/src/input_handler/pointcloud_input_handler.cc#L239

(Optional) Suggest a solution Extend the config field by a new bool to enable debug output.

https://github.com/ethz-asl/wavemap/blob/7fd41f70ea260e2ecfe379383caaf3bfab024b56/ros/wavemap_ros/src/input_handler/pointcloud_input_handler.cc#L9

victorreijgwart commented 1 year ago

Hi Alexander, thanks for filing this feature request. I'll go through wavemap's logging messages and add more verbosity controls later this week.

For a temporary fix, it should be possible to reduce spam by setting the logger levels to only emit warnings and higher. Note that wavemap's ROS wrapper uses ROS's native logging but the libraries use GLOG (since they're ROS agnostic), so it's necessary to set both. To configure

victorreijgwart commented 1 year ago

PR #37 adds an option to set the logging level under:

map:
  general: 
    logging_level: info

The options are debug, info, warning, error, and fatal. I lowered the severity for the timing-related messages such that they only show up when the level is set to debug. This way wavemap is already relatively quiet when running at the default info level. Let me know if this solves your issue.

astumpf commented 11 months ago

So logging_level: info is already default? I've tested that version and even without any changes on my config I didn't get any "spam" prints anymore.

victorreijgwart commented 11 months ago

Yes, info is the default level. Great. Then I'll close this issue.