First pass at obstacle detection, though the result isn't correct at the moment