In this paper we generalize Theorem 1.1 in [1]} valid in Heisenberg groups to Carnot groups of step 2. The main difference between 2 step Carnot groups and Heisenberg groups is that in \(\mathbb {H}^n\)  there is only one vertical (i.e. non-horizontal) coordinate, whereas for 2 step Carnot groups there can be many.
