Nacho/cleanup get transform util#4181
Conversation
|
@nachovizzo, your PR has failed to build. Please check CI outputs and resolve issues. |
This is fine! |
|
@nachovizzo, your PR has failed to build. Please check CI outputs and resolve issues. |
|
@nachovizzo waddup here? 💯 |
Done! |
|
@nachovizzo, your PR has failed to build. Please check CI outputs and resolve issues. |
|
2 things:
Otherwise, love it, super clean, I love abstracting out nonsense |
Signed-off-by: Ignacio Vizzo <[email protected]>
Signed-off-by: Ignacio Vizzo <[email protected]>
Signed-off-by: Ignacio Vizzo <[email protected]>
Otherwise is very confusing for any user who is user to the tf2::Buffer::lookupTransform method Signed-off-by: Ignacio Vizzo <[email protected]>
I find this "transform tolerance" to specify something else. Once again, I believe that sticking to tf2 name conventions is better and improve readability for users already used to the tf2 API Signed-off-by: Ignacio Vizzo <[email protected]>
This allow us to also query for the TransformStamped message from the lookupTransform method. Signed-off-by: Ignacio Vizzo <[email protected]>
Signed-off-by: Ignacio Vizzo <[email protected]>
Signed-off-by: Ignacio Vizzo <[email protected]>
This reverts commit ca7d06b. Signed-off-by: Ignacio Vizzo <[email protected]>
Signed-off-by: Ignacio Vizzo <[email protected]>
Signed-off-by: Ignacio Vizzo <[email protected]>
Signed-off-by: Ignacio Vizzo <[email protected]>
Signed-off-by: Ignacio Vizzo <[email protected]>
2bd3588 to
d450502
Compare
Signed-off-by: Ignacio Vizzo <[email protected]>
|
@SteveMacenski done with this, I pulled |
|
It ran (i.e. built) there are some new test failures that popped up while our CI was down. I just haven't had a chance to look at them yet but not caused by this PR (probably; or at least in whole) |
* remove unused header Signed-off-by: Ignacio Vizzo <[email protected]> * First step. Return an optional value instead of user provided output. Signed-off-by: Ignacio Vizzo <[email protected]> * Second step, update the consumers of this utility function Signed-off-by: Ignacio Vizzo <[email protected]> * Third step: swap source/target to make it consistent with tf lookups Otherwise is very confusing for any user who is user to the tf2::Buffer::lookupTransform method Signed-off-by: Ignacio Vizzo <[email protected]> * transform tolerance -> transform timeout I find this "transform tolerance" to specify something else. Once again, I believe that sticking to tf2 name conventions is better and improve readability for users already used to the tf2 API Signed-off-by: Ignacio Vizzo <[email protected]> * Last step, convert functions to template functions This allow us to also query for the TransformStamped message from the lookupTransform method. Signed-off-by: Ignacio Vizzo <[email protected]> * Add nodiscard to avoid confusiong API calls Signed-off-by: Ignacio Vizzo <[email protected]> * Update docs Signed-off-by: Ignacio Vizzo <[email protected]> * Revert "transform tolerance -> transform timeout" This reverts commit ca7d06b. Signed-off-by: Ignacio Vizzo <[email protected]> * Fix linter 🤦 Signed-off-by: Ignacio Vizzo <[email protected]> * reset to main Signed-off-by: Ignacio Vizzo <[email protected]> * Add 2 new utils functions to query transforms using messages Signed-off-by: Ignacio Vizzo <[email protected]> * Move utility function to base class to reuse implementation Signed-off-by: Ignacio Vizzo <[email protected]> * Fix Typo Signed-off-by: Ignacio Vizzo <[email protected]> --------- Signed-off-by: Ignacio Vizzo <[email protected]>
* remove unused header Signed-off-by: Ignacio Vizzo <[email protected]> * First step. Return an optional value instead of user provided output. Signed-off-by: Ignacio Vizzo <[email protected]> * Second step, update the consumers of this utility function Signed-off-by: Ignacio Vizzo <[email protected]> * Third step: swap source/target to make it consistent with tf lookups Otherwise is very confusing for any user who is user to the tf2::Buffer::lookupTransform method Signed-off-by: Ignacio Vizzo <[email protected]> * transform tolerance -> transform timeout I find this "transform tolerance" to specify something else. Once again, I believe that sticking to tf2 name conventions is better and improve readability for users already used to the tf2 API Signed-off-by: Ignacio Vizzo <[email protected]> * Last step, convert functions to template functions This allow us to also query for the TransformStamped message from the lookupTransform method. Signed-off-by: Ignacio Vizzo <[email protected]> * Add nodiscard to avoid confusiong API calls Signed-off-by: Ignacio Vizzo <[email protected]> * Update docs Signed-off-by: Ignacio Vizzo <[email protected]> * Revert "transform tolerance -> transform timeout" This reverts commit ca7d06b. Signed-off-by: Ignacio Vizzo <[email protected]> * Fix linter 🤦 Signed-off-by: Ignacio Vizzo <[email protected]> * reset to main Signed-off-by: Ignacio Vizzo <[email protected]> * Add 2 new utils functions to query transforms using messages Signed-off-by: Ignacio Vizzo <[email protected]> * Move utility function to base class to reuse implementation Signed-off-by: Ignacio Vizzo <[email protected]> * Fix Typo Signed-off-by: Ignacio Vizzo <[email protected]> --------- Signed-off-by: Ignacio Vizzo <[email protected]> Signed-off-by: enricosutera <[email protected]>
* remove unused header Signed-off-by: Ignacio Vizzo <[email protected]> * First step. Return an optional value instead of user provided output. Signed-off-by: Ignacio Vizzo <[email protected]> * Second step, update the consumers of this utility function Signed-off-by: Ignacio Vizzo <[email protected]> * Third step: swap source/target to make it consistent with tf lookups Otherwise is very confusing for any user who is user to the tf2::Buffer::lookupTransform method Signed-off-by: Ignacio Vizzo <[email protected]> * transform tolerance -> transform timeout I find this "transform tolerance" to specify something else. Once again, I believe that sticking to tf2 name conventions is better and improve readability for users already used to the tf2 API Signed-off-by: Ignacio Vizzo <[email protected]> * Last step, convert functions to template functions This allow us to also query for the TransformStamped message from the lookupTransform method. Signed-off-by: Ignacio Vizzo <[email protected]> * Add nodiscard to avoid confusiong API calls Signed-off-by: Ignacio Vizzo <[email protected]> * Update docs Signed-off-by: Ignacio Vizzo <[email protected]> * Revert "transform tolerance -> transform timeout" This reverts commit ca7d06b. Signed-off-by: Ignacio Vizzo <[email protected]> * Fix linter 🤦 Signed-off-by: Ignacio Vizzo <[email protected]> * reset to main Signed-off-by: Ignacio Vizzo <[email protected]> * Add 2 new utils functions to query transforms using messages Signed-off-by: Ignacio Vizzo <[email protected]> * Move utility function to base class to reuse implementation Signed-off-by: Ignacio Vizzo <[email protected]> * Fix Typo Signed-off-by: Ignacio Vizzo <[email protected]> --------- Signed-off-by: Ignacio Vizzo <[email protected]>
* remove unused header Signed-off-by: Ignacio Vizzo <[email protected]> * First step. Return an optional value instead of user provided output. Signed-off-by: Ignacio Vizzo <[email protected]> * Second step, update the consumers of this utility function Signed-off-by: Ignacio Vizzo <[email protected]> * Third step: swap source/target to make it consistent with tf lookups Otherwise is very confusing for any user who is user to the tf2::Buffer::lookupTransform method Signed-off-by: Ignacio Vizzo <[email protected]> * transform tolerance -> transform timeout I find this "transform tolerance" to specify something else. Once again, I believe that sticking to tf2 name conventions is better and improve readability for users already used to the tf2 API Signed-off-by: Ignacio Vizzo <[email protected]> * Last step, convert functions to template functions This allow us to also query for the TransformStamped message from the lookupTransform method. Signed-off-by: Ignacio Vizzo <[email protected]> * Add nodiscard to avoid confusiong API calls Signed-off-by: Ignacio Vizzo <[email protected]> * Update docs Signed-off-by: Ignacio Vizzo <[email protected]> * Revert "transform tolerance -> transform timeout" This reverts commit ca7d06b. Signed-off-by: Ignacio Vizzo <[email protected]> * Fix linter 🤦 Signed-off-by: Ignacio Vizzo <[email protected]> * reset to main Signed-off-by: Ignacio Vizzo <[email protected]> * Add 2 new utils functions to query transforms using messages Signed-off-by: Ignacio Vizzo <[email protected]> * Move utility function to base class to reuse implementation Signed-off-by: Ignacio Vizzo <[email protected]> * Fix Typo Signed-off-by: Ignacio Vizzo <[email protected]> --------- Signed-off-by: Ignacio Vizzo <[email protected]>
* remove unused header Signed-off-by: Ignacio Vizzo <[email protected]> * First step. Return an optional value instead of user provided output. Signed-off-by: Ignacio Vizzo <[email protected]> * Second step, update the consumers of this utility function Signed-off-by: Ignacio Vizzo <[email protected]> * Third step: swap source/target to make it consistent with tf lookups Otherwise is very confusing for any user who is user to the tf2::Buffer::lookupTransform method Signed-off-by: Ignacio Vizzo <[email protected]> * transform tolerance -> transform timeout I find this "transform tolerance" to specify something else. Once again, I believe that sticking to tf2 name conventions is better and improve readability for users already used to the tf2 API Signed-off-by: Ignacio Vizzo <[email protected]> * Last step, convert functions to template functions This allow us to also query for the TransformStamped message from the lookupTransform method. Signed-off-by: Ignacio Vizzo <[email protected]> * Add nodiscard to avoid confusiong API calls Signed-off-by: Ignacio Vizzo <[email protected]> * Update docs Signed-off-by: Ignacio Vizzo <[email protected]> * Revert "transform tolerance -> transform timeout" This reverts commit ca7d06b. Signed-off-by: Ignacio Vizzo <[email protected]> * Fix linter 🤦 Signed-off-by: Ignacio Vizzo <[email protected]> * reset to main Signed-off-by: Ignacio Vizzo <[email protected]> * Add 2 new utils functions to query transforms using messages Signed-off-by: Ignacio Vizzo <[email protected]> * Move utility function to base class to reuse implementation Signed-off-by: Ignacio Vizzo <[email protected]> * Fix Typo Signed-off-by: Ignacio Vizzo <[email protected]> --------- Signed-off-by: Ignacio Vizzo <[email protected]> Signed-off-by: stevedanomodolor <[email protected]>
Basic Info
Description of contribution in a few bullet points
The following pattern is widely used in ROS applications, and (far from ideal) I'd like to extend the
nav2_utils::getTransformto also spitTransformStampedmessages. I know, these util functions should be in the tf library but here seemed like a lower-hanging fruit to bite:Some comments:
nav2_utilpkg. I'm happy to express this in the build system but I'm not sure if this is a common practice in nav2. Do you think this might bring a problemtf2to avoid confusing userssoruceandframeid from thegetTransformfunction. I'm not sure why it was "inverted" (compared to tf2) in the first place. But I found it very confusing to read this:Before:
For a more modern and easier to read + safer approach:
This improves the code (on my opinion) from:
, to:
Future work that may be required in bullet points
nav2_utils::getTransformFor Maintainers: