34 import roslib; roslib.load_manifest(
'calibration_estimation')
52 self.assertEqual(cb._corners_x, 2)
53 self.assertEqual(cb._corners_y, 3)
54 self.assertEqual(cb._spacing_x, 10)
55 self.assertEqual(cb._spacing_y, 20)
62 config = cb.params_to_config( matrix([5,6], float).T )
63 self.assertEquals( config[
"corners_x"], 2)
64 self.assertEquals( config[
"corners_y"], 3)
65 self.assertAlmostEquals( config[
"spacing_x"], 5, 6)
66 self.assertAlmostEquals( config[
"spacing_y"], 6, 6)
70 param_vec = matrix([10,20], float).T
71 cb.inflate( param_vec )
75 self.assertAlmostEqual(numpy.linalg.norm(result - param_vec), 0.0, 6)
82 result = cb.generate_points()
83 expected = matrix( [ [ -5, 5, -5, 5, -5, 5],
84 [ 20, 20, 0, 0,-20,-20],
86 [ 1, 1, 1, 1, 1, 1] ], float)
89 self.assertAlmostEqual(numpy.linalg.norm(result - expected), 0.0, 6)
93 self.assertEqual(cb.get_length(), 2)
95 if __name__ ==
'__main__':
97 rostest.unitrun(
'calibration_estimation',
'test_Checkerboard', TestCheckerboard, coverage_packages=[
'calibration_estimation.checkerboard'])
def test_generate_points(self)
def test_params_to_config(self)
def test_get_length(self)