Sub-Riemannian geometry on Carnot groups: Rank 2 and beyond