Transformer - based Trajectory Planning for Robots: Extending to UAVs and UGVs