A robotic arm calibration method based on motion capture
By collecting the robot arm parameters through motion capture equipment, building a motion model and using a natural heuristic algorithm to compensate for errors and optimize the model parameters, the problem of model parameter error in the robot arm calibration is solved, the positioning and trajectory accuracy of the robot arm is improved, and its adaptability in complex environments is enhanced.
Patent Information
- Application Number
- CN202511032599.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-25
- Publication Date
- 2025-09-19
- Estimated Expiration
- 2045-07-25
AI Technical Summary
Existing technologies cannot effectively compensate for model parameter errors during the robotic arm calibration process, resulting in insufficient robotic arm positioning accuracy and trajectory accuracy, which cannot meet the needs of complex work and fine processing.
The robot arm parameter information is collected through motion capture equipment, the robot arm motion model is constructed, the posture error compensation value is obtained using the natural heuristic algorithm, the model parameters are optimized, the calibration model is constructed and error compensation is performed, and finally the calibration is completed in the robot arm coordinate system.
The positioning accuracy and trajectory accuracy of the robotic arm are improved, the adaptability of the robotic arm in complex environments and tasks is enhanced, and higher precision and stability are achieved.
Smart Images

Figure CN120516728B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of robotic arm calibration, and more particularly to a robotic arm calibration method based on motion capture. Background Art
[0002] With the development of science and technology, the application of robotic arms has covered more and more industries. Through program control, robotic arms can imitate human movements, thereby assisting or replacing manual work. However, for some complex tasks or tasks that require fine processing, such as object grasping and coffee art, robotic arms are required to be more precise and efficient.
[0003] Robot arm calibration plays a vital role in the normal operation and precise positioning of the robot arm. Through calibration, the robot arm can be ensured to have higher motion accuracy and stability, thereby improving production efficiency and product quality. At the same time, calibration can also enable the robot arm to better adapt to complex environments and task requirements, and achieve more intelligent and automated operations.
[0004] The public document with publication number CN117067214A discloses a motion capture-based robotic arm calibration method, system and robotic arm, and realizes the calibration of the robotic arm based on the motion capture system. The specific implementation method is as follows: self-calibration of the motion capture system, setting the coordinate system and zero point position of the capture system; calibration of the conversion relationship between the motion capture system and the robotic arm coordinate system, based on the sampling data of the center point position of the flange at the end of the robotic arm, obtaining the robotic arm sampling data and the motion capture system sampling data, and calculating the coordinate conversion relationship between the motion capture system and the robotic arm system; constructing a matrix based on the robotic arm sampling data and the motion capture system sampling data, and performing singular value decomposition on the matrix, and finally obtaining the matrix conversion relationship between the motion capture system and the robotic arm; by combining the data of the motion capture system, accurate calibration of the robotic arm is achieved to ensure its accuracy and reliability in various tasks.
[0005] However, there are errors in the model parameters during the modeling process of the robotic arm calibration. Such factors will directly affect the final calibration effect. The above method cannot compensate and identify the parameter errors, and thus cannot improve the absolute accuracy of the robotic arm, and cannot effectively improve the positioning accuracy and trajectory accuracy of the robotic arm, so that the robotic arm can move accurately according to the theoretical model. Summary of the Invention
[0006] In order to overcome the above-mentioned defects in the prior art, the present invention provides a robotic arm calibration method based on motion capture to solve the problems existing in the above-mentioned background technology.
[0007] The present invention provides the following technical solution: a robotic arm calibration method based on motion capture, comprising the following steps:
[0008] Step S01: Collect parameters: collect robot arm parameter information through motion capture equipment, and construct device coordinate system and robot arm coordinate system;
[0009] Step S02: Implement error compensation: Based on the constructed robot arm motion model, obtain the posture error compensation values of n joint points of the robot arm to implement error compensation;
[0010] Step S03: Optimize model parameters: Build a calibration model infrastructure, optimize model parameters based on a natural heuristic algorithm, and obtain the optimal model parameter group in combination with the pose error compensation value;
[0011] Step S04: performing coordinate system conversion: combining the optimal model parameter group with the calibration model, performing calibration model training, and performing model evaluation to form the final calibration model;
[0012] Step S05: The three-dimensional coordinates of the robot arm to be calibrated in the device coordinate system are collected by the motion capture device, and the three-dimensional coordinates are converted into the three-dimensional coordinates in the robot arm coordinate system in the final calibration model to complete the calibration.
[0013] Preferably, the robotic arm parameter information includes the length of each joint, the position of the rotation axis, the rotation axis angle, the common normal distance, the relative position of the two links, the normal angle between the two links and the link length. The robotic arm is usually composed of multiple joints; the common normal distance is the straight-line distance between the rotation axes of the two joints of the robotic arm; the relative position of the two links is the measured distance of the horizontal tangent of the robotic arm joint links; the normal angle between the two links is the angle between the horizontal tangent with a certain joint as the base point and the line connecting the next joint; the link length is the measured length of the link between the two joints of the robotic arm; the device coordinate system is the coordinate system of the motion capture device, and the robotic arm coordinate system is the coordinate system of the robotic arm.
[0014] Preferably, the specific method of constructing the robot arm motion model in step S02 is:
[0015] Based on the common normal distance a, the relative position b of the two links, the angle θ between the two link normals, and the link length d, the robot arm motion model is constructed, and the formula is expressed as:
[0016] , where Y i is the kinematic model formula of the i-th joint; a i represents the common normal distance of the i-th joint, that is, the straight-line distance between the i-th joint and the i+1-th joint rotation axis; d i represents the connecting rod length of the i-th joint, that is, the measured length of the connecting rod between the i-th joint and the i+1-th joint; θ irepresents the angle between the connecting rod normal of the i-th joint, that is, the angle between the horizontal tangent line with the i-th joint as the base point and the line connecting the i+1-th joint; b i represents the relative position of the link of the i-th joint, that is, the measured distance between the horizontal tangent of the link of the i-th joint and the i+1-th joint;
[0017] The kinematic model formula is expanded in matrix form and expressed as:
[0018] ;
[0019] in, represents the maximum rotation angle of the i-th joint of the manipulator;
[0020] Among them, i=1, 2, 3, ..., n-1; the nth joint point is the joint point closest to the end of the robotic arm, and the 1st joint point is the joint point farthest from the end of the robotic arm.
[0021] Preferably, the specific method for implementing error compensation in step S02 is:
[0022] Based on the robot arm coordinate system, the coordinate point of the end of the robot arm, that is, the nth joint point, is represented as follows: Among them, D n is the coordinate point of the nth joint point, r xn is the coordinate point of the nth joint point on the x-axis, r yn is the coordinate point of the nth joint point on the y-axis, r zn is the coordinate point of the nth joint point on the z-axis;
[0023] Based on the coordinate position of the nth joint point, the kinematic model formula of the nth joint point is expressed as follows: Among them, Y n is the kinematic model formula of the nth joint point, that is, the position and posture representation of the nth joint point, and L is the horizontal displacement of the end of the nth joint point of the robot arm;
[0024] The posture error compensation formula is expressed as: , where B is the pose error compensation value and λ is the parameter bias constant.
[0025] Preferably, the calibration model infrastructure in step S03 includes an input layer, a hidden layer, an activation function, and an output layer;
[0026] The input layer is used to input data, and the input data is the three-dimensional coordinates of each joint point in the device coordinate system;
[0027] The hidden layer is used to process the eigenvalues. The hidden layer has multiple layers, each layer has several nodes, and the connection status of the nodes between layers is reflected by weights.
[0028] The activation function is a Sigmoid function, and the output layer is used to output data, wherein the output data is the three-dimensional coordinates corresponding to each joint point in the robotic arm coordinate system;
[0029] Collect parameter information of the robot arm during m runs, and use the three-dimensional coordinates of n joints in the device coordinate system during each run as a set of analysis data, that is, there are m sets of analysis data;
[0030] A natural heuristic algorithm is used to search for the optimal solution of m groups of analysis data to obtain the parameter information corresponding to the minimum error compensation value of the robotic arm.
[0031] Preferably, the nature-inspired algorithm specifically includes:
[0032] Step S11: Consider each set of analysis data as a bat, and the position of the j-th bat is p j , the speed is v j , the sound wave frequency is H j , the loudness of the sound wave is S j , the pulse frequency is I j ,When searching for prey, bats automatically adjust the wavelength and loudness according to the distance between the target and themselves;,j=1,2,3,…,m; the initial number of iterations k is 0;
[0033] Step S12: determining the fitness function and ranking the fitness values of all individual bats;
[0034] Step S13: Find the optimal position p* of the bats in the current population and update the bat position and speed; the optimal position of the bats in the current population is the bat position corresponding to the analysis data corresponding to the maximum fitness in this iteration;
[0035] Step S14: Generate a random number rand1 between [0, 1]. If rand1>I j , then random flight is performed, and a new position p is generated near the original optimal position by random flight new , otherwise update the bat position according to the bat position update formula;
[0036] Step S15: Generate a random number rand3 on [0, 1]. If rand3 < S j , and the fitness corresponding to the new optimal position is greater than the fitness of the original optimal position, then the position is accepted and the new position is used as the current optimal position, and the sound wave loudness is reduced and the pulse frequency is increased;
[0037] Step S16: Determine whether the maximum number of iterations has been reached. If so, the iteration ends and the analysis data corresponding to the bat in the optimal position is obtained as the optimal parameter information; otherwise, set k=k+1 and loop through steps S12 to S15.
[0038] Preferably, the bat position update formula is: , where p j k is the position of the j-th bat at the k-th iteration, p j k-1 is the position of the j-th bat at the k-1th iteration; v j k is the speed of the j-th bat at the k-th iteration;
[0039] The bat speed update formula is: , where v j k-1 is the speed of the j-th bat at the k-1th iteration, H j is the frequency of the sound wave emitted by the j-th bat;
[0040] , where H min is the minimum frequency of the bat's sound waves, H max is the maximum frequency of the sound waves generated by bats, and the sound wave frequency range is [H min , H max ], β is a random vector between [0,1];
[0041] The formula for the random flight is:
[0042] , where p old is the original optimal position, rand2 is a random number between [0, 1], S k is the average loudness of all bats in the kth iteration.
[0043] Preferably, the formula for adjusting the loudness and frequency of the sound waves is:
[0044] ; ;in, , is the sound wave loudness attenuation coefficient, γ>0, is the pulse frequency enhancement coefficient, S j k+1 is the sound wave loudness of the j-th bat at the k+1th iteration, S j k is the sound wave loudness of the j-th bat at the k-th iteration, I j k+1 is the pulse frequency of the j-th bat at the k+1-th iteration, Ij 0 is the initial pulse frequency of the rth bat;
[0045] For any sound wave loudness attenuation coefficient and pulse frequency enhancement coefficient, when k→∞, we have , ; When S j k When it approaches 0, it is considered that the bat has found its prey and will not emit a pulse temporarily. Only when the bat's position is optimized will the loudness and frequency of the pulse be updated.
[0046] Preferably, the fitness function is expressed as: , where f j is the fitness value corresponding to the j-th bat, B j is the pose error compensation value of the parameter information corresponding to the j-th bat;
[0047] The optimal parameter information consists of the three-dimensional coordinates of n joint points in the device coordinate system; the optimal parameter information is input into the calibration model as input data, the output value of the output layer is compared with the expected value, the error between the output value and the expected value is back-propagated layer by layer, and the weight value of each layer in the calibration model is adjusted until the error is reduced to a preset threshold or cannot be further reduced, and the weight value of each layer in the calibration model at this time is obtained as the optimal model parameter group.
[0048] Preferably, the specific method of performing model training in step S04 is:
[0049] Collect Q groups of analysis data and the corresponding calibration data, where the calibration data is the three-dimensional coordinates in the robotic arm coordinate system corresponding to the analysis data; use the optimal model parameter group as the initial weight value of each layer in the calibration model, input the Q groups of analysis data into the calibration model, and the output layer outputs Q corresponding three-dimensional coordinates in the robotic arm coordinate system. Similarly, compare the output value of the output layer with the corresponding calibration data, and backpropagate the error between the output value and the corresponding calibration data layer by layer, and continuously adjust the weight value of each layer in the calibration model until the error between the output value and the corresponding calibration data is reduced to a preset threshold or cannot be reduced further. At this time, the model training is completed and the model evaluation is performed.
[0050] The technical effects and advantages of the present invention are as follows:
[0051] The present invention is provided with step S03 and step S04, which is conducive to constructing a calibration model infrastructure, optimizing the model parameters based on the nature-inspired algorithm, and obtaining the optimal model parameter group in combination with the posture error compensation value; integrating the nature-inspired algorithm into the model to solve the problem that the calibration model is prone to falling into the local optimal solution and improve the model training speed; combining the optimal model parameter group with the calibration model to perform calibration model training and model evaluation to form a final calibration model, and using the final calibration model to calibrate the robotic arm, and obtaining the optimal parameters with the minimum error compensation through the nature-inspired algorithm, and then obtaining the initial weight value through the calibration model as the optimal weight value, which lays the foundation for subsequent calibration model training. At the same time, on the basis of the optimal initial weight value, the model is trained, and the weight value of each layer is continuously adjusted to make the model achieve the best effect, effectively improving the calibration effect and the accuracy of the robotic arm. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] Figure 1 This is a flow chart of the robotic arm calibration method based on motion capture of the present invention. DETAILED DESCRIPTION
[0053] The technical solutions of the present invention will be clearly and completely described below in conjunction with the drawings in the present invention. In addition, the forms of the various structures described in the following embodiments are merely examples. The motion capture-based robotic arm calibration method involved in the present invention is not limited to the various structures described in the following embodiments. All other implementations obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0054] like Figure 1 As shown, the present invention provides a robotic arm calibration method based on motion capture, comprising the following steps:
[0055] Step S01: Collecting parameters: Collecting the parameter information of the robotic arm through the motion capture device, and constructing the device coordinate system and the robotic arm coordinate system; the robotic arm parameter information includes but is not limited to the length of each joint, the position of the rotation axis, the rotation axis angle, the common normal distance, the relative position of the two links, the normal angle between the two links and the link length, etc. The robotic arm is usually composed of multiple joints; the common normal distance is the straight-line distance between the rotation axes of the two joints of the robotic arm; the relative position of the two links is the measured distance of the horizontal tangent of the robotic arm joint links; the normal angle between the two links is the angle between the horizontal tangent of a certain joint and the line connecting the next joint; the link length is the measured length of the link between the two joints of the robotic arm; the device coordinate system is the coordinate system of the motion capture device, and the robotic arm coordinate system is the coordinate system of the robotic arm;
[0056] Step S02: Implement error compensation: Based on the constructed robot arm motion model, the posture error compensation values of the n joint points of the robot arm are obtained to implement error compensation; by analyzing the posture error of the robot arm, the posture error compensation values are obtained to perform error compensation, which can improve the accuracy and performance of the robot arm. At the same time, the optimal model parameter combination is obtained based on the error compensation value, thereby improving the effectiveness of the calibration model;
[0057] Step S03: Optimize model parameters: Build a calibration model infrastructure, optimize model parameters based on a natural heuristic algorithm, and obtain the optimal model parameter set in combination with the pose error compensation value; integrate the natural heuristic algorithm into the model to solve the problem that the calibration model is prone to falling into a local optimal solution and improve the model training speed;
[0058] Step S04: performing coordinate system conversion: combining the optimal model parameter group with the calibration model, performing calibration model training, and performing model evaluation to form the final calibration model;
[0059] Step S05: The three-dimensional coordinates of the robot arm to be calibrated in the device coordinate system are collected by the motion capture device, and the three-dimensional coordinates are converted into the three-dimensional coordinates in the robot arm coordinate system in the final calibration model to complete the calibration.
[0060] In this embodiment, it should be specifically explained that the specific method of constructing the robot arm motion model in step S02 is:
[0061] Based on the common normal distance a, the relative position b of the two links, the angle θ between the two link normals, and the link length d, the robot arm motion model is constructed, and the formula is expressed as:
[0062] , where Y i is the kinematic model formula of the i-th joint; a i represents the common normal distance of the i-th joint, that is, the straight-line distance between the i-th joint and the i+1-th joint rotation axis; d i represents the connecting rod length of the i-th joint, that is, the measured length of the connecting rod between the i-th joint and the i+1-th joint; θ i represents the angle between the connecting rod normal of the i-th joint, that is, the angle between the horizontal tangent line with the i-th joint as the base point and the line connecting the i+1-th joint; b i represents the relative position of the link of the i-th joint, that is, the measured distance between the horizontal tangent of the link of the i-th joint and the i+1-th joint;
[0063] The kinematic model formula is expanded in matrix form and expressed as:
[0064] ;
[0065] in, represents the maximum rotation angle of the i-th joint of the manipulator;
[0066] Among them, i=1, 2, 3, ..., n-1; the nth joint point is the joint point closest to the end of the robotic arm, and the 1st joint point is the joint point farthest from the end of the robotic arm.
[0067] In this embodiment, it should be specifically explained that the specific method for implementing error compensation in step S02 is:
[0068] Based on the robot arm coordinate system, the coordinate point of the end of the robot arm, that is, the nth joint point, is represented as follows: Among them, D n is the coordinate point of the nth joint point, r xn is the coordinate point of the nth joint point on the x-axis, r yn is the coordinate point of the nth joint point on the y-axis, r zn is the coordinate point of the nth joint point on the z-axis;
[0069] Based on the coordinate position of the nth joint point, the kinematic model formula of the nth joint point is expressed as follows: Among them, Y n is the kinematic model formula of the nth joint point, that is, the position and posture representation of the nth joint point, and L is the horizontal displacement of the end of the nth joint point of the robot arm;
[0070] The posture error compensation formula is expressed as: , where B is the pose error compensation value, λ is the parameter bias constant, which is a constant between 0 and 1;
[0071] According to the formula of the robot arm motion model, the nth joint point cannot be calculated by the formula. At the same time, the nth joint point is the joint point closest to the end of the robot arm. Therefore, the position and posture of the nth joint point can most directly reflect the accuracy of the robot arm. The position and posture representation of the nth joint point is obtained based on the robot arm coordinate system. Its purpose is to obtain the kinematic model formula representation of the nth joint point, and then obtain the position and posture error compensation, thereby realizing the error compensation of the robot arm.
[0072] In this embodiment, it should be specifically explained that the calibration model in step S03 is specifically a neural network model, and the basic architecture includes an input layer, a hidden layer, an activation function, and an output layer;
[0073] The input layer is used to input data, and the input data is the three-dimensional coordinates of each joint point in the device coordinate system;
[0074] The hidden layer is used to process the eigenvalues. The hidden layer can have one or more layers. Each layer has several nodes. The connection status of the nodes between layers is reflected by weights.
[0075] The activation function is a Sigmoid function, and the output layer is used to output data, wherein the output data is the three-dimensional coordinates corresponding to each joint point in the robotic arm coordinate system;
[0076] Collect parameter information of the robot arm during m runs, and use the three-dimensional coordinates of n joints in the device coordinate system during each run as a set of analysis data, that is, there are m sets of analysis data;
[0077] A natural heuristic algorithm is used to search for the optimal solution of the m sets of analysis data to obtain parameter information corresponding to minimizing the error compensation value of the robotic arm. The natural heuristic algorithm can be any one of a genetic algorithm, a gray wolf algorithm, a lizard algorithm, a particle swarm algorithm, and a bat algorithm. In this embodiment, the bat algorithm is used, which specifically includes:
[0078] Step S11: Consider each set of analysis data as a bat, and the position of the j-th bat is p j , the speed is v j , the sound wave frequency is H j , the loudness of the sound wave is S j , the pulse frequency is I j ,When searching for prey, bats automatically adjust the wavelength and loudness according to the distance between the target and themselves;,j=1,2,3,…,m; the initial number of iterations k is 0;
[0079] Step S12: determining the fitness function and ranking the fitness values of all individual bats;
[0080] Step S13: Find the optimal position p* of the bats in the current population and update the bat position and speed; the optimal position of the bats in the current population is the bat position corresponding to the analysis data corresponding to the maximum fitness in this iteration;
[0081] The bat position update formula is: , where p j k is the position of the j-th bat at the k-th iteration, p j k-1 is the position of the j-th bat at the k-1th iteration; v j k is the speed of the j-th bat at the k-th iteration;
[0082] The bat speed update formula is: , where v j k-1is the speed of the j-th bat at the k-1th iteration, H j is the frequency of the sound wave emitted by the j-th bat;
[0083] , where H min is the minimum frequency of the bat's sound waves, H max is the maximum frequency of the sound waves generated by bats, and the sound wave frequency range is [H min , H max ], β is a random vector between [0,1];
[0084] Step S14: Generate a random number rand1 between [0, 1]. If rand1>I j , then random flight is performed, and a new position p is generated near the original optimal position by random flight new Otherwise, the bat position is updated according to the bat position update formula; the formula for random flight is:
[0085] , where p old is the original optimal position, rand2 is a random number between [0, 1], S k is the average loudness of all bats in the kth iteration;
[0086] When searching for prey, bats constantly adjust the loudness and frequency of their sound waves according to the location of their target prey to improve their hunting efficiency. As they gradually approach their prey, the spatial range within which they search for prey decreases. Therefore, they gradually reduce the loudness to a constant value while continuously increasing the frequency in order to quickly and dynamically grasp the location of their target prey.
[0087] Step S15: Generate a random number rand3 on [0, 1]. If rand3 < S j , and the fitness corresponding to the new optimal position is greater than the fitness of the original optimal position, then the position is accepted and the new position is used as the current optimal position, and the sound wave loudness is reduced and the pulse frequency is increased;
[0088] The formula for adjusting the loudness and frequency of sound waves is:
[0089] ; ;in, , is the sound wave loudness attenuation coefficient, γ>0, is the pulse frequency enhancement coefficient, S j k+1 is the sound wave loudness of the j-th bat at the k+1th iteration, S j k is the sound wave loudness of the j-th bat at the k-th iteration, I j k+1is the pulse frequency of the j-th bat at the k+1-th iteration, I j 0 is the initial pulse frequency of the rth bat;
[0090] For any sound wave loudness attenuation coefficient and pulse frequency enhancement coefficient, when k→∞, we have , ; When S j k When it approaches 0, it can be considered that the bat has found prey and temporarily stops emitting pulses. The pulse variation range can be set by technicians in this field according to specific circumstances. Only when the bat's position is optimized will the loudness and frequency of the pulse be updated, which indicates that the bat is moving towards the optimal position.
[0091] Step S16: Determine whether the maximum number of iterations has been reached. If so, the iteration ends and the analysis data corresponding to the bat in the optimal position is obtained as the optimal parameter information; otherwise, set k=k+1 and loop through steps S12 to S15.
[0092] In this embodiment, it should be specifically explained that the fitness function is expressed as follows: , where f j is the fitness value corresponding to the j-th bat, B j is the pose error compensation value of the parameter information corresponding to the j-th bat;
[0093] The method of determining whether the maximum number of iterations has been reached is that when the number of iterations converges to a stable value, it is determined that the maximum number of iterations has been reached;
[0094] The optimal parameter information consists of the three-dimensional coordinates of n joint points in the device coordinate system; the optimal parameter information is input into the calibration model as input data, the output value of the output layer is compared with the expected value, the error between the output value and the expected value is back-propagated layer by layer, and the weight value of each layer in the calibration model is adjusted until the error is reduced to a preset threshold or cannot be further reduced, and the weight value of each layer in the calibration model at this time is obtained as the optimal model parameter group; the expected value is the three-dimensional coordinate of the robotic arm coordinate system corresponding to the three-dimensional coordinate in the device coordinate system under ideal conditions.
[0095] In this embodiment, it should be specifically explained that the specific method of performing model training in step S04 is:
[0096] Collect Q groups of analysis data and corresponding calibration data, where the calibration data is the three-dimensional coordinates in the robotic arm coordinate system corresponding to the analysis data; use the optimal model parameter group as the initial weight value of each layer in the calibration model, input the Q groups of analysis data into the calibration model, and the output layer outputs Q corresponding three-dimensional coordinates in the robotic arm coordinate system. Similarly, compare the output value of the output layer with the corresponding calibration data, and backpropagate the error between the output value and the corresponding calibration data layer by layer, and continuously adjust the weight value of each layer in the calibration model until the error between the output value and the corresponding calibration data is reduced to a preset threshold or cannot be further reduced. At this time, the model training is completed and the model evaluation is performed;
[0097] The model evaluation can use accuracy, precision, recall rate and F1 value as evaluation indicators to perform model evaluation.
[0098] In this embodiment, it should be specifically explained that a natural heuristic algorithm is used to obtain the optimal parameter information, and then the optimal parameter information is used as the initial input data of the calibration model to obtain the optimal model parameter group. The advantages of the bat algorithm are utilized, including strong robustness and global search capabilities, which can efficiently explore the optimal solution in a global range and avoid falling into local optimality. Therefore, the optimal parameter information obtained is the optimal parameter with the smallest error compensation. At this time, the initial weight value obtained by the calibration model is the optimal weight value, which lays the foundation for the subsequent training of the calibration model. At the same time, it has strong parallel computing capabilities, simple parameter adjustment, easy implementation and operation, fast convergence speed, and can quickly find a better solution. The exploration process is stable and is not easily affected by the initial parameters and the size of the exploration space. Then, on the basis of the optimal initial weight value, the model is trained, and the weight value of each layer is continuously adjusted to make the model achieve the best effect, effectively improving the calibration effect and the accuracy of the robotic arm.
[0099] In this embodiment, it should be specifically explained that the difference between this embodiment and the prior art mainly lies in that this embodiment has step S03 and step S04, which is conducive to optimizing the model parameters based on the nature-inspired algorithm by constructing a calibration model infrastructure, and obtaining the optimal model parameter group in combination with the posture error compensation value; integrating the nature-inspired algorithm into the model to solve the problem that the calibration model is prone to falling into the local optimal solution and improve the model training speed; combining the optimal model parameter group with the calibration model to train the calibration model and perform model evaluation to form a final calibration model, and using the final calibration model to calibrate the robotic arm, and obtaining the optimal parameters with the minimum error compensation through the nature-inspired algorithm, and then obtaining the initial weight value through the calibration model as the optimal weight value, which lays the foundation for subsequent calibration model training, and at the same time, on the basis of the optimal initial weight value, the model is trained, and the weight value of each layer is continuously adjusted to make the model achieve the best effect, effectively improving the calibration effect and the accuracy of the robotic arm.
[0100] Finally: The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
[0101] The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.
Claims
1. A robotic arm calibration method based on motion capture, characterized by: The following steps are involved: Step S01: Collect parameters: collect robot arm parameter information through motion capture equipment, and construct device coordinate system and robot arm coordinate system; Step S02: Implement error compensation: Based on the constructed robot arm motion model, obtain the posture error compensation values of n joint points of the robot arm to implement error compensation; Step S03: Optimize model parameters: Build a calibration model infrastructure, optimize model parameters based on a natural heuristic algorithm, and obtain the optimal model parameter group in combination with the pose error compensation value; Step S04: performing coordinate system conversion: combining the optimal model parameter group with the calibration model, performing calibration model training, and performing model evaluation to form the final calibration model; Step S05: The three-dimensional coordinates of the robot arm to be calibrated in the device coordinate system are collected by the motion capture device, and the three-dimensional coordinates are converted into the three-dimensional coordinates in the robot arm coordinate system in the final calibration model to complete the calibration; The calibration model infrastructure in step S03 includes an input layer, a hidden layer, an activation function, and an output layer; The input layer is used to input data, and the input data is the three-dimensional coordinates of each joint point in the device coordinate system; The hidden layer is used to process the eigenvalues. The hidden layer has multiple layers, each layer has several nodes, and the connection status of the nodes between layers is reflected by weights. The activation function is a Sigmoid function, and the output layer is used to output data, wherein the output data is the three-dimensional coordinates corresponding to each joint point in the robotic arm coordinate system; Collect parameter information of the robot arm during m runs, and use the three-dimensional coordinates of n joints in the device coordinate system during each run as a set of analysis data, that is, there are m sets of analysis data; A natural heuristic algorithm is used to search for the optimal solution of m groups of analysis data to obtain the parameter information corresponding to the minimum error compensation value of the robotic arm; The nature-inspired algorithm specifically includes: Step S11: Consider each set of analysis data as a bat, and the position of the j-th bat is p j , the speed is v j , the sound wave frequency is H j , the loudness of the sound wave is S j , the pulse frequency is I j ,When searching for prey, bats automatically adjust the wavelength and loudness according to the distance between the target and themselves;,j=1,2,3,…,m; the initial number of iterations k is 0; Step S12: determining the fitness function and ranking the fitness values of all individual bats; Step S13: Find the optimal position p* of the bats in the current population and update the bat position and speed; the optimal position of the bats in the current population is the bat position corresponding to the analysis data corresponding to the maximum fitness in this iteration; Step S14: Generate a random number rand1 between [0, 1]. If rand1>I j , then random flight is performed, and a new position p is generated near the original optimal position by random flight new , otherwise update the bat position according to the bat position update formula; Step S15: Generate a random number rand3 on [0, 1]. If rand3 < S j , and the fitness corresponding to the new optimal position is greater than the fitness of the original optimal position, then the position is accepted and the new position is used as the current optimal position, and the sound wave loudness is reduced and the pulse frequency is increased; Step S16: Determine whether the maximum number of iterations has been reached. If so, the iteration ends and the analysis data corresponding to the bat at the optimal position is obtained as the optimal parameter information; otherwise, set k=k+1 and loop through steps S12 to S15. The bat position update formula is: , where p j k is the position of the j-th bat at the k-th iteration, p j k-1 is the position of the j-th bat at the k-1th iteration; v j k is the speed of the j-th bat at the k-th iteration; The bat speed update formula is: , where v j k-1 is the speed of the j-th bat at the k-1th iteration, H j is the frequency of the sound wave emitted by the j-th bat; , where H min is the minimum frequency of the bat's sound waves, H max is the maximum frequency of the sound waves generated by bats, and the sound wave frequency range is [H min , H max ], β is a random vector between [0,1]; The formula for the random flight is: , where p old is the original optimal position, rand2 is a random number between [0, 1], S k is the average loudness of all bats in the kth iteration.
2. The method for calibrating a robotic arm based on motion capture according to claim 1, wherein: The robotic arm parameter information includes the length of each joint, the position of the rotation axis, the rotation axis angle, the common normal distance, the relative position of the two links, the normal angle between the two links and the link length. The robotic arm is usually composed of multiple joints; the common normal distance is the straight-line distance between the rotation axes of the two joints of the robotic arm; the relative position of the two links is the measured distance of the horizontal tangent of the robotic arm joint links; the normal angle between the two links is the angle between the horizontal tangent with a certain joint as the base point and the line connecting the next joint; the link length is the measured length of the link between the two joints of the robotic arm; the device coordinate system is the coordinate system of the motion capture device, and the robotic arm coordinate system is the coordinate system of the robotic arm.
3. The method for calibrating a robotic arm based on motion capture according to claim 2, wherein: The specific method of constructing the robot arm motion model in step S02 is: Based on the common normal distance a, the relative position b of the two links, the angle θ between the two link normals, and the link length d, the robot arm motion model is constructed, and the formula is expressed as: , where Y i is the kinematic model formula of the i-th joint; a i represents the common normal distance of the i-th joint, that is, the straight-line distance between the i-th joint and the i+1-th joint rotation axis; d i represents the connecting rod length of the i-th joint, that is, the measured length of the connecting rod between the i-th joint and the i+1-th joint; θ i represents the angle between the connecting rod normal of the i-th joint, that is, the angle between the horizontal tangent line with the i-th joint as the base point and the line connecting the i+1-th joint; b i represents the relative position of the link of the i-th joint, that is, the measured distance between the horizontal tangent of the link of the i-th joint and the i+1-th joint; The kinematic model formula is expanded in matrix form and expressed as: ; in, represents the maximum rotation angle of the i-th joint of the robotic arm; Among them, i=1, 2, 3, ..., n-1; the nth joint point is the joint point closest to the end of the robotic arm, and the 1st joint point is the joint point farthest from the end of the robotic arm.
4. The method for calibrating a robotic arm based on motion capture according to claim 3, wherein: The specific method for achieving error compensation in step S02 is: Based on the robot arm coordinate system, the coordinate point of the end of the robot arm, that is, the nth joint point, is represented as follows: Among them, D n is the coordinate point of the nth joint point, r xn is the coordinate point of the nth joint point on the x-axis, r yn is the coordinate point of the nth joint point on the y-axis, r zn is the coordinate point of the nth joint point on the z-axis; Based on the coordinate position of the nth joint point, the kinematic model formula of the nth joint point is expressed as follows: Among them, Y n is the kinematic model formula of the nth joint point, that is, the position and posture representation of the nth joint point, and L is the horizontal displacement of the end of the nth joint point of the robot arm; The posture error compensation formula is expressed as: , where B is the pose error compensation value and λ is the parameter bias constant.
5. The method for calibrating a robotic arm based on motion capture according to claim 1, wherein: The formula for adjusting the loudness and frequency of sound waves is: ; ;in, , is the sound wave loudness attenuation coefficient, γ>0, is the pulse frequency enhancement coefficient, S j k+1 is the sound wave loudness of the j-th bat at the k+1-th iteration, S j k is the sound wave loudness of the j-th bat at the k-th iteration, I j k+1 is the pulse frequency of the j-th bat at the k+1-th iteration, I j 0 is the initial pulse frequency of the rth bat; For any sound wave loudness attenuation coefficient and pulse frequency enhancement coefficient, when k→∞, we have , ; When S j k When it approaches 0, it is considered that the bat has found its prey and will not emit a pulse temporarily. Only when the bat's position is optimized will the loudness and frequency of the pulse be updated.
6. The method for calibrating a robotic arm based on motion capture according to claim 1, wherein: The fitness function is expressed as follows: , where f j is the fitness value corresponding to the j-th bat, B j is the pose error compensation value of the parameter information corresponding to the j-th bat; The optimal parameter information consists of the three-dimensional coordinates of n joint points in the device coordinate system; the optimal parameter information is input into the calibration model as input data, the output value of the output layer is compared with the expected value, the error between the output value and the expected value is back-propagated layer by layer, and the weight value of each layer in the calibration model is adjusted until the error is reduced to a preset threshold or cannot be further reduced, and the weight value of each layer in the calibration model at this time is obtained as the optimal model parameter group.
7. The method for calibrating a robotic arm based on motion capture according to claim 1, wherein: The specific method of performing model training in step S04 is: Collect Q groups of analysis data and the corresponding calibration data, where the calibration data is the three-dimensional coordinates in the robotic arm coordinate system corresponding to the analysis data; use the optimal model parameter group as the initial weight value of each layer in the calibration model, input the Q groups of analysis data into the calibration model, and the output layer outputs Q corresponding three-dimensional coordinates in the robotic arm coordinate system. Similarly, compare the output value of the output layer with the corresponding calibration data, and backpropagate the error between the output value and the corresponding calibration data layer by layer, and continuously adjust the weight value of each layer in the calibration model until the error between the output value and the corresponding calibration data is reduced to a preset threshold or cannot be reduced further. At this time, the model training is completed and the model evaluation is performed.
Citation Information
Patent Citations
Mechanical arm calibration method and system based on motion capture and mechanical arm
CN117067214A
Reliability sensing multi-target prediction control method for wind power plant
CN116401937A
Series-parallel connection fracture reduction robot kinematics calibration and error compensation method
CN118322188A