Detecting potential obstacles