To explain my situation, I am working with haptics devices connected with a stylus (a simple rod). I am calculating the middle of the stylus and its orientation according to a 3d frame (+y is right, +z is up and x is towards) in order to send thoses data to a robotic arm. Then I'd like to create a simple position controller to make the movement smoother, so I acquire the arm's end effector position/orientation that correspond to the middle of the stylus and send it back to the controller. As I need to control both haptics separately so I need to calculate both stylus extremities. It is a trigonometric issue : I am looking to get cartesian positions of the stylus' extremities from orientation and middle position. Thanks in advance
Asked
Active
Viewed 118 times
1
-
This might be better posed on Physics Stack Exchange or Engineering Stack Exchange (Beta). – Zach466920 Apr 30 '15 at 21:09
-
I don't think so because it is trigonometry – Tristan C Apr 30 '15 at 21:15
-
Those other sites use math, but they may be more familiar with your instrument set up...This site may be able to help, I was only suggesting that this site may not be the most effective way to get your question answered. – Zach466920 Apr 30 '15 at 21:17
-
all right, thank you for the suggestion, I'll post there too – Tristan C May 01 '15 at 12:30
1 Answers
0
If the middle point is $(x_M,y_M,z_M)^T$ and th orientation versor is $(u_x,u_y,u_z)^T$, than the equation of the stright line for the stylus is: $$ (x,y,z)^T=(x_M,y_M,z_M)^T+t(u_x,u_y,u_z)^T $$
so, if the leght of the stylus is $l$, the extremities are: $$ (x_M,y_M,z_M)^T\pm \dfrac{l}{2}(u_x,u_y,u_z)^T $$

Emilio Novati
- 62,675
-
thanks emilio for this answer, but the problem is to evaluate the orientation vector. I am stuck with euler angles, I am not able to find ux depending on yaw, pitch or roll, any suggestion? – Tristan C May 01 '15 at 17:09
-
If your problem is to find the orientation versor I think that is better if you post another question (with a different title) where you better specify what you know and what you find. Maybe that your problem can be solved using quaternions. You can see here: http://math.stackexchange.com/questions/435680/quaternions-vs-axis-angle/1071145#1071145 and related questions. – Emilio Novati May 01 '15 at 18:13