The technology of robot roller hemming has been widely used in the manufacturing process of body-in-white anbauteile. While, depletion and design defects of the roller hemming equipment, part dimension changes and other factors cause more roller hemming quality defects, thereby affecting the vehicle size matching and surface quality. Through changing the roller position with the robot, we can control the force trajectory of the part contacting flange. Through editing the offset command of robot, we can make the program more simple and flexible to change. Through the VW USER function block, it can monitor and feedback compensation in real time, then automatically adjust force position of roller. Robot program has the characteristics of simplicity, intuition, flexibility, and the application of one or several different parameters can play the role of mutual compensation, mutual influence, then to achieve the improvement and optimization of defects. © 2016, Shanghai Jiao Tong University Press. All right reserved.