Point cloud motion compensation method and apparatus, storage medium, and LiDAR
This application discloses a point cloud motion compensation method and apparatus, a storage medium, and a LiDAR. The method includes: obtaining a millimeter-wave point cloud data frame by a millimeter-wave radar through scanning a preset working region, where each millimeter-wave point cloud data frame includes multiple pieces of millimeter-wave point cloud data, and each piece of millimeter-wave point cloud data includes a timestamp and a motion parameter of a target object; obtaining a LiDAR point cloud data frame by the LiDAR through scanning a preset working region, where each LiDAR point cloud data frame includes multiple pieces of LiDAR point cloud data, and each piece of LiDAR point cloud data includes a timestamp and spatial position coordinates of the target object; fusing the millimeter-wave point cloud data with the LiDAR point cloud data; and performing attitude compensation on the LiDAR point cloud data based on the fused data.
1 . A point cloud motion compensation method, applied to a LiDAR, wherein the method comprises:
obtaining a millimeter-wave point cloud data frame by a millimeter-wave radar through scanning a preset working region, wherein the millimeter-wave point cloud data frame comprises multiple pieces of millimeter-wave point cloud data, and each piece of the millimeter-wave point cloud data comprises a timestamp and a motion parameter of a target object;
obtaining a LiDAR point cloud data frame by the LiDAR through scanning a preset working region, wherein the point cloud data frame comprises multiple pieces of LiDAR point cloud data, and each piece of the LiDAR point cloud data comprises a timestamp and spatial position coordinates of the target object;
fusing the millimeter-wave point cloud data with the LiDAR point cloud data to obtain fused data; and
performing attitude compensation on the LiDAR point cloud data based on the fused data, wherein
the LiDAR and the millimeter-wave radar have overlapped scanning regions and the overlapped scanning regions cover the preset working region,
wherein performing the attitude compensation on the LiDAR point cloud data based on the fused data comprises:
when the fused data indicates that the target object is in motion relative to the LiDAR, calculating an attitude compensation volume of the LiDAR point cloud data based on a relative speed difference of the target object relative to the LiDAR, and performing attitude compensation on the LiDAR point cloud data based on the attitude compensation volume and the spatial position coordinates of the target object; or
when the fused data indicates that the target object is in a stationary status relative to the LiDAR, skipping performing attitude compensation on the LiDAR point cloud data.
2 . The point cloud motion compensation method according to claim 1 , wherein before obtaining a millimeter-wave point cloud data frame by a millimeter-wave radar through scanning a preset working region, the method further comprises:
performing external reference calibration and time synchronization on the millimeter-wave radar and the LiDAR.
3 . The point cloud motion compensation method according to claim 1 , wherein when the fused data indicates that the target object is in motion relative to the LiDAR, calculating an attitude compensation volume of the LiDAR point cloud data based on a relative speed difference of the target object relative to the LiDAR comprises:
calculating the relative speed difference of the target object relative to the LiDAR based on motion information of the target object and motion information of the LiDAR in the fused data; and
when the relative speed difference is greater than a speed difference threshold, calculating the attitude compensation volume of the LiDAR point cloud data based on the relative speed difference.
4 . The point cloud motion compensation method according to claim 3 , wherein the relative speed difference comprises a relative angular speed difference and a relative linear speed difference, and when the relative speed difference is greater than a speed difference threshold, calculating the attitude compensation volume of the LiDAR point cloud data based on the relative speed difference comprises at least one of the following:
when the relative angular speed difference is less than or equal to an angular speed threshold and a current linear speed difference is greater than a linear speed threshold, calculating the attitude compensation volume of the LiDAR point cloud data based on the current linear speed difference;
when a current relative angular speed difference is greater than an angular speed threshold and a current relative linear speed difference is less than or equal to a linear speed threshold, calculating the attitude compensation volume of the LiDAR point cloud data based on the current relative angular speed difference; or
when a current relative angular speed difference is less than or equal to an angular speed threshold and a current linear speed difference is less than or equal to a linear speed threshold, skipping performing attitude compensation.
5 . The point cloud motion compensation method according to claim 1 , wherein the relative speed difference comprises a relative speed difference in a horizontal direction and a relative speed difference in a vertical direction, and calculating an attitude compensation volume of the LiDAR point cloud data based on a relative speed difference of the target object relative to the LiDAR comprises:
calculating a horizontal attitude compensation volume of the LiDAR point cloud data based on the relative speed difference of the target object relative to the LiDAR in the horizontal direction; and
calculating a vertical attitude compensation volume of the LiDAR point cloud data based on the relative speed difference of the target object relative to the LiDAR in the vertical direction.
6 . The point cloud motion compensation method according to claim 1 , wherein before performing attitude compensation on the LiDAR point cloud data, the method further comprises:
clustering the fused data; and
determining a motion status of the target object relative to the LiDAR based on clustered fused data.
7 . A point cloud motion compensation apparatus, applied to a LiDAR, wherein the apparatus comprises:
a first data obtaining module, configured to obtain a millimeter-wave point cloud data frame by a millimeter-wave radar through scanning a preset working region, wherein the millimeter-wave point cloud data frame comprises multiple pieces of millimeter-wave point cloud data, and each piece of the millimeter-wave point cloud data comprises a timestamp and a motion parameter of a target object;
a second data obtaining module, configured to obtain a LiDAR point cloud data frame by the LiDAR through scanning a preset working region, wherein the point cloud data frame comprises multiple pieces of LiDAR point cloud data, and each piece of the LiDAR point cloud data comprises a timestamp and spatial position coordinates of the target object;
a data fusion module, configured to fuse the millimeter-wave point cloud data with the LiDAR point cloud data to obtain fused data; and
an attitude compensation module, configured to perform attitude compensation on the LiDAR point cloud data based on the fused data, wherein the LiDAR and the millimeter-wave radar have overlapped scanning regions and the overlapped scanning regions cover the preset working region,
wherein performing the attitude compensation on the LiDAR point cloud data based on the fused data comprises:
when the fused data indicates that the target object is in motion relative to the LiDAR, calculating an attitude compensation volume of the LiDAR point cloud data based on a relative speed difference of the target object relative to the LiDAR, and performing attitude compensation on the LiDAR point cloud data based on the attitude compensation volume and the spatial position coordinates of the target object; or
when the fused data indicates that the target object is in a stationary status relative to the LiDAR, skipping performing attitude compensation on the LiDAR point cloud data.
8 . A non-transitory computer readable storage medium storing a plurality of instructions, wherein the instructions are capable of being loaded by a processor to perform steps of the method according to claim 1 .