Beispiel #1
0
    def world_euler_angles(self):
        """  World rotation in euler angle representation as Vector of length 3.
        Internally quaternions are used. The used rotation order is YZX.

        .. seealso:: Please have a look at the :ref:`rotations` section for more details.
        """
        return quaternion_to_euler_angles(self.world_quaternion)
Beispiel #2
0
 def test_quaternion_to_euler_4(self):
     q = Quaternion([1, 0, 0, 0])
     e = quaternion_to_euler_angles(q)
     np.testing.assert_almost_equal(np.array(e), np.array([180., 0., 0.]))
Beispiel #3
0
 def test_quaternion_to_euler_5(self):
     q = Quaternion([0.3711136, 0.0742227, 0.519559, 0.7660444])
     e = quaternion_to_euler_angles(q)
     np.testing.assert_almost_equal(np.array(e), np.array([69.4060045, -31.1935729, 58.3315948]), decimal=5)
Beispiel #4
0
 def test_quaternion_to_euler_2(self):
     q = Quaternion([0, 0, 1, 0])
     e = quaternion_to_euler_angles(q)
     # Rotation [180, 180, 0] and [0,0,180] are the same thing.
     np.testing.assert_almost_equal(np.array(e), np.array([180., 180., 0.]))