Trajectory optimization of industrial robots with application to computer-aided robotics and robot controllers