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

Substract minimum twist covariance from twist covariance #222

Merged

Conversation

efernandez
Copy link
Collaborator

This might sound a bit awkward at first, but I believe there's a use case for it, that I explain in a bit below.

First, what's the issue this is trying to solve?

If the twist covariance already had a minimum twist covariance added to it in order to prevent ill-conditioned covariance matrices, we need a way to substract that minimum twist covariance from it before we compute the pose relative covariance.

Otherwise, we cannot get the original pose relative covariance because the minimum twist covariance term is
multiplied by the time delta, which could actually make the resulting pose relative covariance ill-conditioned or very small, i.e.
overconfident.

How can we fix this?

In practice, this means that we can use the same minimum twist covariance that was added to the raw twist covariance to obtain the raw twist covariance and then compute the pose relative covariance and, if needed, add a minimum pose relative covariance to the result, which could be the same as the minimum twist covariance or different.

Use case

If we don't care too much about having a pose relative covariance that matches exactly what it should be for the raw twist covariance, it's true that with a minimum pose relative covariance we should be fine to guarantee the pose relative covariance isn't ill-conditioned.

However, we might not be able to remove the minimum twist covariance because other consumers might not have protection for ill-conditioned covariance matrices. For context, https://github.com/clearpathrobotics/ros_controllers/blob/38e474f3d05e42de1500f8486eb180803613d79d/diff_drive_controller/src/odometry.cpp#L203 is an example of an odometry producer that does this, and its output could be consumed by multiple consumers, not all able to handle the twist covariance if it were zero or very close to it.

If the twist covariance already had a minimum twist covariance added to
it to prevent ill-conditioned covariance matrices, we need a way to
substract that minimum twist covariance from it before we compute the
pose relative covariance. Otherwise, we cannot get the original pose
relative covariance because the minimum twist covariance term is
multiplies by the time delta, which could actually make the resulting
pose relative covariance ill-conditioned or very small, i.e.
overconfident.
@efernandez efernandez self-assigned this Feb 5, 2021
@efernandez efernandez added the enhancement New feature or request label Feb 5, 2021
efernandez and others added 2 commits February 8, 2021 07:31
Co-authored-by: Stephen Williams <stephen.vincent.williams@gmail.com>
@svwilliams svwilliams merged commit 8b62c80 into locusrobotics:devel Feb 17, 2021
@efernandez efernandez deleted the add-minimum-twist-covariance branch November 26, 2021 11:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

Successfully merging this pull request may close these issues.

3 participants