Package test_suite :: Package unit_tests :: Package _lib :: Package _geometry :: Module test_rotations :: Class Test_rotations
[hide private]
[frames] | no frames]

Class Test_rotations

source code


Unit tests for the lib.geometry.rotations relax module.

Nested Classes [hide private]

Inherited from unittest.case.TestCase: failureException

Instance Methods [hide private]
 
setUp(self)
Set up data used by the unit tests.
source code
 
check_return_conversion(self, euler_to_R=None, R_to_euler=None, alpha_start=None, beta_start=None, gamma_start=None, alpha_end=None, beta_end=None, gamma_end=None)
Check the Euler angle to rotation matrix to Euler angle conversion.
source code
 
check_rotation(self, R, x_real_pos, y_real_pos, z_real_pos, x_real_neg, y_real_neg, z_real_neg)
Check that the rotation matrix is correct.
source code
 
test_axis_angle_to_R_no_rot(self)
Test the quaternion to rotation matrix conversion for a zero angle rotation.
source code
 
test_axis_angle_to_quaternion_no_rot(self)
Test the axis-angle to quaternion conversion for a zero angle rotation.
source code
 
test_axis_angle_to_quaternion_180_complex(self)
Test the axis-angle to quaternion conversion for a 180 degree rotation about [1, 1, 1].
source code
 
test_axis_angle_to_R_z_30(self)
Test the quaternion to rotation matrix conversion for a 30 degree rotation about z.
source code
 
test_axis_angle_to_R_180_complex(self)
Test the quaternion to rotation matrix conversion for a 180 degree rotation about [1, 1, 1].
source code
 
test_euler_cycle_1(self)
Cycle through all the hard-coded conversion functions returning to the starting point.
source code
 
test_euler_zyz_to_euler_zyz(self)
Bounce around all the conversion functions to see if the original angles are returned.
source code
 
test_euler_zyz_to_R_alpha_30(self)
Test the rotation matrix from zyz Euler angle conversion using a beta angle of pi/4.
source code
 
test_euler_zyz_to_R_beta_45(self)
Test the rotation matrix from zyz Euler angle conversion using a beta angle of pi/4.
source code
 
test_euler_zyz_to_R_gamma_15(self)
Test the rotation matrix from zyz Euler angle conversion using a beta angle of pi/4.
source code
 
test_euler_zyz_to_R_alpha_15_gamma_15(self)
Test the rotation matrix from zyz Euler angle conversion using a beta angle of pi/4.
source code
 
test_R_to_axis_angle_no_rot(self)
Test the rotation matrix to axis-angle conversion.
source code
 
test_R_to_axis_angle_180_complex(self)
Test the rotation matrix to axis-angle conversion.
source code
 
test_R_to_euler_to_R_xyx(self)
Test the rotation matrix to xyx Euler angle conversion and back again.
source code
 
test_R_to_euler_to_R_xyz(self)
Test the rotation matrix to xyz Euler angle conversion and back again.
source code
 
test_R_to_euler_to_R_xzx(self)
Test the rotation matrix to xzx Euler angle conversion and back again.
source code
 
test_R_to_euler_to_R_xzy(self)
Test the rotation matrix to xzy Euler angle conversion and back again.
source code
 
test_R_to_euler_to_R_yxy(self)
Test the rotation matrix to yxy Euler angle conversion and back again.
source code
 
test_R_to_euler_to_R_yxz(self)
Test the rotation matrix to yxz Euler angle conversion and back again.
source code
 
test_R_to_euler_to_R_yzx(self)
Test the rotation matrix to yzx Euler angle conversion and back again.
source code
 
test_R_to_euler_to_R_yzy(self)
Test the rotation matrix to yzy Euler angle conversion and back again.
source code
 
test_R_to_euler_to_R_zxy(self)
Test the rotation matrix to zxy Euler angle conversion and back again.
source code
 
test_R_to_euler_to_R_zxz(self)
Test the rotation matrix to zxz Euler angle conversion and back again.
source code
 
test_R_to_euler_to_R_zyx(self)
Test the rotation matrix to zyx Euler angle conversion and back again.
source code
 
test_R_to_euler_to_R_zyz(self)
Test the rotation matrix to zyz Euler angle conversion and back again.
source code
 
test_R_to_euler_xyx(self)
Test the rotation matrix to xyx Euler angle conversion.
source code
 
test_R_to_euler_xyz(self)
Test the rotation matrix to xyz Euler angle conversion.
source code
 
test_R_to_euler_xzx(self)
Test the rotation matrix to xzx Euler angle conversion.
source code
 
test_R_to_euler_xzy(self)
Test the rotation matrix to xzy Euler angle conversion.
source code
 
test_R_to_euler_yxy(self)
Test the rotation matrix to yxy Euler angle conversion.
source code
 
test_R_to_euler_yxz(self)
Test the rotation matrix to yxz Euler angle conversion.
source code
 
test_R_to_euler_yzx(self)
Test the rotation matrix to yzx Euler angle conversion.
source code
 
test_R_to_euler_yzy(self)
Test the rotation matrix to yzy Euler angle conversion.
source code
 
test_R_to_euler_zxy(self)
Test the rotation matrix to zxy Euler angle conversion.
source code
 
test_R_to_euler_zxz(self)
Test the rotation matrix to zxz Euler angle conversion.
source code
 
test_R_to_euler_zyx(self)
Test the rotation matrix to zyx Euler angle conversion.
source code
 
test_R_to_euler_zyz(self)
Test the rotation matrix to zyz Euler angle conversion.
source code
 
test_R_to_quaternion_no_rot(self)
Test the rotation matrix to quaternion conversion for a zero angle rotation.
source code
 
test_R_to_quaternion_180_complex(self)
Test the rotation matrix to quaternion conversion for a 180 degree rotation about [1, 1, 1].
source code
 
test_reverse_euler_zyz_a0_b0_g0(self)
Test the reverse Euler angle conversion for {0, 0, 0}.
source code
 
test_reverse_euler_zyz_a1_b0_g0(self)
Test the reverse Euler angle conversion for {1, 0, 0}.
source code
 
test_reverse_euler_zyz_a0_b1_g0(self)
Test the reverse Euler angle conversion for {0, 1, 0}.
source code
 
test_reverse_euler_zyz_a0_b0_g1(self)
Test the reverse Euler angle conversion for {0, 0, 1}.
source code
 
test_reverse_euler_zyz_a1_b1_g0(self)
Test the reverse Euler angle conversion for {1, 1, 0}.
source code
 
test_reverse_euler_zyz_a0_b1_g1(self)
Test the reverse Euler angle conversion for {0, 1, 1}.
source code
 
test_reverse_euler_zyz_a1_b0_g1(self)
Test the reverse Euler angle conversion for {1, 0, 1}.
source code
 
test_reverse_euler_zyz_a1_b1_g1(self)
Test the reverse Euler angle conversion for {1, 1, 1}.
source code
 
test_reverse_euler_zyz_a1_b0_5_g3(self)
Test the reverse Euler angle conversion for {1, 0.5, 3}.
source code
 
test_quaternion_to_axis_angle_no_rot(self)
Test the quaternion to rotation matrix conversion for a zero angle rotation.
source code
 
test_quaternion_to_axis_angle_180_complex(self)
Test the quaternion to axis-angle conversion for a 180 degree rotation about [1, 1, 1].
source code
 
test_quaternion_to_R_no_rot(self)
Test the quaternion to rotation matrix conversion for a zero angle rotation.
source code
 
test_quaternion_to_R_z_30(self)
Test the quaternion to rotation matrix conversion for a 30 degree rotation about z.
source code
 
test_quaternion_to_R_180_complex(self)
Test the quaternion to rotation matrix conversion for a 180 degree rotation about [1, 1, 1].
source code

Inherited from unittest.case.TestCase: __call__, __eq__, __hash__, __init__, __ne__, __repr__, __str__, addCleanup, addTypeEqualityFunc, assertAlmostEqual, assertAlmostEquals, assertDictContainsSubset, assertDictEqual, assertEqual, assertEquals, assertFalse, assertGreater, assertGreaterEqual, assertIn, assertIs, assertIsInstance, assertIsNone, assertIsNot, assertIsNotNone, assertItemsEqual, assertLess, assertLessEqual, assertListEqual, assertMultiLineEqual, assertNotAlmostEqual, assertNotAlmostEquals, assertNotEqual, assertNotEquals, assertNotIn, assertNotIsInstance, assertNotRegexpMatches, assertRaises, assertRaisesRegexp, assertRegexpMatches, assertSequenceEqual, assertSetEqual, assertTrue, assertTupleEqual, assert_, countTestCases, debug, defaultTestResult, doCleanups, fail, failIf, failIfAlmostEqual, failIfEqual, failUnless, failUnlessAlmostEqual, failUnlessEqual, failUnlessRaises, id, run, shortDescription, skipTest, tearDown

Inherited from unittest.case.TestCase (private): _addSkip, _baseAssertEqual, _deprecate, _formatMessage, _getAssertEqualityFunc, _truncateMessage

Inherited from object: __delattr__, __format__, __getattribute__, __new__, __reduce__, __reduce_ex__, __setattr__, __sizeof__, __subclasshook__

Class Methods [hide private]

Inherited from unittest.case.TestCase: setUpClass, tearDownClass

Class Variables [hide private]

Inherited from unittest.case.TestCase: longMessage, maxDiff

Inherited from unittest.case.TestCase (private): _classSetupFailed, _diffThreshold

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

setUp(self)

source code 

Set up data used by the unit tests.

Overrides: unittest.case.TestCase.setUp

test_euler_cycle_1(self)

source code 

Cycle through all the hard-coded conversion functions returning to the starting point.

The nested cycling is as follows:

  • start with random Euler angles alpha, beta, gamma,
  • convert to a rotation matrix using euler_to_R_xyx(),
  • xyx cycle:
    • R_to_euler_xyx()
    • euler_to_R_xyx(),
    • R_to_axis_angle(),
    • axis_angle_to_euler_xyx(),
    • euler_to_axis_angle_xyx(),
    • axis_angle_to_R(),
  • xyz cycle:
    • R_to_euler_xyz()
    • euler_to_R_xyz(),
    • R_to_axis_angle(),
    • axis_angle_to_euler_xyz(),
    • euler_to_axis_angle_xyz(),
    • axis_angle_to_R(),
  • xzx cycle:
    • R_to_euler_xzx()
    • euler_to_R_xzx(),
    • R_to_axis_angle(),
    • axis_angle_to_euler_xzx(),
    • euler_to_axis_angle_xzx(),
    • axis_angle_to_R(),
    • xzy cycle:
      • R_to_euler_xzy()
      • euler_to_R_xzy(),
      • R_to_axis_angle(),
      • axis_angle_to_euler_xzy(),
      • euler_to_axis_angle_xzy(),
      • axis_angle_to_R(),
    • yxy cycle:
      • R_to_euler_yxy()
      • euler_to_R_yxy(),
      • R_to_axis_angle(),
      • axis_angle_to_euler_yxy(),
      • euler_to_axis_angle_yxy(),
      • axis_angle_to_R(),
    • yxz cycle:
      • R_to_euler_yxz()
      • euler_to_R_yxz(),
      • R_to_axis_angle(),
      • axis_angle_to_euler_yxz(),
      • euler_to_axis_angle_yxz(),
      • axis_angle_to_R(),
    • yzx cycle:
      • R_to_euler_yzx()
      • euler_to_R_yzx(),
      • R_to_axis_angle(),
      • axis_angle_to_euler_yzx(),
      • euler_to_axis_angle_yzx(),
      • axis_angle_to_R(),
    • yzy cycle:
      • R_to_euler_yzy()
      • euler_to_R_yzy(),
      • R_to_axis_angle(),
      • axis_angle_to_euler_yzy(),
      • euler_to_axis_angle_yzy(),
      • axis_angle_to_R(),
    • zxy cycle:
      • R_to_euler_zxy()
      • euler_to_R_zxy(),
      • R_to_axis_angle(),
      • axis_angle_to_euler_zxy(),
      • euler_to_axis_angle_zxy(),
      • axis_angle_to_R(),
    • zxz cycle:
      • R_to_euler_zxz()
      • euler_to_R_zxz(),
      • R_to_axis_angle(),
      • axis_angle_to_euler_zxz(),
      • euler_to_axis_angle_zxz(),
      • axis_angle_to_R(),
    • zyx cycle:
      • R_to_euler_zyx()
      • euler_to_R_zyx(),
      • R_to_axis_angle(),
      • axis_angle_to_euler_zyx(),
      • euler_to_axis_angle_zyx(),
      • axis_angle_to_R(),
    • zyz cycle:
      • R_to_euler_zyz()
      • euler_to_R_zyz(),
      • R_to_axis_angle(),
      • axis_angle_to_euler_zyz(),
      • euler_to_axis_angle_zyz(),
      • axis_angle_to_R(),
  • return to start with R_to_euler_xyx().