In a situation where I have two axis adjacent back to back (let's say a robotic arm) I can sometimes perform two rotations ($R1, R2$) such that the resulting position and direction is unchanged.
This is trivial in cases where two axis are identical -- having $R2 = -R1$.
In case the axis are orthogonal, there is no solution.
Third case being in between the two, where there is not a solution, but there is a "best" fit.
A more complex situation is having ~15 of these axis.
What is the proper name for this concatenated rotation (so I can search better) and how would one model a counter rotation? I envision an algorithm along these lines, but I'd like a closed form solution:
For rotations $i$ through $j$
- Let $k$ = $j$
- Find best fit rotation for $k$..$j$
- If this is not a 0-error solution
- Set $k$ = $k$ - 1
- Goto #2
Additional Information as per comments below:
Achieving cumulative rotation of identity is a simplified version. This is more complex because rotations do not start at the same origin. They are concatenated -- so in real world a robot's arm of 15 degrees of freedom, with each rod being, say, 12 inches, may collide and prevent the rotation. I'm not worried about this collision for theory purposes.
So for full solution, I need final rotation to be identity, and translation of the last vector to be zero