Kintinuous icon indicating copy to clipboard operation
Kintinuous copied to clipboard

Error on saving

Open jleaming opened this issue 8 years ago • 6 comments

Initial build was working well however have all of a sudden have started getting the following error on attempting to save scan:

Saving 6430 points... terminate called after throwing an instance of 'pcl::IOException' what(): : [pcl::PCDWriter::writeBinary] Error during open! Aborted (core dumped)

Any ideas what would be causing this and how to fix without an entire rebuild?

EDIT: Exception appears to be thrown by this line of code in pcd_io.hpp from the PCL library:

#else int fd = pcl_open (file_name.c_str (), O_RDWR | O_CREAT | O_TRUNC, static_cast<mode_t> (0600)); if (fd < 0) { throw pcl::IOException ("[pcl::PCDWriter::writeBinary] Error during open!"); return (-1); }

jleaming avatar Feb 08 '17 20:02 jleaming

I would guess it's permissions? Try running with sudo

mp3guy avatar Feb 09 '17 14:02 mp3guy

Solved thanks, could you elaborate on how to save .ply files, im currently only saving .pcd's?

jleaming avatar Feb 09 '17 23:02 jleaming

You need to enable mesh generation with the -m flag

mp3guy avatar Feb 09 '17 23:02 mp3guy

Sorry for all the trouble but I am attempting to edit the way save files are named (hoping to replace with system time and date). Tried editing the line of code in ConfigArgs.h:

           if(!logFile.size())
           {
            char buf[256];
            int length = readlink("/proc/self/exe", buf, sizeof(buf));

            std::string currentVal;
            currentVal.append((char *)&buf, length);

            saveFile = currentVal;

I was hoping changing the line saveFile=currrentVal; to saveFile="test"; would change the Kintinuous.pcd file to test.pcd but instead had no effect.

Would you mind pointing out the file i need to be editing to achieve this?

jleaming avatar Feb 10 '17 00:02 jleaming

@jleaming Im running it on remote server,I successfully saved .pcd and .ply by adding "save();"in MainController::mainLoop() just after "threads.join_all();" screenshot from 2017-04-05 19-14-53

I hope this can help you by the way , the .ply file I saved cannot be opened in Meshlab , can you open your .ply?

Meshlab shows to me : screenshot from 2017-04-05 19-15-47

voyage19941119 avatar Apr 05 '17 11:04 voyage19941119

Initial build was working well ,however when I pushed save tag,the terminal print "MainController::save:failed",Why? I tried to print the value of the following std::cout<<ThreadDataPack::get().finalised.getValue()<<endl;//gang 0 std::cout<<!ConfigArgs::get().onlineDeformation<<endl;//gang 0 std::cout<<ConfigArgs::get().enableMeshGenerator<<endl;//gang 1 print is 0,0,1 .Why the value of ThreadDataPack::get().finalised.getValue() is false?? Any ideas what would be causing this ???

gang007 avatar May 10 '19 06:05 gang007