Error on saving
jleaming opened this issue · 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);
}
I would guess it's permissions? Try running with sudo
Solved thanks, could you elaborate on how to save .ply files, im currently only saving .pcd's?
You need to enable mesh generation with the -m flag
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
Im running it on remote server,I successfully saved .pcd and .ply by adding "save();"in MainController::mainLoop() just after "threads.join_all();"
I hope this can help you
by the way , the .ply file I saved cannot be opened in Meshlab , can you open your .ply?
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 ???