In the paper a new method to consider a mechanical system with non-ideal constraints is presented. It is proved that a mechanical system subjected to physical non-ideal constraints cannot be determined purely by theoretical analysis because the reaction forces depend on the physical parameters of interactive environment, which are defined only by measurement. The Principle of Compatibility is shown to be an effective tool in combination with experience for investigating such a problem. For illustration the dynamics of a digging machine are investigated.