Assertion failing on ply_io.cpp - Tombari's datasets

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Assertion failing on ply_io.cpp - Tombari's datasets

LuisRocha26
Hello, everyone,

I'm working with Tombari's point cloud datasets. So far, I'm simply trying to load one of the scenes with:

pcl::PointCloud<pcl::PointXYZRGB>::Ptr ptr_scene(new pcl::PointCloud<pcl::PointXYZRGB>());
pcl::io::loadPLYFile("a\\very\\long\\path\\...\\scene001_0.ply", *ptr_scene);


which gives me a runtime error and prints:

Assertion failed: st.size() == 3, file C:\\Build\\PCL\\x64\\pcl-1.8.0\\io\\src\\ply_io.cpp, line 500

Trying to load other PLY files gives me no errors (I tried the Stanford bunny and everything worked well).
Inspecting ply_io.cpp somewhere about line 500:

pcl::PLYReader::objInfoCallback (const std::string& line)
{
  std::vector<std::string> st;
  boost::split (st, line, boost::is_any_of (std::string ( "\t ")), boost::token_compress_on);
  assert (st[0].substr (0, 8) == "obj_info");
  {
    if (st.size() >= 3)
    {
      if (st[1] == "num_cols")
        cloudWidthCallback (atoi (st[2].c_str ()));
      else if (st[1] == "num_rows")

...

So I guess there's a problem in the header of my PLY files. The only difference between those that won't work and those that work fine is that the "broken" ones are binary_little_endian PLY files.
Question is: what error could it be? Is it something I can manually fix in the headers? As these datasets are used in many articles regarding the performance of feature descriptors, I really wish I could use it.

Thanks a lot!

[also if anyone knows where I can download these very same datasets but working, it would be equally nice!]
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Assertion failing on ply_io.cpp - Tombari's datasets

Flowz
This post has NOT been accepted by the mailing list yet.
Hello,

I have the same issue. It is working with PCL 1.6 but not with 1.8.
If someone has a solution, it would be nice.

Best regards,
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Assertion failing on ply_io.cpp - Tombari's datasets

LuisRocha26
Hi,

I did further research and found out that these datasets contain mesh information, so they must be loaded with the method loadPolygonFilePLY(), and it'll return a PolygonMesh object, which contains a PCLPointCloud2 cloud.

Best regards,

Luís Rocha

Em 9 de jan de 2017 10:55 AM, "Flowz [via Point Cloud Library (PCL) Users mailing list]" <[hidden email]> escreveu:
Hello,

I have the same issue. It is working with PCL 1.6 but not with 1.8.
If someone has a solution, it would be nice.

Best regards,


If you reply to this email, your message will be added to the discussion below:
http://www.pcl-users.org/Assertion-failing-on-ply-io-cpp-Tombari-s-datasets-tp4043656p4043700.html
To unsubscribe from Assertion failing on ply_io.cpp - Tombari's datasets, click here.
NAML
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Assertion failing on ply_io.cpp - Tombari's datasets

Flowz
This post has NOT been accepted by the mailing list yet.
Thank you for your answer. Actually, it is not exactly the same issue.
The PLY files I used are not from Tombari's point cloud datasets, these are files that I generated with the software CloudCompare and it is cloudpoint only (not a mesh).
After header comparison, in my case the problem seems to be due to the line "obj_info Generated by CloudCompare!" in the header file. After removing this line, the file is loaded correctly.
The problem did not appear with PCL 1.6, it would be great if this problem would be fix for the next release of PCL.
Loading...