This paper studies the precision motion control of a high-speed/acceleration linear motor driven commercial gantry which is subject to significant nonlinear cogging forces. A discontinuous projection based desired compensation adaptive robust controller (DCARC) is constructed. In particular, based on the special structures of various nonlinear forces, design models consisting of known basis functions with unknown weights are used to approximate those unknown nonlinear forces with approximation errors being explicitly accounted for in the design process. Online parameter adaptation is then utilized to reduce the effect of various parametric uncertainties while certain robust control laws are used to handle effects of various modeling uncertainties. Theoretically, the resulting controller achieves a guaranteed transient performance and final tracking accuracy in the presence of both parametric uncertainties and uncertain nonlinearities. In addition, in the presence of parametric uncertainties, the controller achieves asymptotic output tracking. Comparative experimental results obtained on a high-speed Anorad commercial gantry with a linear encoder resolution of 0.5 μ m and a position measurement resolution of 20 nm by external laser interferometer are presented to verify the excellent tracking performance of the proposed control strategy.