def get_topodata(map_dir): print('Please wait for loading routing topo data...') topo_data_path = os.path.join(map_dir, 'routing_map.bin') print("File: %s" % topo_data_path) return proto_utils.get_pb_from_bin_file(topo_data_path, topo_graph_pb2.Graph())
Args: """ print 'type in command: [q] [r]' print ' q exit' print ' p plot passage region' if __name__ == '__main__': if len(sys.argv) != 3: print_help() sys.exit(0) print 'Please wait for loading data...' topo_graph_file = sys.argv[1] graph = proto_utils.get_pb_from_bin_file(topo_graph_file, Graph()) g_central_curve_dict = {nd.lane_id: nd.central_curve for nd in graph.node} plt.ion() while 1: print_help_command() print 'cmd>', instruction = raw_input() argv = instruction.strip(' ').split(' ') if len(argv) == 1: if argv[0] == 'q': sys.exit(0) elif argv[0] == 'p': routing_result_file = sys.argv[2] result = proto_utils.get_pb_from_bin_file( routing_result_file, RoutingResponse())
def get_mapdata(map_dir): print('Please wait for loading map data...') map_data_path = os.path.join(map_dir, 'base_map.bin') print('File: %s' % map_data_path) return proto_utils.get_pb_from_bin_file(map_data_path, map_pb2.Map())
Args: """ print 'type in command: [q] [r]' print ' q exit' print ' p plot passage region' if __name__ == '__main__': if len(sys.argv) != 3: print_help() sys.exit(0) print 'Please wait for loading data...' topo_graph_file = sys.argv[1] graph = proto_utils.get_pb_from_bin_file(topo_graph_file, Graph()) g_central_curve_dict = {nd.lane_id: nd.central_curve for nd in graph.node} plt.ion() while 1: print_help_command() print 'cmd>', instruction = raw_input() argv = instruction.strip(' ').split(' ') if len(argv) == 1: if argv[0] == 'q': sys.exit(0) elif argv[0] == 'p': routing_result_file = sys.argv[2] result = proto_utils.get_pb_from_bin_file(routing_result_file, RoutingResponse())