On the motion of a mechanical system inside a rolling ball