A nonlinear feedback control based on inverse dynamics is proposed for robots with flexible joints during constrained motion task execution. Based on constrained system formalism, the presented control scheme achieves simultaneous, independent control of both position and contact force at the robot end-effector. The method can be directly applied to robot control, or it can be used as the basis for developing other advanced control strategies. In this paper, a. feedforward controller is considered. Issues related to the practical application of the full inverse dynamics and feedforward control algorithms, such as evaluation of feedback variables, the use of predictors to eliminate the time delay of digital control, and the design of robust controllers, are discussed. The results of extensive numerical simulation are used to show the effectiveness of the proposed controllers and to compare their performances. It is shown that it is possible to achieve high precision tracking if the appropriate predictors are used to eliminate the effect of computational delay of the digital controller. Applying a straightforward approach for robustness of the proposed controllers has additionally improved the trajectory tracking accuracy.