'Zeroing' a rotation, Quaternion inversion
Clash Royale CLAN TAG#URR8PPP
up vote
2
down vote
favorite
I am using an IMU-Sensor (Inertial Measurement Unit) to get the absolute rotation of a sensor kit I am building. The rotation is relative to the initial orientation, that means when the device is powered up the 'zero' rotation is set.
The sensor tells me its current rotation as a quaternion and by applying this to a reference vector - lets say (1,0,0) - I am visualizing that rotation. Works perfectly so far.
Now, I want to 'zero-out' the sensor without restarting it. Naively speaking, that means I have to undo the zeroing rotation. How do I do this?
My attempt:
Let the current rotation be $R$, the rotation at the zeroing moment $Z$ and the reference vector $x = (1, 0, 0)$ and we call the expected vector $y$.
Normally, I do: $y = R cdot x$ (works perfectly)
Now, I would do: $y = Z^-1 cdot R cdot x$ where $Z^-1$ is the inverse quaternion.
At the first moment this solution works. I can see that $y$ is reset to the x-axis. However, when I start rotating my sensor very wired things happen.
Question: What is the correct concept for zeroing a rotation system?
rotations quaternions
add a comment |Â
up vote
2
down vote
favorite
I am using an IMU-Sensor (Inertial Measurement Unit) to get the absolute rotation of a sensor kit I am building. The rotation is relative to the initial orientation, that means when the device is powered up the 'zero' rotation is set.
The sensor tells me its current rotation as a quaternion and by applying this to a reference vector - lets say (1,0,0) - I am visualizing that rotation. Works perfectly so far.
Now, I want to 'zero-out' the sensor without restarting it. Naively speaking, that means I have to undo the zeroing rotation. How do I do this?
My attempt:
Let the current rotation be $R$, the rotation at the zeroing moment $Z$ and the reference vector $x = (1, 0, 0)$ and we call the expected vector $y$.
Normally, I do: $y = R cdot x$ (works perfectly)
Now, I would do: $y = Z^-1 cdot R cdot x$ where $Z^-1$ is the inverse quaternion.
At the first moment this solution works. I can see that $y$ is reset to the x-axis. However, when I start rotating my sensor very wired things happen.
Question: What is the correct concept for zeroing a rotation system?
rotations quaternions
If you know the current quaternion with respect to the original zero measurement, why don't you just apply the inverse of the current quaternion? That would bring you back to the identity (presumably your zero orientation?)
â rschwieb
Aug 8 at 19:42
I am not sure what you try to say? Could you write that down formally? I am working with quaternions since yesterday, so I am not yet on a 'why don't you just...' base here...
â Matthias Sokolowski
Aug 8 at 20:31
That's funny, I am not sure what you try to say? Could you write that down formally? is exactly what I was going to start with in my last comment. I don't really understand what challenge there is in "zeroing out" the sensor. "Zeroing out" implies you have a fixed "zero value" that you can re-assign to the value. Why would the zero value ever change? But let's ignore that for now and go on to a nother question: if you have "the zeroing rotation", and you "want to undo the rotation" you would just use the inverse rotation. The inverse rotation, by definition, undoes the rotation.
â rschwieb
Aug 8 at 20:37
So is the second thing what you are looking for? "I have a rotation and I want to undo it"?
â rschwieb
Aug 8 at 20:38
Ok, I am pretty sure, that I kind of self answered my question and my original solution - also as indicated by you - was in fact correct from the beginning. Apparently, a number of mistakes here when testing - e.g. drifting sensors and rotating to may things at a time - made me believe I had a wrong concept.
â Matthias Sokolowski
Aug 8 at 23:19
add a comment |Â
up vote
2
down vote
favorite
up vote
2
down vote
favorite
I am using an IMU-Sensor (Inertial Measurement Unit) to get the absolute rotation of a sensor kit I am building. The rotation is relative to the initial orientation, that means when the device is powered up the 'zero' rotation is set.
The sensor tells me its current rotation as a quaternion and by applying this to a reference vector - lets say (1,0,0) - I am visualizing that rotation. Works perfectly so far.
Now, I want to 'zero-out' the sensor without restarting it. Naively speaking, that means I have to undo the zeroing rotation. How do I do this?
My attempt:
Let the current rotation be $R$, the rotation at the zeroing moment $Z$ and the reference vector $x = (1, 0, 0)$ and we call the expected vector $y$.
Normally, I do: $y = R cdot x$ (works perfectly)
Now, I would do: $y = Z^-1 cdot R cdot x$ where $Z^-1$ is the inverse quaternion.
At the first moment this solution works. I can see that $y$ is reset to the x-axis. However, when I start rotating my sensor very wired things happen.
Question: What is the correct concept for zeroing a rotation system?
rotations quaternions
I am using an IMU-Sensor (Inertial Measurement Unit) to get the absolute rotation of a sensor kit I am building. The rotation is relative to the initial orientation, that means when the device is powered up the 'zero' rotation is set.
The sensor tells me its current rotation as a quaternion and by applying this to a reference vector - lets say (1,0,0) - I am visualizing that rotation. Works perfectly so far.
Now, I want to 'zero-out' the sensor without restarting it. Naively speaking, that means I have to undo the zeroing rotation. How do I do this?
My attempt:
Let the current rotation be $R$, the rotation at the zeroing moment $Z$ and the reference vector $x = (1, 0, 0)$ and we call the expected vector $y$.
Normally, I do: $y = R cdot x$ (works perfectly)
Now, I would do: $y = Z^-1 cdot R cdot x$ where $Z^-1$ is the inverse quaternion.
At the first moment this solution works. I can see that $y$ is reset to the x-axis. However, when I start rotating my sensor very wired things happen.
Question: What is the correct concept for zeroing a rotation system?
rotations quaternions
asked Aug 8 at 19:36
Matthias Sokolowski
111
111
If you know the current quaternion with respect to the original zero measurement, why don't you just apply the inverse of the current quaternion? That would bring you back to the identity (presumably your zero orientation?)
â rschwieb
Aug 8 at 19:42
I am not sure what you try to say? Could you write that down formally? I am working with quaternions since yesterday, so I am not yet on a 'why don't you just...' base here...
â Matthias Sokolowski
Aug 8 at 20:31
That's funny, I am not sure what you try to say? Could you write that down formally? is exactly what I was going to start with in my last comment. I don't really understand what challenge there is in "zeroing out" the sensor. "Zeroing out" implies you have a fixed "zero value" that you can re-assign to the value. Why would the zero value ever change? But let's ignore that for now and go on to a nother question: if you have "the zeroing rotation", and you "want to undo the rotation" you would just use the inverse rotation. The inverse rotation, by definition, undoes the rotation.
â rschwieb
Aug 8 at 20:37
So is the second thing what you are looking for? "I have a rotation and I want to undo it"?
â rschwieb
Aug 8 at 20:38
Ok, I am pretty sure, that I kind of self answered my question and my original solution - also as indicated by you - was in fact correct from the beginning. Apparently, a number of mistakes here when testing - e.g. drifting sensors and rotating to may things at a time - made me believe I had a wrong concept.
â Matthias Sokolowski
Aug 8 at 23:19
add a comment |Â
If you know the current quaternion with respect to the original zero measurement, why don't you just apply the inverse of the current quaternion? That would bring you back to the identity (presumably your zero orientation?)
â rschwieb
Aug 8 at 19:42
I am not sure what you try to say? Could you write that down formally? I am working with quaternions since yesterday, so I am not yet on a 'why don't you just...' base here...
â Matthias Sokolowski
Aug 8 at 20:31
That's funny, I am not sure what you try to say? Could you write that down formally? is exactly what I was going to start with in my last comment. I don't really understand what challenge there is in "zeroing out" the sensor. "Zeroing out" implies you have a fixed "zero value" that you can re-assign to the value. Why would the zero value ever change? But let's ignore that for now and go on to a nother question: if you have "the zeroing rotation", and you "want to undo the rotation" you would just use the inverse rotation. The inverse rotation, by definition, undoes the rotation.
â rschwieb
Aug 8 at 20:37
So is the second thing what you are looking for? "I have a rotation and I want to undo it"?
â rschwieb
Aug 8 at 20:38
Ok, I am pretty sure, that I kind of self answered my question and my original solution - also as indicated by you - was in fact correct from the beginning. Apparently, a number of mistakes here when testing - e.g. drifting sensors and rotating to may things at a time - made me believe I had a wrong concept.
â Matthias Sokolowski
Aug 8 at 23:19
If you know the current quaternion with respect to the original zero measurement, why don't you just apply the inverse of the current quaternion? That would bring you back to the identity (presumably your zero orientation?)
â rschwieb
Aug 8 at 19:42
If you know the current quaternion with respect to the original zero measurement, why don't you just apply the inverse of the current quaternion? That would bring you back to the identity (presumably your zero orientation?)
â rschwieb
Aug 8 at 19:42
I am not sure what you try to say? Could you write that down formally? I am working with quaternions since yesterday, so I am not yet on a 'why don't you just...' base here...
â Matthias Sokolowski
Aug 8 at 20:31
I am not sure what you try to say? Could you write that down formally? I am working with quaternions since yesterday, so I am not yet on a 'why don't you just...' base here...
â Matthias Sokolowski
Aug 8 at 20:31
That's funny, I am not sure what you try to say? Could you write that down formally? is exactly what I was going to start with in my last comment. I don't really understand what challenge there is in "zeroing out" the sensor. "Zeroing out" implies you have a fixed "zero value" that you can re-assign to the value. Why would the zero value ever change? But let's ignore that for now and go on to a nother question: if you have "the zeroing rotation", and you "want to undo the rotation" you would just use the inverse rotation. The inverse rotation, by definition, undoes the rotation.
â rschwieb
Aug 8 at 20:37
That's funny, I am not sure what you try to say? Could you write that down formally? is exactly what I was going to start with in my last comment. I don't really understand what challenge there is in "zeroing out" the sensor. "Zeroing out" implies you have a fixed "zero value" that you can re-assign to the value. Why would the zero value ever change? But let's ignore that for now and go on to a nother question: if you have "the zeroing rotation", and you "want to undo the rotation" you would just use the inverse rotation. The inverse rotation, by definition, undoes the rotation.
â rschwieb
Aug 8 at 20:37
So is the second thing what you are looking for? "I have a rotation and I want to undo it"?
â rschwieb
Aug 8 at 20:38
So is the second thing what you are looking for? "I have a rotation and I want to undo it"?
â rschwieb
Aug 8 at 20:38
Ok, I am pretty sure, that I kind of self answered my question and my original solution - also as indicated by you - was in fact correct from the beginning. Apparently, a number of mistakes here when testing - e.g. drifting sensors and rotating to may things at a time - made me believe I had a wrong concept.
â Matthias Sokolowski
Aug 8 at 23:19
Ok, I am pretty sure, that I kind of self answered my question and my original solution - also as indicated by you - was in fact correct from the beginning. Apparently, a number of mistakes here when testing - e.g. drifting sensors and rotating to may things at a time - made me believe I had a wrong concept.
â Matthias Sokolowski
Aug 8 at 23:19
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
0
down vote
My own mistakes during testing made me believe I applied the wrong concept. However, the solution explained above is in fact correct.
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
My own mistakes during testing made me believe I applied the wrong concept. However, the solution explained above is in fact correct.
add a comment |Â
up vote
0
down vote
My own mistakes during testing made me believe I applied the wrong concept. However, the solution explained above is in fact correct.
add a comment |Â
up vote
0
down vote
up vote
0
down vote
My own mistakes during testing made me believe I applied the wrong concept. However, the solution explained above is in fact correct.
My own mistakes during testing made me believe I applied the wrong concept. However, the solution explained above is in fact correct.
answered Aug 8 at 23:20
Matthias Sokolowski
111
111
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f2876502%2fzeroing-a-rotation-quaternion-inversion%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
If you know the current quaternion with respect to the original zero measurement, why don't you just apply the inverse of the current quaternion? That would bring you back to the identity (presumably your zero orientation?)
â rschwieb
Aug 8 at 19:42
I am not sure what you try to say? Could you write that down formally? I am working with quaternions since yesterday, so I am not yet on a 'why don't you just...' base here...
â Matthias Sokolowski
Aug 8 at 20:31
That's funny, I am not sure what you try to say? Could you write that down formally? is exactly what I was going to start with in my last comment. I don't really understand what challenge there is in "zeroing out" the sensor. "Zeroing out" implies you have a fixed "zero value" that you can re-assign to the value. Why would the zero value ever change? But let's ignore that for now and go on to a nother question: if you have "the zeroing rotation", and you "want to undo the rotation" you would just use the inverse rotation. The inverse rotation, by definition, undoes the rotation.
â rschwieb
Aug 8 at 20:37
So is the second thing what you are looking for? "I have a rotation and I want to undo it"?
â rschwieb
Aug 8 at 20:38
Ok, I am pretty sure, that I kind of self answered my question and my original solution - also as indicated by you - was in fact correct from the beginning. Apparently, a number of mistakes here when testing - e.g. drifting sensors and rotating to may things at a time - made me believe I had a wrong concept.
â Matthias Sokolowski
Aug 8 at 23:19