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

Add support for quaternions to GaussianMixture and related #82

Merged

Conversation

xEnVrE
Copy link
Collaborator

@xEnVrE xEnVrE commented Feb 13, 2020

Within this PR:

  • added support for quaternions to GaussianMixture and derived classes (Gaussian and ParticleSet).
  • updated test_Gaussian
  • updated CHANGELOG.md

Details

The most important change is done inside the class GaussianMixture where a new argument use_quaternion is supported in the generic constructor. By default, the constructor assumes that use_quaternion = false.

The interpretation is the following:

  • when use_quaternion == false and dim_circular != 0, then each circular component is treated as a component in the manifold S1, i.e. the circle. Since GaussianMixture, and derived, are mainly responsible for the storage, the mean circular components are stored as vectors in R^{dim_circular} and the associated covariance matrices as matrices in R^{dim_circular x dim_circular}. This is the default behavior that the library was already implementing.
  • when use_quaternion == true and dim_circular != 0, then each circular component is treated as a component in the manifold S3 represented using a quaternion. Storage-wise, the mean associated with each quaternion is stored as a vector in R^4(i.e. real and imaginary part of the quaternion) and the associated covariance matrix as a matrix in R^{3 x 3}. Indeed, the uncertainty associated with the quaternion is best represented in the tangent space, i.e. rotation vectors, that can be treated as R^{3}.

Copy link
Collaborator

@claudiofantacci claudiofantacci left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just some minor changes, then LGTM 🚀

CHANGELOG.md Outdated Show resolved Hide resolved
src/BayesFilters/include/BayesFilters/Gaussian.h Outdated Show resolved Hide resolved
src/BayesFilters/include/BayesFilters/GaussianMixture.h Outdated Show resolved Hide resolved
src/BayesFilters/include/BayesFilters/ParticleSet.h Outdated Show resolved Hide resolved
src/BayesFilters/src/Gaussian.cpp Outdated Show resolved Hide resolved
@xEnVrE xEnVrE force-pushed the impl/gaussian_mixture_w_quaternion branch from 82e5aca to 8d1c55b Compare February 17, 2020 01:01
@claudiofantacci
Copy link
Collaborator

@xEnVrE, can you please resolve the conflicts? 😄

@xEnVrE
Copy link
Collaborator Author

xEnVrE commented Feb 18, 2020

@xEnVrE, can you please resolve the conflicts? 😄

Yep!

@claudiofantacci claudiofantacci merged commit 885feb3 into robotology:devel Feb 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants