Don't ad-block us - support your favorite websites. We have safe, unobstrusive, robotics related ads that you actually want to see - see here for more.

0 Members and 1 Guest are viewing this topic.

Finally, when you say "what is my x, y, z," what do you mean? X, Y, Z are typically used alone for translation, and quaternions are typically not used with translation at all. And when you say your "angular orientation," what angles do you mean? A quaternion is already a representation of orientation. Do you mean "heading, pitch, roll"? If so, relative to what coordinate frame? X axis as forward? Note that heading/pitch/roll relative to a fixed world reference behaves very unintuitively when you're not mainly pointing "forward."

Let's say I calculated the quaternions every 0.01s. Given that list of quaternions, how do I calculate the current x/y/z coordinates, and a,a,a?

Roll, pitch, and yaw are useful for stability

The AHRS code or DCM (directional cosine matrix - google it for a great paper) has been part of webbotlib for a while. If its of interest then see http://webbot.org.uk/iPoint/49.page as it gives some examples.

Here is my question: what is the equation to convert those four quaternions to determine the roll, pitch, and yaw. We already know the answer: 0,0,0. It didn't rotate. But how do I calculate that knowing only the quaternions?