Comments (7)
Also, you state that your vector multiplication formula is q.inversed() * q(0, v) * q. The glm library convention uses the opposite I believe, because rotating v(1, 0, 0) by quaternion q(cos(rads(90/2)), 0, sin(rads(90/2)), 0) results in r(0, 0, -1). Which was my assumption, but instead I was getting r(0, 0, 1).
from px4-matrix.
Can we make assumption that rotations are always applied right to left?
ie. q2 * q1 * v means apply q1 to v first, then apply q2 rotation.
This would clear things up and be more consistent with how it is done in other places.
from px4-matrix.
v_rotated = q^(-1) * [0;v] * q
The description for the rotation formula seems to be wrong. As you stated above this actually applies a transformation rather than a rotation.
from px4-matrix.
I switched to Hamilton quaternion def here: 19554c4
The unit tests all pass with previous and current definition, so no significant change, but I agree it is better to follow the common convention. I'm not sure which reference I pulled that from orginaly.
@mkschreder Please post a new issue if you find anything else, thanks for going through the details.
@mkschreder Quaternion multiplication is associative I believe, so I don't think it matters if we we (q2 * q1)*v or q2 * (q1 * v). The code will execute it as QuatMul(q2, Quat_Mul(q1, v)), effectively always evaluating it as q2 * (q1 * v). Am I following you? Did you mean that v is a vector? I don't believe quat * vector is supported in the library.
from px4-matrix.
Roman, vector part of the resulting quaternion from that transformation is
the rotated vector v.
On 16 Aug 2016 09:57, "Roman Bapst" [email protected] wrote:
@mkschreder https://github.com/mkschreder
v_rotated = q^(-1) * [0;v] * q
The description for the rotation formula seems to be wrong. As you stated
above this actually applies a transformation rather than a rotation.—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#28 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AERqibRYSyXXzVEO7xgH3HI0XGuaI19Sks5qgW1mgaJpZM4JlDnZ
.
from px4-matrix.
It is clockwise, as that seems to be the convention when using hamilton
notation (as opposed to positive angle representing counterclockwise
rotation).
On 16 Aug 2016 10:41, "Martin Schroeder" [email protected]
wrote:
Roman, vector part of the resulting quaternion from that transformation is
the rotated vector v.On 16 Aug 2016 09:57, "Roman Bapst" [email protected] wrote:
@mkschreder https://github.com/mkschreder
v_rotated = q^(-1) * [0;v] * q
The description for the rotation formula seems to be wrong. As you stated
above this actually applies a transformation rather than a rotation.—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#28 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AERqibRYSyXXzVEO7xgH3HI0XGuaI19Sks5qgW1mgaJpZM4JlDnZ
.
from px4-matrix.
Thanks for fixing this.
from px4-matrix.
Related Issues (18)
- test_copyto fails in debug mode HOT 2
- Dcm Type Error HOT 2
- Problem with calculating floating point numbers with PseudoInverse library HOT 3
- Assigning values out of bounds doesn't throw error HOT 2
- How to deduce the maximum force generated in X, Y and Z directions for the fully-actuated UAV? HOT 2
- Add class for axis angle representation
- platform testing HOT 1
- Implementation of quaternion derivative HOT 1
- Support hamilton quaternion HOT 6
- Cholesky decomposition?
- May be a bug in matrix inverse HOT 1
- coverity low priority defects HOT 2
- I run stack overflow with some big matrix HOT 2
- Quaternion multiplication HOT 2
- cmake header only library
- Assert Function Coverage 100% HOT 1
- Fix Unit test properly HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from px4-matrix.