Method and apparatus for spatial calibration of a vehicle
By acquiring and processing pose data in real time during vehicle operation, and using online spatial calibration mode and nonlinear optimization algorithm, the problems of low sensor calibration accuracy and frequent offset are solved, achieving high-precision sensor position update and robust calibration.
Patent Information
- Application Number
- CN202211654596.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-22
- Publication Date
- 2026-11-27
- Estimated Expiration
- 2042-12-22
AI Technical Summary
Existing LiDAR and inertial navigation calibration methods have low accuracy, making it difficult to update sensor position relationships in real time while the vehicle is in motion. Furthermore, vehicle vibrations cause sensor offsets, requiring frequent verification and calibration, which is a cumbersome process.
By acquiring pose data at multiple moments in real time during vehicle operation, the relative positional relationship of the sensors is calculated using an online spatial calibration mode, and the relative positional relationship of the target is automatically updated when the sensor position shifts. Nonlinear optimization algorithms and interpolation algorithms are used for accurate calibration.
It achieves high-precision sensor position calibration during vehicle operation, suppresses the influence of noise, enhances the robustness of external parameter calibration, and reduces the tedious repetitive calibration process.
Smart Images

Figure CN116148859B_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of autonomous driving, and in particular relates to a spatial calibration method and apparatus for vehicles. Background Technology
[0002] Sensor calibration is an essential and crucial step in the development of autonomous driving technology and a prerequisite for the development of multi-sensor fusion algorithms. LiDAR sensors detect the surrounding environment by emitting laser beams, offering advantages such as high resolution, wide detection range, and strong anti-interference capabilities, making them one of the most mainstream sensors in autonomous driving sensor architectures. Inertial navigation sensors, on the other hand, acquire satellite signals and combine them with their own inertial measurement units to comprehensively solve for the device's current geographical location, making them one of the most widely used positioning technologies in autonomous driving. Due to the significant differences in the signal types output by the two sensors and the very obvious weak correlation between them, it is often difficult to accurately obtain the extrinsic parameter values between LiDAR and inertial navigation. Therefore, it is necessary to obtain the accurate relative positional relationship between the two sensors, including translation and rotation parameters in three-dimensional space, to transform both sensors into a unified spatiotemporal coordinate system, facilitating the provision of complete and reliable sensor information for subsequent multi-sensor fusion positioning and perception modules.
[0003] Traditional LiDAR and inertial navigation system calibration methods are offline calibration methods based on the hand-eye calibration principle. However, this offline calibration method limits the calibration calculation to only one time after data acquisition, and a single calibration usually cannot achieve accurate results, resulting in low calibration precision. Furthermore, during normal vehicle operation, vehicle vibrations inevitably cause slight shifts in sensor position, necessitating periodic verification and recalibration of the sensor position, a rather cumbersome process. Summary of the Invention
[0004] This application provides a spatial calibration method and apparatus for vehicles, which can perform high-precision external parameter calibration online during vehicle operation and automatically update the relative position relationship of the target when the sensor position shifts, thus avoiding the influence of vehicle body vibration on external parameter calibration.
[0005] In a first aspect, embodiments of this application provide a spatial calibration method for a vehicle. The spatial calibration method includes: when a first spatial calibration mode is activated, acquiring first pose data at at least two time points and second pose data at at least two time points, wherein the first pose data is pose data acquired by a first spatial position acquisition device in the vehicle, and the second pose data is pose data acquired by a second spatial position acquisition device in the vehicle; for any i-th time point among the at least two time points, calculating the first pose increment of the first spatial position acquisition device at the i-th time point relative to the initial time point and the second pose increment of the second spatial position acquisition device at the i-th time point relative to the initial time point based on the first pose data at the i-th time point and the second pose data at the i-th time point, where i is a positive integer; determining the relative positional relationship between the first spatial position acquisition device and the second spatial position acquisition device at the i-th time point based on the first pose increment and the second pose increment corresponding to the i-th time point; when the difference between the relative positional relationship corresponding to the previous time point and the relative positional relationship corresponding to the next time point among the at least two time points is greater than a first preset threshold, taking the relative positional relationship corresponding to the next time point as the target relative positional relationship.
[0006] According to the implementation of the first aspect of this application, acquiring first pose data at at least two time points and second pose data at at least two time points specifically includes: acquiring first pose data and second pose data at the current time point once every preset time interval; when the difference between the relative position relationship corresponding to the previous time point and the relative position relationship corresponding to the next time point in the at least two time points is greater than a first preset threshold, the relative position relationship corresponding to the next time point is taken as the target relative position relationship, specifically including: when the difference between the relative position relationship corresponding to the current time point and the relative position relationship corresponding to any one of the at least two time points is greater than the first preset threshold, the target relative position relationship is updated to the relative position relationship corresponding to the current time point.
[0007] According to any of the foregoing embodiments of the first aspect of this application, obtaining first pose data at at least two time points and second pose data at at least two time points specifically includes: obtaining first pose data at multiple time points, second pose data at multiple time points, and the confidence level corresponding to each of the second pose data at multiple time points; removing second pose data at a target time point and first pose data at a target time point whose confidence level is less than a second preset threshold, to obtain first pose data at at least two time points and second pose data at at least two time points, wherein the target time point is any one or more of the multiple time points.
[0008] According to any of the foregoing embodiments of the first aspect of this application, obtaining first pose data at at least two time points specifically includes: for any given time point, acquiring first point cloud data collected by a first spatial position acquisition device and second point cloud data collected by a third spatial position acquisition device in the vehicle, wherein the third spatial position acquisition device and the first spatial position acquisition device are spatial position acquisition devices of the same type; using the first spatial position acquisition device as a reference, and based on a predetermined positional relationship between the first spatial position acquisition device and the third spatial position acquisition device, converting the second point cloud data collected by the third spatial position acquisition device to the first spatial coordinate system where the first spatial position acquisition device is located; summarizing the converted second point cloud data with the first point cloud data to obtain summed target point cloud data; and determining the first pose data based on the target point cloud data.
[0009] According to any of the foregoing embodiments of the first aspect of this application, determining the first pose data based on the target point cloud data specifically includes: when a point cloud map exists, matching the target point cloud data with the point cloud map to obtain the first pose data corresponding to the target point cloud data; when a point cloud map does not exist, determining the first pose data corresponding to the target point cloud data in real time based on the running trajectory of the first spatial position acquisition device.
[0010] According to any of the foregoing embodiments of the first aspect of this application, calculating the first pose increment of the first spatial position acquisition device at the i-th time relative to the initial time and the second pose increment of the second spatial position acquisition device at the i-th time relative to the initial time based on the first pose data at the i-th time and the second pose data at the i-th time specifically includes: calculating the first pose increment corresponding to the i-th time and the second pose increment corresponding to the i-th time according to the following expressions:
[0011]
[0012]
[0013] in, This represents the first pose increment corresponding to the i-th time step. This represents the increment of the second pose at time i. This represents the first pose data at time i. This represents the second pose data at time i. This represents the pose increment of the first spatial position acquisition device at the initial moment. This represents the pose increment of the second spatial position acquisition device at the initial moment, and -1 represents the inverse matrix operation.
[0014] According to any of the foregoing embodiments of the first aspect of this application, obtaining second pose data at least two times specifically includes: for any i-th time, acquiring two sets of pose data adjacent to the i-th time, acquired by the second spatial position acquisition device; and processing the two sets of pose data based on an interpolation algorithm to obtain the second pose data at the i-th time.
[0015] According to any of the foregoing embodiments of the first aspect of this application, determining the relative positional relationship between the first spatial position acquisition device and the second spatial position acquisition device at the i-th time based on the first pose increment corresponding to the i-th time and the second pose increment corresponding to the i-th time specifically includes: creating an objective function based on the first pose increment corresponding to the i-th time and the second pose increment corresponding to the i-th time; solving the objective function based on a nonlinear optimization algorithm to obtain the relative positional relationship between the first spatial position acquisition device and the second spatial position acquisition device at the i-th time; wherein, the expression of the objective function is:
[0016]
[0017] in, This represents the first pose increment corresponding to the i-th time step. Let X represent the second pose increment at the i-th time, and let X represent the relative positional relationship between the first spatial position acquisition device and the second spatial position acquisition device at the i-th time.
[0018] According to any of the foregoing embodiments of the first aspect of this application, before activating the first spatial calibration mode, the vehicle spatial calibration method further includes: determining whether the controller in the vehicle supports running the first spatial calibration mode; if the controller supports running the first spatial calibration mode, activating the first spatial calibration mode; if the controller does not support running the first spatial calibration mode, activating the second spatial calibration mode; wherein, the first spatial calibration mode includes an online spatial calibration mode, and the second spatial calibration mode includes an offline spatial calibration mode.
[0019] Secondly, embodiments of this application provide a vehicle spatial calibration device, comprising: an acquisition module, configured to acquire first pose data at at least two times and second pose data at at least two times when a first spatial calibration mode is activated, wherein the first pose data is pose data acquired by a first spatial position acquisition device in the vehicle, and the second pose data is pose data acquired by a second spatial position acquisition device in the vehicle; and a calculation module, configured to, for any i-th time among the at least two times, calculate the position data acquired by the first spatial position acquisition device at the i-th time based on the first pose data at the i-th time and the second pose data at the i-th time. The first spatial position acquisition device is defined as the first pose increment relative to the initial time, and the second spatial position acquisition device is defined as the second pose increment relative to the initial time at the i-th time, where i is a positive integer; the determination module is used to determine the relative position relationship between the first spatial position acquisition device and the second spatial position acquisition device at the i-th time based on the first pose increment and the second pose increment corresponding to the i-th time; the calibration module is used to take the relative position relationship corresponding to the next time as the target relative position relationship when the difference between the relative position relationship corresponding to the previous time and the relative position relationship corresponding to the next time in at least two time periods is greater than a first preset threshold.
[0020] The vehicle spatial calibration method and apparatus of this application, when a first spatial calibration mode is activated, acquires first pose data at at least two time points and second pose data at at least two time points; for any i-th time point among the at least two time points, based on the first pose data at the i-th time point and the second pose data at the i-th time point, calculates the first pose increment of the first spatial position acquisition device at the i-th time point relative to the initial time point and the second pose increment of the second spatial position acquisition device at the i-th time point relative to the initial time point; based on the first pose increment and the second pose increment corresponding to the i-th time point, determines the relative positional relationship between the first spatial position acquisition device and the second spatial position acquisition device at the i-th time point; when the difference between the relative positional relationship corresponding to the previous time point and the relative positional relationship corresponding to the next time point among the at least two time points is greater than a first preset threshold, the relative positional relationship corresponding to the next time point is taken as the target relative positional relationship. The system acquires first pose data in real time using a first spatial position acquisition device and second pose data in real time using a second spatial position acquisition device. An online spatial calibration mode is used to determine the relative positional relationship between the first and second spatial position acquisition devices at the same time. This allows for online calibration of the two spatial position acquisition devices during vehicle operation, effectively suppressing the influence of noise during calibration and achieving high-precision extrinsic parameter calibration. By continuously acquiring multiple sets of pose data and iteratively cyclically, the position between the two spatial position acquisition devices to be calibrated is detected in real time. When a sensor position shift occurs—that is, when the difference between the relative positional relationship at the previous moment and the relative positional relationship at the next moment exceeds a first preset threshold—the target relative positional relationship is automatically updated. This solves the problem of sensor position shift caused by vehicle vibration affecting extrinsic parameter calibration and enhances the robustness of the extrinsic parameter calibration. Attached Figure Description
[0021] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments of this application will be briefly introduced below. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0022] Figure 1 This is a schematic flowchart of a vehicle spatial calibration method provided in an embodiment of this application;
[0023] Figure 2 This is a schematic flowchart of another vehicle spatial calibration method provided in an embodiment of this application;
[0024] Figure 3 This is a schematic flowchart of another vehicle spatial calibration method provided in the embodiments of this application;
[0025] Figure 4 This is a schematic flowchart of another vehicle spatial calibration method provided in the embodiments of this application;
[0026] Figure 5 This is a schematic diagram of the structure of a vehicle space calibration device provided in an embodiment of this application. Detailed Implementation
[0027] The features and exemplary embodiments of various aspects of this application will be described in detail below. To make the objectives, technical solutions, and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only intended to explain this application and not to limit it. For those skilled in the art, this application can be implemented without some of these specific details. The following description of the embodiments is merely to provide a better understanding of this application by illustrating examples.
[0028] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising..." does not exclude the presence of additional identical elements in the process, method, article, or apparatus that includes said element.
[0029] It should be understood that the term "and / or" used in this article is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Additionally, the character " / " in this article generally indicates that the preceding and following related objects have an "or" relationship.
[0030] Various modifications and variations can be made to this application without departing from its spirit or scope, which will be apparent to those skilled in the art. Therefore, this application is intended to cover modifications and variations falling within the scope of the corresponding claims (the claimed technical solutions) and their equivalents. It should be noted that the embodiments provided in this application can be combined with each other without contradiction.
[0031] Before describing the technical solutions provided in the embodiments of this application, in order to facilitate understanding of the embodiments of this application, this application first specifically explains the problems existing in the related technologies:
[0032] As mentioned above, the inventors of this application have discovered that existing offline calibration methods based on the hand-eye calibration principle involve driving the vehicle to be calibrated in a figure-eight pattern to collect point cloud data from the LiDAR and positioning trajectory data output by the inertial navigation system (INS) during the vehicle's movement. Then, the relative pose transformation between consecutive frame point clouds is obtained through frame-to-frame matching, and a constraint relationship is established with the pose transformation output by the INS within the same time period. This is used to comprehensively solve for the extrinsic parameter values between the LiDAR and INS. However, the method of obtaining the relative pose of consecutive frame point clouds through LiDAR odometry requires a relatively large number of structured objects in the environment, placing high demands on the data acquisition environment. The LiDAR sensor data acquisition frequency is relatively high, typically 10-30Hz, resulting in small calculated relative pose values for consecutive frame point clouds, making them highly susceptible to noise and leading to unsatisfactory calibration results. Furthermore, the offline calibration method limits the calibration calculation to only one time after data acquisition, and a single calibration usually cannot achieve accurate results, resulting in low calibration precision. During normal vehicle operation, the sensor position will inevitably shift slightly due to vehicle body vibration. Therefore, the sensor position needs to be checked and recalibrated every once in a while, which is a rather cumbersome process.
[0033] In view of the inventors’ above-mentioned research findings, the embodiments of this application provide a spatial calibration method and apparatus for vehicles, which can solve the technical problems of low calibration accuracy of offline calibration methods and the cumbersome process of recalibration when the sensor position shifts.
[0034] The spatial calibration method for vehicles provided in the embodiments of this application will be introduced first below.
[0035] Figure 1 This is a schematic flowchart of a vehicle spatial calibration method provided in an embodiment of this application.
[0036] like Figure 1 As shown, the method may include the following steps:
[0037] S101. When the first spatial calibration mode is activated, acquire first pose data at at least two time points and second pose data at at least two time points. The first pose data is the pose data acquired by the first spatial position acquisition device in the vehicle, and the second pose data is the pose data acquired by the second spatial position acquisition device in the vehicle.
[0038] When the vehicle-side first spatial calibration mode (i.e., online spatial calibration mode) is activated, based on the vehicle positioning status output by the second spatial positioning acquisition device, the first spatial positioning acquisition device automatically acquires at least two moments of first pose data in the world coordinate system, and the second spatial positioning acquisition device automatically acquires at least two moments of second pose data in the world coordinate system. The first spatial positioning acquisition device may include, but is not limited to, a lidar sensor, and the second spatial positioning acquisition device may include, but is not limited to, an inertial navigation sensor.
[0039] S102. For any i-th time in at least two time moments, based on the first pose data at the i-th time moment and the second pose data at the i-th time moment, calculate the first pose increment of the first spatial position acquisition device at the i-th time moment relative to the initial time moment and the second pose increment of the second spatial position acquisition device at the i-th time moment relative to the initial time moment, where i is a positive integer.
[0040] For any i-th time in at least two time moments, based on the first pose data of the first spatial position acquisition device at the i-th time in the world coordinate system, the second pose data of the second spatial position acquisition device at the i-th time in the world coordinate system, the pose increment of the first spatial position acquisition device at the initial time in the world coordinate system, and the pose increment of the second spatial position acquisition device at the initial time in the world coordinate system, calculate the first pose increment of the first spatial position acquisition device at the i-th time relative to the initial time and the second pose increment of the second spatial position acquisition device at the i-th time relative to the initial time.
[0041] S103. Determine the relative positional relationship between the first spatial position acquisition device and the second spatial position acquisition device at the i-th time based on the first pose increment corresponding to the i-th time and the second pose increment corresponding to the i-th time.
[0042] Based on the first pose increment of the first spatial position acquisition device at time i relative to the initial time, and the second pose increment of the second spatial position acquisition device at time i relative to the initial time, a constraint relationship between the first pose increment and the second pose increment is constructed. Based on the constraint relationship, an objective function is created to solve for the relative positional relationship between the first spatial position acquisition device and the second spatial position acquisition device at time i, that is, the extrinsic parameter values between the first spatial position acquisition device and the second spatial position acquisition device.
[0043] S104. When the difference between the relative position relationship corresponding to the previous time and the relative position relationship corresponding to the next time in at least two time periods is greater than the first preset threshold, the relative position relationship corresponding to the next time period shall be taken as the target relative position relationship.
[0044] During vehicle operation, if the difference between the relative position relationship between the first spatial position acquisition device and the second spatial position acquisition device at a certain moment and the relative position relationship at the next moment is greater than a preset first threshold, it is determined that the sensor position has shifted, and the relative position relationship at the next moment is taken as the target relative position relationship.
[0045] The vehicle spatial calibration method of this application embodiment, when a first spatial calibration mode is activated, acquires first pose data at at least two time points and second pose data at at least two time points; for any i-th time point among the at least two time points, based on the first pose data at the i-th time point and the second pose data at the i-th time point, calculates the first pose increment of the first spatial position acquisition device at the i-th time point relative to the initial time point and the second pose increment of the second spatial position acquisition device at the i-th time point relative to the initial time point; based on the first pose increment and the second pose increment corresponding to the i-th time point, determines the relative positional relationship between the first spatial position acquisition device and the second spatial position acquisition device at the i-th time point; when the difference between the relative positional relationship corresponding to the previous time point and the relative positional relationship corresponding to the next time point among the at least two time points is greater than a first preset threshold, the relative positional relationship corresponding to the next time point is taken as the target relative positional relationship. The system acquires first pose data in real time using a first spatial position acquisition device and second pose data in real time using a second spatial position acquisition device. An online spatial calibration mode is used to determine the relative positional relationship between the first and second spatial position acquisition devices at the same time. This allows for online calibration of the two spatial position acquisition devices during vehicle operation, effectively suppressing the influence of noise during calibration and achieving high-precision extrinsic parameter calibration. By continuously acquiring multiple sets of pose data and iteratively cyclically, the position between the two spatial position acquisition devices to be calibrated is detected in real time. When a sensor position shift occurs—that is, when the difference between the relative positional relationship at the previous moment and the relative positional relationship at the next moment exceeds a first preset threshold—the target relative positional relationship is automatically updated. This solves the problem of sensor position shift caused by vehicle vibration affecting extrinsic parameter calibration and enhances the robustness of the extrinsic parameter calibration.
[0046] In some embodiments, acquiring first pose data at at least two time points and second pose data at at least two time points specifically includes: acquiring first pose data and second pose data at the current time point once every preset time interval; when the difference between the relative position relationship corresponding to the previous time point and the relative position relationship corresponding to the next time point in the at least two time points is greater than a first preset threshold, taking the relative position relationship corresponding to the next time point as the target relative position relationship, specifically includes: when the difference between the relative position relationship corresponding to the current time point and the relative position relationship corresponding to any one of the at least two time points is greater than the first preset threshold, updating the target relative position relationship to the relative position relationship corresponding to the current time point.
[0047] For example, every preset time interval, the first spatial position acquisition device automatically acquires the first pose data of the current moment, and the second spatial position acquisition device automatically acquires the second pose data of the current moment. Based on the newly acquired first and second pose data of the current moment, the relative positional relationship between the first and second spatial position acquisition devices is determined, i.e., the extrinsic parameter values between the first and second spatial position acquisition devices at the current moment. If the difference between the extrinsic parameter value corresponding to the current moment and the extrinsic parameter value corresponding to any moment before the current moment is greater than a first preset threshold, it is determined that the sensor position has shifted. The extrinsic parameter value corresponding to a certain moment that was originally used as the target relative positional relationship is updated to the extrinsic parameter value corresponding to the current moment, which is used as the new target relative positional relationship. During vehicle operation, the calculation of the extrinsic parameter values between the first and second spatial position acquisition devices is performed by continuously acquiring multiple sets of pose data in a cyclical iteration, which enhances the robustness of the extrinsic parameter calibration.
[0048] In some embodiments, obtaining first pose data at at least two time points and second pose data at at least two time points specifically includes: obtaining first pose data at multiple time points, second pose data at multiple time points, and the confidence level corresponding to each of the second pose data at multiple time points; removing second pose data at a target time point and first pose data at a target time point whose confidence level is less than a second preset threshold, to obtain first pose data at at least two time points and second pose data at at least two time points, wherein the target time point is any one or more of the multiple time points.
[0049] For example, after the first spatial position acquisition device acquires first pose data at multiple times and the second spatial position acquisition device acquires second pose data at multiple times, it determines whether the confidence level of each second pose data is less than a second preset threshold. The second pose data at the target time with a confidence level less than the second preset threshold and the first pose data corresponding to the target time are removed. This eliminates the second pose data acquired by the second spatial position acquisition device when the satellite signal is not ideal, and retains the second pose data with high positioning accuracy and the first pose data at the corresponding time for subsequent determination of relative position relationships. This achieves automatic optimization and filtering of pose data.
[0050] In some embodiments, acquiring first pose data at at least two time points specifically includes: for any given time point, acquiring first point cloud data collected by a first spatial position acquisition device and second point cloud data collected by a third spatial position acquisition device in the vehicle, wherein the third spatial position acquisition device and the first spatial position acquisition device are spatial position acquisition devices of the same type; using the first spatial position acquisition device as a reference, and according to a predetermined positional relationship between the first spatial position acquisition device and the third spatial position acquisition device, converting the second point cloud data collected by the third spatial position acquisition device to the first spatial coordinate system where the first spatial position acquisition device is located; summarizing the converted second point cloud data with the first point cloud data to obtain the summarized target point cloud data; and determining the first pose data based on the target point cloud data.
[0051] For example, using the first spatial position acquisition device as a reference, and based on the positional relationship between the first and third spatial position acquisition devices, the second point cloud data acquired by the third spatial position acquisition device is converted to the first spatial coordinate system where the first spatial position acquisition device is located. This allows for the aggregation of point cloud data acquired by different spatial position acquisition devices of the same type at the same time, resulting in complete point cloud data around the vehicle at that time, i.e., the target point cloud data. This is then used to determine the first pose data later. To ensure that all spatial position acquisition devices of the same type can acquire point cloud data simultaneously at the same time, this embodiment uses the same clock source to trigger all spatial position acquisition devices.
[0052] Figure 2 This is a flowchart illustrating another vehicle spatial calibration method provided in an embodiment of this application. Figure 2 As shown, according to some embodiments of this application, optionally, after summarizing the converted second point cloud data with the first point cloud data to obtain the summarized target point cloud data, the vehicle spatial calibration method provided in this application embodiment further includes the following steps S201 to S202.
[0053] S201. Perform distortion correction processing on the target point cloud data and the second pose data to obtain the distorted target point cloud data and the distorted second pose data.
[0054] The vehicle speed information output by the second spatial position acquisition device is converted into the speed information of the location of the first spatial position acquisition device, including the linear velocity and angular velocity of the vehicle. Based on the timestamp of each point in the target point cloud data and the linear velocity and angular velocity of the vehicle, distortion removal processing is performed on the target point cloud data and the second pose data acquired by the second spatial position acquisition device to obtain the distortion removal target point cloud data and the second pose data.
[0055] S202. Determine the first pose data based on the distortion-free target point cloud data.
[0056] The distortion-free target point cloud data is used as the basis for subsequent data processing to determine the first pose data of the first spatial position acquisition device at the corresponding time.
[0057] Figure 3 This is a flowchart illustrating another vehicle spatial calibration method provided in this application. Figure 3 As shown, according to some embodiments of this application, optionally, after performing distortion correction processing on the target point cloud data and the second pose data in S201, the spatial calibration method for vehicles provided in this application embodiment further includes the following steps S301 to S303.
[0058] S301. Divide the distorted target point cloud data and the distorted second pose data into multiple spatial regions.
[0059] The distortion-free target point cloud data and the second pose data are subjected to appropriate downsampling processing. The distortion-free target point cloud data and the second pose data are divided into multiple spatial regions. Each spatial region may contain some target point cloud data and some second pose data, or it may not contain target point cloud data and second pose data.
[0060] S302. Select a preset number of partial target point cloud data and partial second pose data from each spatial region to obtain filtered target point cloud data and filtered second pose data.
[0061] The algorithm determines whether partial target point cloud data and partial second pose data exist in each spatial region. If they do, a preset number of partial target point cloud data and partial second pose data are selected from that spatial region to represent all target point cloud data and all second pose data in that region. This results in sparser target point cloud data and second pose data, reducing the amount of data processing and improving processing efficiency. Furthermore, the sparsity of the target point cloud data and second pose data can be controlled by adjusting the size of different spatial regions.
[0062] S303. Determine the first pose data based on the filtered target point cloud data.
[0063] Based on the downsampled target point cloud data, the first pose data of the first spatial position acquisition device at the corresponding time is determined.
[0064] In some embodiments, determining the first pose data based on the target point cloud data specifically includes: when a point cloud map exists, matching the target point cloud data with the point cloud map to obtain the first pose data corresponding to the target point cloud data; when a point cloud map does not exist, determining the first pose data corresponding to the target point cloud data in real time based on the running trajectory of the first spatial position acquisition device.
[0065] For example, when a high-precision point cloud map exists, the Normal Distribution Transform (NDT) algorithm is used to perform inter-frame matching between the distortion-free target point cloud data and the high-precision point cloud map to obtain the first pose data corresponding to the target point cloud data. When a high-precision point cloud map is lacking, Simultaneous Localization and Mapping (SLAM) technology is used to obtain the trajectory information of the first spatial position acquisition device, and the first pose data corresponding to the target point cloud data is determined in real time based on the trajectory information. However, due to limitations in the data acquisition environment and hardware computing conditions, the first pose data obtained using the SLAM method is slightly inferior to the first pose data obtained using the NDT algorithm when a high-precision map exists. This application provides two calibration schemes: one relying on a high-precision point cloud map and the other not relying on a high-precision point cloud map, facilitating calibration for users when high-precision point cloud map data is unavailable.
[0066] In some embodiments, based on the first pose data at the i-th time and the second pose data at the i-th time, the first pose increment of the first spatial position acquisition device at the i-th time relative to the initial time and the second pose increment of the second spatial position acquisition device at the i-th time relative to the initial time are calculated, specifically including: calculating the first pose increment corresponding to the i-th time and the second pose increment corresponding to the i-th time according to the following expressions (1) and (2):
[0067]
[0068]
[0069] in, This represents the first pose increment corresponding to the i-th time step. This represents the increment of the second pose at time i. This represents the first pose data at time i. This represents the second pose data at time i. This represents the pose increment of the first spatial position acquisition device at the initial moment. This represents the pose increment of the second spatial position acquisition device at the initial moment, and -1 represents the inverse matrix operation.
[0070] For example, the first spatial position acquisition device obtains the first pose data in the world coordinate system at the i-th moment. And the second pose data of the second spatial position acquisition device at the i-th moment in the world coordinate system Then, the pose increments of the first and second spatial position acquisition devices at the i-th time relative to the same initial time are calculated using the above expression.
[0071] In some embodiments, acquiring second pose data at at least two time points specifically includes: for any i-th time point, acquiring two sets of pose data adjacent to the i-th time point acquired by the second spatial position acquisition device; and processing the two sets of pose data based on an interpolation algorithm to obtain the second pose data at the i-th time point.
[0072] For example, since there is a certain time difference between the pose data acquired by the second spatial position acquisition device and the point cloud data acquired by the first spatial position acquisition device, in order to obtain a relatively accurate calibration result, it is necessary to find the two sets of pose data before and after each time point cloud frame based on the timestamp of that frame and perform interpolation fitting to obtain the synchronized second pose data. Assuming the timestamp of the point cloud is t, the two sets of pose data closest to time t are obtained by searching using a binary search method. and Based on the following expression (3), the second pose data at time t is obtained by interpolation:
[0073]
[0074] in, This represents the second pose data at time t, where t1 and t2 represent two times adjacent to time t. This represents the pose data at time t1. This represents the pose data at time t2.
[0075] In some embodiments, the relative positional relationship between the first spatial position acquisition device and the second spatial position acquisition device at the i-th time is determined based on the first pose increment corresponding to the i-th time and the second pose increment corresponding to the i-th time. Specifically, this includes: creating an objective function based on the first pose increment corresponding to the i-th time and the second pose increment corresponding to the i-th time; solving the objective function based on a nonlinear optimization algorithm to obtain the relative positional relationship between the first spatial position acquisition device and the second spatial position acquisition device at the i-th time; wherein, the expression (4) of the objective function is:
[0076]
[0077] in, This represents the first pose increment corresponding to the i-th time step. Let X represent the second pose increment at the i-th time, and let X represent the relative positional relationship between the first spatial position acquisition device and the second spatial position acquisition device at the i-th time.
[0078] For example, based on the first pose increment corresponding to the i-th time moment and the second pose increment corresponding to the i-th time moment, a constraint relationship between the two is established based on the hand-eye calibration principle. The expression of the constraint relationship (5) is:
[0079] AX = XB (5)
[0080] Where A represents the first pose increment at the i-th time step. B represents the second pose increment at time i. X represents the extrinsic parameter value between the first and second spatial position acquisition devices, including translation and rotation components. For each set of pose increments, a constraint relationship is constructed. For multiple constraint relationships constructed for multiple sets of pose increments, an objective function is created. A nonlinear optimization algorithm is used to solve the objective function to obtain the relative positional relationship between the first and second spatial position acquisition devices at time i, i.e., the extrinsic parameter value X.
[0081] Figure 4This is a flowchart illustrating another vehicle spatial calibration method provided in an embodiment of this application. Figure 4 As shown, according to some embodiments of this application, optionally, before starting the first space calibration mode in S101, the space calibration method for vehicles provided in this application embodiment further includes the following steps S401 to S403.
[0082] S401. Determine whether the controller in the vehicle supports running the first space calibration mode.
[0083] Determine whether the controller in the vehicle supports running the online spatial calibration mode.
[0084] S402. If the controller supports running the first space calibration mode, start the first space calibration mode.
[0085] If the controller supports running the online spatial calibration mode, start the online spatial calibration mode and execute step S101 to obtain the first pose data at at least two time points and the second pose data at at least two time points.
[0086] S403. If the controller does not support running the first space calibration mode, start the second space calibration mode.
[0087] If the controller in the vehicle does not support running the online spatial calibration mode, then the second spatial calibration mode, namely the offline spatial calibration mode, will be activated.
[0088] This application integrates online and offline spatial calibration modes, allowing users to choose the appropriate spatial calibration mode based on specific circumstances.
[0089] Based on the vehicle spatial calibration method provided in the above embodiments, this application also provides specific implementation methods of the vehicle spatial calibration device. Please refer to the following embodiments.
[0090] First see Figure 5 The vehicle space calibration device 50 provided in this application embodiment includes the following modules:
[0091] The acquisition module 501 is used to acquire first pose data at at least two moments and second pose data at at least two moments when the first spatial calibration mode is started. The first pose data is the pose data acquired by the first spatial position acquisition device in the vehicle, and the second pose data is the pose data acquired by the second spatial position acquisition device in the vehicle.
[0092] The calculation module 502 is used to calculate, for any i-th time in at least two time moments, the first pose data of the first spatial position acquisition device at the i-th time relative to the initial time and the second pose data of the second spatial position acquisition device at the i-th time relative to the initial time, based on the first pose data at the i-th time and the second pose data at the i-th time, where i is a positive integer.
[0093] The determination module 503 is used to determine the relative position relationship between the first spatial position acquisition device and the second spatial position acquisition device at the i-th time based on the first pose increment corresponding to the i-th time and the second pose increment corresponding to the i-th time.
[0094] The calibration module 504 is used to take the relative position relationship corresponding to the next time moment as the target relative position relationship when the difference between the relative position relationship corresponding to the previous time moment and the relative position relationship corresponding to the next time moment is greater than a first preset threshold.
[0095] The vehicle spatial calibration device of this application embodiment, when activating a first spatial calibration mode, acquires first pose data at at least two time points and second pose data at at least two time points; for any i-th time point among the at least two time points, based on the first pose data at the i-th time point and the second pose data at the i-th time point, calculates the first pose increment of the first spatial position acquisition device at the i-th time point relative to the initial time point and the second pose increment of the second spatial position acquisition device at the i-th time point relative to the initial time point; based on the first pose increment and the second pose increment corresponding to the i-th time point, determines the relative positional relationship between the first spatial position acquisition device and the second spatial position acquisition device at the i-th time point; when the difference between the relative positional relationship corresponding to the previous time point and the relative positional relationship corresponding to the next time point among the at least two time points is greater than a first preset threshold, the relative positional relationship corresponding to the next time point is taken as the target relative positional relationship. The system acquires first pose data in real time using a first spatial position acquisition device and second pose data in real time using a second spatial position acquisition device. An online spatial calibration mode is used to determine the relative positional relationship between the first and second spatial position acquisition devices at the same time. This allows for online calibration of the two spatial position acquisition devices during vehicle operation, effectively suppressing the influence of noise during calibration and achieving high-precision extrinsic parameter calibration. By continuously acquiring multiple sets of pose data and iteratively cyclically, the position between the two spatial position acquisition devices to be calibrated is detected in real time. When a sensor position shift occurs—that is, when the difference between the relative positional relationship at the previous moment and the relative positional relationship at the next moment exceeds a first preset threshold—the target relative positional relationship is automatically updated. This solves the problem of sensor position shift caused by vehicle vibration affecting extrinsic parameter calibration and enhances the robustness of the extrinsic parameter calibration.
[0096] In some embodiments, the acquisition module 501 specifically includes: a first acquisition submodule, configured to acquire the first pose data and the second pose data at the current time once every preset time interval; when the difference between the relative position relationship corresponding to the previous time and the relative position relationship corresponding to the next time in at least two time intervals is greater than a first preset threshold, the relative position relationship corresponding to the next time interval is taken as the target relative position relationship, specifically including: when the difference between the relative position relationship corresponding to the current time interval and the relative position relationship corresponding to any one of the at least two time intervals is greater than the first preset threshold, the target relative position relationship is updated to the relative position relationship corresponding to the current time interval.
[0097] In some embodiments, the acquisition module 501 may further include: a second acquisition submodule, configured to acquire first pose data at multiple times, second pose data at multiple times, and the confidence level corresponding to each of the second pose data at multiple times; remove the second pose data at a target time and the first pose data at a target time whose confidence level is less than a second preset threshold, to obtain first pose data at at least two times and second pose data at at least two times, wherein the target time is any one or more times among the multiple times.
[0098] In some embodiments, the acquisition module 501 may further include: a third acquisition submodule, configured to acquire, for any given moment, first point cloud data collected by the first spatial position acquisition device itself and second point cloud data collected by a third spatial position acquisition device in the vehicle, wherein the third spatial position acquisition device and the first spatial position acquisition device are spatial position acquisition devices of the same type; using the first spatial position acquisition device as a reference, and according to a predetermined positional relationship between the first spatial position acquisition device and the third spatial position acquisition device, convert the second point cloud data collected by the third spatial position acquisition device to the first spatial coordinate system where the first spatial position acquisition device is located; summarize the converted second point cloud data and the first point cloud data to obtain the summarized target point cloud data; and determine the first pose data based on the target point cloud data.
[0099] In some embodiments, the third acquisition submodule specifically includes: a first matching unit, configured to match the target point cloud data with the point cloud map when a point cloud map exists, to obtain the first pose data corresponding to the target point cloud data; and to determine the first pose data corresponding to the target point cloud data in real time based on the running trajectory of the first spatial position acquisition device when a point cloud map does not exist.
[0100] In some embodiments, the calculation module 502 specifically includes: a first calculation submodule, configured to calculate the first pose increment corresponding to the i-th time moment and the second pose increment corresponding to the i-th time moment according to the following expression:
[0101]
[0102]
[0103] in, This represents the first pose increment corresponding to the i-th time step. This represents the increment of the second pose at time i. This represents the first pose data at time i. This represents the second pose data at time i. This represents the pose increment of the first spatial position acquisition device at the initial moment. This represents the pose increment of the second spatial position acquisition device at the initial moment, and -1 represents the inverse matrix operation.
[0104] In some embodiments, the acquisition module 501 may further include: a fourth acquisition submodule, configured to acquire, for any i-th time moment, two sets of pose data adjacent to the i-th time moment acquired by the second spatial position acquisition device; and process the two sets of pose data based on an interpolation algorithm to obtain the second pose data at the i-th time moment.
[0105] In some embodiments, the determining module 503 specifically includes: a first determining submodule, configured to create an objective function based on the first pose increment corresponding to the i-th time moment and the second pose increment corresponding to the i-th time moment; and to solve the objective function based on a nonlinear optimization algorithm to obtain the relative positional relationship between the first spatial position acquisition device and the second spatial position acquisition device at the i-th time moment; wherein, the expression of the objective function is:
[0106]
[0107] in, This represents the first pose increment corresponding to the i-th time step. Let X represent the second pose increment at the i-th time, and let X represent the relative positional relationship between the first spatial position acquisition device and the second spatial position acquisition device at the i-th time.
[0108] In some embodiments, the space calibration device 50 for the vehicle may further include: a determination module, configured to determine whether the controller in the vehicle supports running a first space calibration mode; if the controller supports running the first space calibration mode, to start the first space calibration mode; if the controller does not support running the first space calibration mode, to start a second space calibration mode; wherein the first space calibration mode includes an online space calibration mode, and the second space calibration mode includes an offline space calibration mode.
[0109] Figure 5 Each module / unit in the device shown has the function of implementing each step in the spatial calibration method for vehicles provided in the above method embodiments, and can achieve the corresponding technical effects. For the sake of brevity, it will not be described in detail here.
[0110] It should be noted that the exemplary embodiments mentioned in this application describe methods or systems based on a series of steps or apparatus. However, this application is not limited to the order of the above steps; that is, the steps can be performed in the order mentioned in the embodiments, or in a different order, or several steps can be performed simultaneously.
[0111] The aspects of this application have been described above with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It should be understood that each block in the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, 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, or other programmable data processing apparatus to produce a machine such that these instructions, executable via the processor of the computer or other programmable data processing apparatus, enable the implementation of the functions / actions specified in one or more blocks of the flowchart illustrations and / or block diagrams. Such a processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor, or a field-programmable logic circuit. It is also understood that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can also be implemented by dedicated hardware performing the specified functions or actions, or can be implemented by a combination of dedicated hardware and computer instructions.
[0112] The above description is merely a specific implementation of this application. Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, modules, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here. It should be understood that the protection scope of this application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in this application, and these modifications or substitutions should all be covered within the protection scope of this application.
Claims
1. A spatial calibration method for a vehicle, characterized in that, include: Determine whether the controller in the vehicle supports running the first spatial calibration mode; If the controller supports running the first spatial calibration mode, the first spatial calibration mode is started; If the controller does not support running the first spatial calibration mode, the second spatial calibration mode is activated; The first spatial calibration mode includes an online spatial calibration mode, and the second spatial calibration mode includes an offline spatial calibration mode. When the first spatial calibration mode is activated, acquire the first pose data at at least two time points and the second pose data at at least two time points; Wherein, the first pose data is pose data acquired by the first spatial position acquisition device in the vehicle, and the second pose data is pose data acquired by the second spatial position acquisition device in the vehicle. The acquisition of the first pose data at at least two time points includes: For any given moment, acquire the first point cloud data collected by the first spatial position acquisition device itself and the second point cloud data collected by the third spatial position acquisition device in the vehicle, wherein the third spatial position acquisition device and the first spatial position acquisition device are the same type of spatial position acquisition device. Using the first spatial location acquisition device as a reference, and based on the predetermined positional relationship between the first spatial location acquisition device and the third spatial location acquisition device, the second point cloud data acquired by the third spatial location acquisition device is converted to the first spatial coordinate system where the first spatial location acquisition device is located. The converted second point cloud data is combined with the first point cloud data to obtain the combined target point cloud data; The target point cloud data and the second pose data are subjected to distortion correction processing to obtain distorted target point cloud data and distorted second pose data. The first pose data is determined based on the distortion-free target point cloud data. For any i-th time among the at least two time points, based on the first pose data at the i-th time point and the second pose data at the i-th time point, calculate the first pose increment of the first spatial position acquisition device at the i-th time point relative to the initial time point and the second pose increment of the second spatial position acquisition device at the i-th time point relative to the initial time point, where i is a positive integer; Based on the first pose increment corresponding to the i-th time and the second pose increment corresponding to the i-th time, the relative positional relationship between the first spatial position acquisition device and the second spatial position acquisition device at the i-th time is determined; When the difference between the relative position relationship corresponding to the previous time and the relative position relationship corresponding to the next time in the at least two time periods is greater than a first preset threshold, the relative position relationship corresponding to the next time period is taken as the target relative position relationship.
2. The method according to claim 1, characterized in that, The acquisition of the first pose data at at least two time points and the second pose data at at least two time points specifically includes: The first pose data and the second pose data at the current time are acquired once every preset time interval; When the difference between the relative positional relationship corresponding to the previous time step and the relative positional relationship corresponding to the next time step in the at least two time steps is greater than a first preset threshold, the relative positional relationship corresponding to the next time step is taken as the target relative positional relationship, specifically including: When the difference between the relative position relationship corresponding to the current time and the relative position relationship corresponding to any one of the at least two times is greater than the first preset threshold, the target relative position relationship is updated to the relative position relationship corresponding to the current time.
3. The method according to claim 1, characterized in that, The acquisition of the first pose data at at least two time points and the second pose data at at least two time points specifically includes: Acquire the first pose data at multiple time points, the second pose data at multiple time points, and the confidence level corresponding to each of the second pose data at multiple time points; Remove the second pose data and the first pose data of the target time when the confidence level is less than the second preset threshold, and obtain the first pose data and the second pose data of the at least two times. The target time is any one or more of the plurality of times.
4. The method according to claim 1, characterized in that, The step of determining the first pose data based on the distortion-free target point cloud data specifically includes: In the presence of a point cloud map, the target point cloud data is matched with the point cloud map to obtain the first pose data corresponding to the target point cloud data; In the absence of the point cloud map, the first pose data corresponding to the target point cloud data is determined in real time based on the running trajectory of the first spatial position acquisition device.
5. The method according to claim 1, characterized in that, The step of calculating the first pose increment of the first spatial position acquisition device at the i-th time relative to the initial time and the second pose increment of the second spatial position acquisition device at the i-th time relative to the initial time, based on the first pose data at the i-th time and the second pose data at the i-th time, specifically includes: Calculate the first pose increment at the i-th time step and the second pose increment at the i-th time step according to the following expressions: in, This represents the increment of the first pose corresponding to the i-th time moment. This represents the second pose increment corresponding to the i-th time moment. This represents the first pose data at the i-th time moment. This represents the second pose data at the i-th time moment. This represents the pose increment of the first spatial position acquisition device at the initial moment. This represents the pose increment of the second spatial position acquisition device at the initial moment, and -1 represents the inverse matrix operation.
6. The method according to claim 1, characterized in that, The acquisition of the second pose data at at least two time points specifically includes: For any i-th moment, acquire the two sets of pose data that are adjacent to the i-th moment, acquired by the second spatial position acquisition device; The two sets of pose data are processed using an interpolation algorithm to obtain the second pose data at the i-th time moment.
7. The method according to claim 1, characterized in that, The step of determining the relative positional relationship between the first spatial position acquisition device and the second spatial position acquisition device at the i-th time based on the first pose increment corresponding to the i-th time and the second pose increment corresponding to the i-th time specifically includes: A target function is created based on the first pose increment corresponding to the i-th time step and the second pose increment corresponding to the i-th time step. The objective function is solved using a nonlinear optimization algorithm to obtain the relative positional relationship between the first spatial position acquisition device and the second spatial position acquisition device at the i-th time. The expression for the objective function is: in, This represents the increment of the first pose corresponding to the i-th time moment. X represents the second pose increment corresponding to the i-th time moment, and X represents the relative positional relationship between the first spatial position acquisition device and the second spatial position acquisition device at the i-th time moment.
8. A spatial calibration device for a vehicle, characterized in that, include: The determination module is used to determine whether the controller in the vehicle supports running the first spatial calibration mode; If the controller supports running the first spatial calibration mode, the first spatial calibration mode is started; if the controller does not support running the first spatial calibration mode, the second spatial calibration mode is started; the calibration mode includes an offline spatial calibration mode; wherein, the first spatial calibration mode includes an online spatial calibration mode, and the second spatial calibration mode includes an offline spatial calibration mode. The acquisition module is used to acquire first pose data at at least two time points and second pose data at at least two time points when the first spatial calibration mode is activated; The acquisition module includes a third acquisition submodule, which is used to acquire, at any given time, first point cloud data collected by the first spatial position acquisition device and second point cloud data collected by the third spatial position acquisition device in the vehicle; using the first spatial position acquisition device as a reference, and according to a predetermined positional relationship between the first and third spatial position acquisition devices, convert the second point cloud data collected by the third spatial position acquisition device to the first spatial coordinate system where the first spatial position acquisition device is located; summarize the converted second point cloud data and the first point cloud data to obtain summarized target point cloud data; perform distortion correction processing on the target point cloud data and the second pose data to obtain distorted target point cloud data and distorted second pose data; and determine first pose data based on the distorted target point cloud data. Wherein, the first pose data is pose data acquired by the first spatial position acquisition device in the vehicle, and the second pose data is pose data acquired by the second spatial position acquisition device in the vehicle. The calculation module is used to calculate, for any i-th time of the at least two time points, the first pose increment of the first spatial position acquisition device at the i-th time point relative to the initial time point and the second pose increment of the second spatial position acquisition device at the i-th time point relative to the initial time point, based on the first pose data at the i-th time point and the second pose data at the i-th time point, where i is a positive integer. The determining module is used to determine the relative positional relationship between the first spatial position acquisition device and the second spatial position acquisition device at the i-th time based on the first pose increment corresponding to the i-th time and the second pose increment corresponding to the i-th time. The calibration module is used to take the relative position relationship corresponding to the next time moment as the target relative position relationship when the difference between the relative position relationship corresponding to the previous time moment and the relative position relationship corresponding to the next time moment is greater than a first preset threshold.
Citation Information
Patent Citations
Coordinate relation calibration method and device, equipment and medium
CN113759347A
Sensor calibration method and device, vehicle and storage medium
CN115267751A
