  We study deformations of associative submanifolds $Y^3\subset M^7$ of a $G_2$
manifold $M^7$. We show that the deformation space can be perturbed to be
smooth, and it can be made compact and zero dimensional by constraining it with
an additional equation. This allows us to associate local invariants to
associative submanifolds of $M$. The local equations at each associative $Y$
are restrictions of a global equation on a certain associated Grassmann bundle
over $ M$.
