示例#1
0
def test_euler_to_quaternion_pitch():
    """Test euler_to_quaternion for 90deg rotations along pitch axis."""
    quat = convert.euler_to_quaternion(0., np.pi / 2, 0.)
    assert np.allclose(quat, cst.quaty90)
示例#2
0
def test_euler_to_quaternion_roll():
    """Test euler_to_quaternion for 90deg rotations along roll axis."""
    quat = convert.euler_to_quaternion(0., 0., np.pi / 2)
    assert np.allclose(quat, cst.quatx90)
示例#3
0
def test_euler_to_quaternion_yaw():
    """Test euler_to_quaternion for 90deg rotations along yaw axis."""
    quat = convert.euler_to_quaternion(np.pi / 2, 0., 0.)
    assert np.allclose(quat, cst.quatz90)