Script allows you to rotate a quaternion by XYZ Euler (so rotation about local target axes) angles and produces new quaternion.
Python 3.9.10
All required packages in requirements.txt file.
To install all required packages, type:
pip install -r requirements.txt
in the terminal.
- At the top of the file, input the quaternion you want to rotate in quaternion_to_rotate variable.
- Input also the angle matrix to angle_matrix variable.
- Run the script.
- After successful execution, program should print simple rotations and after that, the desired rotation.
Script comes in handy in robot programming, when you have no other way of rotating a robot target about axes you specify.
Everything About Unit Quaternions to Express Orientations in Robotics + Great Demos [LESSON 12] - https://www.youtube.com/watch?v=Ek9fySVzuq4
Conversion between quaternions and Euler angles - https://en.wikipedia.org/wiki/Conversion_between_quaternions_and_Euler_angles
Maths - Conversion Matrix to Quaternion - https://www.euclideanspace.com/maths/geometry/rotations/conversions/matrixToQuaternion/
Converting a Rotation Matrix to a Quaternion - https://d3cw3dd2w32x2b.cloudfront.net/wp-content/uploads/2015/01/matrix-to-quat.pdf
Distributed under the MIT License. See LICENSE file for more information.