Operácie

Robotics

Z SensorWiki

Verzia z 09:06, 3. október 2016, ktorú vytvoril Balogh (diskusia | príspevky) (Vytvorená stránka „Helper page for the Peter Corke: Introduction to robotics MOOC. #week2 #matlab o=[-1.8833, 6.1427, 1.0000]; %Orientation vector a=[1.0000, -0.4925, 4.9085]; ...“)
(rozdiel) ← Staršia verzia | Aktuálna úprava (rozdiel) | Novšia verzia → (rozdiel)

Helper page for the Peter Corke: Introduction to robotics MOOC.

  1. week2 #matlab
o=[-1.8833, 6.1427, 1.0000];     %Orientation vector
a=[1.0000, -0.4925, 4.9085];     %Approach vector
R=oa2r(o,a)    %To create rotation matrix R from o and a vectors

R =

 0.9363         -0.2896         0.1987
 0.3130          0.9447        -0.0978
-0.1593         0.1538         0.9752
 
n=cross(o,a)     %To calculate normal vector n
n =
30.6439       10.2442       -5.2152

r=[n' o' a']     %To create rotation matrix r with columns of n, o, a vectors

# Wrong, n, o and a are unit vectors: 

r=[unit(n') unit(o') unit(a')]     %To create rotation matrix r with columns of n, o, a vectors

tr2rpy(R)     %To calculate roll, pitch and yaw angles from rotation matrix R
tr2rpy(r)     %To calculate roll, pitch and yaw angles from rotation matrix r

Can you please explain:

1. How can matrices R=oa2r(o,a) and r=[n' o' a'] proved to be equivalent? 2. Why is a difference appearing in the yaw angle calculated from matrix R and from matrix r?