  For a simple, rigid vector bundle $F$ on a Calabi-Yau $3$-fold $Y$, we
construct a symmetric obstruction theory on the Quot scheme
$\textrm{Quot}_Y(F,n)$, and we solve the associated enumerative theory. We
discuss the case of other $3$-folds. Exploiting the critical structure on
$\textrm{Quot}_{\mathbb A^3}(\mathscr O^r,n)$, we construct a virtual motive
(in the sense of Behrend-Bryan-Szendr\H{o}i) for $\textrm{Quot}_Y(F,n)$ for an
arbitrary vector bundle $F$ on a smooth $3$-fold $Y$. We compute the associated
motivic partition function. We obtain new examples of higher rank (motivic)
Donaldson-Thomas invariants.
