Finite-time consensus of heterogeneous multi-agent systems