Industrial robots have become a suitable alternative to machine tools due to their flexibility, low cost, and large working space. However, the compliance of the robot system makes it prone to produce large deformations and vibrations during machining, resulting in poor machining accuracy and surface quality. In order to improve the machining performance of the robot, a posture optimization method for robotic milling with the redundant degree of freedom is introduced. First, modal tests are conducted at sampled points to obtain the configuration-dependent parameters of the structural dynamics of the robotic milling system. These experimental data are combined with the inverse distance weighted (IDW) model to further predict the modal parameters at the unsampled points. Then, considering the dynamics model of the system, the optimization model based on surface location error (SLE) is proposed to obtain the optimal robotic posture. Finally, a series of experiments illustrate that pose optimization based on SLE can improve the machining accuracy and surface machining quality.