Text this: Efficient algorithm for collision detection and path planning for robotics application