  The goal of this paper is to describe a method to solve a class of time
optimal control problems which are equivalent to finding the sub-Riemannian
minimizing geodesics on a manifold M. In particular, we assume that the
manifold M is acted upon by a group G which is a symmetry group for the
dynamics. The action of G on M is proper but not necessarily free. As a
consequence, the orbit space M/G is not necessarily a manifold but it presents
the more general structure of a stratified space. The main ingredients of the
method are a reduction of the problem to the orbit space M/G and an analysis of
the reachable sets on this space. We give general results relating the
stratified structure of the orbit space, and its decomposition into orbit
types, with the optimal synthesis. We consider in more detail the case of the
so-called K-P problem where the manifold M is itself a Lie group and the group
G is determined by a Cartan decomposition of M. In this case, the geodesics can
be explicitly calculated and are analytic. As an illustration, we apply our
method and results to the complete optimal synthesis on SO(3).
