New answers tagged rotation
3
The accelerometer measures the gravity vector in the body frame, call it $a$. If you normalize that, say $\hat a$, it's the third row of the rotation matrix $R$ that represents the rotation of the body. i.e.
$$
R^\top \begin{pmatrix}0 \\ 0 \\ 1\end{pmatrix} = \frac{a}{||a||} = \hat a = z_{\mathcal{W}}^{\mathcal{B}}
$$
So $$ R = \begin{pmatrix} ? \\ ? \\ \...
1
First off, your code may have some confusion about atan2, which already returns an angle between -pi and +pi. That's one reason to use atan2(dy, dx) instead of atan(dy/dx) -- it figures out the correct quadrant so we don't have to. (The other reason to use atan2 is that it works fine when dx is near zero, where atan(dy/dx) will suffer loss of precision, ...
Top 50 recent answers are included
Related Tags
rotation × 74kinematics × 11
robotic-arm × 9
inverse-kinematics × 9
imu × 6
orientation × 6
frame × 6
odometry × 5
transforms × 5
sensors × 4
mechanism × 4
gyroscope × 4
forward-kinematics × 4
movement × 4
motor × 3
ros × 3
slam × 3
localization × 3
computer-vision × 3
design × 3
accelerometer × 3
pose × 3
geometry × 3
screw-theory × 3
inclinometer × 3