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] Fix Transform::log() and SpatialMotionVector::exp() #562

Merged
merged 1 commit into from
Aug 26, 2019

Conversation

prashanthr05
Copy link
Contributor

  • Adds left Jacobian and left Jacobian inverse of SO(3) to Rotation
  • Fixes Transform::log()
  • Fixes SpatialMotionVector::exp()

@prashanthr05 prashanthr05 changed the title [Core] fix #561 [Core] iDynTree::Transform::log() and iDynTree::SpatialMotionVector::exp() Aug 25, 2019
@prashanthr05 prashanthr05 changed the title [Core] iDynTree::Transform::log() and iDynTree::SpatialMotionVector::exp() [Core] Fix iDynTree::Transform::log() and iDynTree::SpatialMotionVector::exp() Aug 25, 2019
@prashanthr05 prashanthr05 changed the title [Core] Fix iDynTree::Transform::log() and iDynTree::SpatialMotionVector::exp() [Core] Fix Transform::log() and SpatialMotionVector::exp() 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

@traversaro it'd be great if you could review this PR.


Transform t_v = v.exp();

ASSERT_EQUAL_TRANSFORM_TOL(t_posrot, t_v, 0.01);
Copy link
Member

Choose a reason for hiding this comment

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

This test is not testing the linear part?

Copy link
Contributor Author

@prashanthr05 prashanthr05 Aug 25, 2019

Choose a reason for hiding this comment

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

Computationally, it is (meaning, the Jacobian is computed underneath and is multiplied with the linear part, and the computation does not crash). Quantitatively, no. Since the linear part is set to all zeros.

Copy link
Member

Choose a reason for hiding this comment

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

I see, we are not checking if the function is correct, but at least we are checking stuff like that memory is correct with Valgrind, etc etc.

@traversaro
Copy link
Member

I am bit puzzled about that. In theory changing the behavior of a public function would call for creating a new function and deprecate the old one, but in practice the behavior of those function was not documented, so I think it is fair to consider the "wrong" behavior for the linear part as a bug.

@traversaro traversaro merged commit 5635a4f into robotology:devel Aug 26, 2019
@prashanthr05
Copy link
Contributor Author

I am bit puzzled about that. In theory changing the behavior of a public function would call for creating a new function and deprecate the old one, but in practice the behavior of those function was not documented, so I think it is fair to consider the "wrong" behavior for the linear part as a bug.

I do not fully comprehend this statement. You mean since some macro related to make_deprecated was not called since we made changes directly on the public API of Transform or SpatialMotionVector?

@traversaro
Copy link
Member

I do not fully comprehend this statement. You mean since some macro related to make_deprecated was not called since we made changes directly on the public API of Transform or SpatialMotionVector?

I will explain to you in person. In a nutshell, in general you cannot change the behaviour of a public function, i.e. if you have a function int sum(int, int) that sums two integers, you cannot suddenly change its behaviour to something else, unless the previous behaviour was not consistent with what documented/had a bug.

@prashanthr05
Copy link
Contributor Author

prashanthr05 commented Aug 27, 2019

you cannot suddenly change its behaviour to something else, unless the previous behaviour was not consistent with what documented/had a bug.

Ah, okay. I understand and I agree.

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

Successfully merging this pull request may close these issues.

2 participants