16#include "gflags/gflags.h"
18#include "modules/common_msgs/map_msgs/map.pb.h"
30int main(
int argc,
char *argv[]) {
31 google::InitGoogleLogging(argv[0]);
32 FLAGS_alsologtostderr =
true;
34 google::ParseCommandLineFlags(&argc, &argv,
true);
36 const auto map_filename = FLAGS_map_dir +
"/base_map.txt";
39 AERROR <<
"Failed to load txt map from " << map_filename;
42 AINFO <<
"Loaded txt map from " << map_filename;
45 const std::string output_bin_file = FLAGS_output_dir +
"/base_map.bin";
47 AERROR <<
"Failed to generate binary base map";
53 <<
"Failed to load generated binary base map";
55 AINFO <<
"Successfully converted .txt map to .bin map: " << output_bin_file;
int main(int argc, char *argv[])
DEFINE_string(output_dir, "/tmp", "output map directory")
A map tool to transform .txt map to .bin map
bool GetProtoFromFile(const std::string &file_name, google::protobuf::Message *message)
Parses the content of the file specified by the file_name as a representation of protobufs,...
bool SetProtoToBinaryFile(const google::protobuf::Message &message, const std::string &file_name)
Sets the content of the file specified by the file_name to be the binary representation of the input ...