  Given a family of locally Lipschitz vector fields
$X(x)=(X_1(x),\dots,X_m(x))$ on $\mathbb{R}^n$, $m\leq n$, we study integral
functionals depending on $X$. Using the results in \cite{MPSC1}, we study the
convergence of minima, minimizers and momenta of those functionals. Moreover,
we apply these results to the periodic homogenization in Carnot groups and to
prove a $H$-compactness theorem for linear differential operators of the second
order depending on $X$.
