mp3guy / Kintinuous

Real-time large scale dense visual SLAM system
Other
918 stars 287 forks source link

Error on saving #22

Open jleaming opened 7 years ago

jleaming commented 7 years ago

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 (0600)); if (fd < 0) { throw pcl::IOException ("[pcl::PCDWriter::writeBinary] Error during open!"); return (-1); }

mp3guy commented 7 years ago

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

jleaming commented 7 years ago

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

mp3guy commented 7 years ago

You need to enable mesh generation with the -m flag

jleaming commented 7 years ago

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?

voyage19941119 commented 7 years ago

@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

gang007 commented 5 years ago

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 ???