Text this: Optimal Dynamics Control in Trajectory Tracking of Industrial Robots Based on Adaptive Gaussian Pseudo-Spectral Algorithm