Text this: Collision Prediction and Optimal Trajectory Generation for Collision Avoidance Systems in Trackless Mobile Machines