Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This exposes the TF2 Listener subscriber callback so that a user can override it to perform a slightly altered operation. This is in efforts to a new
BaseFootprintPublisher
I'm adding tonav2_util
which looks at incoming TF messages and checks if they're updating the transform ofbase_link
. If so, then I want to automatically publish abase_footprint
transform with the Z, Pitch, Roll removed to be flat on the surface 2D.Initially, I had made a
TF2MsgCallback
which the user could register on TF2 Listener construction to be called within the subscription callback, but I ran into issues since there are so many default constructor arguments, selecting the order of where to place it to (1) not disrupt users and (2) not have to specify a massive number of QoS settings or options.So instead, I opted for making the subscription itself overridable so I can call
TransformListener::subscription_callback(msg, is_static);
internally and then do my thing with that data, e.g.Thus, this seems like the best trade off to be (1) not disruptive to other users and (2) get what I need to get done on an event-basis instead of polling or manually listening into the TF topic. In general, it seems useful to be able to override this method for custom logic or introspection.