-
Notifications
You must be signed in to change notification settings - Fork 1.6k
No need to spam the logs #5674
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
No need to spam the logs #5674
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests.
... and 16 files with indirect coverage changes 🚀 New features to boost your workflow:
|
14b02ec to
e6f9f55
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I generally agree with you, but I don't love exposing ROS at increasingly lower levels than already done so. There's only a single log that is using the throttle and its in a situation that should, practically speaking, never happen except in a poor situation.
Can you provide some motivating feedback about why you're seeing so much logging like this that a change like this is necessary -- and the cause of the error cannot be fixed?
Sorry for the delay - ROSCon + vacation and all that jazz 😄
| } | ||
|
|
||
| LayeredCostmap::LayeredCostmap(std::string global_frame, bool rolling_window, bool track_unknown) | ||
| : LayeredCostmap(rclcpp::get_logger("nav2_costmap_2d"), rclcpp::Clock{RCL_ROS_TIME}, global_frame, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think there's a sane default for the clock type like this. I think this needs to always be a real clock if a clock is used. That's an argument - to me - to change the constructor of LayeredCostmap to have the clock/logger fields at the end in the existing constructor rather than adding a new one. If we're adding it, make it strictly required since there's no sane workaround.
Yes, that was my original feeling as well. So we might as well leave this PR to it's first commit?
It can and it's already fixed. But the terminal output was scrolling up fast so I had to scroll a lot to get to the rootcause 😄 I don't feel strongly about this PR. But in general I don't like log spams so I fixed it. We can A) Drag in the logger and the clock. |
I like this one. Lets just do this. With my long term planning surrounding costmaps, I don't want to invest too much time in Costmap2D but I also don't want to muddle it up more than it already is 😆 |
Signed-off-by: Tim Clephas <[email protected]>
|
@Timple, your PR has failed to build. Please check CI outputs and resolve issues. |
This pushes out all other logs. I think once every 5 seconds is enough to catch the eye.