I'm trying to find the pose of an 3D vector in terms of RPY(Roll, Pitch, Yaw). Let's say the two end points of the vector is $P_0(x_0, y_0, z_0)$ and $P_1(x_1, y_1, z_1)$. So the centered vector I get is $V(V_x, V_y, V_z) = P_1 - P_0 = (x_1 - x_0, y_1 - y_0, z_1 - z_0)$

Then $cos(\alpha) = \frac{V_x}{|V|}\\ cos(\beta) = \frac{V_y}{|V|}\\ cos(\gamma) = \frac{V_z}{|V|}$

Thus, $\alpha = cos^{-1}(\frac{V_x}{|V|})\\ \beta = cos^{-1}(\frac{V_y}{|V|})\\ \gamma = cos^{-1}(\frac{V_z}{|V|})$

Here, I'm assuming $\alpha = roll,\ \beta = pitch,\ and \ \gamma = yaw$

Is it the correct way to do this?

  • $\begingroup$ What is RPY ... ? Ah ... Roll, Pitch, Yawl ... $\endgroup$ – Jean Marie May 27 at 19:16
  • $\begingroup$ Keep in mind that the 3 angles you computed are not independent. And there is no such thing as a roll of a vector. $\endgroup$ – user58697 May 27 at 19:57

Your Answer

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

Browse other questions tagged or ask your own question.