Let $G$ be the centroid of triangle $ABC$. If triangle $ABG$ is an equilateral triangle with a side length of $2,$ then find the perimeter of triangle $ABG$.