Skip to main content
. 2020 Aug 12;20(16):4502. doi: 10.3390/s20164502
Algorithm 1 Calculate the optimal joint position of joint {4}.
Inputs: Position and attitude of {T}, XT, ZT, RZT. Data of attachment, AX, AZ, AR.
Outputs: Position and attitude of {4}, X4, Z4, RZ4.
Notes:ΔθT=0,,π6, θe=0,,2π, θ4=π2,,πN, Δθb=π2,,0.
1. θT=πarctan2AZ,AX+ΔθT.
2. Calculate the trajectory of {T} according to Equation (9), and get xT, zT.
3. Calculate the collision region ellipse according to Equation (8), and get xe, ze.
4. Calculate the trajectory of {4} according to Equation (7), and get x4, z4.
5. fori=1,,N
6. X4=x4i, Z4=z4i
7 zW=zT, calculate xW, according to Equation (4)
8. θb=arctan2Z4ZT,X4XT+Δθb
9.  Calculate the trajectory of the quick-hitch equipment edge according to Equation (6), and get xb, zb.
10. di=maxxTxW2+zTzW2.
11. if arc (xb, zb) is tangent to ellipse (xe, ze), then
12.    break
13. end if
14. end for
15. index, dmin=mind
16. X4=x4index, Z4=z4index
17. RZ4=arctan2ZTZ4,XTX40.236π10
18. OutputX4, Z4, RZ4.