Mechanical arm calibration and control device and method based on particle swarm algorithm optimization

By optimizing the combination of the camera and the laser tracking ball using the particle swarm optimization algorithm, the error problem of the end-effector position was solved, achieving high-precision robot arm calibration and control, and improving the detection accuracy of the end-effector position.

CN116476046BActive Publication Date: 2026-03-31FOSHAN UNIVERSITY
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-03-27
Publication Date
2026-03-31

AI Technical Summary

Technical Problem

The robotic arm suffers from motion and detection errors during design, manufacturing, and visual inspection, resulting in insufficient precision and making it difficult to achieve high-precision end-effector position control.

Method used

The particle swarm optimization algorithm is used to optimize the motion error of the camera and laser tracking ball to obtain the position of the robotic arm end effector. The control error compensation amount is obtained through particle swarm optimization training. Combined with perspective distortion correction and light source reflector edge extraction, high-precision robotic arm calibration and control are achieved.

Benefits of technology

By comparing real-time data and optimizing with particle swarm optimization, the error in the end-effector position is reduced, achieving higher precision control.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116476046B_ABST
    Figure CN116476046B_ABST
Patent Text Reader

Abstract

The application discloses a kind of mechanical arm calibration and control device and method based on particle swarm optimization, the method includes: obtaining second arm end position photo;Second arm end position photo is handled, and the pixel coordinates of light source reflector are extracted;The light source edge of light source reflector is extracted, the pixel coordinates of second arm end position are calculated, and the pixel coordinate sequence of first arm end position is obtained;Second arm end position pixel coordinate sequence is converted into corresponding coordinate sequence under camera coordinate system;Obtain the light source reflector coordinates under laser tracker coordinate system, and calculate the pixel coordinate sequence of second arm end position, obtain the pixel coordinate sequence of second arm end position;The error between the pixel coordinate sequence of first arm end position and the pixel coordinate sequence of second arm end position is reduced to preset range using particle swarm optimization algorithm, realizes mechanical arm calibration and control.The mechanical arm control of higher calibration accuracy can be realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of end-effector trajectory detection and control research of rotary heavy-duty robotic arms, and in particular to a robotic arm calibration and control device and method based on particle swarm optimization algorithm. Background Technology

[0002] Heavy-duty robotic arms, structurally similar to human arms, possess strong load-bearing capacity and response speeds several times faster than ordinary articulated robotic arms, making them suitable for planar positioning and assembly line work. With increasingly stringent requirements for robotic arm motion precision and advancements in visual inspection technology, robotic arms are continuously evolving towards visual inspection and control. However, on the one hand, motion errors exist within the robotic arm itself due to factors such as design, manufacturing, and assembly errors; on the other hand, detection errors arise due to limitations in pixel size and numerical processing distortion in visual inspection methods. Therefore, designing a method for accurately detecting and controlling the end-effector position of a rotating heavy-duty secondary arm using an industrial camera has significant research value and practical application. Summary of the Invention

[0003] To address the aforementioned technical problems, the present invention aims to provide a robotic arm calibration and control device and method based on particle swarm optimization. This device and method can train the second arm end-effector position motion error obtained by the camera and laser tracking ball using the particle swarm optimization algorithm to obtain the control error compensation amount, thereby achieving robotic arm control with higher calibration accuracy.

[0004] The first technical solution adopted in this invention is: a method for calibrating and controlling a robotic arm based on particle swarm optimization, comprising the following steps:

[0005] Acquire a photo of the end position of the second arm, process the photo of the end position of the second arm, and obtain the pixel coordinates of the light source reflector;

[0006] The light source edge of the light source reflector is extracted using the pixel coordinates of the light source reflector, and the pixel coordinates of the end position of the second arm are calculated to obtain the first sequence of pixel coordinates of the end position of the second arm;

[0007] The first sequence of pixel coordinates at the end of the second arm is converted into the corresponding coordinate sequence in the camera coordinate system, and the corresponding angle sequence is solved.

[0008] Obtain the pixel coordinates of the robotic arm's end in the laser tracker coordinate system to obtain the second sequence of pixel coordinates of the end position of the second arm;

[0009] The particle swarm optimization algorithm is used to reduce the error between the first sequence of pixel coordinates at the end position of the second arm in the camera coordinate system and the second sequence of pixel coordinates at the end position of the second arm to a preset range, thereby obtaining the control error compensation amount and realizing the calibration and control of the robotic arm.

[0010] In this method, motion data of the robotic arm end effector is acquired in real time by a camera and compared with motion data of the robotic arm end effector acquired by a laser tracker. The particle swarm optimization algorithm is used to reduce errors and achieve robotic arm control with higher calibration accuracy.

[0011] Furthermore, after the step of obtaining the image of the end position of the second arm, processing the image of the end position of the second arm to obtain the pixel coordinates of the light source reflector, the method further includes:

[0012] Perspective distortion correction is performed on the pixel coordinates of the light source reflector to obtain the ideal pixel coordinates of the light source reflector.

[0013] Furthermore, the perspective distortion includes radial distortion and tangential distortion, specifically expressed as follows;

[0014] Mathematical model of radial distortion:

[0015] W=w(1+k1r 2 +k2r 4 +k3r 6 )

[0016] H=h(1+k1r 2 +k2r 4 +k3r 6 )

[0017] Where (W, H) represents the distorted pixel, (w, h) represents the ideal pixel, and r 2 =w 2 +h 2 k1, k2, and k3 represent the distortion vectors;

[0018] Mathematical model of tangential distortion:

[0019] U = u + [2p1v + p2(r)] 2 +2u 2 )]

[0020] V = v + [2p1(r)] 2 +2v 2 )+p2u]

[0021] Where (U, V) represents distorted pixels, (u, v) represents ideal pixels, and r 2 =w 2 +h 2 P1 and P2 represent the distortion vectors.

[0022] In this technical solution, perspective distortion correction can overcome the imperfections in the camera's own light source characteristics and the errors caused by the camera's failure to install its image sensor and optical axis perpendicularly during the manufacturing process, thus making the robotic arm calibration more accurate.

[0023] Furthermore, the step of extracting the light source edge of the light source reflector using the pixel coordinates of the light source reflector and calculating the pixel coordinates of the end position of the second arm to obtain the first sequence of pixel coordinates of the end position of the second arm specifically includes:

[0024] Based on the pixel coordinates of the light source reflector, the edge extraction operator is used to calculate the gradient magnitude and direction of the image, find the gradient of the image, and obtain the light source edge of the light source reflector.

[0025] Separate and fit the light source edge of the light source reflector, and calculate the center coordinates of the light source edge of the fitted light source reflector;

[0026] The average coordinates of the center of the light source edge of the fitted light source reflector are used to obtain the pixel coordinates of the end position of the second arm.

[0027] The pixel coordinates at the end of the second arm are added to the queue, thus obtaining the first sequence of pixel coordinates at the end of the second arm.

[0028] Furthermore, the step of averaging the center coordinates of the fitted light source reflector's light source edge to obtain the pixel coordinates of the second arm's end position specifically involves:

[0029] Calculate the actual pixel size of the photo based on the photo size and the photo pixel size;

[0030] The average value algorithm is used to calculate the pixel coordinates of the end position of the second arm based on the actual size of the photo pixels, the pixel coordinates of the light source reflector, and the pixel coordinates of the center of the light source reflector.

[0031] Furthermore, the specific calculation formula for the average value algorithm is as follows:

[0032]

[0033] Among them, (x ci y ci (x) represents the pixel coordinates of the end position of the second arm during the i-th shot. 1i y 1i ) and (x 2i y 2i (x) represents the pixel coordinates of the first and second light source reflectors during the i-th capture, respectively. 3i y 3i ) and (x 4i y 4i ) represents the center pixel coordinates of the first and second light source reflectors respectively during the i-th shot, x represents the scale of the photo, and N represents the pixel size of the photo.

[0034] Furthermore, the ideal kinematic model used to solve the corresponding angle sequence is:

[0035]

[0036] Where (x, y) represents the pixel coordinates of the end position of the second arm, (θ1, θ2) represents the angle of the robotic arm, l1 represents the length of the first arm, and l2 represents the length of the second arm.

[0037] Furthermore, the error is expressed as:

[0038]

[0039] Among them, e i The error between the i-th pixel coordinate in the first sequence of pixel coordinates representing the end position of the second arm in the camera coordinate system and the i-th pixel coordinate in the second sequence representing the end position of the second arm, is expressed as (x...). ci y ci (x) is the pixel coordinate of the position of the end of the mechanical part detected by the camera. gi y gi ) are the pixel coordinates of the position of the end of the second arm detected by the laser tracker.

[0040] The second technical solution adopted in this invention is: a robotic arm calibration and control device based on particle swarm optimization, comprising a heavy-duty robotic arm body unit, an end-effector position detection and calibration unit, and a control unit.

[0041] The heavy-duty robotic arm body unit includes a vibration isolation table, an aluminum profile support, a base, an electric slip ring, a first arm, a second arm, an elbow joint servo motor, a shoulder joint servo motor, an elbow joint reducer, and a shoulder joint reducer.

[0042] The vibration isolation table is connected to the base by bolts, and the base fixes the first arm;

[0043] The aluminum profile bracket is used to fix the industrial camera;

[0044] The electric slip ring is mounted at the top center of the aluminum profile bracket and is used to provide power to the shoulder joint servo motor;

[0045] The elbow joint servo motor and the elbow joint reducer are installed at the first arm and are used to drive the movement of the first arm.

[0046] The shoulder joint servo motor and shoulder joint reducer are installed at the second arm to drive the movement of the second arm;

[0047] The end position detection and calibration unit includes an industrial camera, a laser tracker, and two light source reflectors;

[0048] The two light source reflectors are mounted at the top of the end of the second arm;

[0049] The industrial camera is mounted on an aluminum profile bracket and connected to a PC network to transmit images of the end position of the second arm. It also extracts pixels from two light source reflectors to obtain the actual end position of the second arm. Combined with the detection data from the laser tracker, particle swarm optimization calculations are performed to obtain the control error compensation amount.

[0050] The control unit includes a shoulder joint servo driver, an elbow joint servo driver, a control card, and a PC.

[0051] The joint servo driver and elbow joint servo driver are respectively connected to the shoulder joint servo motor, elbow joint servo motor and motion control card, and are used to drive the shoulder joint servo motor and elbow joint servo motor to move, so as to realize the movement of the second arm end.

[0052] The control card is used to receive signals from the PC, perform inverse kinematics solution in conjunction with the control error compensation amount, and transmit the processed data to the shoulder joint servo driver and the elbow joint servo driver.

[0053] The beneficial effects of the robot arm calibration and control device and method based on particle swarm optimization in this invention are as follows: This invention acquires motion data of the robot arm end effector in real time through a camera, compares it with the motion data of the robot arm end effector acquired by a laser tracker, optimizes it through particle swarm optimization, obtains motion error compensation amount, and achieves robot arm control with higher calibration accuracy. Attached Figure Description

[0054] Figure 1 This is a flowchart of the steps of the robotic arm calibration and control method based on particle swarm optimization in this invention;

[0055] Figure 2 This is a structural diagram of the robotic arm calibration and control device based on particle swarm optimization according to the present invention;

[0056] Figure 3 This is a fitted image of the light source edge of the light source reflector provided by the present invention;

[0057] Figure 4 This is a diagram of the particle swarm distribution and iterative optimization process provided by the present invention;

[0058] Reference numerals: 1. Vibration isolation table; 2. Base; 3. Elbow joint servo motor; 4. Elbow joint reducer; 5. First arm; 6. Laser tracking ball; 7. Aluminum profile bracket; 8. Industrial camera; 9. Electric slip ring; 10. Shoulder joint servo motor; 11. Shoulder joint reducer; 12. Light source reflector; 3. Second arm; 14. Laser probe head. Detailed Implementation

[0059] The present invention will now be described in further detail with reference to the accompanying drawings and specific embodiments. The step numbers in the following embodiments are only for ease of explanation and do not limit the order of the steps. The execution order of each step in the embodiments can be adapted according to the understanding of those skilled in the art.

[0060] Example 1

[0061] like Figure 1 As shown, this invention provides a method for calibrating and controlling a robotic arm based on particle swarm optimization, which includes the following steps:

[0062] 101. Obtain the image of the end position of the second arm, process the image of the end position of the second arm, and obtain the pixel coordinates of the light source reflector.

[0063] In this embodiment, the camera is an industrial camera, such as an area scan camera or a line scan camera, and is connected to a computer. The connection can be wired, such as an RJ45 network connection, FC fiber optic cable, coaxial cable, or power line carrier cable; or wireless, such as Wi-Fi, 4G, or 5G network. Data transmission is possible between the industrial camera and the computer. First, the computer sends a command to the industrial camera. Upon receiving the command, the industrial camera starts working, acquiring real-time motion images of the robotic arm's end effector and transmitting these images back to the computer. After receiving the motion images from the robotic arm's end effector, the computer processes them and extracts the pixel coordinates of the two light source reflectors.

[0064] 102. Extract the light source edge of the light source reflector using the pixel coordinates of the light source reflector, and calculate the pixel coordinates of the end position of the second arm to obtain the first sequence of pixel coordinates of the end position of the second arm.

[0065] In this embodiment, preferably, the Sobel operator is used to extract the light source edge of the light source reflector. First, the convolution template is applied to the x and y directions respectively, then the image gradient magnitude and direction are calculated to find the image gradient, thus obtaining the light source edge of the light source reflector. The calculation formula is expressed as:

[0066]

[0067]

[0068]

[0069]

[0070] Where dx is the horizontal transformation of convolving image I with an odd-sized template, dy is the vertical transformation of convolving image I with an odd-sized template, I is the image to be processed, S is the gray level of each pixel in the image calculated by combining the horizontal and vertical gray values ​​with the formula, and θ is the gradient direction.

[0071] like Figure 3 As shown, since the extracted light source reflector has an irregular shape, the light source edge is fitted to obtain a regular light source reflector edge. Based on this, the center coordinates of the light source edge are calculated. The pixel coordinates of the end position of the second arm are calculated by taking the average of the center coordinates of the light source edges of the two light source reflectors. The calculation process of taking the average is as follows:

[0072]

[0073] Among them, (x ci y ci (x) represents the pixel coordinates of the end position of the second arm in the i-th shot. 1i y 1i ) and (x 2i y 2i (x) represents the pixel coordinates of the first and second light source reflectors during the i-th capture, respectively. 3i y 3i ) and (x 4i y 4i ) represent the center pixel coordinates of the first and second light source reflectors during the i-th shot, respectively, x represents the scale of the photo, and N represents the pixel size of the photo.

[0074] Finally, the pixel coordinates of all the end positions of the second arm are added to the sequence to obtain the first sequence of pixel coordinates of the end positions of the second arm.

[0075] 103. Convert the first sequence of pixel coordinates at the end of the second arm into the corresponding coordinate sequence in the camera coordinate system, and solve for the corresponding angle sequence.

[0076] In this embodiment, the pixel coordinates of the second arm's end position obtained above are converted into a coordinate sequence in the camera coordinate system using a transformation matrix between the image coordinate system and the camera coordinate system. The transformation matrix is ​​expressed as follows:

[0077]

[0078] Among them, (x c y c , z c (x, y) represents the coordinates in the camera coordinate system, (x, y) represents the coordinates in the image coordinate system, f represents the camera focal length, and z represents the focal length. cIt is the vertical distance between the light source reflector and the camera lens.

[0079] After obtaining the pixel coordinate sequence of the second arm's end position in the camera coordinate system, the corresponding angle sequence is solved using an ideal kinematic model. The specific solution formula is as follows:

[0080]

[0081] Among them, (x c y c (θ1, θ2) represents the pixel coordinates in the camera coordinate system, (θ1, θ2) represents the robot arm angle, l1 represents the length of the first arm, and l2 represents the length of the second arm.

[0082] Definition (x) c y c )=f(θ1, θ2), then use (θ1, θ2)=f -1 (x c y c The robot arm angles are calculated. The robot arm angles corresponding to all pixel coordinates are added to a sequence to obtain the corresponding angle sequence.

[0083] 104. Obtain the pixel coordinates of the robotic arm end in the coordinate system of the laser tracker, and obtain the second sequence of pixel coordinates of the end position of the second arm.

[0084] In this embodiment, a laser tracker coordinate system is established, with the center of the laser probe as the origin, the 0 reading direction on the scale as the X-axis, the upward direction of the normal to the scale plane as the Z-axis, and the Y-axis determined according to the right-hand coordinate system rule. Based on this, the coordinates of the laser tracking ball relative to the coordinate origin are obtained, as well as the pixel coordinates of the robotic arm end effector measured by the laser tracking ball when neither the tracking mirror nor the target mirror is stationary. These pixel coordinates of the robotic arm end effector measured by the laser tracking ball are added to a sequence to obtain a second sequence of pixel coordinates for the second arm end effector position.

[0085] 105. Using the particle swarm optimization algorithm, the error between the first sequence of pixel coordinates at the end position of the second arm in the camera coordinate system and the second sequence of pixel coordinates at the end position of the second arm is reduced to a preset range, thereby obtaining the control error compensation amount and realizing the calibration and control of the robotic arm.

[0086] In this embodiment, an error formula is first established between the first sequence of pixel coordinates at the end position of the second arm and the second sequence of pixel coordinates at the end position of the second arm in the camera coordinate system, which serves as the particle swarm adaptation function, as follows:

[0087]

[0088] Among them, e iThe error between the i-th pixel coordinate in the first sequence of pixel coordinates representing the end position of the second arm in the camera coordinate system and the i-th pixel coordinate in the second sequence representing the end position of the second arm, is expressed as (x...). ci y ci (x) is the pixel coordinate of the position of the end of the mechanical part detected by the camera. gi y gi ) are the pixel coordinates of the position of the end of the second arm detected by the laser tracker.

[0089] Based on this, the particle swarm optimization algorithm is optimized. First, each two-dimensional particle in the particle swarm is represented as... The velocity is V = (V1, V2…V) N );

[0090] Among them, (x ci y ci (x) represents the pixel coordinates detected by the camera and transformed into the position of the end of the second arm in the camera coordinate system. gi y gi () represents the pixel coordinates of the end position of the second arm detected by the laser tracker. V represents the position of the i-th particle. i Let represent the velocity of the i-th particle, where i = 1, 2, ..., N, and N represents the total number of particles.

[0091] Next, the extreme value of the individual particle at the optimal position found so far is denoted as: P best =(P1, P2.....P N Let G be the global extremum of the best position found so far in the entire particle swarm. best = (G1, G2, ..., G) N Find G. best and P best Then, the velocity and position of the particle swarm are updated using the following equations;

[0092] The particle swarm optimization process is as follows:

[0093] V(t+1)=wV i (t)+c1r1(t)[P i (t)-X i (t)]+c2r2(t)[G i (t)-x i (t)]

[0094] x i (t+1)=X i (t)+V i (t+1)

[0095] Where W is the inertia weight, c1 and c2 are learning factors, r1 and r2 are uniformly random numbers in the range [0, 1], and V i It represents the particle velocity. Through multiple iterations, the particle swarm positions are updated until a position that falls within the allowable error range is found.

[0096] like Figure 4 As shown, when the particle finds the optimal position and the corresponding error is within the preset range, the iteration ends and the control error compensation amount is obtained. Based on the control error compensation amount, the inverse kinematics is solved to obtain the angle compensation amount corresponding to the end position of the second arm, thereby achieving precise calibration control.

[0097] Example 2

[0098] Based on Example 1, since the industrial camera cannot be precisely mounted perpendicularly to the target being measured, the captured image at the end of the second arm exhibits perspective distortion, including radial and tangential distortion. The radial distortion is caused by imperfections in its inherent optical properties, and the mathematical model is as follows:

[0099] W=w(1+k1r 2 +k2r 4 +k3r 6 )

[0100] H=h(1+k1r 2 +k24+k3r 6 )

[0101] Where (W, H) represents the distorted pixel, (w, h) represents the ideal pixel, and r 2 =w 2 +h 2 k1, k2, and k3 represent the distortion vectors.

[0102] The tangential distortion is caused by the camera's failure to mount its image sensor perpendicular to the optical axis during manufacturing. Its mathematical model is as follows:

[0103] U = u + [2p1v + p2(r)] 2 +2u 2 )]

[0104] V = v + [2p1(r)] 2 +2v 2 )+p2u]

[0105] Where (U, V) represents distorted pixels, (u, v) represents ideal pixels, and r 2 =w 2 +h 2 P1 and P2 represent the distortion vectors.

[0106] The ideal pixel coordinates of the second arm end position are obtained by inverse solving the radial and tangential distortion models. Then, the light source edge of the light source reflector and other calculations are performed to achieve more accurate robotic arm calibration and control.

[0107] like Figure 2 As shown, a robotic arm calibration and control device based on particle swarm optimization includes a heavy-duty robotic arm body unit, an end-effector position detection unit, a calibration unit, and a control unit.

[0108] The heavy-duty robotic arm unit includes a vibration isolation table 1, a base 2, an elbow joint servo motor 3, an elbow joint reducer 4, a first arm 5, an aluminum frame 7, an electric slip ring 9, a shoulder joint servo motor 10, a shoulder joint reducer 11, and a second arm 13. The vibration isolation table 1 is square and is connected to the base 2 by bolts to fix the robotic arm and has a shock absorption effect; the aluminum frame 7 supports and fixes the industrial camera 8; the electric slip ring 9 is placed at the top center of the aluminum frame 7 to facilitate the supply of power to the shoulder joint servo motor 10; the shoulder joint servo motor 10 is installed at the second arm 13, and the elbow joint servo motor 3 is installed at the first arm 5. The elbow joint servo motor 3 and the elbow joint reducer 4 drive the first arm 5, and the shoulder joint servo motor 10 and the shoulder joint reducer 11 drive the second arm 6 to move, so that the end of the second arm 13 moves to the expected position;

[0109] The end-effector position detection and calibration unit includes an industrial camera 8, a laser tracker, and a light source reflector 12 at the top of the end of the second arm 13. Two light source reflectors are mounted at the top of the end of the second arm 13. The laser tracker consists of a laser tracking ball 6 and a laser probe head 14. The laser tracking ball 6 is mounted at the exact center of the two light source reflectors, i.e., the actual center point of the end-effector position. The industrial camera 8 is mounted on an aluminum profile 7 and connected to a PC network to transmit images of the end position of the second arm 13. It extracts pixels from the light source reflectors to obtain the actual end position of the second arm, and then combines this with the laser tracker detection data to perform particle swarm optimization calculations to obtain the control error compensation amount.

[0110] The control unit includes an elbow joint servo driver B, a shoulder joint servo driver A, a control card, and a PC. Shoulder joint servo driver A and elbow joint servo driver B are connected to shoulder joint servo motor 10 and elbow joint servo motor 3, respectively, and the motion control card. The motion control card receives signals from the PC, performs inverse kinematics calculations based on control error compensation, and transmits the processed data to shoulder joint servo driver A and elbow joint servo driver B. Shoulder joint servo driver A and elbow joint servo driver B drive shoulder joint servo motor 10 and elbow joint servo motor 3, respectively, to achieve end-effector movement of the second arm 13.

[0111] The content of the above method embodiments is applicable to the device embodiments. The specific functions implemented by the device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.

[0112] The above is a detailed description of the preferred embodiments of the present invention. However, the present invention is not limited to the embodiments described. Those skilled in the art can make various equivalent modifications or substitutions without departing from the spirit of the present invention. All such equivalent modifications or substitutions are included within the scope defined by the claims of this application.

Claims

1. A robot calibration and control method based on particle swarm optimization, characterized in that, The method is suitable for a mechanical arm calibration and control device based on a particle swarm optimization algorithm, and the device comprises a heavy-duty mechanical arm body unit, an end position detection and calibration unit and a control unit. The heavy-duty mechanical arm body unit comprises a vibration isolation table, an aluminum profile support, a base, an electric slip ring, a first arm, a second arm, an elbow joint servo motor, a shoulder joint servo motor, an elbow joint reducer and a shoulder joint reducer. The vibration isolation table is connected to the base by bolts, and the base fixes the first arm. The aluminum profile support is used for fixing an industrial camera. The electric slip ring is arranged at the top center of the aluminum profile support and is used for providing power for the shoulder joint servo motor. The elbow joint servo motor and the elbow joint reducer are installed at the first arm and are used for driving the movement of the first arm. The shoulder joint servo motor and the shoulder joint reducer are installed at the second arm and are used for driving the movement of the second arm. The end position detection and calibration unit comprises an industrial camera, a laser tracker and two light source reflectors. The two light source reflectors are installed at the top of the end of the second arm. The industrial camera is installed on the aluminum profile support and is connected to a PC end network. The control unit comprises a shoulder joint servo driver, an elbow joint servo driver, a control card and a PC end. The joint servo drivers and the elbow joint servo driver are respectively connected to the shoulder joint servo motor, the elbow joint servo motor and the motion control card, are used for driving the movement of the shoulder joint servo motor and the elbow joint servo motor, and realize the movement of the end of the second arm. The control card is used for receiving PC end signals, combining control error compensation amounts to perform inverse kinematics solution, and transmitting the processed signals to the shoulder joint servo driver and the elbow joint servo driver. The method comprises the following steps: An end position photo of the second arm is obtained, the end position photo of the second arm is processed, and pixel coordinates of the light source reflector are obtained. The pixel coordinates of the light source reflector are used to extract a light source edge of the light source reflector, and pixel coordinates of the end position of the second arm are calculated, and a first sequence of the pixel coordinates of the end position of the second arm is obtained. The first sequence of the pixel coordinates of the end position of the second arm is converted into a corresponding coordinate sequence in a camera coordinate system, and a corresponding angle sequence is solved. Pixel coordinates of the end of the mechanical arm in a laser tracker coordinate system are obtained, and a second sequence of the pixel coordinates of the end position of the second arm is obtained. A particle swarm algorithm is used to reduce errors between the first sequence of the pixel coordinates of the end position of the second arm in the camera coordinate system and the second sequence of the pixel coordinates of the end position of the second arm to a preset range, a control error compensation amount is obtained, the mechanical arm is calibrated and controlled, and the mechanical arm is calibrated and controlled. The step of using the pixel coordinates of the light source reflector to extract the light source edge of the light source reflector and calculate the pixel coordinates of the end position of the second arm to obtain the first sequence of the pixel coordinates of the end position of the second arm specifically comprises the following steps. Based on the pixel coordinates of the light source reflector, an edge extraction operator is used to calculate image gradient amplitude and direction, find the gradient of the image, and obtain the light source edge of the light source reflector. The light source edge of the light source reflector is separated and fitted, and the center coordinates of the fitted light source edge of the light source reflector are calculated. The center coordinates of the fitted light source edge of the light source reflector are averaged, and the pixel coordinates of the end position of the second arm are obtained. ​ The pixel coordinates of the second arm end position are added to the queue to obtain a first sequence of pixel coordinates of the second arm end position.

2. The method of claim 1, wherein, The step of obtaining the second arm end position photo, processing the second arm end position photo, and obtaining the light source reflector pixel coordinates further comprises: The light source reflector pixel coordinates are corrected for perspective distortion to obtain ideal light source reflector pixel coordinates.

3. The method of claim 2, wherein, The perspective distortion includes radial distortion and tangential distortion, which are specifically represented as: Mathematical model of radial distortion: wherein (W, H) represents a distorted pixel, (w, h) represents an ideal pixel, , , , represents a distortion vector; Mathematical model of tangential distortion: where (u, v) represents an ideal pixel, and (U, V) represents a distorted pixel. represents a distortion vector.​​ 4. The method of claim 3, wherein the method further comprises: The step of averaging the center coordinates of the light source edge of the fitted light source reflector to obtain the pixel coordinates of the second arm end position is specifically: The actual size of the photo pixels is calculated according to the photo scale and the photo pixel size; The average value algorithm is used to calculate the pixel coordinates of the second arm end position according to the actual size of the photo pixels, the light source reflector pixel coordinates, and the center pixel coordinates of the light source reflector.

5. The method of claim 4, wherein, The specific calculation formula of the average value algorithm is: wherein, represents the pixel coordinate of the second arm end position at the i-th time of shooting, , ) and ( , ) represent the pixel coordinates of the first and second light source reflectors at the i-th time of shooting, , ) and ( , ) represent the pixel coordinates of the center of the first and second light source reflectors at the i-th time of shooting, x represents the scale of the photograph, and N represents the size of the photograph pixels.

6. The method of claim 5, wherein the method further comprises: The ideal kinematic model used for solving the corresponding angle sequence is: where (x, y) represents the pixel coordinates of the second arm end position, , ) represents the mechanical arm angle, represents the first arm length, represents the second arm length.

7. The method of claim 1, wherein, The error is represented as: wherein, represents the error between the first pixel coordinate of the first sequence of pixel coordinates of the end-of-arm position in the camera coordinate system and the second pixel coordinate of the second sequence of pixel coordinates of the end-of-arm position, is the pixel coordinate of the end-of-arm position detected by the camera, is the pixel coordinate of the end-of-arm position detected by the laser tracker.​​​​

Citation Information

Patent Citations

  • Mechanical arm kinematics parameter calibration method based on measuring of laser tracker

    CN110281241A

  • Method and device for assisting mechanical arm to track target through multi-view camera and line laser

    CN114378808A