Rotation of solid bodies in the solar system