Consensus of multi-agent systems with control-affine nonlinear dynamics