This problem has a long history, starting with the work of Killing and Cartan. You can read more here:
-
Robert Bryant, Élie Cartan and geometric duality,
1998.
-
Andrei Agrachev, Rolling balls and octonions, 2006.
-
Ilka Agricola, Old and new on the exceptional group G2, 2008.
-
Aroldo Kaplan, Quaternions and octonions in mechanics, 2008.
-
John Baez and John Huerta, G2 and the rolling ball, 2012.
There is a lot more to say... but not now!