The nearest_obstacle_distance method returns the distance to the nearest obstacle. Check the base.py file in envs to know about the general implementation of the method. As an example you can also take a look at the method implemented in the PolygonEnv.