Relativistic mean field approximation to baryons