  The notion of curvature discussed in this paper is a far going generalization
of the Riemannian sectional curvature. It was first introduced by Agrachev,
Barilari and Rizzi in arXiv:1306.5318, and it is defined for a wide class of
optimal control problems: a unified framework including geometric structures
such as Riemannian, sub-Riemannian, Finsler, and sub-Finsler structures. In
this work we study the generalized sectional curvature of Carnot groups with
rank-two distributions. In particular, we consider the Cartan group and Carnot
groups with horizontal distribution of Goursat-type. In these Carnot groups we
characterize ample and equiregular geodesics. For Carnot groups with horizontal
Goursat distribution we show that their generalized sectional curvatures depend
only on the Engel part of the distribution. This family of Carnot groups
contains naturally the three-dimensional Heisenberg group, as well as the Engel
group. Moreover, we also show that in the Engel and Cartan groups there exist
initial covectors for which there is an infinite discrete set of times at which
the corresponding ample geodesics are not equiregular.
