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

[Core] iDynTree::Transform::log() and iDynTree::SpatialMotionVector::exp() computations seems to be wrong? #561

Closed
prashanthr05 opened this issue Aug 24, 2019 · 2 comments

Comments

@prashanthr05
Copy link
Contributor

prashanthr05 commented Aug 24, 2019

Here, the log of SE(3) says the linear part is unchanged

// the linear part is not changed by the log

which does not seem to be coherent with the definition of SE(3) logarithm described in Appendix section B of the paper Associating Uncertainty With Three-Dimensional Poses for Use in Estimation Problems.

Looks like we are missing a multiplication of the linear part with a left/right Jacobian inverse of $SO(3)$.

where, the left Jacobian of $SO(3)$ is defined as,

$$ J_{l_{SO(3)}} = \sum_{n = 0}^{\infty} \frac{1}{(n+1)!} [\omega_\times]^n = (I_3 + \frac{1 - \text{cos}(||\omega||)}{||\omega||^{2}} [\omega _{\times}] + \frac{||\omega|| - \text{sin}(||\omega||)}{||\omega||^{3}} [\omega _{\times}]^{2})$$ where $\omega$ is the AngularMotionVector3.

When simplified further, $$ J_{l_{SO(3)}} = \frac{\text{sin}(||\omega||)}{||\omega||}I_3 + \frac{1 - \text{cos}(||\omega||)}{||\omega||} [\phi _{\times}] + \bigg(1 - \frac{\text{sin}(||\omega||)}{||\omega||}\bigg) \phi\phi^T$$ where $\phi = \frac{\omega}{||\omega||}$

The inverse left Jacobian is given by,
$$ J^{-1} _{l _{SO(3)}} = \frac{||\omega||}{2} \text{cot} \bigg(\frac{||\omega||}{2}\bigg) I _3 + \bigg( 1 - \frac{||\omega||}{2} \text{cot} \bigg(\frac{||\omega||}{2}\bigg) \bigg) \phi \phi^T - \frac{||\omega||}{2} [\phi _{\times}]$$

cc @traversaro

@prashanthr05 prashanthr05 changed the title [Core] iDynTree::Transform::log() computations seems to be wrong? [Core] iDynTree::Transform::log() and iDynTree::SpatialMotionVector::exp() computations seems to be wrong? Aug 24, 2019
@prashanthr05
Copy link
Contributor Author

prashanthr05 commented Aug 24, 2019

Similarly, the linear part of the exp() method is missing a multiplication with the Jacobian of SO(3).

// the linear part is not changed by the exp

This should be,
$$ T = \begin{bmatrix}
I_3 + \frac{(1 - \text{cos}(||\omega||))}{||\omega||^{2}} \omega \omega^{T} + \frac{\text{sin}(||\omega||)}{||\omega ||} \omega _{\times} & (I_3 + \frac{1 - \text{cos}(||\omega||)}{||\omega||^{2}} \omega _{\times} + \frac{||\omega|| - \text{sin}(||\omega||)}{||\omega||^{3}} \omega^{2} _{\times}) v\\
0 _{3\times 1} & 1
\end{bmatrix} $$

where the rotation part is obtained using Rodrigues formula (which is computed correctly using the AxisAngle computations of Eigen.)

prashanthr05 added a commit to prashanthr05/idyntree that referenced this issue Aug 25, 2019
- Adds left Jacobian and left Jacobian inverse of SO(3) to Rotation
- Fixes Transform::log()
- Fixes SpatialMotionVector::exp()
prashanthr05 added a commit to prashanthr05/idyntree that referenced this issue Aug 25, 2019
- Adds left Jacobian and left Jacobian inverse of SO(3) to Rotation
- Fixes Transform::log()
- Fixes SpatialMotionVector::exp()
prashanthr05 added a commit to prashanthr05/idyntree that referenced this issue Aug 25, 2019
- Adds left Jacobian and left Jacobian inverse of SO(3) to Rotation
- Fixes Transform::log()
- Fixes SpatialMotionVector::exp()
prashanthr05 added a commit to prashanthr05/idyntree that referenced this issue Aug 25, 2019
- Adds left Jacobian and left Jacobian inverse of SO(3) to Rotation
- Fixes Transform::log()
- Fixes SpatialMotionVector::exp()
@prashanthr05
Copy link
Contributor Author

The PR #562 was merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant