Exemple #1
0
 def test_bad_sequence(self):
     with self.assertRaises(AssertionError):
         dcs.quat_to_euler(self.zero_quat, np.array([1, 2]))
Exemple #2
0
 def test_all_valid(self):
     # TODO: this doesn't confirm that all of these give the correct answer, but just don't crash
     for this_seq in self.valid_sequences:
         euler = dcs.quat_to_euler(self.zero_quat, np.array(this_seq))
         np.testing.assert_array_equal(euler, np.zeros(3))
Exemple #3
0
 def test_all_invalid(self):
     for this_seq in self.bad_sequences:
         with self.assertRaises(ValueError):
             dcs.quat_to_euler(self.zero_quat, np.array(this_seq))
Exemple #4
0
 def test_nominal(self):
     euler = dcs.quat_to_euler(self.quat, self.seq)
     np.testing.assert_array_almost_equal(euler, self.euler)
Exemple #5
0
 def test_zero_quat(self):
     euler = dcs.quat_to_euler(self.zero_quat)
     np.testing.assert_array_equal(euler, np.zeros(3))
Exemple #6
0
 def test_bad_sequence(self):
     with self.assertRaises(AssertionError):
         dcs.quat_to_euler(self.zero_quat, np.array([1, 2]))
Exemple #7
0
 def test_all_invalid(self):
     for this_seq in self.bad_sequences:
         with self.assertRaises(ValueError):
             dcs.quat_to_euler(self.zero_quat, np.array(this_seq))
Exemple #8
0
 def test_all_valid(self):
     # TODO: this doesn't confirm that all of these give the correct answer, but just don't crash
     for this_seq in self.valid_sequences:
         euler = dcs.quat_to_euler(self.zero_quat, np.array(this_seq))
         np.testing.assert_array_equal(euler, np.zeros(3))
Exemple #9
0
 def test_zero_quat(self):
     euler = dcs.quat_to_euler(self.zero_quat)
     np.testing.assert_array_equal(euler, np.zeros(3))
Exemple #10
0
 def test_nominal(self):
     euler = dcs.quat_to_euler(self.quat, self.seq)
     np.testing.assert_array_almost_equal(euler, self.euler)