robotology / whole-body-controllers

Simulink-based whole body controllers for humanoid robots.
116 stars 43 forks source link

Integral quaternion #110

Closed gsilano closed 3 years ago

gsilano commented 3 years ago

Hi everybody! I hope my question would be interesting and a source of inspiration even if this is not specifically meant to work in the iCub ecosystem. Currently, I'm facing the problem of integrating the first time derivative of a quaternion, the opposite of what has been implemented in this MATLAB function.

Googleing the problem, I come up with numerous solutions. Above all, I found of interest what reported at this website: https://www.ashwinnarayan.com/post/how-to-integrate-quaternions.

I worked on this, but when I run a simple test script I realized there is something wrong somewhere since single-axis rotations reflect in the wrong way in the Euler angles. I attached the MATLAB scripts I used for the tests together with the implemented MATLAB functions.

I hope that solving this problem would be useful for me and for the whole community.

MATLAB_functions.zip

traversaro commented 3 years ago

Hi @gsilano, thanks for sharing your solution to this problem.

Hi everybody! I hope my question would be interesting and a source of inspiration even if this is not specifically meant to work in the iCub ecosystem.

Just to understand, from your issue it seems that you already solved your question, is that correct? In this case, if you just want to share something that you find cool with the iCub community, probably it may be more indicate (in the sense that it would reach more people) to post this in the Robotology Community Discussions (see https://github.com/robotology/community/discussions). cc @pattacini

pattacini commented 3 years ago

Yep, we do have this particular category: https://github.com/robotology/community/discussions/categories/show-and-tell.

gsilano commented 3 years ago

Hi @traversaro and @pattacini! I will move the conversation there. Thanks!

This is the link to that: https://github.com/robotology/community/discussions/493