def build_surface(arguments): from planning.surface.surface_building import build_surface surface = \ build_surface( arguments.map, 0.0001 ) return surface
are_required_modules_present = False if not are_required_modules_present: exit() # Чтение параметров командной строки parser = prepare_parser() arguments = parser.parse_args() # Чтение карты местности surface = build_surface(arguments) # Планирование глобального пути planning_result = plan_path(surface, arguments) states_sequence, _ = planning_result for state in states_sequence: polygon = state.polygons_sequence[-1] map_polygon_index = surface.get_map_polygon_index(polygon) arguments.output.write("%s\n" % map_polygon_index)