-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
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 <tim.clephas@nobleo.nl>
|
@Timple, your PR has failed to build. Please check CI outputs and resolve issues. |
Signed-off-by: Tim Clephas <tim.clephas@nobleo.nl>
Signed-off-by: Tim Clephas <tim.clephas@nobleo.nl> Signed-off-by: Decwest <fumiyaonishi1016@gmail.com>
Signed-off-by: Tim Clephas <tim.clephas@nobleo.nl>
* No need to spam the logs (#5674) Signed-off-by: Tim Clephas <tim.clephas@nobleo.nl> * Conditionally call onLoop based on node status (#5700) Signed-off-by: Steve Macenski <stevenmacenski@gmail.com> * Allow for no progress checkers to be configured (#5701) Signed-off-by: SteveMacenski <stevenmacenski@gmail.com> * Fix: wait for drive_on_heading_client instead of backup_client (#5724) The basic navigator was waiting for the backup_client in the driveOnHeading function. Signed-off-by: agennart <antoine.gennart@quimesis.be> Co-authored-by: agennart <antoine.gennart@quimesis.be> * Fix: reset controller_server loop_rate when missed desired rate #5712 (#5723) When a single iteration takes longer than the expected period, this impacts the next iterations behavior since they will have less time to perform the control logic, thus increasing the actual controller_frequency. By resetting the loop_rate on sleep() failure, this ensures that each iteration will have a full period to exectue its logic. Signed-off-by: agennart <antoine.gennart@quimesis.be> Co-authored-by: agennart <antoine.gennart@quimesis.be> * temporary fix bug null pointer (#5749) * temporary fix bug null pointer Signed-off-by: suifengersan123 <yangabc810@gmail.com> * add return Signed-off-by: suifengersan123 <yangabc810@gmail.com> * remove return Signed-off-by: suifengersan123 <yangabc810@gmail.com> --------- Signed-off-by: suifengersan123 <yangabc810@gmail.com> * fix: change warning to exception when goal poses cannot be transformed (#5759) - Replace RCLCPP_WARN with std::runtime_error exception in onPreempt method - Remove bt_action_server_->terminatePendingGoal() call after accepting goal - Add required stdexcept include for exception handling Fixes issue where navigators accept pending goal but are not properly terminated if rejected during goal pose transformation. Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com> * Update obstacle layer usage of max ranges (#5697) * Use cell distance for obstacle marking max range Signed-off-by: Simon Dathan <simon.dathan@kudan.eu> * Don't raytrace clear the cell containing the current observation Signed-off-by: Simon Dathan <simon.dathan@kudan.eu> * Add tests for max marking and clearing ranges Signed-off-by: Simon Dathan <simon.dathan@kudan.eu> * Fix cpplint failures Signed-off-by: Simon Dathan <simon.dathan@kudan.eu> * Fix distance calculation Signed-off-by: Simon Dathan <simon.dathan@kudan.eu> * fix casting, formatting Signed-off-by: Simon Dathan <simon.dathan@kudan.eu> * check origin is in map, update CMakeLists Signed-off-by: Simon Dathan <simon.dathan@kudan.eu> * use hypot instead of squared dist Signed-off-by: Simon Dathan <simon.dathan@kudan.eu> * Move origin calc out of loop Signed-off-by: Simon Dathan <simon.dathan@kudan.eu> * Revert don't raytrace observation cell Signed-off-by: Simon Dathan <simon.dathan@kudan.eu> * Revert don't raytrace origin if it is observation cell Signed-off-by: Simon Dathan <simon.dathan@kudan.eu> * Remove new line Signed-off-by: Simon Dathan <simon.dathan@kudan.eu> --------- Signed-off-by: Simon Dathan <simon.dathan@kudan.eu> * [mppi] Don't reset zone-based speed limits (#5768) * [mppi] Don't reset zone-based speed limits Signed-off-by: Adi Vardi <adi.vardi@enway.ai> * [mppi] update motion model params from speed_limit Signed-off-by: Adi Vardi <adi.vardi@enway.ai> * fix linting issue Signed-off-by: Adi Vardi <adi.vardi@enway.ai> * Revert: reset speed limits after param change Signed-off-by: Adi Vardi <adi.vardi@enway.ai> --------- Signed-off-by: Adi Vardi <adi.vardi@enway.ai> * Bugfix inactive publishers (#5748) * Do not publish costmap unless active Signed-off-by: Christopher Thompson <cthompson@metalsharkboats.com> * Fix style Signed-off-by: Christopher Thompson <cthompson@metalsharkboats.com> * Fix typo Signed-off-by: Christopher Thompson <cthompson@metalsharkboats.com> * Use layers isEnabled() to prevent publishing Signed-off-by: Christopher Thompson <cthompson@metalsharkboats.com> * Fix style Signed-off-by: Christopher Thompson <cthompson@metalsharkboats.com> * Add missing include for CostmapLayer type Signed-off-by: Christopher Thompson <cthompson@metalsharkboats.com> * Remove extra scoping Signed-off-by: Christopher Thompson <cthompson@metalsharkboats.com> --------- Signed-off-by: Christopher Thompson <cthompson@metalsharkboats.com> Co-authored-by: Christopher Thompson <cthompson@metalsharkboats.com> * Fix MAX_NON_OBSTACLE_COST in theta star planner (#5865) Signed-off-by: mini-1235 <mauricepurnawan@gmail.com> * Bump jazzy to 1.3.11 for release Signed-off-by: SteveMacenski <stevenmacenski@gmail.com> --------- Signed-off-by: Tim Clephas <tim.clephas@nobleo.nl> Signed-off-by: Steve Macenski <stevenmacenski@gmail.com> Signed-off-by: SteveMacenski <stevenmacenski@gmail.com> Signed-off-by: agennart <antoine.gennart@quimesis.be> Signed-off-by: suifengersan123 <yangabc810@gmail.com> Signed-off-by: Simon Dathan <simon.dathan@kudan.eu> Signed-off-by: Adi Vardi <adi.vardi@enway.ai> Signed-off-by: Christopher Thompson <cthompson@metalsharkboats.com> Signed-off-by: mini-1235 <mauricepurnawan@gmail.com> Co-authored-by: Tim Clephas <tim.clephas@nobleo.nl> Co-authored-by: Saitama <gennartan@users.noreply.github.com> Co-authored-by: agennart <antoine.gennart@quimesis.be> Co-authored-by: suifengersan123 <136066397+suifengersan123@users.noreply.github.com> Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com> Co-authored-by: Simon Dathan <simon.dathan@kudan.eu> Co-authored-by: Adi Vardi <57910756+adivardi@users.noreply.github.com> Co-authored-by: Christopher Thompson <pele1410@gmail.com> Co-authored-by: Christopher Thompson <cthompson@metalsharkboats.com> Co-authored-by: Maurice Alexander Purnawan <mauricepurnawan@gmail.com>
This pushes out all other logs. I think once every 5 seconds is enough to catch the eye.