Пример #1
0
 def test_write(self):
     (header,contents) = plane_finder.read_pcd('test.pcd')
     contents = contents[0:1]
     plane_finder.write_pcd('testout.pcd',header,contents)
     (header2,contents2) = plane_finder.read_pcd('testout.pcd')
     headertrue = ['# .PCD v.7 - Point Cloud Data file format\n', 'VERSION .7\n', 'FIELDS x y z i\n', 'SIZE 4 4 4 4\n', 'TYPE F F F F\n', 'COUNT 1 1 1 1\n', 'WIDTH 1025349\n', 'HEIGHT 1\n', 'VIEWPOINT 0 0 0 1 0 0 0)\n', 'POINTS 1\n', 'DATA ascii\n']
     self.assertEqual(contents,contents2)
     self.assertEqual(headertrue,header2)
Пример #2
0
 def test_write(self):
     (header, contents) = plane_finder.read_pcd('test.pcd')
     contents = contents[0:1]
     plane_finder.write_pcd('testout.pcd', header, contents)
     (header2, contents2) = plane_finder.read_pcd('testout.pcd')
     headertrue = [
         '# .PCD v.7 - Point Cloud Data file format\n', 'VERSION .7\n',
         'FIELDS x y z i\n', 'SIZE 4 4 4 4\n', 'TYPE F F F F\n',
         'COUNT 1 1 1 1\n', 'WIDTH 1025349\n', 'HEIGHT 1\n',
         'VIEWPOINT 0 0 0 1 0 0 0)\n', 'POINTS 1\n', 'DATA ascii\n'
     ]
     self.assertEqual(contents, contents2)
     self.assertEqual(headertrue, header2)
Пример #3
0
 def test_read(self):
     (header,contents) = plane_finder.read_pcd('test.pcd')
     self.assertEqual(header,self.header)
     for i,item in enumerate(self.contents):
         self.assertEqual(contents[i],[float(x) for x in item.strip().split(' ')])
Пример #4
0
 def test_read(self):
     (header, contents) = plane_finder.read_pcd('test.pcd')
     self.assertEqual(header, self.header)
     for i, item in enumerate(self.contents):
         self.assertEqual(contents[i],
                          [float(x) for x in item.strip().split(' ')])