print(' q exit') print(' a plot all topology') print(' a_id plot all topology with lane id') print(' a_rid plot all topology with road id') print( ' i lane_id plot lanes could be reached from lane with lane_id' ) print( ' i_map lane_id plot lanes could be reached from lane with lane_id, with map' ) if __name__ == '__main__': map_dir = util.get_map_dir(sys.argv) graph = util.get_topodata(map_dir) base_map = util.get_mapdata(map_dir) print("district: %s" % graph.hdmap_district) print("version: %s" % graph.hdmap_version) plt.ion() while 1: print_help_command() print('cmd>', end=' ') instruction = raw_input() argv = instruction.strip(' ').split(' ') if len(argv) == 1: if argv[0] == 'q': sys.exit(0) elif argv[0] == 'a': plot_all(graph) elif argv[0] == 'a_id':
#break #if curve.HasField('arc'): # draw_arc(curve.arc) for curve in lane.left_boundary.curve.segment: if curve.HasField('line_segment'): draw_boundary(curve.line_segment) for curve in lane.right_boundary.curve.segment: if curve.HasField('line_segment'): draw_boundary(curve.line_segment) #break return drivemap if __name__ == "__main__": parser = argparse.ArgumentParser( description="A tool to show road") parser.add_argument( "base_map_path", action="store", type=str, help="base map path only bin support") print("Reading map data") # map_dir = util.get_map_dir(sys.argv) g_args = parser.parse_args() base_map = util.get_mapdata(g_args.base_map_path) print("Done reading map data") plt.subplots() draw_map(base_map) plt.axis('equal') plt.show()
' i_map lane_id plot lanes could be reached from lane with lane_id, with map' ) if __name__ == '__main__': parser = argparse.ArgumentParser(description="A tool to debug topo") parser.add_argument( "routing_map_dir", action="store", type=str, help= "routing map only bin support also need base_map.bin in the same dir") #map_dir = util.get_map_dir(sys.argv) g_args = parser.parse_args() graph = util.get_topodata(g_args.routing_map_dir) base_map = util.get_mapdata(g_args.routing_map_dir) print("district: %s" % graph.hdmap_district) print("version: %s" % graph.hdmap_version) 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] == 'a': plot_all(graph) elif argv[0] == 'a_id':
Print help information of command. Args: """ print 'type in command: [q] [r]' print ' q exit' print ' r plot route result' print ' r_map plot route result with map' if __name__ == '__main__': map_dir = util.get_map_dir(sys.argv) graph = util.get_topodata(map_dir) base_map = util.get_mapdata(map_dir) route = util.get_routingdata() central_curves = {} for nd in graph.node: central_curves[nd.lane_id] = nd.central_curve 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)