Rotations: screws.so3¶
Rotations: SO(3), so(3), exponential coordinates. MR chapter 3.2.
Portions derived from the Modern Robotics code library, Copyright (c) 2018 Huan Weng, Bill Hunt, Jarvis Schultz, Mikhail Todes (MIT).
near_zero ¶
near_zero(z)
True if the scalar z is small enough to be treated as zero (|z| < 1e-6).
MR library helper; notes 3.6 uses it for the theta = 0 case.
Source code in screws/so3.py
28 29 30 31 32 33 | |
normalize ¶
normalize(v)
The unit vector in the direction of v.
MR library helper.
Source code in screws/so3.py
36 37 38 39 40 41 42 | |
rot_inv ¶
rot_inv(R)
The inverse of a rotation matrix, its transpose.
MR 3.2.1; notes 3.3 (Rotation matrices).
Source code in screws/so3.py
45 46 47 48 49 50 | |
vec_to_so3 ¶
vec_to_so3(omega)
[omega], the 3x3 skew-symmetric matrix with [omega] y = omega x y.
MR 3.2.3.1, eq. 3.30; notes 3.5 (Angular velocities).
Source code in screws/so3.py
53 54 55 56 57 58 59 | |
so3_to_vec ¶
so3_to_vec(so3mat)
The 3-vector omega from its skew-symmetric matrix [omega].
MR 3.2.3.1; notes 3.5.
Source code in screws/so3.py
62 63 64 65 66 67 68 | |
axis_angle3 ¶
axis_angle3(expc3)
(omega_hat, theta) from the exponential coordinates omega_hat theta.
MR 3.2.3.3; notes 3.6 (Exponential coordinates of rotations).
Source code in screws/so3.py
71 72 73 74 75 76 77 | |
exp3 ¶
exp3(so3mat)
e^{[omega] theta}: the rotation matrix from the so(3) matrix [omega] theta.
Rodrigues' formula. MR 3.2.3.3, eq. 3.51; notes 3.6.
Source code in screws/so3.py
80 81 82 83 84 85 86 87 88 89 90 91 | |
log3 ¶
log3(R)
The matrix logarithm [omega] theta of a rotation matrix R.
MR 3.2.3.3, algorithm after eq. 3.53; notes 3.6.
Source code in screws/so3.py
94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 | |
project_so3 ¶
project_so3(mat)
The rotation matrix nearest to mat (singular-value decomposition).
Only meaningful for matrices already close to SO(3). MR library; MR Appendix E.
Source code in screws/so3.py
122 123 124 125 126 127 128 129 130 131 | |
distance_so3 ¶
distance_so3(mat)
||mat^T mat - I|| if det mat > 0, else 1e9: how far mat is from SO(3).
MR library; MR Appendix E.
Source code in screws/so3.py
134 135 136 137 138 139 140 141 142 | |
is_so3 ¶
is_so3(mat)
True if mat is within 1e-3 of SO(3) by distance_so3.
MR library.
Source code in screws/so3.py
145 146 147 148 149 150 | |
rot ¶
rot(omega_hat, theta)
Rot(omega_hat, theta): the rotation about the unit axis omega_hat by theta.
Addition, not in the MR library. MR 3.2.3.3; notes 3.6.
Source code in screws/so3.py
153 154 155 156 157 158 | |
rotation_from_rpy ¶
rotation_from_rpy(roll, pitch, yaw)
URDF fixed-axis roll-pitch-yaw: Rot(z, yaw) Rot(y, pitch) Rot(x, roll).
Addition, not in the MR library. MR Appendix B.1; notes 4.3 (URDF).
Source code in screws/so3.py
161 162 163 164 165 166 | |