Active ball joint mechanism based on spherical gears