Robotic machining is a fast-growing technology in the field of mechanical manufacturing. Indeed, it is generally accepted that for the same working space, a fully equipped robotic machining cell can cost 30 to 50 % less than a conventional machine tool. However, inaccuracies resulting either from vibrations or deflections occur while the robot is subjected to cutting forces, inherent to its flexible structure. As an order of magnitude, the stiffness at the tool-tip is about 1N/µm for industrial robots against more than 50N/µm for CNC machine tools. The flexibility source has been investigated and appears to be caused by the robot articulations in a proportion of 80% while the remaining flexibility issues from the structural elasticity. In order to improve the accuracy of robotic machining operations, several approaches have been carried out such as the study of stable cutting conditions and the online/offline compensation of the tool trajectory.Two aspects of the operation must be modeled, on the one hand the model of the cutting machine, being an industrial robot in robotic machining, and on the other hand, the machining model including the resulting geometry of the workpiece. A coupled model is then proposed with the multi-body model of the robot subjected to machining forces. The multi-body model includes the flexibility induced by the structure and the articulations. In order to compensate the deviations, a solution is proposed where the trajectory is discretized in nodes with a compensation taking the system dynamics into account by successive simulations of the operation. The algorithm involves two steps, firstly it aims to detect critical locations of the path and add or reposition nodes to reduce the deviation and secondly an optimization layer modifies nodes positions and velocities for a finer reduction. The method is deployed for three systems of increasing complexity for a face milling operation, showing a machining error reduction.