Example #1
0
def comparison_test_2():
    ''' Compares between se2_from_SE2 and se2_from_SE2_slow. '''
    for pose in SE2.interesting_points():
        se2a = se2_from_SE2(pose)
        se2b = se2_from_SE2_slow(pose)
        #printm('pose', pose, 'se2a', se2a, 'se2b', se2b)
        assert_allclose(se2a, se2b, atol=1e-8)
Example #2
0
def comparison_test_2():
    ''' Compares between se2_from_SE2 and se2_from_SE2_slow. '''
    for pose in SE2.interesting_points():
        se2a = se2_from_SE2(pose)
        se2b = se2_from_SE2_slow(pose)
        #printm('pose', pose, 'se2a', se2a, 'se2b', se2b)
        assert_allclose(se2a, se2b, atol=1e-8)
Example #3
0
def test_se3_se2():
    for pose in SE2.interesting_points():
        pose3 = SE3_from_SE2(pose)
        vel3 = SE3.algebra_from_group(pose3)
        vel2 = se2_from_se3(vel3)
        pose2 = SE2.group_from_algebra(vel2)
        assert_allclose(pose2, pose, atol=1e-8)
Example #4
0
def comparison_test():
    ''' Compares between SE2_from_se2_slow and SE2_from_se2. '''
    for pose in SE2.interesting_points():
        se2 = se2_from_SE2(pose)
        SE2a = SE2_from_se2_slow(se2)
        SE2b = SE2_from_se2(se2)
        #printm('pose', pose, 'se2', se2)
        #printm('SE2a', SE2a, 'SE2b', SE2b)
        SE2.assert_close(SE2a, pose)
        #print('SE2a = pose Their distance is %f' % d)
        SE2.assert_close(SE2b, pose)
        #print('SE2b = pose Their distance is %f' % d)
        assert_allclose(SE2a, SE2b, atol=1e-8, err_msg='SE2a != SE2b')
        assert_allclose(SE2a, pose, atol=1e-8, err_msg='SE2a != pose')
        assert_allclose(SE2b, pose, atol=1e-8, err_msg='SE2b != pose')
Example #5
0
def comparison_test():
    ''' Compares between SE2_from_se2_slow and SE2_from_se2. '''
    for pose in SE2.interesting_points():
        se2 = se2_from_SE2(pose)
        SE2a = SE2_from_se2_slow(se2)
        SE2b = SE2_from_se2(se2)
        #printm('pose', pose, 'se2', se2)
        #printm('SE2a', SE2a, 'SE2b', SE2b)
        SE2.assert_close(SE2a, pose)
        #print('SE2a = pose Their distance is %f' % d)
        SE2.assert_close(SE2b, pose)
        #print('SE2b = pose Their distance is %f' % d)
        assert_allclose(SE2a, SE2b, atol=1e-8, err_msg='SE2a != SE2b')
        assert_allclose(SE2a, pose, atol=1e-8, err_msg='SE2a != pose')
        assert_allclose(SE2b, pose, atol=1e-8, err_msg='SE2b != pose')
Example #6
0
    def test_conversions_se2_SE2(self):

        self.check_conversion(SE2.interesting_points(),
                              se2_from_SE2,
                              SE2_from_se2)
Example #7
0
    def test_conversions_se2_SE2(self):

        self.check_conversion(SE2.interesting_points(), se2_from_SE2,
                              SE2_from_se2)