19 #include "gflags/gflags.h" 20 #include "glog/logging.h" 23 original_pbstream_file,
"",
24 "Path to the pbstream file that will be migrated to the new version.");
26 "Output filename for the migrated pbstream.");
28 int main(
int argc,
char** argv) {
29 google::InitGoogleLogging(argv[0]);
30 FLAGS_logtostderr =
true;
31 google::SetUsageMessage(
33 "Tool for migrating files that use the serialization output of " 34 "Cartographer 0.3, to the new serialization format, which includes a " 35 "header (Version 1).");
36 google::ParseCommandLineFlags(&argc, &argv,
true);
38 if (FLAGS_original_pbstream_file.empty() ||
39 FLAGS_output_pbstream_file.empty()) {
40 google::ShowUsageWithFlagsRestrict(argv[0],
"migrate_serialization_format");
int main(int argc, char **argv)
void MigrateStreamFormatToVersion1(cartographer::io::ProtoStreamReaderInterface *const input, cartographer::io::ProtoStreamWriterInterface *const output)
DEFINE_string(original_pbstream_file, "", "Path to the pbstream file that will be migrated to the new version.")