42 std::cerr <<
"\nUSAGE: " <<
self <<
" InputFile.log OutputFile.graph\n\n";
44 std::cerr <<
"This tool converts a plain text log file into a binary scangraph file" << std::endl;
45 std::cerr <<
"which can be used in Octomap.\n\n";
46 std::cerr <<
"The log file needs to be in the format of:\n" 47 <<
"NODE x y z roll pitch yaw\n" 48 <<
"x y z\nx y z\n...\n" 49 <<
"NODE x y z roll pitch yaw\n" 51 <<
"Lines starting with '#' or empty lines are ignored.\n\n";
56 int main(
int argc,
char** argv) {
58 string logFilename =
"";
59 string graphFilename =
"";
65 logFilename = std::string(argv[1]);
66 graphFilename = std::string(argv[2]);
69 cout <<
"\nReading Log file\n===========================\n";
73 cout <<
"\nWriting binary graph file\n===========================\n";
void printUsage(char *self)
std::ostream & writeBinary(std::ostream &s) const
int main(int argc, char **argv)
std::istream & readPlainASCII(std::istream &s)