-
Notifications
You must be signed in to change notification settings - Fork 194
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
tf2_geometry_msgs
: Fixing covariance transformation in doTransform<PoseWithCovarianceStamped, TransformStamped>
#430
Conversation
* The transform operation has been performed with the row-major form of the covariance matrix. * tf2 matrix types were used for easier matrix multiplication. Signed-off-by: Abrar Rahman Protyasha <abrar@openrobotics.org>
* The previous test was doing a wrong covariance check, i.e. out.covariance = in.covariance. * The updated test checks against the correctly transformed covariance matrix. Signed-off-by: Abrar Rahman Protyasha <abrar@openrobotics.org>
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.
The math LGTM (I only checked that it matches the ROS 1 code)
tf2_geometry_msgs/include/tf2_geometry_msgs/tf2_geometry_msgs.hpp
Outdated
Show resolved
Hide resolved
tf2_geometry_msgs/include/tf2_geometry_msgs/tf2_geometry_msgs.hpp
Outdated
Show resolved
Hide resolved
tf2_geometry_msgs/include/tf2_geometry_msgs/tf2_geometry_msgs.hpp
Outdated
Show resolved
Hide resolved
tf2_geometry_msgs/include/tf2_geometry_msgs/tf2_geometry_msgs.hpp
Outdated
Show resolved
Hide resolved
Previously, `transformCovariance`'s transform argument was of type `geometry_msgs::msg::Transform`, which is not a "general" transform type, but rather a message type. As such, that argument type has been changed to `tf2::Transform`, so that the user can convert from whatever transform type they have to a tf Transform. Also: * Moved location of a forward declaration to be closer to its use. * Applied `ament_uncrustify` changes for maximum line length, changing the `transformCovariance` signature ine. * Reflected change in `transformCovariance` function signature in doxygen documentation. Signed-off-by: Abrar Rahman Protyasha <abrar@openrobotics.org>
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.
One minor thing to fix, then this looks good to me.
tf2_geometry_msgs/include/tf2_geometry_msgs/tf2_geometry_msgs.hpp
Outdated
Show resolved
Hide resolved
Leading tabs prevented the function parameters from lining up, both in the Github UI and in Vim. Converting all tabs to spaces fixes said issue. Signed-off-by: Abrar Rahman Protyasha <abrar@openrobotics.org>
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.
Looks good to me!
@Mergifyio backport galactic foxy |
…<PoseWithCovarianceStamped, TransformStamped>` (#430) Fixes #372. * Implement covariance transformation (cpp). * Fixed `TfGeometry/FrameWithCovariance` test. The updated test checks against the correctly transformed covariance matrix. Signed-off-by: Abrar Rahman Protyasha <abrar@openrobotics.org> (cherry picked from commit ae30f0b) # Conflicts: # tf2_geometry_msgs/include/tf2_geometry_msgs/tf2_geometry_msgs.hpp
…<PoseWithCovarianceStamped, TransformStamped>` (#430) Fixes #372. * Implement covariance transformation (cpp). * Fixed `TfGeometry/FrameWithCovariance` test. The updated test checks against the correctly transformed covariance matrix. Signed-off-by: Abrar Rahman Protyasha <abrar@openrobotics.org> (cherry picked from commit ae30f0b) # Conflicts: # tf2_geometry_msgs/include/tf2_geometry_msgs/tf2_geometry_msgs.hpp
✅ Backports have been created
|
…<PoseWithCovarianceStamped, TransformStamped>` (#430) Fixes #372. * Implement covariance transformation (cpp). * Fixed `TfGeometry/FrameWithCovariance` test. The updated test checks against the correctly transformed covariance matrix. Signed-off-by: Abrar Rahman Protyasha <abrar@openrobotics.org> (cherry picked from commit ae30f0b)
…<PoseWithCovarianceStamped, TransformStamped>` (#430) Fixes #372. * Implement covariance transformation (cpp). * Fixed `TfGeometry/FrameWithCovariance` test. The updated test checks against the correctly transformed covariance matrix. Signed-off-by: Abrar Rahman Protyasha <abrar@openrobotics.org> (cherry picked from commit ae30f0b)
…<PoseWithCovarianceStamped, TransformStamped>` (#430) (#488) Fixes #372. * Implement covariance transformation (cpp). * Fixed `TfGeometry/FrameWithCovariance` test. The updated test checks against the correctly transformed covariance matrix. Signed-off-by: Abrar Rahman Protyasha <abrar@openrobotics.org> (cherry picked from commit ae30f0b)
…<PoseWithCovarianceStamped, TransformStamped>` (#430) (#489) Fixes #372. * Implement covariance transformation (cpp). * Fixed `TfGeometry/FrameWithCovariance` test. The updated test checks against the correctly transformed covariance matrix. Signed-off-by: Abrar Rahman Protyasha <abrar@openrobotics.org> (cherry picked from commit ae30f0b)
Previously, the covariance matrix of a
PoseWithCovarianceStamped
message was incorrectly transformed. This PR:transformCovariance
method to address the covariance transformation.TfGeometry/FrameWithCovariance
unit test to check for the expected transformed covariance.Fixes #372