added add_random_obstacles parameter.