Skip to main content
. 2018 Oct 10;18(10):3380. doi: 10.3390/s18103380
Algorithm 1 Automated Centering Procedure
1: Procedure AutoCenter(qd)  # qd is the desired joints configuration to measure
2: MAX_EPSILON 0.010   # 0.010 mm = position repeatability
3: Move the robot to qd    # from MATLAB to Controller
4: Wait 1 s                # to ensure effective communication
5: Send data request             # from MATLAB to U-WAVE-R
6: rx Measurement of indicator along the tool X  # from U-WAVE-R to MATLAB
7: ry Measurement of indicator along the tool Y  # from U-WAVE-R to MATLAB
8: rz Measurement of indicator along the tool Z  # from U-WAVE-R to MATLAB
9: r[rx,ry,rz]
10: while(norm(r)) >= MAX_EPSILON do
11:  Move the robot’s TCP by vector r         # from MATLAB to Controller
12:  Wait 1 s                     # to ensure effective communication
13:  Send data request                # from MATLAB to U-WAVE-R
14:  rx Measurement of indicator along the tool X  # from U-WAVE-R to MATLAB
15:  ry Measurement of indicator along the tool Y  # from U-WAVE-R to MATLAB
16:  rz Measurement of indicator along the tool Z  # from U-WAVE-R to MATLAB
17: r[rx,ry,rz]
18: return qa Actual joints configuration        # from Controller to MATLAB