-
Notifications
You must be signed in to change notification settings - Fork 197
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
Suppress spam from calling canTransform #529
Conversation
Signed-off-by: Gonzalo de Pedro <[email protected]>
Do you mind also updating these other calls (from my other comment #502 (comment)): geometry2/tf2_ros/src/buffer.cpp Line 94 in ef2dd14
geometry2/tf2_ros/src/buffer.cpp Line 117 in ef2dd14
|
The user has few options to workaround potential console spam from canTransform. If we want, it would be better to update the API to optional return the error string. Signed-off-by: Jacob Perron <[email protected]>
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.
Not to derail this, but I will point out that suppressing these error messages unconditionally basically constitutes a large behavior change in tf2_ros from previous versions. It also means that we won't get notified of real errors in the tf2 tree (like loops).
I'm not quite sure what we want to do here. Maybe it would be a better idea to rate-limit this instead of suppressing it completely, as we are going to be losing a lot of debugging information this way.
The code is a bit tangled, but I think these are the two behavior changes caused by this PR:
Correct me if I'm wrong, but I don't think (1) is disagreeable. Regarding (2), the code is a bit hard to follow, but in both the previous and current behavior an exception is thrown from geometry2/tf2/src/buffer_core.cpp Lines 124 to 145 in 51a7f24
called from lookupTransform's implementation: geometry2/tf2/src/buffer_core.cpp Lines 654 to 655 in 51a7f24
The only difference this PR introduces is that we don't get the (more or less) same message repeated to the console before the exception ultimately occurs. AFAICT, we're only calling I agree that the underlying issue of |
If I'm not mistaken, this change doesn't hide errors in the TF tree since |
@clalancette friendly ping 🙂 |
Agreed, this is desirable. The part of the patch that changes
And now looking at it in more detail, I agree with you. So with all of that said, I'm going to approve this. Thanks for the detailed explanation on what is going on here. |
@jacobperron |
* suppress spam in canTransform * Uncrustify Signed-off-by: Gonzalo de Pedro <[email protected]> * Suppress console spam in other calls to canTransform The user has few options to workaround potential console spam from canTransform. If we want, it would be better to update the API to optional return the error string. Signed-off-by: Jacob Perron <[email protected]> Signed-off-by: Gonzalo de Pedro <[email protected]> Signed-off-by: Jacob Perron <[email protected]> Co-authored-by: Grigoriy Lipenko <[email protected]> Co-authored-by: Jacob Perron <[email protected]>
Was this feature ever ported to humble? I am getting lots of messages in my tests, they make debugging a lot more difficult |
@Mergifyio backport humble |
✅ Backports have been created
|
* suppress spam in canTransform * Uncrustify Signed-off-by: Gonzalo de Pedro <[email protected]> * Suppress console spam in other calls to canTransform The user has few options to workaround potential console spam from canTransform. If we want, it would be better to update the API to optional return the error string. Signed-off-by: Jacob Perron <[email protected]> Signed-off-by: Gonzalo de Pedro <[email protected]> Signed-off-by: Jacob Perron <[email protected]> Co-authored-by: Grigoriy Lipenko <[email protected]> Co-authored-by: Jacob Perron <[email protected]> (cherry picked from commit 8c2aa5a)
* suppress spam in canTransform * Uncrustify Signed-off-by: Gonzalo de Pedro <[email protected]> * Suppress console spam in other calls to canTransform The user has few options to workaround potential console spam from canTransform. If we want, it would be better to update the API to optional return the error string. Signed-off-by: Jacob Perron <[email protected]> Signed-off-by: Gonzalo de Pedro <[email protected]> Signed-off-by: Jacob Perron <[email protected]> Co-authored-by: Grigoriy Lipenko <[email protected]> Co-authored-by: Jacob Perron <[email protected]> (cherry picked from commit 8c2aa5a) Co-authored-by: Gonzo <[email protected]>
Based on #502
Closes #501