Disclosure of Invention
The embodiment of the application aims to provide a point cloud map updating method, a point cloud map updating device, electronic equipment and a positioning system, so that a point cloud map is more accurate. The specific technical scheme is as follows:
in a first aspect, an embodiment of the present application provides a method for updating a point cloud map, where the method includes:
Acquiring a laser radar point cloud of a current scene scanned by a laser radar and a pre-stored point cloud map of the current scene, wherein the laser radar point cloud comprises a plurality of scanning points, and the point cloud map comprises a plurality of map points;
comparing the laser radar point cloud with the point cloud map to determine the difference points of the laser radar point cloud and the point cloud map;
Determining the observation probability of each difference point, wherein the observation probability represents the probability that one scanning point and one map point are the same point, the initial value of the observation probability is set for the map point when one map point is added in the point cloud map, and the initial value of the observation probability is reduced after the laser radar does not scan the scanning point which is the same point as the map point each time;
and deleting the difference points with the observation probability smaller than a preset threshold value in the point cloud map to obtain an updated point cloud map.
Optionally, after the step of acquiring the laser radar point cloud of the current scene scanned by the laser radar, the method further includes:
Acquiring each point cloud mass and current motion data in the laser radar point cloud, wherein a point cloud mass is the minimum unit of the laser radar point cloud;
Calculating the pose transformation relation of each point cloud mass relative to the initial point cloud mass by using the current motion data;
according to the pose transformation relationship, each point cloud mass is converted into a coordinate system of an initial point cloud mass;
and splicing the converted points cloud mass to obtain updated laser radar point clouds.
Optionally, after the step of acquiring the laser radar point cloud of the current scene scanned by the laser radar, the method further includes:
Acquiring point cloud information of a laser radar point cloud;
Based on the point cloud information, carrying out semantic segmentation on the laser radar point cloud to obtain semantic types of all scanning points in the laser radar point cloud;
identifying a target scan point having a specified semantic type, wherein the specified semantic type is a semantic type having a motion feature;
and deleting the target scanning point from the laser radar point cloud to obtain an updated laser radar point cloud.
Optionally, the step of comparing the laser radar point cloud with the point cloud map to determine a difference point between the laser radar point cloud and the point cloud map includes:
mapping the laser radar point cloud to a coordinate system to which a point cloud map belongs to obtain each scanning point coordinate in the laser radar point cloud under the coordinate system;
Acquiring coordinates of each map point in a point cloud map;
if only one map point or only one scanning point is determined at a position in the coordinate system according to the coordinates of each map point and the coordinates of each scanning point, determining the point at the position as a differential point.
Optionally, the step of determining the observation probability of each difference point includes:
according to the coordinates of each map point and the coordinates of each scanning point, respectively calculating the distance between each map point and each scanning point in the coordinate system;
For any difference point, if the difference point is a map point and no scanning point with the distance smaller than a preset distance threshold exists, reducing the observation probability of the difference point according to a preset reduction strategy;
For any difference point, if the difference point is a scanning point and no map point with the distance smaller than a preset distance threshold exists, adding a map point at the corresponding position of the difference point coordinate in the point cloud map, and initializing the observation probability of the difference point;
For any difference point, if the difference point is a map point and a scanning point with a distance smaller than a preset distance threshold exists between the difference point and the map point, the observation probability of the difference point is increased according to a preset increasing strategy.
Optionally, before the step of mapping the lidar point cloud to the coordinate system to which the point cloud map belongs to obtain the coordinates of each scanning point in the lidar point cloud in the coordinate system, the method further includes:
acquiring a predicted pose relationship and radar coordinates of each scanning point in a laser radar point cloud;
Converting each scanning point in the laser radar point cloud to a coordinate system to which a point cloud map belongs according to the predicted pose relationship to obtain predicted coordinates of each scanning point;
For any scanning point, searching an associated map point closest to the scanning point from a point cloud map according to the predicted coordinates of the scanning point and the coordinates of each map point;
filtering unstable associated map points with unstable characteristics in the found associated map points by using a preset filtering method;
Calculating the relative pose relation between the laser radar point cloud and the point cloud map according to the rest associated map point coordinates and the radar coordinates of each scanning point;
mapping the laser radar point cloud to a coordinate system to which a point cloud map belongs to obtain coordinates of each scanning point in the laser radar point cloud under the coordinate system, wherein the step comprises the following steps:
And according to the relative pose relation, converting each scanning point in the laser radar point cloud to a coordinate system to which the point cloud map belongs, and obtaining the coordinate of each scanning point under the coordinate system.
Optionally, before the step of comparing the lidar point cloud with the point cloud map to determine the difference points of the lidar point cloud and the point cloud map, the method further includes:
Converting the laser radar point cloud and the point cloud map into the same coordinate system to obtain each scanning point coordinate in the laser radar point cloud and each map point coordinate in the point cloud map in the same coordinate system;
Acquiring noise information of a laser radar;
Calculating registration confidence of the laser radar point cloud and the point cloud map by using a preset pose solving function according to the coordinates of each scanning point, the coordinates of each map point and the noise information;
comparing the laser radar point cloud with the point cloud map to determine the difference points of the laser radar point cloud and the point cloud map, wherein the method comprises the following steps:
and if the registration confidence coefficient is larger than a preset confidence coefficient threshold value, executing the step of comparing the laser radar point cloud with the point cloud map to determine the difference points of the laser radar point cloud and the point cloud map.
Optionally, the lidar point cloud comprises a multi-frame lidar point cloud;
before the step of comparing the lidar point cloud with the point cloud map to determine the difference points of the lidar point cloud and the point cloud map, the method further comprises:
and fusing the multi-frame laser radar point clouds to obtain the fused laser radar point clouds.
In a second aspect, an embodiment of the present application provides a point cloud map updating apparatus, including:
the acquisition module is used for acquiring a laser radar point cloud of a current scene scanned by the laser radar and a pre-stored point cloud map of the current scene, wherein the laser radar point cloud comprises a plurality of scanning points, and the point cloud map comprises a plurality of map points;
The comparison module is used for comparing the laser radar point cloud with the point cloud map and determining the difference points of the laser radar point cloud and the point cloud map;
The calculation module is used for determining the observation probability of each difference point, wherein the observation probability represents the probability that one scanning point and one map point are the same point, the initial value of the observation probability is set for the map point when one map point is added in the point cloud map, and the observation probability is reduced after the laser radar does not scan the scanning point which is the same point as the map point each time;
And the updating module is used for deleting the difference points with the observation probability smaller than a preset threshold value in the point cloud map to obtain the updated point cloud map.
Optionally, the apparatus further comprises: a motion compensation module;
The motion compensation module is used for acquiring each point cloud mass and current motion data in the laser radar point cloud, wherein a point cloud mass is a minimum unit of the laser radar point cloud; calculating the pose transformation relation of each point cloud mass relative to the initial point cloud mass by using the current motion data; according to the pose transformation relationship, each point cloud mass is converted into a coordinate system of an initial point cloud mass; and splicing the converted points cloud mass to obtain updated laser radar point clouds.
Optionally, the apparatus further comprises: a semantic segmentation module;
The semantic segmentation module is used for acquiring point cloud information of the laser radar point cloud; based on the point cloud information, carrying out semantic segmentation on the laser radar point cloud to obtain semantic types of all scanning points in the laser radar point cloud; identifying a target scan point having a specified semantic type, wherein the specified semantic type is a semantic type having a motion feature; and deleting the target scanning point from the laser radar point cloud to obtain an updated laser radar point cloud.
Optionally, the comparison module is specifically configured to:
mapping the laser radar point cloud to a coordinate system to which a point cloud map belongs to obtain each scanning point coordinate in the laser radar point cloud under the coordinate system;
Acquiring coordinates of each map point in a point cloud map;
if only one map point or only one scanning point is determined at a position in the coordinate system according to the coordinates of each map point and the coordinates of each scanning point, determining the point at the position as a differential point.
Optionally, the computing module is specifically configured to:
according to the coordinates of each map point and the coordinates of each scanning point, respectively calculating the distance between each map point and each scanning point in the coordinate system;
For any difference point, if the difference point is a map point and no scanning point with the distance smaller than a preset distance threshold exists, reducing the observation probability of the difference point according to a preset reduction strategy;
For any difference point, if the difference point is a scanning point and no map point with the distance smaller than a preset distance threshold exists, adding a map point at the corresponding position of the difference point coordinate in the point cloud map, and initializing the observation probability of the difference point;
For any difference point, if the difference point is a map point and a scanning point with a distance smaller than a preset distance threshold exists between the difference point and the map point, the observation probability of the difference point is increased according to a preset increasing strategy.
Optionally, the apparatus further comprises: a laser positioning module;
the laser positioning module is used for acquiring a predicted pose relationship and radar coordinates of each scanning point in the laser radar point cloud; converting each scanning point in the laser radar point cloud to a coordinate system to which a point cloud map belongs according to the predicted pose relationship to obtain predicted coordinates of each scanning point; for any scanning point, searching an associated map point closest to the scanning point from a point cloud map according to the predicted coordinates of the scanning point and the coordinates of each map point; filtering unstable associated map points with unstable characteristics in the found associated map points by using a preset filtering method; calculating the relative pose relation between the laser radar point cloud and the point cloud map according to the rest associated map point coordinates and the radar coordinates of each scanning point;
the comparison module is specifically used for converting each scanning point in the laser radar point cloud to a coordinate system to which the point cloud map belongs according to the relative pose relationship, so as to obtain the coordinate of each scanning point under the coordinate system.
Optionally, the apparatus further comprises: a confidence coefficient calculating module;
The confidence coefficient calculating module is used for converting the laser radar point cloud and the point cloud map into the same coordinate system to obtain each scanning point coordinate in the laser radar point cloud and each map point coordinate in the point cloud map in the same coordinate system; acquiring noise information of a laser radar; calculating registration confidence of the laser radar point cloud and the point cloud map by using a preset pose solving function according to the coordinates of each scanning point, the coordinates of each map point and the noise information;
the comparison module is specifically configured to compare the laser radar point cloud with the point cloud map if the registration confidence coefficient is greater than a preset confidence coefficient threshold value, and determine a difference point between the laser radar point cloud and the point cloud map.
Optionally, the lidar point cloud comprises a multi-frame lidar point cloud;
The apparatus further comprises: a fusion module;
and the fusion module is used for fusing the multi-frame laser radar point clouds to obtain fused laser radar point clouds.
In a third aspect, an embodiment of the present application provides an electronic device, including a processor and a memory, where the memory stores machine executable instructions executable by the processor, where the machine executable instructions are loaded and executed by the processor to implement the method provided by the first aspect of the embodiment of the present application.
In a fourth aspect, embodiments of the present application provide a machine-readable storage medium having stored thereon machine-executable instructions which, when loaded and executed by a processor, implement the method provided by the first aspect of the embodiments of the present application.
In a fifth aspect, an embodiment of the present application provides a positioning system, including an electronic device and a lidar;
The laser radar is used for scanning the laser radar point cloud of the current scene and sending the laser radar point cloud to the electronic equipment;
The electronic equipment is used for receiving the laser radar point cloud sent by the laser radar and acquiring a pre-stored point cloud map of the current scene, wherein the laser radar point cloud comprises a plurality of scanning points, and the point cloud map comprises a plurality of map points; comparing the laser radar point cloud with the point cloud map to determine the difference points of the laser radar point cloud and the point cloud map; determining the observation probability of each difference point, wherein the observation probability represents the probability that one scanning point and one map point are the same point, the initial value of the observation probability is set for the map point when one map point is added in the point cloud map, and the initial value of the observation probability is reduced after the laser radar does not scan the scanning point which is the same point as the map point each time; deleting the difference points with the observation probability smaller than a preset threshold value in the point cloud map to obtain an updated point cloud map; and performing target positioning by using the point cloud map.
The embodiment of the application provides a point cloud map updating method, a device, electronic equipment and a positioning system, wherein the point cloud map updating method comprises the following steps: obtaining a laser radar point cloud of a current scene scanned by a laser radar and a pre-stored point cloud map of the current scene, comparing the laser radar point cloud with the point cloud map, determining the difference points of the laser radar point cloud and the point cloud map, determining the observation probability of each difference point, and deleting the difference points of which the observation probability is smaller than a preset threshold value in the point cloud map to obtain an updated point cloud map.
By applying the embodiment of the application, the difference points of the laser radar point cloud and the point cloud map of the current scene are determined by comparing the laser radar point cloud of the current scene obtained by scanning with the pre-stored point cloud map of the current scene, the observation probability of each difference point is determined, the probability that one scanning point and one map point are the same point is represented by the observation probability, one map point is added to the initial value of the observation probability when the map point is added to the point cloud map, the map point is reduced after each time the laser radar does not scan the scanning point which is the same point as the map point, namely, if one map point in the point cloud map is the difference point with the laser radar point cloud, and the observation probability of the map point is smaller, the probability that the scanning point associated with the map point exists in the actual scene is lower, and if the observation probability of the map point is smaller than the preset threshold value, the map point does not exist in the actual scene, so that the map point is deleted from the point cloud map, the point cloud map is updated, and the updated point cloud is more in accordance with the actual scene and more accurate.
Detailed Description
The following description of the embodiments of the present application will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present application, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
In order to obtain a more accurate point cloud map, the embodiment of the application provides a point cloud map updating method, a device, electronic equipment and a positioning system. The method for updating the point cloud map provided by the embodiment of the application is first described below.
The execution main body of the point cloud map updating method provided by the embodiment of the application can be a control device on mobile equipment such as an unmanned automobile, a mobile robot and the like, and the control device is used for realizing control such as automatic driving of the automobile and automatic running of the robot; the execution main body can also be a background server for realizing the control of automatic driving of the automobile, automatic running of the robot and the like, and the background server has the functions of updating a point cloud map, planning a running path, issuing the running path and the like. The execution subject of the point cloud map updating method provided by the embodiment of the present application is not particularly limited, and the implementation manner of the point cloud map updating method provided by the embodiment of the present application may be at least one manner of software, a hardware circuit and a logic circuit provided in the electronic device.
As shown in fig. 1, the method for updating a point cloud map provided by the embodiment of the application may include the following steps.
S101, acquiring a laser radar point cloud of a current scene scanned by a laser radar and a pre-stored point cloud map of the current scene, wherein the laser radar point cloud comprises a plurality of scanning points, and the point cloud map comprises a plurality of map points.
S102, comparing the laser radar point cloud with the point cloud map to determine the difference points of the laser radar point cloud and the point cloud map.
S103, determining the observation probability of each difference point, wherein the observation probability represents the probability that one scanning point and one map point are the same point, the initial value of the observation probability is set for the map point when one map point is added in the point cloud map, and the observation probability is reduced after the laser radar does not scan the scanning point which is the same point as the map point each time.
And S104, deleting the difference points with the observation probability smaller than a preset threshold value in the point cloud map to obtain an updated point cloud map.
By applying the embodiment of the application, the difference points of the laser radar point cloud and the point cloud map of the current scene are determined by comparing the laser radar point cloud of the current scene obtained by scanning with the pre-stored point cloud map of the current scene, the observation probability of each difference point is determined, the probability that one scanning point and one map point are the same point is represented by the observation probability, one map point is added to the initial value of the observation probability when the map point is added to the point cloud map, the map point is reduced after each time the laser radar does not scan the scanning point which is the same point as the map point, namely, if one map point in the point cloud map is the difference point with the laser radar point cloud, and the observation probability of the map point is smaller, the probability that the map point is associated with the map point in the actual scene is lower, and if the observation probability of the map point is smaller than a preset threshold value, the map point is not present in the actual scene is represented, the map point is deleted from the point cloud map, the map point is updated, the point cloud map is more in line with the actual scene, the point is more accurate, and the cloud can be positioned more accurately.
The point cloud map of the current scene is a map established based on the point cloud information of the current scene by utilizing a preset positioning mapping method to obtain the point cloud information of the current scene. The positioning mapping method mentioned here may be mapping methods such as SLAM (Simultaneous Localization AND MAPPING, synchronous mapping and positioning), L-SLAM (Lidar-Simultaneous Localization AND MAPPING, laser synchronous mapping and positioning), etc. The current scene is a scene where the mobile device to be positioned is currently located, such as a park, a parking lot, a factory, a production line, etc. The point cloud map includes a plurality of map points, and one map point or a combination of a plurality of map points characterizes one object, such as a building, an obstacle, etc., in an actual scene. The laser radar point cloud is point cloud data scanned by the laser radar in the current scene. In order to ensure the real-time performance of positioning, the obtained laser radar point cloud is generally the current frame laser radar point cloud scanned in real time.
After the laser radar point cloud and the point cloud map are obtained, the laser radar point cloud and the point cloud map are required to be compared, and the difference points of the laser radar point cloud and the point cloud map are determined. The comparison process is to judge whether a point exists in the point cloud of the laser radar or in the point cloud map, and if a point exists in the point cloud of the laser radar or in the point cloud map, the point is the difference point between the point cloud of the laser radar and the point cloud map. The specific comparison process can be to identify whether the same type of points exist in the laser radar point cloud and the point cloud map in a type identification mode, and if one type of points exist in the laser radar point cloud only or exist in the point cloud map only, the point is a difference point between the laser radar point cloud and the point cloud map. Or in the comparison process, whether the scanning point and the map point coincide with each other at the same position point after the mapping is judged by mapping the laser radar point cloud to the point cloud map, and if one position point does not coincide with the scanning point and the map point, namely the position point only has the scanning point or the map point, the position point is a difference point between the laser radar point cloud and the point cloud map.
Alternatively, S102 may be specifically implemented as follows: mapping the laser radar point cloud to a coordinate system to which a point cloud map belongs to obtain each scanning point coordinate in the laser radar point cloud under the coordinate system; acquiring coordinates of each map point in a point cloud map; if only one map point or only one scanning point is determined at a position in the coordinate system according to the coordinates of each map point and the coordinates of each scanning point, determining the point at the position as a differential point.
By mapping the laser radar point cloud to the coordinate system to which the point cloud map belongs, the scanning points in the laser radar point cloud can be mapped to the coordinate system identical to the map points in the point cloud map, so that the scanning points and the map points have uniform coordinates, and a specific mapping mode can be directly coordinate mapping or can be realized through conversion of a certain pose conversion relation, and a specific mapping process is detailed in the following embodiments and is not repeated here. Through the mapping process from the laser radar point cloud to the coordinate system of the point cloud map, the coordinates of each scanning point in the laser radar point cloud can be obtained under the coordinate system, and the coordinates of each map point can be directly read from the point cloud map, and the coordinates of each scanning point and the coordinates of each map point belong to the same coordinate system.
After obtaining the coordinates of each scanning point and the coordinates of each map point, it can be determined whether the scanning point and the map point coincide or not according to the coordinates of each scanning point and the coordinates of each map point, if the coordinates of one scanning point are the same as those of one map point, it can be determined that the scanning point coincides with the map point, if there is only one map point or only one scanning point at a position, that is, if there is no coordinate of any map point for one scanning point is the same as it is, it can be determined that the scanning point is a difference point, and if there is no coordinate of any scanning point for one map point is the same as it is, it can be determined that the map point is a difference point.
The difference points are points which exist in the laser radar point cloud and do not exist in the point cloud map, or points which exist in the point cloud map and do not exist in the laser radar point cloud, or the same points which have differences in positions in the laser radar point cloud and the point cloud map, and the probability of existence of the scanning point or the map point associated with each difference point can be known by determining the observation probability of each difference point, and the smaller the probability is, the more the difference point is indicated to appear in the laser radar point cloud or the point cloud map. The initial value of the observation probability is set for a map point when the map point is added in the point cloud map, and the initial value is used for representing the probability of existence of a scanning point associated with the map point in the laser radar point cloud for any map point in the point cloud map. The case of adding map points in a point cloud map includes: if a scanning point is scanned in the laser radar point cloud and a map point which is the same as the scanning point does not exist in the point cloud map, a map point is added at the corresponding position of the scanning point coordinate in the point cloud map; the technical personnel can also artificially add a map point in the point cloud map according to the actual situation.
Alternatively, S103 may be specifically implemented as follows: according to the coordinates of each map point and the coordinates of each scanning point, respectively calculating the distance between each map point and each scanning point in a coordinate system; for any difference point, if the difference point is a map point and no scanning point with the distance smaller than a preset distance threshold exists, reducing the observation probability of the difference point according to a preset reduction strategy; for any difference point, if the difference point is a scanning point and no map point with the distance smaller than a preset distance threshold exists, adding a map point at the corresponding position of the difference point coordinate in the point cloud map, and initializing the observation probability of the difference point; for any difference point, if the difference point is a map point and a scanning point with a distance smaller than a preset distance threshold exists between the difference point and the map point, the observation probability of the difference point is increased according to a preset increasing strategy.
The observation probability of each difference point may be calculated after the laser radar point cloud is mapped to the point cloud map, specifically, based on the distance between the mapped scanning point and the map point. For any map point, if there is no scanning point with a distance from the map point smaller than the preset distance threshold, the point is only shown in the point cloud map, and is not scanned in the current scene, the point is a point which is possibly sampled by mistake before, or because of environmental change, a building is located before the position of the map point, and no result is caused, but in order to avoid the occurrence of the condition of missing sampling when the current sampling is performed, when it is determined that there is no scanning point with a distance from the map point smaller than the preset distance threshold, the map point is not deleted directly from the point cloud map, but the observation probability of the map point is reduced, and in particular, the observation probability of the map point is reduced, which is calculated by using the formula (1).
p(t)=p(t-1)+odd(pc) (1)
Wherein pc is a set parameter.
For any scan point, if there is no map point whose distance from the scan point is smaller than the preset distance threshold, it indicates that the point is scanned in the current scene but not in the point cloud map, in order to ensure the integrity of the point cloud map and avoid missed detection, a map point may be added at a corresponding position of the scan point coordinate in the point cloud map, and according to the initialized observation probability of the differential point, the observation probability of the map point may be set, where the initialized observation probability may be a preset fixed value, and is generally greater than or equal to the preset threshold.
For any map point, if there is a scan point whose distance from the map point is smaller than the preset distance threshold, it is indicated that the scan point and the map point are the same point, and the observation probability of the map point can be increased. Further, the scanning point and the map point may be fused, where the map point may be reserved in the point cloud map, or a new map point coordinate may be obtained by weighting, averaging, or the like according to the scanning point coordinate and the map point coordinate, and a map point is added at the new map point coordinate position in the point cloud map, and the original map point is deleted. The way to increase the observation probability of the map points may be calculated by using the formula (2).
Wherein, p(t) is the current frame observation probability of the map point, p(t-1) is the previous frame observation probability of the map point, odd (p) =log (p (1-p)-1),pa、pb、σd is a set parameter, d is the distance between the scan point and the map point, and the distance is calculated according to the coordinates of the scan point and the coordinates of the map point.
For map points outside the current frame observation range, the original observation probability of the points can be maintained unchanged. In order to ensure the accuracy of laser radar positioning, only map points with the observation probability larger than a certain threshold value can be reserved in the point cloud map, and the map points have associated scanning points in an actual scene, so that the vehicle to be positioned can be accurately positioned.
Therefore, if for a map point, after the laser radar does not scan the scanning point which is the same point as the map point, the observation probability is smaller and smaller until the observation probability is reduced to be smaller than the preset threshold value, the map point is not existed in the actual scene, so that the map point is deleted from the point cloud map, and the update of the point cloud map is realized. And vehicle positioning is performed based on the updated point cloud map, and because map points detected by mistake are deleted from the point cloud map, the point cloud map is more in line with an actual scene, so that the accuracy and the robustness of the obtained positioning result are higher when the vehicle positioning is performed.
Optionally, before S102, the method may further include: converting the laser radar point cloud and the point cloud map into the same coordinate system to obtain each scanning point coordinate in the laser radar point cloud and each map point coordinate in the point cloud map in the same coordinate system; acquiring noise information of a laser radar; and calculating the registration confidence of the laser radar point cloud and the point cloud map by utilizing a preset pose solving function according to the coordinates of each scanning point, the coordinates of each map point and the noise information. If the registration confidence is greater than the preset confidence threshold, then S102 is performed.
After each scanning point coordinate and each map point coordinate are obtained, the registration confidence of the laser radar point cloud and the point cloud map can be calculated according to each scanning point coordinate and each map point coordinate, the registration confidence represents the coincidence degree of the laser radar point cloud and the point cloud map, that is, the higher the number of overlapping of the scanning points in the laser radar point cloud and the map points in the point cloud map, the higher the registration confidence is, and of course, the registration confidence can be determined by parameters such as a normal vector besides the number of overlapping of the scanning points and the map points. The lower the registration confidence coefficient is, the lower the matching degree of the laser radar point cloud and the point cloud map is, the point cloud map updating based on the laser radar point cloud is unnecessary, and the point cloud map updating based on the laser radar point cloud is only performed under the condition that the registration confidence coefficient is larger than a preset confidence coefficient threshold value. When the laser radar point cloud and the point cloud map are converted into the same coordinate system, the laser radar point cloud and the point cloud map can be converted into a polar coordinate system.
The registration confidence level may be specifically calculated as follows:
first, a conversion matrix to be calculated is calculated according to formula (3).
T=argmin{∑i||ni(Tbi-ai||)} (3)
Wherein, T is the transformation matrix to be calculated, ai is the coordinate of the ith scanning point, bi is the coordinate of the ith map point, and ni is the normal vector of ai.
Solving the optimal solution of equation (3), the registration confidence is calculated as in equation (4).
x=argminJ(z,x) (4)
Wherein x is a pose variable to be solved, J is a preset pose solving function, and z is observation.
Formulas (3) and (4) are corresponding relations, x is T, and z is points ai and bi. Covariance calculation formula (5) is used.
Wherein cov (z) is noise information of the laser radar, and cov (x) is registration confidence.
The method is that the noise information of the laser radar is reflected into the noise information of pose solving, for example, the range accuracy of the laser radar has errors, such as about 10cm, and the angle has errors, such as about 0.5 degree. These data can be used to derive cov (z) and solve for cov (x).
Alternatively, the lidar point cloud may comprise a multi-frame lidar point cloud. The multi-frame lidar point cloud referred to herein refers to the lidar point cloud of the current frame and the previous frames of the scan, and before S102, the method may further include: and fusing the multi-frame laser radar point clouds to obtain the fused laser radar point clouds.
For the situation that the multi-frame laser radar point clouds are scanned, firstly, the multi-frame laser radar point clouds are fused, the fusion process is to integrate the coordinates of the same scanning point in the multi-frame laser radar point clouds, and the specific process can be to perform operations such as weighting, averaging and the like on the coordinates of the same scanning point in different frame laser radar point clouds, so as to obtain the fused laser radar point clouds; the fusion mode can also be to only reserve a certain frame of laser radar point cloud. After fusion, the fused laser radar point cloud is compared with the point cloud map.
Based on the embodiment shown in fig. 1, the embodiment of the application also provides a point cloud map updating method, which can comprise the following steps as shown in fig. 2.
S201, acquiring a laser radar point cloud of a current scene scanned by a laser radar, a pre-stored point cloud map of the current scene and current motion data, wherein the laser radar point cloud comprises a plurality of scanning points, and the point cloud map comprises a plurality of map points.
S202, reading each point cloud mass from the laser radar point cloud, wherein the point cloud mass is the minimum unit of the laser radar point cloud.
S203, calculating the pose transformation relation of each point cloud mass relative to the initial point cloud mass by using the current motion data.
S204, according to the pose transformation relation, each point cloud mass is converted into the coordinate system of the initial point cloud mass.
And S205, splicing the converted points cloud mass to obtain updated laser radar point clouds.
S206, comparing the updated laser radar point cloud with the point cloud map to determine the difference points of the laser radar point cloud and the point cloud map.
S207, determining the observation probability of each difference point, wherein the observation probability represents the probability that one scanning point and one map point are the same point, the initial value of the observation probability is set for the map point when one map point is added in the point cloud map, and the observation probability is reduced after the laser radar does not scan the scanning point which is the same point as the map point each time.
And S208, deleting the difference points with the observation probability smaller than a preset threshold value in the point cloud map to obtain an updated point cloud map.
Since there may be distortion of the laser radar point cloud caused by the movement of the vehicle in the scanned laser radar point cloud, motion compensation is required to be performed on the laser radar point cloud to eliminate the distortion, as shown in fig. 3, a process of motion compensation is shown in fig. 3, each point cloud mass (a point cloud mass is a point cloud set in a fixed included angle and is the minimum unit data of laser radar scanning) in the laser radar scanning laser radar point cloud and current movement data (the movement data is data generated in the movement process of a mobile device to be positioned, for example, an IMU (Inertial Measurement Unit, an inertial measurement unit), a wheel speed and the like) are obtained, after each point cloud mass and the current movement data are obtained, motion update is performed, that is, a pose conversion relation of each point cloud mass relative to an initial point cloud mass is calculated by using the current movement data, then motion compensation is performed based on a result of the motion update, each frame of point cloud data corresponds to an initial point cloud mass, the calculated pose conversion relation characterizes the distortion degree of the laser radar point cloud data compared with the initial point cloud data, each point cloud mass is converted to the coordinate of the initial point cloud mass, and the converted point cloud mass can be eliminated after the converted point reaches the coordinate of the initial point 3449, and the point cloud mass can be converted. Because the laser radar has a certain scanning range, when the laser radar is spliced, the points cloud mass in the scanning range are required to be spliced, for example, the scanning range is 360 degrees, the splicing is completed for a circle of points cloud mass in the 360-degree range, the splicing is completed, and the updated laser radar point cloud is obtained. And updating the point-to-point cloud map based on the updated laser radar point-to-point cloud map.
The pose transformation relation is calculated by the following steps: assuming that the pose of the previous frame is Tn-1, the rotation matrix and the translation vector are Rn-1 and Tn-1, respectively, the pose of the current frame is Tn, the rotation matrix and the translation vector are Rn and Tn, the speed between the two frames is v, the angular speed is w (including the rotation axis and the rotation angle), and the time interval is Δt, the pose change amount is:
t=vΔt (6)
R=wΔt (7)
in the formula (7), w is an angular velocity, multiplied by time, and then is a rotation angle, and the rotation angle of the rotating shaft needs to be converted into a rotation matrix.
The current pose is calculated as follows:
tn=Rtn-1+t (8)
Rn=RRn-1 (9)
Based on the embodiment shown in fig. 1, the embodiment of the application also provides a point cloud map updating method, which can comprise the following steps as shown in fig. 4.
S401, acquiring a laser radar point cloud of a current scene scanned by a laser radar and a pre-stored point cloud map of the current scene, wherein the laser radar point cloud comprises a plurality of scanning points, and the point cloud map comprises a plurality of map points.
S402, acquiring point cloud information of the laser radar point cloud, and carrying out semantic segmentation on the laser radar point cloud based on the point cloud information to obtain semantic types of all scanning points in the laser radar point cloud.
S403, identifying target scanning points with specified semantic types, wherein the specified semantic types are semantic types with motion features.
S404, deleting target scanning points from the laser radar point cloud to obtain updated laser radar point cloud.
S405, comparing the updated laser radar point cloud with the point cloud map to determine the difference points of the laser radar point cloud and the point cloud map.
S406, determining the observation probability of each difference point, wherein the observation probability represents the probability that one scanning point and one map point are the same point, the initial value of the observation probability is set for the map point when one map point is added in the point cloud map, and the observation probability is reduced after the laser radar does not scan the scanning point which is the same point as the map point each time.
And S407, deleting the difference points with the observation probability smaller than a preset threshold value in the point cloud map to obtain an updated point cloud map.
In an actual scene, as the objects such as pedestrians, non-motor vehicles and automobiles continuously move, the moving characteristics of the objects enable the scanned corresponding scanning points to be extremely unstable, and the unstable scanning points can cause interference to the positioning accuracy and robustness of the point cloud map. After the laser radar point cloud is obtained, semantic segmentation can be performed on the laser radar point cloud, a traditional neural network can be adopted for a specific semantic segmentation method, and the semantic types of all scanning points in the laser radar point cloud can be obtained through semantic segmentation, wherein the semantic types comprise driving roads, crosswalks, parking lots, other roads, buildings, cars, trucks, bicycles, motorcycles, vegetation, trunks, zones, pedestrians, cyclists, motorcyclists, fences, rods, traffic lights and the like, the target scanning points with the designated semantic types are identified based on semantic segmentation results, the designated semantic types refer to the semantic types with motion characteristics, such as 'mechanically non-people' of pedestrians, cyclists, motorcyclists, cars, trucks, bicycles, motorcycles and the like, and the scanning points are extremely unstable, so that the target scanning points are deleted from the laser radar point cloud, only static and stable scanning points which characterize the buildings, trees and the like are reserved, the laser radar point cloud is updated, and the laser radar point cloud is updated based on the updated subsequently.
Based on the embodiment shown in fig. 1, the embodiment of the application also provides a point cloud map updating method, which can comprise the following steps as shown in fig. 5.
S501, acquiring a laser radar point cloud of a current scene scanned by a laser radar, a pre-stored point cloud map of the current scene, point coordinates of each map in the point cloud map, a predicted pose relationship and radar coordinates of each scanning point in the laser radar point cloud, wherein the laser radar point cloud comprises a plurality of scanning points, and the point cloud map comprises a plurality of map points.
S502, converting each scanning point in the laser radar point cloud to a coordinate system to which the point cloud map belongs according to the predicted pose relationship, and obtaining the predicted coordinates of each scanning point.
S503, for any scan point, searching for the associated map point closest to the scan point from the point cloud map according to the predicted coordinates of the scan point and the coordinates of each map point.
S504, filtering out unstable associated map points with unstable characteristics in the found associated map points by using a preset filtering method.
S505, calculating the relative pose relation between the laser radar point cloud and the point cloud map according to the rest associated map point coordinates and the radar coordinates of each scanning point.
S506, according to the relative pose relation, converting each scanning point in the laser radar point cloud to a coordinate system to which the point cloud map belongs, and obtaining the coordinates of each scanning point under the coordinate system.
S507, if it is determined that there is only one map point or only one scan point at a position in the coordinate system based on the map point coordinates and the scan point coordinates, it is determined that the point at the position is a differential point.
S508, determining the observation probability of each difference point, wherein the observation probability represents the probability that one scanning point and one map point are the same point, the initial value of the observation probability is set for the map point when one map point is added in the point cloud map, and the observation probability is reduced after the laser radar does not scan the scanning point which is the same point as the map point each time.
And S509, deleting the difference points with the observation probability smaller than a preset threshold value in the point cloud map to obtain an updated point cloud map.
In one implementation manner of the embodiment of the application, mapping from the laser radar point cloud to the point cloud map is achieved through conversion of a certain pose conversion relation, a determination process of the pose conversion relation can be called laser positioning, specifically, a laser positioning algorithm comprises an ICP (ITERATIVE CLOSEST POINTS, iteration closest point), an NDT (Normal Distributions Transform, normal distribution transformation) algorithm and the like, and positioning accuracy of the two algorithms can reach a centimeter level. In the following, a laser positioning process is mainly described by taking an ICP algorithm as an example, as shown in fig. 6, radar coordinates of each scanning point in a laser radar point cloud, coordinates of each map point in a point cloud map, and a predicted pose relationship, where the predicted pose relationship includes a rotation matrix and a translation vector. And carrying out coordinate transformation, and converting each scanning point in the laser radar point cloud to a coordinate system to which the point cloud map belongs according to the predicted pose relationship to obtain the predicted coordinates of each scanning point. And then carrying out characteristic association, aiming at any scanning point, searching an associated map point closest to the scanning point from a point cloud map according to the predicted coordinates of the scanning point and the coordinates of each map point, and particularly, when carrying out associated map point search, accelerating the search process by utilizing technologies such as a kd tree (a data structure for dividing k-dimensional space) and the like. And filtering unstable characteristics, namely filtering unstable associated map points with unstable characteristics in each found associated map point by using a preset filtering method, wherein the main filtering method comprises normal vector filtering, distance filtering and the like, namely eliminating the associated map points when pose solving is carried out if the normal vector of the current scanning point and the normal vector included angle of the associated map point in the point cloud map are larger than a certain threshold value and the distance between the current scanning point and the associated map point in the point cloud map is larger than a certain threshold value. After the unstable features are filtered, pose solving is carried out, and according to the rest associated map point coordinates and radar coordinates of all scanning points, the relative pose relation between the laser radar point cloud and the point cloud map is solved by using a nonlinear least square method such as LM (Levenberg-Marquardt ) and the like, and the solving can be carried out by using a formula (10).
Wherein, R is a rotation matrix, T is a translation vector, R0 is a predicted rotation matrix, T0 is a predicted translation vector, bi is the ith scanning point in the point cloud of the laser radar of the current frame, mi is the associated map point of bi in the point cloud map, ni is the normal vector of mi, and equation (10) will minimize the distance between the associated map points, thereby solving the rotation matrix R and the translation vector T. In the above process, coordinate transformation is performed by using the solved relative pose relationship, that is, each scanning point in the laser radar point cloud is converted to the coordinate system to which the point cloud map belongs, so as to obtain the coordinate of each scanning point under the coordinate system, whether the coordinate is converged after the coordinate transformation is judged, if the coordinate is not converged, the step of feature association is returned, and if the coordinate is not converged, the solved relative pose relationship can be determined to be the optimal relative pose relationship.
In summary, the method for updating a point cloud map according to the embodiment of the present application, as shown in fig. 7, mainly includes steps of motion compensation, semantic segmentation, laser positioning, and point cloud fusion. Firstly, a point cloud map of a target scene is established by using a SLAM algorithm, when mobile equipment such as an unmanned vehicle, an automatic robot and the like operates in the target scene, the point cloud map is loaded, the mobile equipment enters a positioning process, after a frame of laser radar point cloud is acquired by a laser radar, the laser radar point cloud is subjected to motion compensation according to motion data of the mobile equipment, then the laser radar point cloud subjected to the motion compensation is subjected to semantic segmentation, scanning points with semantic types of 'unmanned' and the like are removed according to a semantic segmentation result, and static and stable scanning points in an actual scene are reserved for positioning. And then registering the laser radar point cloud and the point cloud map by using a laser positioning algorithm, and acquiring the pose of the laser radar point cloud in the point cloud map, wherein the point cloud fusion of the laser radar point cloud and the point cloud map is carried out only when the confidence of positioning registration is greater than a certain threshold value. The point cloud fusion mentioned here is not the point cloud fusion in the conventional sense, but the process of determining the observation probability of each map point based on each scan point coordinate and each map point coordinate, and determining whether to add a map point or delete a map point according to the observation probability is described in detail in the foregoing embodiments, and is not repeated here.
Based on the above method embodiment, the point cloud map updating method according to the embodiment of the present application is described below with reference to the 2D lidar, fig. 8 (a) is a schematic diagram before laser positioning, fig. 8 (b) is a schematic diagram after laser positioning, and the laser positioning process is to search for its nearest neighbor in the point cloud map by traversing the point cloud of the current frame lidar, and the pose of the point cloud of the current frame lidar with respect to the point cloud map is solved by minimizing the distance D as shown in fig. 8 (a). After the laser positioning is finished, the current frame of laser radar point cloud is converted into a coordinate system to which the point cloud map belongs according to the relative pose of the current frame of laser radar point cloud in the point cloud map, then the current frame of laser radar point cloud is fused with the point cloud map, namely the nearest neighbor of the current frame of laser radar point cloud in the point cloud map is searched, and for the scanning points in the area A in fig. 8 (a) and 8 (b), map points which belong to the same point can not be found in the point cloud map, so that the points are initialized in the point cloud map, a clear parking lot is formed in the map construction process, a building is formed in the positioning process, and the observation probability of the map points in the area can be always increased after the vehicle runs for a plurality of times in the area. For map points in the area B in fig. 8 (a) and 8 (B), the observation probability of the map points is reduced if no scanning points belonging to the same point are found, wherein an obstacle seal is set for construction reasons during construction, construction is completed during positioning, the obstacle is removed, and after a vehicle runs in the area for a plurality of times, the observation probability of the map points in the area is reduced until the map points are deleted from the point cloud map. For other scan points, there are map points associated with the point cloud map, and the observation probability of the map points can rise.
Fig. 9 (a) is a point cloud map before update, after the automatic driving vehicle runs in the scene multiple times, the point cloud map is updated to be shown in fig. 9 (b), new buildings of the original parking area are added into the point cloud map, the points of the obstacle part are deleted from the point cloud map due to the construction of the closed road, and the point cloud map is more in line with the current actual scene.
Based on the above method embodiment, the embodiment of the present application provides a point cloud map updating device, as shown in fig. 10, the device may include:
an obtaining module 1010, configured to obtain a laser radar point cloud of a current scene scanned by a laser radar, and a pre-stored point cloud map of the current scene, where the laser radar point cloud includes a plurality of scanning points, and the point cloud map includes a plurality of map points;
The comparison module 1020 is used for comparing the laser radar point cloud with the point cloud map to determine the difference points of the laser radar point cloud and the point cloud map;
The calculation module 1030 is configured to determine an observation probability of each difference point, where the observation probability characterizes a probability that one scan point and one map point are the same point, an initial value of the observation probability is set for the map point when one map point is added in the point cloud map, and is reduced after each laser radar does not scan the scan point that is the same point as the map point;
And the updating module 1040 is configured to delete the difference points in the point cloud map, where the observation probability is smaller than the preset threshold, and obtain an updated point cloud map.
Optionally, the apparatus may further include: a motion compensation module;
The motion compensation module is used for acquiring each point cloud mass and current motion data in the laser radar point cloud, wherein a point cloud mass is a minimum unit of the laser radar point cloud; calculating the pose transformation relation of each point cloud mass relative to the initial point cloud mass by using the current motion data; according to the pose transformation relationship, each point cloud mass is converted into a coordinate system of an initial point cloud mass; and splicing the converted points cloud mass to obtain updated laser radar point clouds.
Optionally, the apparatus may further include: a semantic segmentation module;
The semantic segmentation module is used for acquiring point cloud information of the laser radar point cloud; based on the point cloud information, carrying out semantic segmentation on the laser radar point cloud to obtain semantic types of all scanning points in the laser radar point cloud; identifying a target scan point having a specified semantic type, wherein the specified semantic type is a semantic type having a motion feature; and deleting the target scanning point from the laser radar point cloud to obtain an updated laser radar point cloud.
Optionally, the comparison module 1020 may specifically be used to:
mapping the laser radar point cloud to a coordinate system to which a point cloud map belongs to obtain each scanning point coordinate in the laser radar point cloud under the coordinate system;
Acquiring coordinates of each map point in a point cloud map;
if only one map point or only one scanning point is determined at a position in the coordinate system according to the coordinates of each map point and the coordinates of each scanning point, determining the point at the position as a differential point.
Optionally, the calculating module 1030 may specifically be configured to:
according to the coordinates of each map point and the coordinates of each scanning point, respectively calculating the distance between each map point and each scanning point in the coordinate system;
For any difference point, if the difference point is a map point and no scanning point with the distance smaller than a preset distance threshold exists, reducing the observation probability of the difference point according to a preset reduction strategy;
For any difference point, if the difference point is a scanning point and no map point with the distance smaller than a preset distance threshold exists, adding a map point at the corresponding position of the difference point coordinate in the point cloud map, and initializing the observation probability of the difference point;
For any difference point, if the difference point is a map point and a scanning point with a distance smaller than a preset distance threshold exists between the difference point and the map point, the observation probability of the difference point is increased according to a preset increasing strategy.
Optionally, the apparatus may further include: a laser positioning module;
the laser positioning module is used for acquiring a predicted pose relationship and radar coordinates of each scanning point in the laser radar point cloud; converting each scanning point in the laser radar point cloud to a coordinate system to which a point cloud map belongs according to the predicted pose relationship to obtain predicted coordinates of each scanning point; for any scanning point, searching an associated map point closest to the scanning point from a point cloud map according to the predicted coordinates of the scanning point and the coordinates of each map point; filtering unstable associated map points with unstable characteristics in the found associated map points by using a preset filtering method; calculating the relative pose relation between the laser radar point cloud and the point cloud map according to the rest associated map point coordinates and the radar coordinates of each scanning point;
The comparison module 1020 may be specifically configured to convert each scanning point in the laser radar point cloud to a coordinate system to which the point cloud map belongs according to the relative pose relationship, so as to obtain coordinates of each scanning point in the coordinate system.
Optionally, the apparatus may further include: a confidence coefficient calculating module;
The confidence coefficient calculating module is used for converting the laser radar point cloud and the point cloud map into the same coordinate system to obtain each scanning point coordinate in the laser radar point cloud and each map point coordinate in the point cloud map in the same coordinate system; acquiring noise information of a laser radar; calculating registration confidence of the laser radar point cloud and the point cloud map by using a preset pose solving function according to the coordinates of each scanning point, the coordinates of each map point and the noise information;
the comparison module 1020 may be specifically configured to compare the laser radar point cloud with the point cloud map if the registration confidence coefficient is greater than a preset confidence coefficient threshold value, and determine a difference point between the laser radar point cloud and the point cloud map.
Optionally, the lidar point cloud comprises a multi-frame lidar point cloud;
The apparatus may further include: a fusion module;
and the fusion module is used for fusing the multi-frame laser radar point clouds to obtain fused laser radar point clouds.
By applying the embodiment of the application, the difference points of the laser radar point cloud and the point cloud map of the current scene are determined by comparing the laser radar point cloud of the current scene obtained by scanning with the pre-stored point cloud map of the current scene, the observation probability of each difference point is determined, the probability that one scanning point and one map point are the same point is represented by the observation probability, one map point is added to the initial value of the observation probability when the map point is added to the point cloud map, the map point is reduced after each time the laser radar does not scan the scanning point which is the same point as the map point, namely, if one map point in the point cloud map is the difference point with the laser radar point cloud, and the observation probability of the map point is smaller, the probability that the scanning point associated with the map point exists in the actual scene is lower, and if the observation probability of the map point is smaller than the preset threshold value, the map point does not exist in the actual scene, so that the map point is deleted from the point cloud map, the point cloud map is updated, and the updated point cloud is more in accordance with the actual scene and more accurate.
An embodiment of the present application provides an electronic device, as shown in fig. 11, including a processor 1101 and a memory 1102, where the memory 1102 stores machine executable instructions capable of being executed by the processor 1101, and the machine executable instructions are loaded and executed by the processor 1101 to implement the point cloud map updating method provided by the embodiment of the present application.
The Memory may include RAM (Random Access Memory ) or NVM (Non-volatile Memory), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the aforementioned processor.
The processor may be a general-purpose processor, including a CPU, NP (Network Processor ), etc.; but may also be a DSP (DIGITAL SIGNAL Processor), ASIC (Application SPECIFIC INTEGRATED Circuit), FPGA (Field-Programmable gate array) or other Programmable logic device, discrete gate or transistor logic device, discrete hardware components.
The memory 1102 and the processor 1101 may be in data transmission through a wired connection or a wireless connection, and the management server and other devices may be in communication through a wired communication interface or a wireless communication interface. Fig. 11 shows only an example of data transmission through a bus, and is not limited to a specific connection method.
In the embodiment of the application, the processor can realize by reading the machine executable instructions stored in the memory and loading and executing the machine executable instructions: comparing the laser radar point cloud of the current scene obtained by scanning with a pre-stored point cloud map of the current scene, determining the difference points of the laser radar point cloud and the point cloud map, determining the observation probability of each difference point, wherein the observation probability characterizes the probability that one scanning point and one map point are the same, setting the map point when one map point is added to the point cloud map at the initial value of the observation probability, reducing after each time the laser radar does not scan the scanning point which is the same as the map point, namely, if one map point in the point cloud map is the difference point with the laser radar point cloud, and the observation probability of the map point is smaller, the probability that the scanning point associated with the map point exists in the actual scene is lower, and if the observation probability of the map point is smaller than a preset threshold value, the map point does not exist at all, so that the map point cloud map is deleted from the point cloud map, updating the point cloud map is realized, namely, the updated point cloud map is more in accordance with the actual scene, and the accuracy is better.
In addition, the embodiment of the application provides a machine-readable storage medium, and machine-executable instructions are stored in the machine-readable storage medium, and when the machine-executable instructions are loaded and executed by a processor, the point cloud map updating method provided by the embodiment of the application is realized.
In the embodiment of the application, the machine-readable storage medium stores machine-executable instructions for executing the point cloud map updating method provided by the embodiment of the application when running, so that the method can be realized: comparing the laser radar point cloud of the current scene obtained by scanning with a pre-stored point cloud map of the current scene, determining the difference points of the laser radar point cloud and the point cloud map, determining the observation probability of each difference point, wherein the observation probability characterizes the probability that one scanning point and one map point are the same, setting the map point when one map point is added to the point cloud map at the initial value of the observation probability, reducing after each time the laser radar does not scan the scanning point which is the same as the map point, namely, if one map point in the point cloud map is the difference point with the laser radar point cloud, and the observation probability of the map point is smaller, the probability that the scanning point associated with the map point exists in the actual scene is lower, and if the observation probability of the map point is smaller than a preset threshold value, the map point does not exist at all, so that the map point cloud map is deleted from the point cloud map, updating the point cloud map is realized, namely, the updated point cloud map is more in accordance with the actual scene, and the accuracy is better.
In yet another embodiment of the present application, there is also provided a computer program product containing instructions that, when run on a computer, cause the computer to perform any of the point cloud map updating methods of the above embodiments.
The embodiment of the application also provides a positioning system, as shown in fig. 12, which comprises an electronic device 1210 and a laser radar 1220;
The laser radar 1220 is configured to scan a laser radar point cloud of a current scene and send the laser radar point cloud to the electronic device 1210;
The electronic device 1210 is configured to receive a laser radar point cloud sent by the laser radar 1220, and obtain a pre-stored point cloud map of the current scene, where the laser radar point cloud includes a plurality of scanning points, and the point cloud map includes a plurality of map points; comparing the laser radar point cloud with the point cloud map to determine the difference points of the laser radar point cloud and the point cloud map; determining the observation probability of each difference point, wherein the observation probability represents the probability that one scanning point and one map point are the same point, the initial value of the observation probability is set for the map point when one map point is added in the point cloud map, and the initial value of the observation probability is reduced after the laser radar does not scan the scanning point which is the same point as the map point each time; deleting the difference points with the observation probability smaller than a preset threshold value in the point cloud map to obtain an updated point cloud map; and performing target positioning by using the point cloud map.
By applying the embodiment of the application, the difference points of the laser radar point cloud and the point cloud map of the current scene are determined by comparing the laser radar point cloud of the current scene obtained by scanning with the pre-stored point cloud map of the current scene, the observation probability of each difference point is determined, the probability that one scanning point and one map point are the same point is represented by the observation probability, one map point is added to the initial value of the observation probability when the map point is added to the point cloud map, the map point is reduced after each time the laser radar does not scan the scanning point which is the same point as the map point, namely, if one map point in the point cloud map is the difference point with the laser radar point cloud, and the observation probability of the map point is smaller, the probability that the map point is associated with the map point in the actual scene is lower, and if the observation probability of the map point is smaller than a preset threshold value, the map point is not present in the actual scene is represented, the map point is deleted from the point cloud map, the map point is updated, the point cloud map is more in line with the actual scene, the point is more accurate, and the cloud can be positioned more accurately.
In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, produces a flow or function in accordance with embodiments of the present application, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by a wired (e.g., coaxial cable, fiber optic, DSL (Digital Subscriber Line, digital subscriber line)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that contains an integration of one or more available media. The usable medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a magnetic tape), an optical medium (e.g., a DVD (DIGITAL VERSATILE DISC, digital versatile disk)), or a semiconductor medium (e.g., an SSD (Solid state disk) STATE DISK), or the like.
It is noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
In this specification, each embodiment is described in a related manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments. In particular, for an apparatus, an electronic device, a machine-readable storage medium, a computer program product, a positioning system embodiment, since it is substantially similar to a method embodiment, the description is relatively simple, and references are made to the parts of the description of a method embodiment.
The foregoing description is only of the preferred embodiments of the present application and is not intended to limit the scope of the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application are included in the protection scope of the present application.