Vehicle Reference Generator for Collision-Free Trajectories in Hazardous Maneuvers