Stratifications of the Euclidean motion group with applications to robotics