16#include "gflags/gflags.h"
22#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.xml";
40 <<
"fail to load data from : " << map_filename;
42 const std::string output_ascii_file = FLAGS_output_dir +
"/base_map.txt";
44 <<
"failed to output ASCII format base map";
46 const std::string output_bin_file = FLAGS_output_dir +
"/base_map.bin";
48 <<
"failed to output binary format base map";
52 <<
"failed to load map";
54 AINFO <<
"load map success";
static bool LoadData(const std::string &filename, apollo::hdmap::Map *pb_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 ...
bool SetProtoToASCIIFile(const google::protobuf::Message &message, int file_descriptor)
DEFINE_string(output_dir, "/tmp", "output map directory")
A map tool to transform opendrive map to pb map
int main(int argc, char **argv)