## 2 The Robotic Machining System and Combined Calibration Method  
The structure of the robotic milling and polishing composite machining system is shown in Figure 1, which includes an industrial robot, KUKA KR 210, a rotary worktable, a 3D vision calibration system, an electric spindle, a pneumatic floating spindle, a quick-change tool magazine, an electric spindle tool magazine, a pneumatic spindle tool magazine, and a rapid workpiece clamping mechanism. The electric spindle can hold milling tools to perform machining on workpieces, such as milling of residual burring, and it can also hold some brushes for polishing tasks. The pneumatic floating spindle can support specific polishing tools. The 3D vision calibration system can identify relevant features of the workpiece for rapid coarse positioning, and then precise calibration of the workpiece coordinate system is achieved by using a ruby probe. The entire robot processing workflow is as follows:  
1. The workpiece is fixed using the rapid workpiece clamping mechanism, and the rotary worktable transports the workpiece to the processing area. 2. The 3D vision calibration system scans the workpiece to locate its features and perform preliminary positioning. The probe is used to detect the workpiece features for precise positioning, determining the transformation between the workpiece coordinate and the robot base coordinate. 3. The processing path for the workpiece is programmed offline, and interaction with the process database is carried out. Depending on the different processing positions and techniques, suitable processing tools are selected. This generates the robot processing path, which is then uploaded to the robot controller. 4. The robot commences the processing task. Once the processing process is complete, the rotary worktable is started, and the workpiece is transported to the manual area for dismantling. The workpiece calibration process is a critical step to ensure processing precision. Whether it's the milling or polishing process, there are high demands for the calibration accuracy of the entire system. The cost-effective, wide-view 3D vision products typically offer a matching and positioning accuracy of \(\pm 2\,\mathrm{mm}\) for workpieces. Using higher-precision visual equipment or laser scanning products is often prohibitively expensive and operationally complex. On the other hand, using contact-based devices directly for calibration requires manual robot teaching each time, given the arbitrary positioning of workpieces. This method is labor-intensive, places high demands on operators, and does not satisfy the requirements for automated robotic measurement operations. In addressing existing technological limitations, this paper introduces a method that blends the ease of visual positioning with the precision of contact-based positioning. It leverages affordable 3D vision products for initial workpiece coordinate placement, establishing the approximate workpiece coordinate system. Following this, a robot employs a contact-based probe for precise workpiece positioning in the rapid workpiece positioning system. The entire calibration process is divided into two major steps: (1) coarse calibration of 3D visual system, (2) precise calibration of contact measurement. The 3D coarse calibration determines the approximate position of the workpiece, guiding the robot for precise positioning. The principle of 3D visual coarse calibration is illustrated in Figure 2: [B] represents the robot base coordinate system, [W] represents the workpiece coordinate system, [C] represents the initial coordinate system of the 3D camera, and {C1} refers to the coordinate system of the 3D camera after moving on the XY Dual-Axis servo module. The relationship between {C1} and {C} is defined by a translation transformation \(\frac{C}{C1}\)T. Firstly, it checks whether updates are needed for the 3D camera calibration. If updates are required, the 3D camera captures a point cloud of the workpiece.