Solving Quaternion Confusion for 3D Orientation

  • Context: Graduate 
  • Thread starter Thread starter SGGSJi
  • Start date Start date
  • Tags Tags
    Confusion Quaternion
SGGSJi
Messages
2
Reaction score
0
Hi Guys,

I am getting a quaternion stream from motion sensor (accl, gyro, magneto). As I understand the quaternion represent the 3D orientation of objects. When I place the sensor at location 1 (I record quaternion, q1=[w x y z]), now if I place it at location 2 (say 3 feet to right, 2 feet up and 2 feet forward, q2=[w2 x2 y2 z2]) basically no rotation just translation, should I be expecting same quaternion values as location 1?

I get two different quaternion values, assuming that is correct. I wish to determine if there is any difference in orientation(Euler angles) at location1 and 2. Any ideas where I might be wrong.

Please guide.
Regards,
 
The quaternion output only describes the sensor orientation. It has nothing to do with position. If the two quaternions are different either: you did in fact rotate it, or the sensor has some error. I don't know what kind of sensor you have, but in general these things are always trying to balance a pure tilt measurement with rate sensor integration.

Change the quaternion outputs back in euler angles so that you have a better understanding of the difference. Maybe you are seeing a small angle difference.
 
Thank you
I was making sure that I don't rotate the sensor. I even tried converting quat output to Euler but the values were way different. Please note that as the quat values are with repect to global north the Euler angles were random, however the Euler angles for both locations should still be same. I believe to set euler angles to zero for a given location I should do the following
Q1= quat at location 1
Q1'= conjugate of Q1
Qnew= multiply (Q1', Q1)
Q2= quat at loc 2
Q2new= multiply(Q1',Q2)
Then Euler angles would be

EulerQ1= 0 0 0
EulerQ2= 0 0 0 ( ideally if no orientation at loc 2)
 
Hmm, at this point, I'd recommend getting in touch with tech support of the sensor manufacturer. I think the quaterion output is intended to be a simple representation of the orientation as a function of time, and is not a transformation from one reading to the next. You should be able to find a set of equations to express the Euler angles in terms of quaternion components. I'd be surprised if the manual didn't have something similar.
 

Similar threads

  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 11 ·
Replies
11
Views
5K
  • · Replies 8 ·
Replies
8
Views
4K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 2 ·
Replies
2
Views
4K
Replies
1
Views
3K
  • · Replies 5 ·
Replies
5
Views
6K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 9 ·
Replies
9
Views
2K
  • · Replies 3 ·
Replies
3
Views
4K