Example #1
0
    """
    print('type in command: [q] [a] [i lane_id]')
    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':
Example #2
0
def print_help_command():
    """Print command help information.

    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: