-
Notifications
You must be signed in to change notification settings - Fork 463
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
Fixed the orientation of covariance view to match with the interpreta… #1576
base: melodic-devel
Are you sure you want to change the base?
Fixed the orientation of covariance view to match with the interpreta… #1576
Conversation
…tion of the covariance in e.g. geometry_msgs::PoseWithCovariance used by tf2.
Could you please check the overlap of your PR with #1540. |
I checked now - I would say their solution is incorrect - they are "manually" fixing the issues they discovered by swapping axes. |
Ok, I can replicate the issue in #1540 with both versions. This implies that this is a separate issue. |
|
I'm afraid that I cannot judge your code change, because I don't exactly know the definition of the Pose covariance. Given 6d-vectors x = (p, w) and their counterparts y = (Rp, Rw) represented in another frame to compute the covariance from, the corresponding covariance matrices should be defined as: CX = <(x-µ) (x-µ)^t> and CY = <(Rx-Rµ) (Rx-Rµ)^t> = RCXR^t. |
No. The position covariance is already expressed in the frame in the message header. Otherwise, changing the orientation would rotate the position covariance too, which it doesn't. It Does change the orientation covariance, which it should not - e.g if we have large noise in yaw, but set the orientation to 90 deg in pitch, the visualization will imply that there is a large noise in roll, which is wrong. My change makes the orientation covariance consistent with the position covariance interpretation - by recalculating the covariance matrix, we can extract the "tangent covariances" (I don't know what to call them) such that they will represent the noise in the viewing frame. The reason that this change is applied only to the orientation covariance is that as opposed to the position covariance this visualization is affixed to the axis gizmo's full pose. Edit.: Obviously, an alternative solution would be to leave the covariance as is, and affix it to the frame axes instead of the visualized body axes. |
Fixed the orientation part of covariance view to match with the interpretation of the covariance in e.g.
geometry_msgs::PoseWithCovariance
used by tf2.This means, that the "tangent covariance" on the tips of the axis vector visualizations will actually show the orientation uncertainties/noises in the frame of the world, not in the frame of the object/body as was the case previously.