Pcl: Sporadical failures in test_io

Created on 28 Nov 2018  路  5Comments  路  Source: PointCloudLibrary/pcl

Environment

  • Operating System and version: Windows
  • Compiler: Visual Studio 2017 x64
  • PCL Version: master

Several Azure jobs have failed, examples:

Output:

2018-11-27T12:06:19.4450593Z 66: [----------] 1 test from AutoIOTest/18, where TypeParam = struct pcl::PointNormal
2018-11-27T12:06:19.4450645Z 66: [ RUN      ] AutoIOTest/18.AutoLoadCloudFiles
2018-11-27T12:06:19.4450693Z 66: d:\a\1\s\test\io\test_io.cpp(1342): error: Expected equality of these values:
2018-11-27T12:06:19.4450758Z 66:   cloud_pcd.is_dense
2018-11-27T12:06:19.4450800Z 66:     Which is: false
2018-11-27T12:06:19.4450840Z 66:   cloud.is_dense
2018-11-27T12:06:19.4451052Z 66:     Which is: true
2018-11-27T12:06:19.4451119Z 66: [pcl::PLYReader] test_autoio.ply:25: property 'float32 focal' of element 'camera' is not handled
2018-11-27T12:06:19.4451172Z 66: [pcl::PLYReader] test_autoio.ply:26: property 'float32 scalex' of element 'camera' is not handled
2018-11-27T12:06:19.4451224Z 66: [pcl::PLYReader] test_autoio.ply:27: property 'float32 scaley' of element 'camera' is not handled
2018-11-27T12:06:19.4451466Z 66: [pcl::PLYReader] test_autoio.ply:28: property 'float32 centerx' of element 'camera' is not handled
2018-11-27T12:06:19.4451516Z 66: [pcl::PLYReader] test_autoio.ply:29: property 'float32 centery' of element 'camera' is not handled
2018-11-27T12:06:19.4451565Z 66: [pcl::PLYReader] test_autoio.ply:32: property 'float32 k1' of element 'camera' is not handled
2018-11-27T12:06:19.4451638Z 66: [pcl::PLYReader] test_autoio.ply:33: property 'float32 k2' of element 'camera' is not handled
2018-11-27T12:06:19.4451686Z 66: d:\a\1\s\test\io\test_io.cpp(1346): error: Expected equality of these values:
2018-11-27T12:06:19.4451832Z 66:   cloud_ply.is_dense
2018-11-27T12:06:19.4451870Z 66:     Which is: false
2018-11-27T12:06:19.4451908Z 66:   cloud.is_dense
2018-11-27T12:06:19.4451947Z 66:     Which is: true
2018-11-27T12:06:19.4452011Z 66: Failed to find match for field 'normal_x'.
2018-11-27T12:06:19.4452060Z 66: Failed to find match for field 'normal_y'.
2018-11-27T12:06:19.4452102Z 66: Failed to find match for field 'normal_z'.
2018-11-27T12:06:19.4452165Z 66: Failed to find match for field 'curvature'.
2018-11-27T12:06:19.4452213Z 66: [  FAILED  ] AutoIOTest/18.AutoLoadCloudFiles, where TypeParam = struct pcl::PointNormal (3 ms)
2018-11-27T12:06:19.4452261Z 66: [----------] 1 test from AutoIOTest/18 (4 ms total)

Both times pcl::PointNormal test case failed.

@claudiofantacci could not reprocude with --repeat-unitl-fail 50.

test windows

Most helpful comment

Hm, I think there is an obvious problem in the test.

TYPED_TEST (AutoIOTest, AutoLoadCloudFiles)
{
  PointCloud<TypeParam> cloud;
  PointCloud<TypeParam> cloud_pcd;

  cloud.width  = 10;
  cloud.height = 5;
  cloud.resize (cloud.width * cloud.height);
  cloud.is_dense = true;

  save ("test_autoio.pcd", cloud);
  load ("test_autoio.pcd", cloud_pcd);
  EXPECT_EQ (cloud_pcd.width * cloud_pcd.height, cloud.width * cloud.height);
  EXPECT_EQ (cloud_pcd.is_dense, cloud.is_dense);
}

is_dense flag is not stored in PCD files. When a PCD file is read, the value of the flag is determined by examining all point coordinates. Since the data in the cloud is never initialized, there is a chance that some of these garbage floats are NaNs.

All 5 comments

@kaylangan is there any know way for us to fetch the image that Azure pipelines uses for its VMs/agents? Alternatively is there any way for us to access the VM through RDP or ssh?

We're having a problem we're unable to replicate on our local environments and it's specific to the x64 build.

Edit: this looks promising https://github.com/Microsoft/azure-pipelines-agent/releases

@SergioRAgostinho that project is a good place to start. As for SSH'ing into the machines, unfortunately we do not currently support that. We've had a few requests for that feature so will consider adding it in the future.

Hm, I think there is an obvious problem in the test.

TYPED_TEST (AutoIOTest, AutoLoadCloudFiles)
{
  PointCloud<TypeParam> cloud;
  PointCloud<TypeParam> cloud_pcd;

  cloud.width  = 10;
  cloud.height = 5;
  cloud.resize (cloud.width * cloud.height);
  cloud.is_dense = true;

  save ("test_autoio.pcd", cloud);
  load ("test_autoio.pcd", cloud_pcd);
  EXPECT_EQ (cloud_pcd.width * cloud_pcd.height, cloud.width * cloud.height);
  EXPECT_EQ (cloud_pcd.is_dense, cloud.is_dense);
}

is_dense flag is not stored in PCD files. When a PCD file is read, the value of the flag is determined by examining all point coordinates. Since the data in the cloud is never initialized, there is a chance that some of these garbage floats are NaNs.

All fingers crossed :crossed_fingers: . Whenever someone has time please push that PR.

Since the data in the cloud is never initialized, there is a chance that some of these garbage floats are NaNs.

Well... the thing is that the data is sort of initialized. When cloud.resize() is invoked, it is calling the resize method of an STL vector.

void resize (size_type n, value_type val = value_type());

The default ctor for the point types it holds and for PointNormal the ctor is properly initialized
https://github.com/PointCloudLibrary/pcl/blob/49359aa4e0bd4ebd5f6de4cb1aa49e10019584bf/common/include/pcl/impl/point_types.hpp#L880-L885

Edit: The curvature is not being initialized!

Was this page helpful?
0 / 5 - 0 ratings