Error in loading ".ply" file Centos 7

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Error in loading ".ply" file Centos 7

Mohamed Azzam
This post has NOT been accepted by the mailing list yet.
Hello Everyone,
I face a run-time error in loading .ply file on Centos 7 Although, it works properly on ubuntu with the same code.

here is the example:
#include <pcl/io/ply_io.h>
#include <pcl/console/parse.h>
#include <pcl/point_cloud.h>

int main(int argc, char **argv) {

        //fetch filenames from the arguments
        std::vector<int> filenames;

        filenames = pcl::console::parse_file_extension_argument(argc,argv,".ply");

        if (filenames.size() !=1){
                PCL_ERROR("missing the file name argument\n");
                return (-1);

        //load files
        pcl::PointCloud<pcl::PointXYZ>::Ptr scene (new pcl::PointCloud<pcl::PointXYZ>);
        std::cout<<"Reading the file..."<<std::endl;

        if( pcl::io::loadPLYFile(argv[filenames[0]], *scene) < 0 ){
                PCL_ERROR("Error: cannot load the file\n");
        // debugging
        std::cout<<"file has been load successfully"<<std::endl;

        return (0);

and this the error message:
"$ ./test Scene0.ply
Reading the file...
test: /builddir/build/BUILD/pcl-0ddf11a6ad1175b6f1c253da003de20c1295cde0/io/src/ply_io.cpp:500: void pcl::PLYReader::objInfoCallback(const string&): Assertion `st.size () == 3' failed.