Skip to content
This repository was archived by the owner on May 31, 2025. It is now read-only.

suppress sequential identical messages#1309

Merged
dirk-thomas merged 4 commits intoros:melodic-develfrom
locusrobotics:rospy_throttle_identical_logs
May 18, 2018
Merged

suppress sequential identical messages#1309
dirk-thomas merged 4 commits intoros:melodic-develfrom
locusrobotics:rospy_throttle_identical_logs

Conversation

@davelkan-zz
Copy link
Copy Markdown
Contributor

Frequently nodes will spam messages that unhelpfully fill up logs. recently throttling by period was added to python to help reduce this spam, but sometimes simply throttling by period will suppress new information when your log is not static. I am proposing the inclusion of a throttler that will filter out identical sequential messages to help reduce log spam when desired.

the LoggingIdentical class is set up similarly to existing LoggingThrottle class and plays nicely with throttling by period. Filtering out sequential identical logs is triggered by setting kwarg logger_throttle_identical to true. When this flag is set a given log will publish if
a) the new message is not identical to previous message
or
b) throttle by period is set and throttle period has elapsed.

@dirk-thomas
Copy link
Copy Markdown
Member

Please provide test coverage for the new feature.

@davelkan-zz
Copy link
Copy Markdown
Contributor Author

davelkan-zz commented Apr 17, 2018

@dirk-thomas Tests added, tested locally with great success. Let me know if there are any further changes required. Sorry for the delay.

@davelkan-zz davelkan-zz closed this May 2, 2018
@davelkan-zz davelkan-zz reopened this May 2, 2018
@davelkan-zz
Copy link
Copy Markdown
Contributor Author

kicking build farm

@davelkan-zz
Copy link
Copy Markdown
Contributor Author

@dirk-thomas build failures occuring appear unrelated to my pr. Is there a separate issue going on?

@dirk-thomas dirk-thomas changed the base branch from lunar-devel to melodic-devel May 18, 2018 22:10
@dirk-thomas
Copy link
Copy Markdown
Member

Ignoring the Lunar CI result since this patch is now targeting melodic-devel.

@dirk-thomas
Copy link
Copy Markdown
Member

Thank you for the patch. Please add documentation to the wiki page for this new feature and post a link to the changes here for future readers to find it.

@dirk-thomas dirk-thomas merged commit 60be250 into ros:melodic-devel May 18, 2018
@leviathan747
Copy link
Copy Markdown

Is this in a melodic release and did documentation ever get written?

@dirk-thomas
Copy link
Copy Markdown
Member

@leviathan747 When you click on the above merge commit 60be250 you will see that it has been released as of 1.14.0 (which was around May 2018).

I will let @davelkan respond to the documentation question.

@AadityaRavindran AadityaRavindran deleted the rospy_throttle_identical_logs branch April 4, 2025 01:27
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants