def load_map(map_name, origin): my_map = GridMap(map_name, 5) my_map._representation = np.loadtxt(open( "test_maps/{}.txt".format(map_name), "rb"), delimiter=",") my_map._representation = my_map._representation # TODO we consider no obstacles in this case, we now it works with obstacles my_map._path_planner_representation = my_map._representation my_map.origin = np.array(origin, dtype=np.int) # Agent position equal to agent origin my_map._agent_position = my_map._from_matrix_to_relative(my_map.origin) my_map._set_goal_top_left() return my_map
def my_map(): my_map = GridMap('Agent1', 5) my_map._representation = np.loadtxt(open("test_maps/01_test_map.txt", "rb"), delimiter=",") my_map._update_distances() my_map._origin = np.array([4, 14], dtype=np.int) my_map._agent_position = np.array([0, 0], dtype=np.int) return my_map
def load_map(map_name, origin): my_map = GridMap('Agent1', 5) my_map._representation = np.loadtxt(open( "test_maps/{}.txt".format(map_name), "rb"), delimiter=",") my_map._path_planner_representation = my_map._representation my_map._origin = np.array(origin, dtype=np.int) my_map._set_goal_top_left() return my_map