External parameter calibration method and robot

By simultaneously observing three mutually perpendicular calibration planes using lidar and depth cameras, point cloud information is extracted, point cloud lines and planes are fitted, and sensor pose information is determined. This solves the problem of complexity and large errors in external parameter calibration in the existing technology. problem, achieving higher calibration accuracy and information fusion accuracy.

CN115100287BActive Publication Date: 2024-09-03MIDEA GRP (SHANGHAI) CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210394248.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-14
Publication Date
2024-09-03
Estimated Expiration
2042-04-14

AI Technical Summary

Technical Problem

In the existing technology, the external parameter calibration methods of lidar and depth cameras have complicated processes, poor operability, and high requirements for the size accuracy of the calibration objects, resulting in large external parameter calibration errors and affecting the accuracy of information fusion between sensors.

Method used

An external parameter calibration method is proposed. The first sensor and the second sensor simultaneously observe the calibration object including three mutually perpendicular calibration planes, extract the points falling on these planes in the point cloud information, and fit the point cloud lines and points. The cloud plane determines the sensor's pose information and calculates external parameters based on this information, reducing the number of observations and improving calibration accuracy.

Benefits of technology

It effectively simplifies the external parameter calibration process, improves the calibration accuracy and the accuracy of information fusion between sensors, reduces the sensitivity to the size and flatness of the calibration object, and reduces the number of observations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115100287B
    Figure CN115100287B
Patent Text Reader

Abstract

The present invention relates to the field of computer vision technology, and provides an external parameter calibration method and a robot, the method comprising: obtaining first point cloud information of a calibration object collected by a first sensor and second point cloud information of the calibration object collected by a second sensor, the calibration object comprising three mutually perpendicular calibration planes; fitting to obtain point cloud lines of the first point cloud information on the three calibration planes and point cloud planes of the second point cloud information on the three calibration planes; determining the first position pose information of the first sensor relative to the calibration object based on the point cloud lines; determining the second position pose information of the second sensor relative to the calibration object based on the point cloud planes; determining the external parameters between the first sensor and the second sensor based on the first position pose information and the second position pose information. The method calibrates the external parameters between the first sensor and the second sensor by fitting the point cloud lines and the point cloud planes on the calibration planes, thereby effectively reducing the number of observations and calibration accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer vision technology, and in particular to an external parameter calibration method and a robot. Background Art

[0002] LiDAR has a long detection distance, a wide viewing angle and high accuracy, and is often used for real-time positioning and map construction. Depth cameras can accurately detect three-dimensional information about the environment and are often used for object detection and obstacle avoidance. In fields such as intelligent driving and industrial robots, LiDAR and depth cameras are often used in combination to provide environmental information for vehicles or robots.

[0003] In the process of using LiDAR and depth camera together, in order to provide accurate environmental information, it is necessary to fuse the information collected by the two sensors, LiDAR and depth camera. The premise of information fusion is the calibration of external parameters between sensors.

[0004] At present, the external parameter calibration methods suitable for depth cameras and lidars usually require multiple observations. This type of calibration method has a complex process, poor operability, and high requirements on the dimensional accuracy of the calibration object. When the dimensional accuracy of the calibration object is low, it is easy to cause large errors in the external parameter calibration. Summary of the invention

[0005] The present invention aims to solve at least one of the technical problems existing in the prior art. To this end, the present invention proposes an external parameter calibration method to simplify the external parameter calibration process and improve the calibration accuracy.

[0006] According to an embodiment of the first aspect of the present invention, the external parameter calibration method includes:

[0007] Acquire first point cloud information of a calibration object collected by a first sensor and second point cloud information of the calibration object collected by a second sensor, wherein the calibration object includes three calibration planes perpendicular to each other;

[0008] Fitting to obtain point cloud lines of the first point cloud information on the three calibration planes and point cloud planes of the second point cloud information on the three calibration planes;

[0009] Based on the point cloud line, determining first position information of the first sensor relative to the calibration object;

[0010] Based on the point cloud plane, determining second pose information of the second sensor relative to the calibration object;

[0011] Based on the first posture information and the second posture information, an external parameter between the first sensor and the second sensor is determined.

[0012] According to the external parameter calibration method of the embodiment of the present invention, the first sensor and the second sensor simultaneously observe the three mutually perpendicular planes of the calibration object, extract the points in the point cloud information that fall on the three mutually perpendicular planes, and calibrate the external parameters between the first sensor and the second sensor, which can effectively reduce the number of observations, improve the accuracy of the external parameter calibration, and improve the accuracy of information fusion between sensors.

[0013] According to an embodiment of the present invention, determining the first pose information of the first sensor relative to the calibration object based on the point cloud line includes:

[0014] Based on a multi-point perspective algorithm, determining a first coordinate of an intersection of the point cloud lines in a coordinate system of a first sensor and a world coordinate in a world coordinate system, wherein the world coordinate system is established based on the calibration object;

[0015] Based on the first coordinates and the world coordinates, the first posture information is determined.

[0016] According to an embodiment of the present invention, determining second pose information of the second sensor relative to the calibration object based on the point cloud plane includes:

[0017] Obtaining a rotation matrix and a translation vector of the point cloud plane between a coordinate system of the second sensor and a world coordinate system, wherein the world coordinate system is established based on the calibration object;

[0018] Based on the rotation matrix and the translation vector, the second posture information is determined.

[0019] According to an embodiment of the present invention, obtaining a rotation matrix and a translation vector of the point cloud plane between a coordinate system of the second sensor and a world coordinate system includes:

[0020] Acquire a second orthogonal basis of the point cloud plane in the coordinate system of the second sensor;

[0021] Determine the rotation matrix based on the second orthogonal basis and a world orthogonal basis of the world coordinate system;

[0022] Obtaining a plane distance between the point cloud plane and the world coordinate system;

[0023] Based on the planar distance, the translation vector is determined.

[0024] According to one embodiment of the present invention, determining the second pose information based on the rotation matrix and the translation vector includes:

[0025] Performing singular value decomposition on the rotation matrix and the translation vector to correct the rotation matrix and the translation vector;

[0026] The second position and posture information is determined based on the corrected rotation matrix and the translation vector.

[0027] According to an embodiment of the present invention, determining the external parameters between the first sensor and the second sensor based on the first posture information and the second posture information includes:

[0028] Based on the first posture information and the second posture information, obtaining a first external parameter;

[0029] Nonlinear optimization is performed on the first external parameter to obtain the external parameter.

[0030] According to an embodiment of the present invention, the nonlinear optimization includes optimization based on a geometric constraint relationship between the point cloud plane and the point cloud line.

[0031] According to an embodiment of the second aspect of the present invention, an external parameter calibration device includes:

[0032] An acquisition module, used to acquire first point cloud information of a calibration object acquired by a first sensor and second point cloud information of the calibration object acquired by a second sensor, wherein the calibration object includes three calibration planes perpendicular to each other;

[0033] A first processing module is configured to obtain, by fitting, point cloud lines of the first point cloud information on the three calibration planes and point cloud planes of the second point cloud information on the three calibration planes;

[0034] A second processing module, configured to obtain first pose information of the first sensor relative to the calibration object based on the point cloud line;

[0035] A third processing module, configured to obtain second posture information of the second sensor relative to the calibration object based on the point cloud plane;

[0036] A fourth processing module is used to determine external parameters between the first sensor and the second sensor based on the first posture information and the second posture information.

[0037] A robot according to an embodiment of a third aspect of the present invention comprises:

[0038] First sensor and second sensor:

[0039] A controller is used to determine external parameters between the first sensor and the second sensor based on the external parameter calibration method.

[0040] According to an embodiment of the fourth aspect of the present invention, an electronic device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and when the processor executes the computer program, it implements any one of the external parameter calibration methods described above.

[0041] According to the non-transitory computer-readable storage medium of the fifth aspect of the present invention, a computer program is stored thereon, and when the computer program is executed by a processor, it implements any of the external parameter calibration methods described above.

[0042] A computer program product according to an embodiment of the sixth aspect of the present invention includes a computer program, and when the computer program is executed by a processor, it implements any of the external parameter calibration methods described above.

[0043] The above one or more technical solutions in the embodiments of the present invention have at least one of the following technical effects:

[0044] The calibration object only needs to include three mutually perpendicular planes, which is insensitive to the size and flatness of the calibration object. The three mutually perpendicular planes of the calibration object are observed by the first sensor and the second sensor at the same time, and the points falling on the three mutually perpendicular planes in the point cloud information are extracted. The external parameters between the first sensor and the second sensor are calibrated, which can effectively reduce the number of observations, improve the accuracy of external parameter calibration, and improve the accuracy of information fusion between sensors.

[0045] Furthermore, based on the characteristic that the calibration object includes three mutually perpendicular planes, the coordinate information of the point cloud line collected by the first sensor in the coordinate system of the first sensor and the world coordinate system can be accurately solved through the multi-point perspective algorithm, thereby determining the position and posture information of the first sensor relative to the calibration object.

[0046] Furthermore, based on the characteristic that the calibration object includes three mutually perpendicular planes, the rotation matrix for rotation transformation between the coordinate system of the second sensor and the world coordinate system can be determined according to the orthogonal basis corresponding to the three calibration planes of the calibration object and the orthogonal basis corresponding to the three point cloud planes of the second sensor, thereby determining the position and posture information of the second sensor relative to the calibration object.

[0047] Furthermore, based on the line-surface geometric constraints between the point cloud line of the first sensor and the point cloud plane of the second sensor, a cost equation for precise registration is constructed to optimize the first external parameter and improve the accuracy of the external parameter between the first sensor and the second sensor.

[0048] Additional aspects and advantages of the present invention will be given in part in the following description and in part will be obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0050] Figure 1 It is one of the flow charts of the external parameter calibration method provided in the embodiment of the present invention;

[0051] Figure 2 is a schematic diagram of a world coordinate system provided by an embodiment of the present invention;

[0052] Figure 3 is a schematic diagram of a coordinate system of a first sensor provided in an embodiment of the present invention;

[0053] Figure 4 is a schematic diagram of a coordinate system of a second sensor provided in an embodiment of the present invention;

[0054] Figure 5 is a schematic diagram of a first sensor calibration process provided by an embodiment of the present invention;

[0055] Figure 6 is a schematic diagram of a second sensor calibration process provided by an embodiment of the present invention;

[0056] Figure 7 is a schematic diagram of a geometric constraint relationship provided by an embodiment of the present invention;

[0057] Figure 8 This is the second flow chart of the external parameter calibration method provided by the embodiment of the present invention;

[0058] Fig. 9 is a schematic diagram of the structure of an external parameter calibration device provided by an embodiment of the present invention;

[0059] Fig.10 It is a schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0060] The following embodiments of the present invention are described in further detail 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.

[0061] In the description of the embodiments of the present invention, it should be noted that the terms “first”, “second” and “third” are only used for descriptive purposes and cannot be understood as indicating or implying relative importance.

[0062] In the description of the embodiments of the present invention, it should be noted that, unless otherwise clearly specified and limited, the terms "connected" and "connection" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium. For ordinary technicians in this field, the specific meanings of the above terms in the embodiments of the present invention can be understood according to specific circumstances.

[0063] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the embodiment of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, without contradiction.

[0064] Combine the following Figures 1 to 8 The external parameter calibration method of an embodiment of the present invention is described. The execution subject of the method can be a controller of a device terminal, or a cloud, or an edge server.

[0065] The external parameter calibration method of the embodiment of the present invention is applied to determine the external parameters between the first sensor and the second sensor, realize the external parameter calibration between the first sensor and the second sensor, and facilitate the information fusion between the first sensor and the second sensor.

[0066] In the embodiment of the present invention, the calibration object includes three mutually perpendicular planes. The calibration object may be composed of three mutually perpendicular flat plates, or the calibration object may be a cube or a cuboid, and the cube or cuboid has three mutually perpendicular planes at its vertex corners.

[0067] like Figure 1 As shown, the external parameter calibration method of the embodiment of the present invention includes steps 110 to 150.

[0068] Step 110: Acquire first point cloud information of the calibration object collected by the first sensor and second point cloud information of the calibration object collected by the second sensor.

[0069] The first sensor observes three mutually perpendicular calibration planes of the calibration object to obtain first point cloud information, and the second sensor observes three mutually perpendicular calibration planes of the calibration object to obtain second point cloud information.

[0070] It can be understood that when performing external parameter calibration of the first sensor and the second sensor, the first sensor and the second sensor observe the calibration object at the same time and collect corresponding point cloud information.

[0071] The first sensor may be a laser radar (LiDAR), a synthetic aperture radar (SAR), a real aperture radar (RAR), or other sensors that can collect point cloud information of an object for positioning or building a map.

[0072] LiDAR is a radar system that emits laser beams to detect the position, speed and other characteristic quantities of a target. Its working principle is to transmit a detection signal to the target, then compare the received signal reflected from the target with the transmitted signal, and after appropriate processing, obtain relevant information about the target, such as the target's distance, direction, altitude, speed, attitude and shape, so as to detect, track and identify the target.

[0073] The second sensor may be a depth camera for detecting depth information of an environment. For example, the second sensor may be a structured light depth camera, a binocular vision depth camera, or a depth camera based on a time-of-flight (TOF) method.

[0074] Depth cameras have depth measurement capabilities and can accurately perceive the three-dimensional information of the surrounding environment to achieve object detection and obstacle avoidance.

[0075] Step 120 : fitting to obtain point cloud lines of the first point cloud information on the three calibration planes and point cloud planes of the second point cloud information on the three calibration planes.

[0076] The point cloud line is obtained by fitting the first point cloud information of the calibration object collected by the first sensor. The first sensor observes three mutually perpendicular planes of the calibration object, extracts the points where the first point cloud information of the first sensor falls on the three mutually perpendicular planes, and forms the point cloud line by fitting the point cloud straight line.

[0077] Among them, the point cloud straight line fitting for the first point cloud information of the first sensor can be fitted by using a Gaussian fuzzy model point cloud segmentation clustering algorithm, a RANSAC single-frame data straight line fitting algorithm, or a multi-frame data real-time straight line optimization algorithm.

[0078] Take the first sensor as a laser radar as an example. Figure 5 As shown, the point cloud lines collected by the first sensor may be three line segments L1, L2 and L3 formed by point cloud information.

[0079] The point cloud plane is obtained by fitting the second point cloud information of the calibration object collected by the second sensor. The second sensor observes three mutually perpendicular planes of the calibration object, extracts the points where the second point cloud information of the second sensor falls on the three mutually perpendicular planes, and forms the point cloud plane through point cloud plane fitting.

[0080] The point cloud plane fitting for the point cloud information of the second sensor can be achieved by fitting a plane in the spatial point cloud using a RANSAC algorithm.

[0081] Take the second sensor as a depth camera as an example, Figure 6 As shown, the point cloud planes collected by the first sensor may be three planes j1, j2 and j3 composed of point cloud information.

[0082] It should be noted that before extracting point cloud lines and point cloud planes, it is necessary to perform point cloud denoising on the first point cloud information collected by the first sensor and the second point cloud information collected by the second sensor to effectively remove noise points in the point cloud information, make the extracted point cloud lines and point cloud planes smooth, and keep the original topology and geometric features unchanged.

[0083] Step 130: Determine the first position information of the first sensor relative to the calibration object based on the point cloud line.

[0084] The point cloud line is fitted by the first point cloud information collected by the first sensor, and the points on the point cloud line have corresponding coordinate information in the coordinate system where the first sensor is located.

[0085] Correspondingly, the point cloud line is the point cloud information falling on the calibration object, and the points on the point cloud line have corresponding coordinate information in the coordinate system where the calibration object is located.

[0086] The first position information of the first sensor relative to the calibration object can be determined according to the coordinate information of the points on the point cloud line in the coordinate system where the first sensor is located and the coordinate information of the points on the point cloud line in the coordinate system where the calibration object is located.

[0087] The pose is the transformation from the world coordinate system to the sensor coordinate system, including rotation and translation. In this embodiment, the first pose information is the information of the transformation of the coordinate system of the first sensor relative to the coordinate system of the calibration object, that is, the coordinate system where the calibration object is located is the world coordinate system.

[0088] Step 140: Determine second position and posture information of the second sensor relative to the calibration object based on the point cloud plane.

[0089] The point cloud plane is fitted by the second point cloud information collected by the second sensor, and the points on the point cloud plane have corresponding coordinate information in the coordinate system where the second sensor is located.

[0090] Correspondingly, the point cloud plane is the point cloud information falling on the calibration object, and the points on the point cloud plane also have corresponding coordinate information in the coordinate system where the calibration object is located.

[0091] The second position information of the second sensor relative to the calibration object can be determined based on the coordinate information of the point on the point cloud plane in the coordinate system where the second sensor is located and the coordinate information of the point on the point cloud plane in the coordinate system where the calibration object is located.

[0092] Step 150: Determine external parameters between the first sensor and the second sensor based on the first pose information and the second pose information.

[0093] The posture information between sensors is also called the external parameters between sensors. Compared with the internal parameters that remain unchanged inside the sensor, the external parameters will change with the movement between sensors.

[0094] In this embodiment, the external parameters between the first sensor and the second sensor are rotation or translation parameters of the transformation of the coordinate system of the first sensor to the coordinate system of the second sensor.

[0095] The first pose information is the pose information of the coordinate system of the first sensor transformed relative to the coordinate system of the calibration object, and the second pose information is the pose information of the coordinate system of the second sensor transformed relative to the coordinate system of the calibration object.

[0096] In this embodiment, the coordinate system of the calibration object is used as a reference standard, and the posture information of the transformation of the coordinate system of the first sensor and the coordinate system of the second sensor, that is, the external parameters between the first sensor and the second sensor, is determined according to the first posture information and the second posture information.

[0097] Determining the external parameters between the first sensor and the second sensor and realizing the calibration of the external parameters between the first sensor and the second sensor can make the points of the point cloud information collected by the first sensor and the point cloud information collected by the second sensor accurately coincide with each other, realize the information fusion between the sensors, and further provide accurate environmental information.

[0098] Take the example where the first sensor is a lidar and the second sensor is a depth camera.

[0099] The laser points collected by the laser radar are projected onto the point cloud information of the depth camera through the external parameters determined by the external parameter calibration method of the embodiment of the present invention and the mechanical external parameters set by the laser radar on the robot, so as to realize the visualization of the calibration results.

[0100] The point cloud information projected by the external parameters of the laser point determined by the external parameter calibration method of the embodiment of the present invention has a higher degree of overlap with the point cloud information of the depth camera, and the fusion effect is better.

[0101] The sensor calibration problem is a key issue in the field of computer vision technology. The vision of a robot is usually determined by the fusion information of multiple sensors. For example, the combination of a depth camera and a lidar will cause large deviations in the position and posture between sensors, that is, the external parameters, due to the mechanical installation errors of the sensors and the influence of the robot's motion. Therefore, timely and rapid calibration is required.

[0102] In the related technology, the external parameter calibration between sensors requires multiple observations of the calibration objects. The calibration process is complicated and has poor operability. In addition, high requirements are placed on the manufacturing accuracy of the calibration objects, such as size and flatness. When the size accuracy of the calibration objects is low, it is easy to cause large errors in the external parameter calibration.

[0103] In an embodiment of the present invention, the calibration object only needs to include three mutually perpendicular planes, and is insensitive to the size and flatness of the calibration object. The three mutually perpendicular planes of the calibration object are observed by the first sensor and the second sensor at the same time, and the points falling on the three mutually perpendicular planes in the point cloud information are extracted. The external parameters between the first sensor and the second sensor are calibrated, which can effectively reduce the number of observations, improve the accuracy of external parameter calibration, and improve the accuracy of information fusion between sensors.

[0104] According to the external parameter calibration method provided by an embodiment of the present invention, a calibration object including three mutually perpendicular planes is observed by the first sensor and the second sensor, and point cloud lines and point cloud planes falling on the calibration object in the point cloud information of the first sensor and the second sensor are fitted to calibrate the external parameters between the first sensor and the second sensor. This can effectively reduce the number of observations, improve the accuracy of the external parameter calibration, and improve the accuracy of the information fusion between the first sensor and the second sensor.

[0105] In some embodiments, step 130 includes:

[0106] Based on a multi-point perspective algorithm, determining the first coordinates of the intersection of the point cloud lines in the coordinate system of the first sensor and the world coordinates in the world coordinate system, where the world coordinate system is established based on the calibration object;

[0107] Based on the first coordinate and the world coordinate, the first pose information is determined.

[0108] Take the first sensor as a laser radar as an example.

[0109] LiDAR calculates the distance to the observed object by emitting and receiving laser beams, obtains the distance through TOF time difference, measures the angle through horizontal rotation scanning, and establishes a two-dimensional polar coordinate system based on these two parameters. It then obtains three-dimensional height information by acquiring different pitch angles, and finally establishes a three-dimensional coordinate system.

[0110] like Figure 3 As shown, the coordinate system of the first sensor established by the laser radar is LCS, including xL ,y L and z L Three coordinate axes.

[0111] like Figure 2 As shown in the figure, the world coordinate system established by the calibration object is WCS, including x W ,y W and z W Three coordinate axes.

[0112] The calibration object includes three calibration planes that are perpendicular to each other, the intersection of the three calibration planes is the origin of the world coordinate system, and the straight lines where the three calibration planes intersect each other are the three coordinate axes of the world coordinate system.

[0113] In this embodiment, the multi-point perspective algorithm is an algorithm for solving the multi-point perspective problem. The point cloud line collected by the first sensor falls on the calibration object. The calibration object includes three calibration planes that are perpendicular to each other. Each plane has a corresponding point cloud line, that is, the point cloud line includes three straight lines composed of point cloud information.

[0114] The algorithm for solving the multi-point perspective problem may be a PnP method, where the PnP method estimates the position and posture of the sensor based on the known coordinates of n three-dimensional space points and their two-dimensional projection positions.

[0115] In this embodiment, three straight lines of the point cloud line intersect to obtain three intersection points, one of which is an intersection point where two straight lines that do not intersect in the coordinate system where the calibration object is located intersect in perspective.

[0116] The first position information of the first sensor relative to the calibration object can be determined according to the first coordinates of each intersection point of the point cloud line in the coordinate system of the first sensor and the world coordinates in the world coordinate system.

[0117] Take the first sensor as a laser radar as an example.

[0118] like Figure 5 As shown, the point cloud of the laser radar falls on three mutually perpendicular planes of the calibration object, forming three point cloud lines L1, L2 and L3.

[0119] The three point cloud lines L1, L2 and L3 intersect to obtain three points. L2 and L3 intersect at L1 and L2 intersect at L1 and L3 intersect at

[0120] calculate and The distance between them is l1, and The distance between them is l2, and The distance l3 between them is calculated by a simplified perspective three-point algorithm based on the condition that the three calibration planes of the calibration object are perpendicular to each other. and The distances λ1, λ2 and λ3 to the intersection point p of the three mutually perpendicular planes of the calibration object.

[0121] Among them, the intersection point p is the origin of the world coordinate system established based on the calibration object, and λ1, λ2 and λ3 can be determined by the following formula:

[0122]

[0123] By determining the distances λ1, λ2, and λ3, the world coordinates of the three intersection points in the world coordinate system can be obtained. Combined with the first coordinates of the three intersection points in the coordinate system of the first sensor, the first position information of the first sensor relative to the calibration object can be determined based on the coordinate correspondence between the three intersection points in the two coordinate systems.

[0124] In some embodiments, step 140 includes:

[0125] Obtaining a rotation matrix and a translation vector of the point cloud plane between a coordinate system of the second sensor and a world coordinate system, wherein the coordinate system of the second sensor is established based on the second sensor, and the world coordinate system is established based on the calibration object;

[0126] Based on the rotation matrix and the translation vector, the second pose information is determined.

[0127] Take the second sensor as a depth camera as an example.

[0128] The depth camera captures an RGB-D image, where the RGB image provides the x- and y-coordinates of the coordinate system of the second sensor, and the depth image supplements the z-coordinate of the coordinate system of the second sensor, that is, the distance between the depth camera and the point on the object.

[0129] like Figure 4 As shown, the coordinate system of the second sensor established by the depth camera is DCS, including x D ,y D and z D Three coordinate axes.

[0130] In this embodiment, the point cloud collected by the second sensor falls on the calibration object to form three point cloud planes, and the rotation matrix and the translation vector are parameters for converting the points in the world coordinate system where the calibration object is located to the coordinate system of the second sensor.

[0131] like Figure 6 As shown, the point cloud of the depth camera falls on the calibration object. According to the condition that the three calibration planes of the calibration object are perpendicular to each other, three point cloud planes j1, j2 and j3 that are perpendicular to each other are fitted from the point cloud of the depth camera.

[0132] According to the rotation matrix and the translation vector when the point cloud plane is transformed with the points of the three calibration planes of the world coordinate system, the second position and posture information of the second sensor relative to the calibration object can be determined.

[0133] In some embodiments, obtaining a rotation matrix and a translation vector of a point cloud plane between a coordinate system of the second sensor and a world coordinate system includes:

[0134] Obtaining a second orthogonal basis of the point cloud plane in the coordinate system of the second sensor;

[0135] Determine a rotation matrix based on the second orthogonal basis and a world orthogonal basis of the world coordinate system;

[0136] Get the plane distance between the point cloud plane and the world coordinate system;

[0137] Based on the plane distance, a translation vector is determined.

[0138] It can be understood that the transformation between the coordinate system of the second sensor and the world coordinate system includes a rotation transformation and a translation transformation, the rotation matrix is ​​a parameter describing the rotation transformation, and the translation vector is a parameter describing the translation transformation.

[0139] A set of non-zero vectors in Euclidean space is called an orthogonal vector group if they are orthogonal to each other. In n-dimensional Euclidean space, an orthogonal vector group consisting of n vectors is called an orthogonal basis, among which the orthogonal basis composed of unit vectors is called a standard orthogonal basis.

[0140] The three calibration planes of the calibration object are perpendicular to each other, that is, there are mutually orthogonal bases on the three calibration planes of the calibration object. Correspondingly, the three point cloud planes formed by the second sensor point cloud falling on the calibration object also have mutually orthogonal bases.

[0141] In this embodiment, a rotation matrix for rotation transformation between the coordinate system of the second sensor and the world coordinate system may be determined according to the orthogonal bases corresponding to the three calibration planes of the calibration object and the orthogonal bases corresponding to the three point cloud planes of the second sensor.

[0142] Taking the second sensor as a depth camera as an example, the calculation steps of the rotation matrix and the translation vector are introduced.

[0143] like Figure 6 As shown, the point cloud of the depth camera falls on the calibration object. According to the condition that the three calibration planes of the calibration object are perpendicular to each other, three point cloud planes j1, j2 and j3 that are perpendicular to each other are fitted from the point cloud of the depth camera.

[0144] Fit the plane parameters of the three point cloud planes j1, j2 and j3 as well as in, is the unit normal vector of the point cloud plane j1, is the distance between the point cloud plane j1 and the origin of the coordinate system of the second sensor, and so on.

[0145] In this embodiment, by and A second orthogonal basis in the coordinate system of the second sensor is constructed. Accordingly, a world orthogonal basis in the world coordinate system is (1, 0, 0), (0, 1, 0), and (0, 0, 1).

[0146] According to the world orthogonal basis and the second orthogonal basis, the rotation matrix R in the coordinate system of the second sensor where the depth camera is located and the world coordinate system where the calibration object is located can be calculated DW .

[0147] Among them, the rotation matrix R DW As follows:

[0148]

[0149] Plane parameters of the three point cloud planes π1, π2 and π3 as well as middle, as well as is the distance from the three point cloud planes to the origin of the coordinate system of the second sensor, that is, the position of the coordinate system of the second sensor in the world coordinate system. as well as represents the translation vector t DW .

[0150] Among them, the translation vector t DW As follows:

[0151]

[0152] The T in the upper right corner of the bracket represents the matrix transpose.

[0153] In some embodiments, determining the second pose information based on the rotation matrix and the translation vector includes:

[0154] Perform singular value decomposition on the rotation matrix and the translation vector to correct the rotation matrix and the translation vector;

[0155] Based on the corrected rotation matrix and translation vector, the second pose information is determined.

[0156] It is understandable that the point cloud plane is obtained by fitting the point cloud of the second sensor. In actual implementation, due to the influence of the noise of the second sensor or the manufacturing error of the calibration object, it cannot be guaranteed that the three extracted point cloud planes are perpendicular to each other.

[0157] In this embodiment, the rotation matrix and the translation vector are corrected through singular value decomposition to improve the accuracy of the second posture information.

[0158] Among them, Singular Value Decomposition (SVD) is an algorithm widely used in the field of machine learning and can be used for feature decomposition in dimensionality reduction algorithms.

[0159] The geometric meaning of singular value decomposition is: for each linear mapping T: K→K, T maps the i-th basis vector of K to the non-negative multiple of the i-th basis vector of K, and then maps the remaining basis vectors to zero vectors. By comparing these basis vectors, the mapping T can be expressed as a non-negative diagonal matrix.

[0160] Assume that M is an m×n matrix whose elements all belong to the field K, that is, the field of real numbers or the field of complex numbers. Then there exists a decomposition such that M=U∑V T .

[0161] For any singular value decomposition, the elements on the diagonal of the matrix Σ are equal to the singular values ​​of M, and the columns of U and V are the left and right singular vectors in the singular values, respectively.

[0162] In this embodiment, the original rotation matrix R solved according to the orthogonal basis DW can be decomposed into R by singular value decomposition algorithm DW =U∑V T , where U and V are orthogonal matrices obtained by singular value decomposition.

[0163] In actual implementation, the singular value matrix ∑ is replaced by the identity matrix R DW '=UV T , where R DW ' is the corrected rotation matrix.

[0164] Solve to get the corrected rotation matrix R DW 'After that, through For the translation vector t DW Correction is performed, where t DW ' is the corrected translation vector.

[0165] In some embodiments, step 150 includes:

[0166] Obtaining a first external parameter based on the first pose information and the second pose information;

[0167] Nonlinear optimization is performed on the first external parameter to obtain the external parameter.

[0168] In this embodiment, a rough estimate of an external parameter for transformation between the first sensor and the second sensor, that is, a first external parameter, is calculated using the first pose information and the second pose information determined in step 130 and step 140 .

[0169] Then, the first external parameter is nonlinearly optimized to determine the final external parameter between the first sensor and the second sensor.

[0170] In some embodiments, the nonlinear optimization includes optimization based on geometric constraint relationships between point cloud planes and point cloud lines.

[0171] In this embodiment, nonlinear optimization constructs a cost equation for precise registration based on line-surface geometric constraints between the point cloud line of the first sensor and the point cloud plane of the second sensor, optimizes the first external parameters, and obtains the final external parameters between the first sensor and the second sensor.

[0172] The cost equation is a function used to represent the error between the predicted value and the actual value.

[0173] In this embodiment, the geometric constraint relationship between the point cloud plane and the point cloud line includes: the plane normal of the point cloud plane is perpendicular to the corresponding point cloud line, and the distance between the point cloud plane and the corresponding point cloud line point is zero.

[0174] like Figure 7 As shown, is the vector of the point cloud line corresponding to the point cloud plane j, P1, P2 and P3 are point cloud lines The point on is the unit normal vector of point cloud plane j, that is, the plane normal of point cloud plane j, d = 0 means that point cloud plane j and the corresponding point cloud line The distance between points is zero, and the point cloud line corresponding to the point cloud plane j is represented by vectors and points

[0175] According to the point-line geometric constraint relationship between the point cloud plane and the point cloud line, the cost equation for constructing precise registration is as follows:

[0176]

[0177] in, is the unit normal vector of point cloud plane j, is the vector of the point cloud line corresponding to the point cloud plane j, and the distance is the plane parameter of the point cloud plane j in the coordinate system of the second sensor, R LD and t LD They respectively represent the optimized rotation parameters and translation parameters of the first sensor relative to the second sensor.

[0178] It can be understood that the external parameters of the first sensor relative to the second sensor include the rotation parameter R LD and the translation parameter t LD .

[0179] A specific embodiment is described below.

[0180] like Figure 8 As shown, based on the calibration object, the laser radar and the depth camera, three coordinate systems, namely the world coordinate system, the coordinate system of the first sensor and the coordinate system of the second sensor, are established respectively.

[0181] The calibration object is observed by the first sensor and the second sensor at the same time, and the point cloud data of the lidar and the depth camera are extracted and denoised, and preprocessed to obtain point cloud lines and point cloud planes.

[0182] Through the simplified P3P problem solving algorithm, the pose transformation between the coordinate system of the first sensor of the lidar and the world coordinate system is estimated to obtain the first pose information.

[0183] Through orthogonal basis correspondence, the pose transformation between the coordinate system of the second sensor of the depth camera and the world coordinate system is estimated to obtain second pose information, and the pose of the second pose information is corrected by singular value solution.

[0184] Combining the previous two steps, roughly estimate the relative pose transformation parameters between the lidar and the depth camera, which is the first external parameter.

[0185] Based on the point cloud plane of the depth camera and the point cloud line geometric constraints of the lidar, the cost equation for precise registration is constructed, the pose transformation parameters are optimized, and the final external parameters between the lidar and the depth camera are obtained.

[0186] The external parameter calibration device provided in an embodiment of the present invention is described below. The external parameter calibration device described below and the external parameter calibration method described above can be referenced to each other.

[0187] like Fig. 9 As shown, the external parameter calibration device provided by the embodiment of the present invention includes:

[0188] An acquisition module 910 is used to acquire first point cloud information of a calibration object acquired by a first sensor and second point cloud information of the calibration object acquired by a second sensor, wherein the calibration object includes three calibration planes perpendicular to each other;

[0189] A first processing module 920 is used to fit the point cloud lines of the first point cloud information on the three calibration planes and the point cloud planes of the second point cloud information on the three calibration planes;

[0190] Acquire a point cloud line and a point cloud plane, wherein the point cloud line is point cloud information of the calibration object collected by the first sensor, and the point cloud plane is point cloud information of the calibration object collected by the second sensor, and the calibration object includes three calibration planes perpendicular to each other;

[0191] A second processing module 930 is used to determine the first pose information of the first sensor relative to the calibration object based on the point cloud line;

[0192] A third processing module 940 is used to determine second pose information of the second sensor relative to the calibration object based on the point cloud plane;

[0193] The third processing module 950 is used to determine the external parameters between the first sensor and the second sensor based on the first posture information and the second posture information.

[0194] According to the external parameter calibration device provided by the embodiment of the present invention, a calibration object including three mutually perpendicular planes is observed by the first sensor and the second sensor, and the point cloud lines and point cloud planes falling on the calibration object in the point cloud information of the first sensor and the second sensor are fitted to calibrate the external parameters between the first sensor and the second sensor. This can effectively reduce the number of observations, improve the accuracy of the external parameter calibration, and improve the accuracy of the information fusion between the first sensor and the second sensor.

[0195] In some embodiments, the second processing module 930 is used to determine the first coordinate of the intersection of the point cloud line in the coordinate system of the first sensor and the world coordinate in the world coordinate system based on a multi-point perspective algorithm, and the world coordinate system is established based on the calibration object; based on the first coordinate and the world coordinate, determine the first pose information.

[0196] In some embodiments, the third processing module 940 is used to obtain the rotation matrix and translation vector of the point cloud plane between the coordinate system of the second sensor and the world coordinate system, where the world coordinate system is established based on the calibration object; based on the rotation matrix and translation vector, the second pose information is determined.

[0197] In some embodiments, the third processing module 940 is used to obtain a second orthogonal basis of the point cloud plane in the coordinate system of the second sensor; determine the rotation matrix based on the second orthogonal basis and the world orthogonal basis of the world coordinate system; obtain the plane distance between the point cloud plane and the world coordinate system; and determine the translation vector based on the plane distance.

[0198] In some embodiments, the third processing module 940 is used to perform singular value decomposition on the rotation matrix and the translation vector to correct the rotation matrix and the translation vector; and determine the second posture information based on the corrected rotation matrix and the translation vector.

[0199] In some embodiments, the third processing module 950 is used to obtain a first external parameter based on the first pose information and the second pose information; and perform nonlinear optimization on the first external parameter to obtain the external parameter.

[0200] In some embodiments, the nonlinear optimization includes optimization based on geometric constraint relationships between point cloud planes and point cloud lines.

[0201] The invention also provides a robot.

[0202] The robot is provided with a first sensor and a second sensor, which constitute a visual perception system of the robot.

[0203] The controller of the robot is electrically connected to the first sensor and the second sensor, and can determine the external parameters between the first sensor and the second sensor according to the above-mentioned external parameter calibration method, and perform the operation of external parameter calibration of the first sensor and the second sensor.

[0204] According to the robot provided by the embodiment of the present invention, a calibration object including three mutually perpendicular planes is observed by the first sensor and the second sensor, point cloud lines and point cloud planes falling on the calibration object in the point cloud information of the first sensor and the second sensor are fitted, and the external parameters between the first sensor and the second sensor are calibrated. This can effectively reduce the number of observations, improve the accuracy of the external parameter calibration, and improve the accuracy of the information fusion between the first sensor and the second sensor, so that the first sensor and the second sensor provide accurate environmental information for the robot.

[0205] Fig.10 An example of a physical structure diagram of an electronic device is shown in FIG. Fig.10 As shown, the electronic device may include: a processor 1010, a communication interface 1020, a memory 1030 and a communication bus 1040, wherein the processor 1010, the communication interface 1020 and the memory 1030 communicate with each other through the communication bus 1040. The processor 1010 may call the logic instructions in the memory 1030 to execute the external parameter calibration method, which includes: obtaining the first point cloud information of the calibration object collected by the first sensor and the second point cloud information of the calibration object collected by the second sensor, and the calibration object includes three calibration planes perpendicular to each other; fitting the point cloud lines of the first point cloud information on the three calibration planes and the point cloud planes of the second point cloud information on the three calibration planes; based on the point cloud lines, determining the first pose information of the first sensor relative to the calibration object; based on the point cloud plane, determining the second pose information of the second sensor relative to the calibration object; based on the first pose information and the second pose information, determining the external parameters between the first sensor and the second sensor.

[0206] In addition, the logic instructions in the above-mentioned memory 1030 can be implemented in the form of software functional units and can be stored in a computer-readable storage medium when sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk.

[0207] Furthermore, the present invention also provides a computer program product, which includes a computer program. The computer program can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the external parameter calibration method provided by the above-mentioned method embodiments, which includes: acquiring first point cloud information of a calibration object collected by a first sensor and second point cloud information of the calibration object collected by a second sensor, the calibration object including three calibration planes perpendicular to each other; fitting point cloud lines of the first point cloud information on the three calibration planes and point cloud planes of the second point cloud information on the three calibration planes; determining the first pose information of the first sensor relative to the calibration object based on the point cloud line; determining the second pose information of the second sensor relative to the calibration object based on the point cloud plane; and determining the external parameters between the first sensor and the second sensor based on the first pose information and the second pose information.

[0208] On the other hand, an embodiment of the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to execute the external parameter calibration method provided in the above-mentioned embodiments, the method comprising: acquiring first point cloud information of a calibration object collected by a first sensor and second point cloud information of the calibration object collected by a second sensor, the calibration object comprising three mutually perpendicular calibration planes; fitting point cloud lines of the first point cloud information on the three calibration planes and point cloud planes of the second point cloud information on the three calibration planes; determining the first pose information of the first sensor relative to the calibration object based on the point cloud line; determining the second pose information of the second sensor relative to the calibration object based on the point cloud plane; determining the external parameters between the first sensor and the second sensor based on the first pose information and the second pose information.

[0209] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0210] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0211] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

[0212] The above embodiments are only used to illustrate the present invention, but not to limit the present invention. Although the present invention is described in detail with reference to the embodiments, it should be understood by those skilled in the art that various combinations, modifications or equivalent substitutions of the technical solutions of the present invention do not depart from the spirit and scope of the technical solutions of the present invention, and should be included in the scope of the claims of the present invention.

Claims

1. A method for calibrating an external parameter, characterized in that: include: Acquire first point cloud information of a calibration object collected by a first sensor and second point cloud information of the calibration object collected by a second sensor, wherein the calibration object includes three calibration planes perpendicular to each other; Fitting to obtain point cloud lines of the first point cloud information on the three calibration planes and point cloud planes of the second point cloud information on the three calibration planes; Based on the point cloud line, determining first position information of the first sensor relative to the calibration object; Based on the point cloud plane, determining second pose information of the second sensor relative to the calibration object; Based on the first posture information and the second posture information, obtaining a first external parameter; Constructing a cost equation for precise registration, performing nonlinear optimization on the first external parameter, and obtaining the external parameter; The nonlinear optimization includes optimization based on the geometric constraint relationship between the point cloud plane and the point cloud line; The cost equation is a function used to represent the error between the predicted value and the actual value; The geometric constraint relationship between the point cloud plane and the point cloud line includes: the plane normal of the point cloud plane is perpendicular to the corresponding point cloud line, and the distance between the point cloud plane and the corresponding point cloud line point is zero.

2. The external parameter calibration method according to claim 1, characterized in that: The determining, based on the point cloud line, first position information of the first sensor relative to the calibration object includes: Based on a multi-point perspective algorithm, determining a first coordinate of an intersection of the point cloud lines in a coordinate system of a first sensor and a world coordinate in a world coordinate system, wherein the world coordinate system is established based on the calibration object; The first position information is determined based on the first coordinate and the world coordinate.

3. The external parameter calibration method according to claim 1, characterized in that: The determining, based on the point cloud plane, second pose information of the second sensor relative to the calibration object comprises: Obtaining a rotation matrix and a translation vector of the point cloud plane between a coordinate system of the second sensor and a world coordinate system, wherein the world coordinate system is established based on the calibration object; Based on the rotation matrix and the translation vector, the second posture information is determined.

4. The external parameter calibration method according to claim 3, characterized in that: The obtaining of the rotation matrix and the translation vector of the point cloud plane between the coordinate system of the second sensor and the world coordinate system comprises: Acquire a second orthogonal basis of the point cloud plane in the coordinate system of the second sensor; Determine the rotation matrix based on the second orthogonal basis and a world orthogonal basis of the world coordinate system; Obtaining a plane distance between the point cloud plane and the world coordinate system; Based on the planar distance, the translation vector is determined.

5. The external parameter calibration method according to claim 3, characterized in that: The determining the second posture information based on the rotation matrix and the translation vector includes: Performing singular value decomposition on the rotation matrix and the translation vector to correct the rotation matrix and the translation vector; The second position and posture information is determined based on the corrected rotation matrix and the translation vector.

6. A robot, characterized in that: include: First sensor and second sensor: A controller, wherein the controller determines the external parameters between the first sensor and the second sensor based on the external parameter calibration method according to any one of claims 1 to 5.

7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the external parameter calibration method as described in any one of claims 1 to 5 is implemented.

8. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the external parameter calibration method as described in any one of claims 1 to 5 is implemented.

9. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the external parameter calibration method as described in any one of claims 1 to 5 is implemented.