Warning

## Homework 8 - Inverse Kinematics by GB Computation

The goal of this task is to solve the inverse kinematic task for a general 6R mechanism using a general Groebner Basis computation. This consists of the six main elements

1. Formulate the algebraic equations describing the inverse kinematics task.
2. Provide mechanism parameters (cosines and sines of \alpha's, a's, d's) as rational numbers satisfying identities on cosines and sines.
3. Provide the end effector pose as a rational matrix with rotation matrix satisfying the rotation identities.
4. Solve for (some) sines and cosines of joint angles using Groebner Basis computation.
5. Recover solutions for (all) sines and cosines using back-substitution.
6. Recover the joint angles from their sines and cosines.

Groebner Basis computation is done in exact arithmetics over rational numbers and therefore input must be provided in rational numbers. At the same time, the input must to satisfy all identities on rotations, otherwise the systems would have no solution. Therefore, we have to implement

Finalise the Groebner Basis solution to IK 6R Mechanism PRO-2016-IK-6R-GB-Assignment.mw.

1. (A1) Implement function constructing a rotation matrix from a unit quaternion.
2. (A2) Implement function constructing a unit quaternion from a rotation matrix.
3. (A3) Implement function returning a rational point on the circle, which is close to a given point with angle th.
4. (A4) Implement function returning a rational approximation to a given motion matrix E = <R|t>.
5. (A5) Solve the four given mechanisms.
6. (A6) Check that rational approximation of \lambda^2 & \mu^2=1.
7. (A7) Check that input MhV is not an exact rotation.
8. (A8) Check that MhR, which is a rational approximation to MhV, is an exact rotation.
9. (A9) Evaluate the Frobenius norm of the difference of the original pose MhV and the approximated pose MhR.
10. (A10) Formulate the algebraic equations of the 6R Inverse Kinematics.
11. (A11) Solve the 6R IK by a general Groebner basis construction, solving for all variables using back-substitution.
12. (A12) Check that the the equations have no solution for the input transformation MhV.
13. (A13) Select and show the real solutions for sines and cosines and their difference from the ground truth.
14. (A14) Recover the remaining sines and cosines if necessary.
15. (A15) Recover joint angles from their sines and cosines.

Upload via the course ware the zip archive hw08.zip containing