Nacho/cleanup get transform util#4181
Conversation
|
@nachovizzo, your PR has failed to build. Please check CI outputs and resolve issues. |
This is fine! |
nav2_collision_monitor/include/nav2_collision_monitor/circle.hpp
Outdated
Show resolved
Hide resolved
|
@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. |
nav2_collision_monitor/include/nav2_collision_monitor/source.hpp
Outdated
Show resolved
Hide resolved
|
2 things:
Otherwise, love it, super clean, I love abstracting out nonsense |
Signed-off-by: Ignacio Vizzo <ignacio@dexory.com>
Signed-off-by: Ignacio Vizzo <ignacio@dexory.com>
Signed-off-by: Ignacio Vizzo <ignacio@dexory.com>
Otherwise is very confusing for any user who is user to the tf2::Buffer::lookupTransform method Signed-off-by: Ignacio Vizzo <ignacio@dexory.com>
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 <ignacio@dexory.com>
This allow us to also query for the TransformStamped message from the lookupTransform method. Signed-off-by: Ignacio Vizzo <ignacio@dexory.com>
Signed-off-by: Ignacio Vizzo <ignacio@dexory.com>
Signed-off-by: Ignacio Vizzo <ignacio@dexory.com>
This reverts commit ca7d06b. Signed-off-by: Ignacio Vizzo <ignacio@dexory.com>
Signed-off-by: Ignacio Vizzo <ignacio@dexory.com>
Signed-off-by: Ignacio Vizzo <ignacio@dexory.com>
Signed-off-by: Ignacio Vizzo <ignacio@dexory.com>
Signed-off-by: Ignacio Vizzo <ignacio@dexory.com>
2bd3588 to
d450502
Compare
|
@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 <ignacio@dexory.com> * First step. Return an optional value instead of user provided output. Signed-off-by: Ignacio Vizzo <ignacio@dexory.com> * Second step, update the consumers of this utility function Signed-off-by: Ignacio Vizzo <ignacio@dexory.com> * 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 <ignacio@dexory.com> * 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 <ignacio@dexory.com> * 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 <ignacio@dexory.com> * Add nodiscard to avoid confusiong API calls Signed-off-by: Ignacio Vizzo <ignacio@dexory.com> * Update docs Signed-off-by: Ignacio Vizzo <ignacio@dexory.com> * Revert "transform tolerance -> transform timeout" This reverts commit ca7d06b. Signed-off-by: Ignacio Vizzo <ignacio@dexory.com> * Fix linter 🤦 Signed-off-by: Ignacio Vizzo <ignacio@dexory.com> * reset to main Signed-off-by: Ignacio Vizzo <ignacio@dexory.com> * Add 2 new utils functions to query transforms using messages Signed-off-by: Ignacio Vizzo <ignacio@dexory.com> * Move utility function to base class to reuse implementation Signed-off-by: Ignacio Vizzo <ignacio@dexory.com> * Fix Typo Signed-off-by: Ignacio Vizzo <ignacio@dexory.com> --------- Signed-off-by: Ignacio Vizzo <ignacio@dexory.com>
* remove unused header Signed-off-by: Ignacio Vizzo <ignacio@dexory.com> * First step. Return an optional value instead of user provided output. Signed-off-by: Ignacio Vizzo <ignacio@dexory.com> * Second step, update the consumers of this utility function Signed-off-by: Ignacio Vizzo <ignacio@dexory.com> * 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 <ignacio@dexory.com> * 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 <ignacio@dexory.com> * 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 <ignacio@dexory.com> * Add nodiscard to avoid confusiong API calls Signed-off-by: Ignacio Vizzo <ignacio@dexory.com> * Update docs Signed-off-by: Ignacio Vizzo <ignacio@dexory.com> * Revert "transform tolerance -> transform timeout" This reverts commit ca7d06b. Signed-off-by: Ignacio Vizzo <ignacio@dexory.com> * Fix linter 🤦 Signed-off-by: Ignacio Vizzo <ignacio@dexory.com> * reset to main Signed-off-by: Ignacio Vizzo <ignacio@dexory.com> * Add 2 new utils functions to query transforms using messages Signed-off-by: Ignacio Vizzo <ignacio@dexory.com> * Move utility function to base class to reuse implementation Signed-off-by: Ignacio Vizzo <ignacio@dexory.com> * Fix Typo Signed-off-by: Ignacio Vizzo <ignacio@dexory.com> --------- Signed-off-by: Ignacio Vizzo <ignacio@dexory.com> Signed-off-by: enricosutera <enricosutera@outlook.com>
* remove unused header Signed-off-by: Ignacio Vizzo <ignacio@dexory.com> * First step. Return an optional value instead of user provided output. Signed-off-by: Ignacio Vizzo <ignacio@dexory.com> * Second step, update the consumers of this utility function Signed-off-by: Ignacio Vizzo <ignacio@dexory.com> * 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 <ignacio@dexory.com> * 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 <ignacio@dexory.com> * 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 <ignacio@dexory.com> * Add nodiscard to avoid confusiong API calls Signed-off-by: Ignacio Vizzo <ignacio@dexory.com> * Update docs Signed-off-by: Ignacio Vizzo <ignacio@dexory.com> * Revert "transform tolerance -> transform timeout" This reverts commit ca7d06b. Signed-off-by: Ignacio Vizzo <ignacio@dexory.com> * Fix linter 🤦 Signed-off-by: Ignacio Vizzo <ignacio@dexory.com> * reset to main Signed-off-by: Ignacio Vizzo <ignacio@dexory.com> * Add 2 new utils functions to query transforms using messages Signed-off-by: Ignacio Vizzo <ignacio@dexory.com> * Move utility function to base class to reuse implementation Signed-off-by: Ignacio Vizzo <ignacio@dexory.com> * Fix Typo Signed-off-by: Ignacio Vizzo <ignacio@dexory.com> --------- Signed-off-by: Ignacio Vizzo <ignacio@dexory.com>
* remove unused header Signed-off-by: Ignacio Vizzo <ignacio@dexory.com> * First step. Return an optional value instead of user provided output. Signed-off-by: Ignacio Vizzo <ignacio@dexory.com> * Second step, update the consumers of this utility function Signed-off-by: Ignacio Vizzo <ignacio@dexory.com> * 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 <ignacio@dexory.com> * 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 <ignacio@dexory.com> * 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 <ignacio@dexory.com> * Add nodiscard to avoid confusiong API calls Signed-off-by: Ignacio Vizzo <ignacio@dexory.com> * Update docs Signed-off-by: Ignacio Vizzo <ignacio@dexory.com> * Revert "transform tolerance -> transform timeout" This reverts commit ca7d06b. Signed-off-by: Ignacio Vizzo <ignacio@dexory.com> * Fix linter 🤦 Signed-off-by: Ignacio Vizzo <ignacio@dexory.com> * reset to main Signed-off-by: Ignacio Vizzo <ignacio@dexory.com> * Add 2 new utils functions to query transforms using messages Signed-off-by: Ignacio Vizzo <ignacio@dexory.com> * Move utility function to base class to reuse implementation Signed-off-by: Ignacio Vizzo <ignacio@dexory.com> * Fix Typo Signed-off-by: Ignacio Vizzo <ignacio@dexory.com> --------- Signed-off-by: Ignacio Vizzo <ignacio@dexory.com>
* remove unused header Signed-off-by: Ignacio Vizzo <ignacio@dexory.com> * First step. Return an optional value instead of user provided output. Signed-off-by: Ignacio Vizzo <ignacio@dexory.com> * Second step, update the consumers of this utility function Signed-off-by: Ignacio Vizzo <ignacio@dexory.com> * 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 <ignacio@dexory.com> * 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 <ignacio@dexory.com> * 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 <ignacio@dexory.com> * Add nodiscard to avoid confusiong API calls Signed-off-by: Ignacio Vizzo <ignacio@dexory.com> * Update docs Signed-off-by: Ignacio Vizzo <ignacio@dexory.com> * Revert "transform tolerance -> transform timeout" This reverts commit ca7d06b. Signed-off-by: Ignacio Vizzo <ignacio@dexory.com> * Fix linter 🤦 Signed-off-by: Ignacio Vizzo <ignacio@dexory.com> * reset to main Signed-off-by: Ignacio Vizzo <ignacio@dexory.com> * Add 2 new utils functions to query transforms using messages Signed-off-by: Ignacio Vizzo <ignacio@dexory.com> * Move utility function to base class to reuse implementation Signed-off-by: Ignacio Vizzo <ignacio@dexory.com> * Fix Typo Signed-off-by: Ignacio Vizzo <ignacio@dexory.com> --------- Signed-off-by: Ignacio Vizzo <ignacio@dexory.com> Signed-off-by: stevedanomodolor <stevedan.o.omodolor@gmail.com>
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: