  There are many equivalent definitions of Riemannian geodesics. They are
naturally generalised to sub-Riemannian manifold, but become non-equivalent. We
give a review of different definitions of geodesics of a sub-Riemannian
manifold and interrelation between them. We recall three variational
definitions of geodesics as (locally) shortest curves (Euler-Lagrange,
Pontyagin and Hamilton) and three definitions of geodesics as straightest
curves (d'Alembert , Levi-Civita-Schouten and Cartan-Tanaka ), used in
nonholonomic mechanics and discuss their interrelations. We consider a big
class of sub-Riemannian manifolds associated with principal bundle over a
Riemannian manifolds, for which shortest geodesics coincides with straightest
geodesics. Using the geometry of flag manifolds, we describe some classes of
compact homogeneous sub-Riemannian manifolds (including contact sub-Riemannian
manifolds and symmetric sub-Riemannian manifolds) where straightest geodesics
coincides with shortest geodesics. Construction of geodesics in these cases
reduces to description of Riemannian geodesics of the Riemannian homogeneous
manifold or left-invariant metric on a Lie group.
