The application provides a
robot dynamic error compensation method based on a
capsule neural network, adopts Newton-
Euler method to establish a
robot dynamics model, and performs
linearization and dynamics parameter identification; uses joint motion data as input to obtain predicted torque for model training by using the linearized dynamics model after the dynamics parameter identification, and calculates error between the predicted torque and actual torque; regards normalized parameters as vectors in a vector space, calculates inner products of the vectors to form a
Gram matrix and converts the
Gram matrix into a two-dimensional image; learns error between the predicted torque and the actual torque by using a
capsule neural network, and obtains a trained
capsule neural network; obtains real-time prediction error by using the trained capsule neural network, and compensates real-time predicted torque obtained by the linearized dynamics model after the parameter identification by using the real-time prediction error. The application realizes high-precision and adaptive dynamic error compensation.