Minor code cleanups and clarifications

This commit is contained in:
Oleg Kalachev
2024-10-21 03:41:47 +03:00
parent 84a329cca7
commit b0b6eb9a97
2 changed files with 3 additions and 3 deletions

View File

@@ -75,7 +75,7 @@ public:
float sqz = z * z;
float sqw = w * w;
// Cases derived from https://orbitalstation.wordpress.com/tag/quaternion/
float sarg = -2 * (x * z - w * y) / (sqx + sqy + sqz + sqw); /* normalization added from urdfom_headers */
float sarg = -2 * (x * z - w * y) / (sqx + sqy + sqz + sqw);
if (sarg <= -0.99999) {
euler.x = 0;
euler.y = -0.5 * PI;