Text this: Visibility-based Optimal Path and Motion Planning