Apollo 11.0
自动驾驶开放平台
topo_creator.cc
浏览该文件的文档.
1/******************************************************************************
2 * Copyright 2017 The Apollo Authors. All Rights Reserved.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 *****************************************************************************/
16
17#include "cyber/common/file.h"
21
22int main(int argc, char **argv) {
23 google::InitGoogleLogging(argv[0]);
24 google::ParseCommandLineFlags(&argc, &argv, true);
25
27
28 ACHECK(apollo::cyber::common::GetProtoFromFile(FLAGS_routing_conf_file,
29 &routing_conf))
30 << "Unable to load routing conf file: " + FLAGS_routing_conf_file;
31
32 AINFO << "Conf file: " << FLAGS_routing_conf_file << " is loaded.";
33
34 const auto base_map = apollo::hdmap::BaseMapFile();
35 const auto routing_map = apollo::hdmap::RoutingMapFile();
36
37 apollo::routing::GraphCreator creator(base_map, routing_map, routing_conf);
38 ACHECK(creator.Create()) << "Create routing topo failed!";
39
40 AINFO << "Create routing topo successfully from " << base_map << " to "
41 << routing_map;
42 return 0;
43}
#define ACHECK(cond)
Definition log.h:80
#define AINFO
Definition log.h:42
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,...
Definition file.cc:132
std::string RoutingMapFile()
get routing map file path from flags.
Definition hdmap_util.cc:63
std::string BaseMapFile()
get base map file path from flags.
Definition hdmap_util.cc:47
int main(int argc, char **argv)