This study explores fault-tolerant consensus in leader-following heterogeneous multi-agent systems, focusing on actuator failures in uncrewed aerial vehicles (UAVs) and uncrewed ground vehicles (UGVs). An optimization-based fault-tolerant consensus algorithm is proposed. The algorithm utilizes the Euler-Lagrange formula to ensure system consistency under actuator failures, with the Lyapunov stability theory proving the asymptotic stability of the consistency error. The algorithm is applied to heterogeneous multi-agent systems of UAVs and UGVs to derive optimal fault-tolerant consensus control laws for each vehicle type. Simulation experiments give evidence for the feasibility of the proposed control strategy.