The invention discloses a multi-degree-of-freedom mechanical arm
inverse kinematics real-time solving method and device, and the method comprises the following steps: building a
forward kinematics model of a mechanical arm, so as to obtain a
forward kinematics solution of the mechanical arm; defining a
loss function, and calculating a current
pose error of the mechanical arm in combination with a
forward kinematics solution; when the current
pose error is greater than a set error threshold value, calculating the gradient of the
pose error; gradient normalization
processing is carried out to prevent gradient explosion or disappearance; gradient filtering after gradient normalization is carried out, and interference of
noise on a resolving result is reduced; the step length is adaptively adjusted through the
PID controller; step length
delta is set and limited,
impact is prevented, joint variables are updated, and real-time performance is guaranteed; a track is obtained through calculation, and smooth filtering
processing is carried out on the track; and recalculating the error until a set threshold condition is met. According to the method, through the improved
gradient descent algorithm, the convergence speed and the calculation precision of
inverse kinematics solution of the mechanical arm are effectively improved, and robustness and applicability are achieved.