2
$\begingroup$

the problem I have is the following (see picture below), I am able to compute a starting frame $F_S (X_S, Y_S, Z_S)$, an ending frame $F_E (X_E, Y_E, Z_E)$ and a path from $F_S$ to $F_T$ and what I want to do it to compute a serie of transformations that will transform $F_S$ into $F_E$ along the path.

Naively I computed the Euler angles for $F_E$ end $F_S$, compute the differences and incrementally built the transformations but it does not work. Does somebody can give me some hints or pointers towards existing solutions?

The application is related to the computation of a path for an arm and so the frames are associated with the end effector.

Thank you

enter image description here

$\endgroup$
  • 1
    $\begingroup$ Euler angles have many mathematical disadvantages, and it's never necessary to use them because of all the alternatives (mentioned in the answers), so it's best to forget about them. $\endgroup$ – JJM Driessen May 20 '17 at 10:21
2
$\begingroup$

Quaternions and SLERP is what you want.

| improve this answer | |
$\endgroup$
  • $\begingroup$ Thank you very much, after searching on internet, it is what I am looking for indeed! $\endgroup$ – fabrice May 20 '17 at 18:31
1
$\begingroup$

There are a number of ways to do so. Using quaternions has already been mentioned so I will go with (4x4) transformation matrices.

Let a transformation matrix $T$ be $$ T = \begin{bmatrix}R & p\\ 0 & 1\end{bmatrix}, $$ where $R$ is a rotation matrix and $p$ is a position vector. I will write $T = (R, p)$ for short. You want to generate a path connecting $T_1= (R_1, p_1)$ and $T_2= (R_2, p_2)$. The problem then boils down to generating a rotational path and a translational path, separately. For translation, a path can be generated pretty easily using any method like polynomial interpolation or using splines. For rotation, it's a bit more complicated but in the end it can also be done using methods like polynomial interpolation. So I will talk a bit about rotation here.

The thing is that any rotation matrix can be written as $$R = e^{[r]},$$ where $r \in \mathbf{R}^3$, $[\cdot]$ maps a vector to a unique skew symmetric matrix, and $e^{[r]}$ is the matrix exponential $$ e^{[r]} = \sum_{k = 0}^{\infty}\frac{1}{k!}[r]^k. $$ (Of course, there is a formula for that without evaluating that infinite sum.) So actually a rotational path may be generated as $$R(t) = R_0e^{[r(t)]},$$ where $r(t)$ is a polynomial vector and $R_0$ is some constant rotation matrix. Then you just need to find $r(t)$ such that $R_0e^{[r(0)]} = R_1$ and $R_0e^{[r(T)]} = R_2$, so as to meet your boundary conditions. For more details, you may have a look at this paper, for example.

| improve this answer | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.