A method for calculating the deviation angle of laser
By obtaining laser data in the linear motion of the robot and calculating the offset angle of the laser, the problem of laser sensor installation angle error is solved, and the accurate correction and accuracy improvement of the laser measurement results are achieved.
Patent Information
- Application Number
- CN202110901213.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-08-06
- Publication Date
- 2025-01-03
- Estimated Expiration
- 2041-08-06
AI Technical Summary
In the prior art, the installation angle error of the laser sensor leads to inaccurate measurement results, especially the errors of pitch angle and roll angle have a great impact, and there is a lack of an effective angular external parameter calibration method, which affects the measurement accuracy of the robot.
By obtaining two frames of laser data during the linear motion of the robot, the offset angle of the laser coordinate system relative to the robot coordinate system, including pitch angle, yaw angle and roll angle, use specific formulas and methods to calculate each angle, only The data from the first and second two frames can quickly obtain the external angle parameters of the laser relative to the robot encoder.
It realizes accurate correction of laser sensor measurement results, improves robot measurement accuracy, simplifies the process of angle external parameter calibration, and reduces calculation amount and data requirements.
Smart Images

Figure CN113721227B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of laser measurement, and more specifically, to a method for calculating the deviation angle of a laser. Background Art
[0002] 2D (two Dimensional) laser sensors are commonly used on robots and are often used for distance measurement, positioning and mapping. Due to tooling and installation errors, the laser sensor on the robot is tilted to a certain extent relative to the robot body. The tilt angle includes pitch, yaw and roll angles, which are the rotational parts of the laser relative to the robot's external parameters.
[0003] On the one hand, because the displacement error of the sensor fixture installation is relatively small, and on the other hand, because the displacement error has little effect in the sensor fusion process, the displacement design value is directly used as the displacement component in the sensor external parameter. In the process of using laser sensors, the installation angle error is one of the main sources of error in our use of laser sensors. For 2D lasers, the pitch angle and roll angle are the two most important angles in the angle error. Summary of the invention
[0004] In view of the technical problems existing in the prior art, the present invention provides a method for calculating the offset angle of a laser, comprising: during the linear motion of a robot, acquiring two frames of laser data, each frame of laser data including laser distance information and a position where a laser line is incident on a calibration plate; based on the two frames of laser data, calculating the offset angle of a laser coordinate system relative to a robot coordinate system; wherein a laser is mounted on the robot, and a calibration plate is arranged in front of the robot and perpendicular to an XOY plane of the robot coordinate system.
[0005] Based on the above technical solution, the present invention can also make the following improvements.
[0006] Optionally, during the linear motion of the robot, two frames of laser data are acquired, which includes: taking the coordinate system of the robot encoder as the robot coordinate system, with the right, front, and top of the robot as the positive direction of the X-axis, the positive direction of the Y-axis, and the positive direction of the Z-axis respectively; the plane where the calibration plate in front of the robot is located is parallel to the XOZ plane of the robot coordinate system, and perpendicular to the XOY plane of the robot coordinate system.
[0007] Optionally, the offset angle of the laser coordinate system relative to the robot coordinate system includes a pitch angle, a yaw angle and a roll angle.
[0008] Optionally, when the offset angle is a pitch angle, the offset angle of the laser coordinate system relative to the robot coordinate system is calculated based on two frames of laser data, including: obtaining the laser line located in the YOZ plane of the robot coordinate system incident on points P1 and P2 on the calibration plate when the laser is in two different positions; respectively obtaining the distance information from points P1 and P2 to the corresponding laser positions; and calculating the pitch angle of the laser coordinate system relative to the robot coordinate system based on points P1 and P2 on the calibration plate and the corresponding distance information to the laser.
[0009] Optionally, the calculation of the pitch angle of the laser coordinate system relative to the robot coordinate system based on the positions P1 and P2 on the calibration plate and the corresponding distance information to the laser includes:
[0010] (a1-a2)sinα=(y1-y2);
[0011] Where a1 and a2 are the distance information measured by the laser line at two different positions, α is the angle between the laser line in the YOZ plane of the robot coordinate system and the XOY plane of the robot, that is, the pitch angle of the laser coordinate system relative to the robot coordinate system, and (y1-y2) is the distance difference between the positions P1 and P2 of the calibration plate when the laser line is incident on the calibration plate twice, in the Y-axis direction of the calibration plate.
[0012] Optionally, when the offset angle is a yaw angle, the offset angle of the laser coordinate system relative to the robot coordinate system is calculated based on two frames of laser data, including: when the laser is at two different positions, obtaining the position point where the center line of the laser line is incident on the calibration plate, and obtaining the distance difference between the two position points in the X-axis direction of the calibration plate;
[0013] The yaw angle of the laser coordinate system relative to the robot coordinate system is calculated based on the following formula:
[0014]
[0015] Wherein, d0 is the linear motion distance of the robot, a1 and a2 are the distance information measured by the center line of the laser line at two different positions, α is the angle between the center line of the laser line and the XOY plane of the robot, (x1-x2) is the distance difference between the positions of the center line of the laser line incident on the calibration plate twice in the X-axis direction of the calibration plate, and β is the yaw angle of the laser coordinate system rotating around the Z-axis of the robot.
[0016] Optionally, when the offset angle is a roll angle, the offset angle of the laser coordinate system relative to the robot coordinate system is calculated based on two frames of laser data, including: based on a first laser line and another second laser line located in the YOZ plane of the robot coordinate system, respectively obtaining distance information of the first laser line and the second laser line, the position point incident on the calibration plate, and the angle with the XOY plane of the robot coordinate system; calculating the roll angle of the laser coordinate system rotating around the Y-axis of the robot coordinate system according to the distance information of the first laser line and the second laser line, the position point incident on the calibration plate, and the angle with the XOY plane of the robot coordinate system.
[0017] Optionally, the first laser line located in the YOZ plane of the robot coordinate system is determined by the following method: during the linear motion of the robot, the X-axis coordinate value of the position point on the calibration plate when the laser is at two different positions of the same laser line incident on the calibration plate is obtained; if the X-axis coordinate values of the two position points on the calibration plate are the same, then the same laser line is the first laser line located in the YOZ plane of the robot coordinate system.
[0018] Optionally, the roll angle of the laser coordinate system rotating around the Y axis of the robot coordinate system is calculated according to the distance information of the first laser line and the second laser line, the position point incident on the calibration plate, and the angle with the XOY plane of the robot coordinate system, including: obtaining the straight line f1(x) formed by the position point of the first laser line incident on the calibration plate during the rotation process when the laser is in a fixed position; and calculating the rotation angle ω of the calibration plate coordinate system around the Z axis of the robot coordinate system by the following formula:
[0019]
[0020] Wherein, the position point where the first laser line is incident on the calibration plate is point p4, the distance information of the first laser line is a4, and the angle between the first laser line and the XOY plane of the robot coordinate system is α4; the position point where the second laser line is incident on the calibration plate is point p3, the distance information of the second laser line is a3, and the angle between the second laser line and the XOY plane of the robot coordinate system is α3; the calibration plate coordinate system is rotated by ω around the Z axis of the robot coordinate system so that the XOY plane of the calibration plate coordinate system is parallel to the XOZ plane of the robot coordinate system; the angle between the projected f1(x) and the X axis of the calibration plate coordinate system at this time is calculated to obtain the roll angle γ of the laser coordinate system rotating around the Y axis of the robot coordinate system:
[0021]
[0022] Where l is the length of the line segment of the straight line f1(x) on the calibration plate, and ω1 is the angle between f1(x) and the X-axis of the calibration plate coordinate system.
[0023] The present invention provides a method for calculating the offset angle of a laser. Using the laser angle external parameter calibration method provided by the present invention, after the robot performs a simple linear motion, only two frames of data are needed to quickly obtain the angle external parameter of the laser relative to the robot encoder, thereby playing a vital role in correcting the measurement results of the laser sensor. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] Figure 1 A flow chart of a method for calculating the deviation angle of a laser provided by the present invention;
[0025] Figure 2 This is a schematic diagram of the principle of calculating the pitch angle of the laser;
[0026] Figure 3 Schematic diagram of the principle for calculating the yaw angle of the laser;
[0027] Figure 4 Schematic diagram of the principle for calculating the roll angle of the laser. DETAILED DESCRIPTION
[0028] The specific implementation of the present invention is further described in detail below in conjunction with the accompanying drawings and examples. The following examples are used to illustrate the present invention, but are not intended to limit the scope of the present invention.
[0029] Figure 1 A flow chart of a laser angle deviation method provided by the present invention, such as Figure 1 As shown, the method includes: S1, during the linear motion of the robot, two frames of laser data are obtained, each frame of laser data includes laser distance information and the position where the laser line is incident on the calibration plate; S2, based on the two frames of laser data, the offset angle of the laser coordinate system relative to the robot coordinate system is calculated; wherein the laser is installed on the robot, and a calibration plate is set in front of the robot and perpendicular to the XOY plane of the robot coordinate system.
[0030] It can be understood that, based on the needs in the background technology, the present invention provides a method for quickly obtaining three angular offsets of the laser relative to the robot coordinate system, wherein the robot coordinate system may vary depending on the different design structures of the robot, and the robot coordinate system here refers to the encoder coordinate system.
[0031] Before introducing the method for calculating the offset angle of a laser provided in an embodiment of the present invention, the basic knowledge involved in the present invention is introduced, which mainly includes the following points:
[0032] (1) The rotating single-line laser is regarded as a stationary multi-line laser. Because the laser line scanning rate is extremely fast, the movement of the robot will not affect the position of the laser lines at different angles in the single-frame laser code scanning. (2) The coordinate system of the robot encoder is used as the robot coordinate system, the XYZ axes are respectively the upper right front of the robot, and the origin of the robot coordinate system is O. The plane formed by the XOY axes is parallel to the horizontal plane, and the Z axis is perpendicular to the horizontal plane. This is mainly for the convenience of the calculation derivation in the following text, and the selection of the coordinate system will not change the conclusion. (3) The XOZ plane of the calibration plate in front of the robot is perpendicular to the horizontal plane. Here, the position of the calibration plate is calculated in advance, so through projection, the calibration plate plane is projected to a position perpendicular to the horizontal plane. This conclusion can be reused for each laser that needs to be corrected for an angle, so it is considered to be a known quantity before starting to calculate the angle offset of the laser coordinate system. (4) A line pattern matching method is known: using a specially designed calibration plate, the position of the laser line and each laser line in the laser line on the calibration plate can be quickly obtained through laser distance information and intensity information.
[0033] Based on the above basic knowledge, the various offset angles of the laser relative to the robot coordinate system are calculated. In an embodiment of the present invention, during the linear motion of the robot, when the robot moves to different positions, the laser installed on the robot is also in different positions. The laser line emitted by the laser is incident on the calibration plate, and the corresponding two frames of laser data are obtained. Each frame of laser data includes laser distance information and the position where the laser line is incident on the calibration plate; based on the two frames of laser data, the offset angle of the laser coordinate system relative to the robot coordinate system is calculated.
[0034] By using the laser angle external parameter calibration method provided by the present invention, after the robot performs a simple linear motion, only two frames of data are needed to quickly obtain the angle external parameter of the laser relative to the robot encoder, thereby playing a vital role in correcting the measurement results of the laser sensor.
[0035] In a possible embodiment, the offset angle of the laser coordinate system relative to the robot coordinate system includes a pitch angle, a yaw angle, and a roll angle.
[0036] Among them, when the offset angle is a pitch angle, the offset angle of the laser coordinate system relative to the robot coordinate system is calculated based on two frames of laser data in step S2, including: obtaining the laser line located in the YOZ plane of the robot coordinate system incident on the position points P1 and P2 on the calibration plate when the laser is in two different positions; respectively obtaining the distance information from the P1 point and the P2 point to the corresponding laser position; based on the positions of the P1 point and the P2 point on the calibration plate, and the corresponding distance information to the laser, calculating the pitch angle of the laser coordinate system relative to the robot coordinate system.
[0037] It can be understood that, considering a single laser line rotating around the robot's Z-axis, the angle between the laser line and the horizontal plane remains unchanged, and the angle between the laser line and the Z-axis remains unchanged. Therefore, the conical plane obtained by the single laser line rotating around the robot's Z-axis intersects with the calibration plate to obtain a curve, and any point on the curve has the same angle with the horizontal plane.
[0038] See also Figure 2 , the angle between the laser line and the horizontal plane can be obtained by solving the position of the same laser line on the calibration plate when the laser is at two positions P1 and P2, where Figure 2 There are two different positions of P1 and P2 in the figure, where p1 and p2 are the positions of the laser line incident on the calibration plate when the laser is located at P1 and P2 respectively.
[0039] (a1-a2)sinα=(y1-y2); (1)
[0040] Where a1 and a2 are the distance information measured by the laser line at two different positions, which can be understood as the distance of P1p1 and the distance of P2p2. α is the angle between the laser line and the XOY plane of the robot, that is, the angle between the laser line and the horizontal plane. (y1-y2) is the distance difference between the positions where the laser line hits the calibration plate twice in the Y-axis direction of the calibration plate, that is, the height difference in the Z-axis direction of the robot.
[0041] If the laser line is a laser line in the YOZ plane of the robot coordinate system, then the angle between the laser line and the horizontal plane is the pitch angle of the laser coordinate system relative to the horizontal plane of the robot coordinate system. Formula (1) can be used to calculate the angle between the laser line and the horizontal plane of the robot coordinate system, that is, the pitch angle between the laser coordinate system and the robot coordinate system.
[0042] In order to obtain the yaw angle of the laser coordinate system rotating around the Z axis of the robot, a specific robot motion trajectory is used to obtain two positions P1 and P2. When the yaw angle of the laser is 0, if the robot moves in a straight line, the points where the center line of the laser line hits the calibration plate twice have the same X-axis coordinates in the calibration plate coordinate system at the two positions. When the yaw angle of the laser is not 0, the robot moves in a straight line, and the points where the center line of the laser line hits the calibration plate twice have different X-axis coordinates in the calibration plate coordinate system, but there is another laser line whose yaw angle around the Z axis of the robot coordinate system is 0. The points where the laser line hits the calibration plate twice have the same X-axis coordinates in the calibration plate coordinate system. The angle between the laser line and the center line of the laser line is the projection of the yaw angle of the laser rotating around the Z axis of the robot in the laser coordinate system.
[0043] In one embodiment of the present invention, when the offset angle is a yaw angle, the offset angle of the laser coordinate system relative to the robot coordinate system is calculated based on two frames of laser data in step S2, which is specifically implemented as follows: Figure 3 When the laser is at two different positions, obtain the position point where the center line of the laser line is incident on the calibration plate, and get the distance difference between the two position points in the X-axis direction of the calibration plate; use the cosine theorem for the triangle formed by the three straight lines on the horizontal plane to obtain the yaw angle of the laser coordinate system rotating around the Z-axis of the robot.
[0044]
[0045] Wherein, d0 is the linear motion distance of the robot, a1 and a2 are the distance information measured by the center line of the laser line at two different positions, α is the angle between the center line of the laser line and the XOY plane of the robot, (x1-x2) is the distance difference between the positions of the center line of the laser line incident on the calibration plate twice in the X-axis direction of the calibration plate, and β is the yaw angle of the laser coordinate system rotating around the Z-axis of the robot.
[0046] In a possible implementation manner, when the offset angle is a roll angle, the offset angle of the laser coordinate system relative to the robot coordinate system is calculated based on two frames of laser data in step S2, including: based on a first laser line and another second laser line located in the YOZ plane of the robot coordinate system, respectively obtaining distance information of the first laser line and the second laser line, the position point incident on the calibration plate, and the angle with the XOY plane of the robot coordinate system; according to the distance information of the first laser line and the second laser line, the position point incident on the calibration plate, and the angle with the XOY plane of the robot coordinate system, calculating the roll angle of the laser coordinate system rotating around the Y axis of the robot coordinate system.
[0047] Among them, when looking for the first laser line located in the YOZ plane of the robot coordinate system, the principle is that there is a laser line in the laser line that is in the YOZ plane of the robot. During the movement of the robot, the X-axis coordinate value of the point where the laser line hits the calibration plate on the calibration plate coordinate system remains unchanged. By judging the horizontal coordinate value of the point where the laser line hits the calibration plate at the two positions P1 and P2, the laser line can be obtained, which is hereinafter referred to as the first laser line.
[0048] In a possible embodiment, when calculating the roll angle of the laser, a straight line f1(x) formed by the first laser line incident on the position points on the calibration plate during the rotation process when the laser is in a fixed position is obtained. When the laser is in a fixed position, the first laser line forms a straight line when incident on all the position points on the calibration plate during the continuous rotation process, and the portion on the calibration plate is a line segment.
[0049] Among them, see Figure 4The position point where the first laser line is incident on the calibration plate is point p4, the distance information of the first laser line is a4, and the angle between the first laser line and the XOY plane of the robot coordinate system is α4; the position point where the second laser line is incident on the calibration plate is point p3, the distance information of the second laser line is a3, and the angle between the second laser line and the XOY plane of the robot coordinate system is α3.
[0050] The rotation angle ω of the calibration plate coordinate system around the Z axis of the robot coordinate system is calculated by the following formula:
[0051]
[0052] To calculate the angle ω of the calibration plate coordinate system rotating around the robot's Z axis, you need to first rotate the calibration plate coordinate system around the robot's Z axis ω so that the calibration plate coordinate system XOY plane is parallel to the robot's XOZ plane. At this time, the calibration plate Z axis is parallel to the robot coordinate system Y axis, the calibration plate X axis is parallel to the robot coordinate system X axis, and the calibration plate Z axis is parallel to the robot coordinate system Y axis. At this time, calculate the angle between the projected f1(x) and the calibration plate X axis at this time to obtain the roll angle γ of the laser coordinate system rotating around the robot coordinate system Y axis.
[0053] The calculation formula is as follows:
[0054]
[0055] Where l is the length of the line segment formed by the straight line f1(x) on the calibration plate, and ω1 is the angle between f1(x) and the X-axis of the calibration plate coordinate system.
[0056] It should be noted here that the roll angle of the laser coordinate system rotating around the Y axis of the robot coordinate system is not affected by the pitch angle of the laser coordinate system rotating around the X axis of the robot coordinate system.
[0057] When considering the rotation of one coordinate system around a coordinate axis of another coordinate system, for example, the laser coordinate system around the X-axis of the robot coordinate system, a laser line can be found in the laser coordinate system that is located in the YOZ plane of the robot coordinate system or parallel to the YOZ plane of the robot coordinate system. This is because when the laser coordinate system rotates around the X-axis of the robot coordinate system, the laser line perpendicular to the rotation axis is always perpendicular to the rotation axis during the rotation, and the angle of rotation of the laser line perpendicular to the rotation axis is the angle of rotation of the laser coordinate system around the X-axis of the robot coordinate system.
[0058] At this point, the rotation angles of the laser coordinate system around the three axes of the robot coordinate system are obtained. Compared with the nonlinear optimization method, this single-use geometric method only needs two frames of laser data to quickly obtain the angular offset of the laser coordinate system relative to the robot coordinate system.
[0059] A method for calculating the offset angle of a laser provided in an embodiment of the present invention can quickly obtain the angle external parameter of the laser relative to the robot encoder with only two frames of data after the robot performs a simple linear motion, thereby playing a vital role in correcting the measurement results of the laser sensor.
[0060] This solution solves the problem that there is no joint calibration technology for encoders and lasers at present, and provides a simple and fast method for calculating encoder and laser angle external parameters, which indirectly improves the measurement accuracy of laser sensors in wheeled robots. At the same time, this method requires a small amount of data, so the amount of calculation is small, the requirements for the robot computing unit are small, and the requirements for the robot motion path for the calibration of the laser external parameters are small.
[0061] It should be noted that in the above embodiments, the description of each embodiment has its own emphasis, and for parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0062] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0063] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded computer, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0064] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0065] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0066] Although the preferred embodiments of the present invention have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention.
[0067] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.
Claims
1. A method for calculating the deviation angle of a laser, characterized in that: include: During the robot's linear motion, two frames of laser data are acquired, each frame of laser data includes laser distance information and the position where the laser line is incident on the calibration plate; Based on the two frames of laser data, the offset angle of the laser coordinate system relative to the robot coordinate system is calculated; The laser is installed on the robot, and a calibration plate is set in front of the robot and perpendicular to the XOY plane of the robot coordinate system.
2. The method for calculating the offset angle according to claim 1, characterized in that: In the process of the robot moving in a straight line, two frames of laser data are obtained, which includes: The coordinate system of the robot encoder is used as the robot coordinate system, with the right, front, and top of the robot as the positive direction of the X-axis, the positive direction of the Y-axis, and the positive direction of the Z-axis respectively; The plane of the calibration plate in front of the robot is parallel to the XOZ plane of the robot coordinate system and perpendicular to the XOY plane of the robot coordinate system.
3. The method for calculating the offset angle according to claim 1, characterized in that: The offset angles of the laser coordinate system relative to the robot coordinate system include a pitch angle, a yaw angle, and a roll angle.
4. The method for calculating the offset angle according to claim 3, characterized in that: When the offset angle is a pitch angle, the offset angle of the laser coordinate system relative to the robot coordinate system is calculated based on two frames of laser data, including: Obtain the positions P1 and P2 where the laser line located in the YOZ plane of the robot coordinate system is incident on the calibration plate when the laser is at two different positions; Obtain the distance information from point P1 and point P2 to the corresponding laser position respectively; Based on the positions P1 and P2 on the calibration plate and the corresponding distance information to the laser, the pitch angle of the laser coordinate system relative to the robot coordinate system is calculated.
5. The method for calculating the offset angle according to claim 4, characterized in that: The method of calculating the pitch angle of the laser coordinate system relative to the robot coordinate system based on the positions P1 and P2 on the calibration plate and the corresponding distance information to the laser includes: (a1-a2)sinα=(y1-y2); (1) Where a1 and a2 are the distance information measured by the laser line at two different positions, α is the angle between the laser line located in the YOZ plane of the robot coordinate system and the XOY plane of the robot coordinate system, that is, the pitch angle of the laser coordinate system relative to the robot coordinate system, and (y1-y2) is the distance difference between the positions P1 and P2 of the laser line incident on the calibration plate twice, in the Y-axis direction of the calibration plate.
6. The method for calculating the offset angle according to claim 5, characterized in that: When the offset angle is a yaw angle, the offset angle of the laser coordinate system relative to the robot coordinate system is calculated based on two frames of laser data, including: When the laser is at two different positions, obtain the position point where the center line of the laser line is incident on the calibration plate, and obtain the distance difference between the two position points in the X-axis direction of the calibration plate; The yaw angle of the laser coordinate system relative to the robot coordinate system is calculated based on the following formula: Wherein, d0 is the linear motion distance of the robot, a1 and a2 are the distance information measured by the center line of the laser line at two different positions, α is the angle between the center line of the laser line and the XOY plane of the robot, (x1-x2) is the distance difference between the positions of the center line of the laser line incident on the calibration plate twice in the X-axis direction of the calibration plate, and β is the yaw angle of the laser coordinate system rotating around the Z-axis of the robot.
7. The method for calculating the offset angle according to claim 5, characterized in that: When the offset angle is a roll angle, calculating the offset angle of the laser coordinate system relative to the robot coordinate system based on two frames of laser data includes: Based on a first laser line and another second laser line located in the YOZ plane of the robot coordinate system, respectively obtain distance information of the first laser line and the second laser line, a position point incident on the calibration plate, and an angle with the XOY plane of the robot coordinate system; The roll angle of the laser coordinate system rotating around the Y axis of the robot coordinate system is calculated according to the distance information of the first laser line and the second laser line, the position point incident on the calibration plate, and the angle with the XOY plane of the robot coordinate system.
8. The method for calculating the offset angle according to claim 7, characterized in that: The first laser line located in the YOZ plane of the robot coordinate system is determined by the following method: During the robot's linear motion, obtain the X-axis coordinate value of the position point on the calibration plate where the same laser line is incident on the calibration plate when the laser is at two different positions. If the X-axis coordinate values of the two position points incident on the calibration plate are the same, then the same laser line is the first laser line located in the YOZ plane of the robot coordinate system.
9. The method for calculating the offset angle according to claim 7, characterized in that: The method calculates the roll angle of the laser coordinate system rotating around the Y axis of the robot coordinate system according to the distance information of the first laser line and the second laser line, the position point incident on the calibration plate, and the angle with the XOY plane of the robot coordinate system, including: Obtain a straight line f1(x) formed by the first laser line incident on the position point on the calibration plate during the rotation process when the laser is in a fixed position; The rotation angle ω of the calibration plate coordinate system around the Z axis of the robot coordinate system is calculated by the following formula: In the formula, the position point where the first laser line is incident on the calibration plate is point p4, the distance information of the first laser line is a4, and the angle between the first laser line and the XOY plane of the robot coordinate system is α4; the position point where the second laser line is incident on the calibration plate is point p3, the distance information of the second laser line is a3, and the angle between the second laser line and the XOY plane of the robot coordinate system is α3; Rotate the calibration plate coordinate system by ω around the Z axis of the robot coordinate system so that the XOY plane of the calibration plate coordinate system is parallel to the XOZ plane of the robot coordinate system; The angle between the projected f1(x) and the X-axis of the calibration plate coordinate system is calculated to obtain the roll angle γ of the laser coordinate system rotating around the Y-axis of the robot coordinate system: Where l is the length of the line segment of the straight line f1(x) on the calibration plate, and ω1 is the angle between f1(x) and the X-axis of the calibration plate coordinate system.
