Simscape Multibody quaternion calculation does not match hand calculation
Show older comments
I have noticed a potential issue regarding the Simscape block "Transform Sensor".
I am simulating the rotation of a simple body by using a gimbal joint. The inputs into the gimbal joint are three desired angles (roll, pitch, yaw). Now I am using the "Transform Sensor" to output the quaternion "Q" describing the motion between the base frame (World) and the follower frame (Rotating Body). At the same time, I am calculating the quaternion via a MATLAB Function block with the equations I found from reference to convert Euler angles to quaternion. For example, see the section "Euler angles to quaternion conversion" in the following link:
Now if I compare the quaternion entries computed by the Transform Sensor block and the quaternion computed from the Euler angle equations I use, there is no difference as long as I only have a single rotation about roll, pitch, or yaw. But once I combine two or more movements, there is an error between the two quaternion calculations.
Can you explain the reason for the difference? Is there a different convention I need to apply? Or do I have to change the settings of the transform sensor?
Accepted Answer
More Answers (0)
Categories
Find more on Applications in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!