Skip to content
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

PoseWithCovarianceStamped transform doesn't transform covariance part #372

Closed
ksuszka opened this issue Feb 2, 2021 · 9 comments · Fixed by #430
Closed

PoseWithCovarianceStamped transform doesn't transform covariance part #372

ksuszka opened this issue Feb 2, 2021 · 9 comments · Fixed by #430
Labels
help wanted Extra attention is needed

Comments

@ksuszka
Copy link

ksuszka commented Feb 2, 2021

Bug report

Required Info:

  • Operating System:
    • Ubuntu 20.04, but it doesn't really matter
  • Installation type:
    • source code analysis
  • Version or commit hash:
  • DDS implementation:
    • N/A
  • Client library (if applicable):
    • rclcpp

Steps to reproduce issue


Expected behavior

doTransform on PoseWithCovarianceStamped should also transform covariance.

Actual behavior

doTransform on PoseWithCovarianceStamped copies covariance without transforming it.

Additional information

The culprit seems to be line

t_out.pose.covariance = t_in.pose.covariance;

It seems that this functionality is implemented in ROS1 version https://github.com/ros/geometry2/blob/c73b5939723db078c9bbe18523230ad54f859682/tf2_geometry_msgs/include/tf2_geometry_msgs/tf2_geometry_msgs.h#L927

@clalancette
Copy link
Contributor

Yep, agreed. A pull request to port that functionality over from the ROS 1 version would be welcome.

@clalancette clalancette added the help wanted Extra attention is needed label Feb 2, 2021
@aprotyas
Copy link
Member

aprotyas commented Jun 7, 2021

On that note, do_transform_pose_with_covariance_stamped in tf2_geometry_msgs.py does not transform the covariance either. Same pattern.

res.pose.covariance = pose.pose.covariance

Since I'm working on this issue, should I fold above changes into the same PR? @clalancette

@clalancette
Copy link
Contributor

Since I'm working on this issue, should I fold above changes into the same PR? @clalancette

It's worthwhile to fix it both places, but I'll suggest two separate PRs, one for C++ and one for Python.

aprotyas pushed a commit that referenced this issue Jun 11, 2021
…<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>
@msmcconnell
Copy link

@clalancette Is there any chance the fix for this in #430 gets backported to Foxy?

@clalancette
Copy link
Contributor

@clalancette Is there any chance the fix for this in #430 gets backported to Foxy?

I think that is viable; it doesn't change API or ABI. Mind opening a backport PR?

mergify bot pushed a commit that referenced this issue Dec 21, 2021
…<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
mergify bot pushed a commit that referenced this issue Dec 21, 2021
…<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
@aprotyas
Copy link
Member

aprotyas commented Dec 21, 2021

@clalancette Is there any chance the fix for this in #430 gets backported to Foxy?

I think that is viable; it doesn't change API or ABI. Mind opening a backport PR?

I've opened #488 and #489 through mergify.

aprotyas pushed a commit that referenced this issue Dec 21, 2021
…<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)
aprotyas pushed a commit that referenced this issue Dec 21, 2021
…<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)
@msmcconnell
Copy link

Thanks for putting those up @aprotyas ! Hope they can make it in soon.

aprotyas pushed a commit that referenced this issue Dec 23, 2021
…<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)
aprotyas pushed a commit that referenced this issue Dec 23, 2021
…<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)
@aprotyas
Copy link
Member

FYI: both backports have landed.

@msmcconnell
Copy link

@aprotyas Awesome thanks for doing that!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
4 participants