Point cloud matching method, positioning method, device and storage medium
By using semantic information in point cloud matching to filter dynamic object features and perform feature matching, the problem of low point cloud matching accuracy in the existing technology is solved, and the accuracy and stability of robot positioning are improved.
Patent Information
- Application Number
- CN202010565092.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-06-19
- Publication Date
- 2024-09-03
- Estimated Expiration
- 2040-06-19
AI Technical Summary
Existing point cloud matching methods are not very accurate in highly dynamic environments, causing problems such as robot positioning drift or loss.
By determining the semantic information of the target point cloud data, filtering the point features corresponding to the dynamic object, and matching the filtered features with the preset point cloud data, the semantic information and proportional similarity are used to verify the matching results and improve the matching accuracy.
It improves the accuracy of point cloud matching, reduces the impact of dynamic objects on the robot's posture judgment, and makes the positioning results more reliable.
Smart Images

Figure CN111815687B
Abstract
Description
Technical Field
[0001] The present application relates to the field of artificial intelligence, and in particular to a point cloud matching method, a positioning method, an electronic device, and a computer-readable storage medium. Background Art
[0002] Relocalization technology is one of the most common problems to be solved in simultaneous localization and mapping (SLAM) technology. In actual production application scenarios, the application of map positioning technology is often challenged by uncertain external environments. For example, when determining the position and posture of a robot on a global map without any prior information about the environment, if the robot is moved by the outside world, the continuity of the collected data will be affected, resulting in failure of position and posture positioning. For another example, in modern production environments, more and more robots need to move autonomously in a high-dynamic environment. When the external environment of the robot changes drastically, the robot often drifts or even loses its positioning. Based on the above-mentioned situations, the robot's position and posture need to be re-determined. In robot map positioning technology, the point cloud matching process is particularly critical, but the existing point cloud matching methods are not very accurate. Summary of the invention
[0003] The main technical problem solved by this application is the low accuracy of existing point cloud matching methods.
[0004] In order to solve the above technical problems, a technical solution adopted in the present application is: to provide a point cloud matching method, the method comprising: determining the semantic information corresponding to the first point cloud feature of the target point cloud data, wherein the target point cloud data is obtained by scanning the surrounding environment of the target posture; filtering the point features corresponding to the dynamic objects in the first point cloud features based on the semantic information; and performing feature matching on the filtered first point cloud features and the second point cloud features of the preset point cloud data to obtain a matching result.
[0005] In order to solve the above technical problems, a technical solution adopted in the present application is: to provide a positioning method, the method comprising: taking the current posture as the target posture, using a scanning device to scan the surrounding environment of the target posture to obtain target point cloud data; using global map data to obtain a number of candidate point cloud data corresponding to a number of candidate postures; taking each frame of candidate point cloud data as preset point cloud data, and performing feature matching between the target point cloud data and each frame of preset point cloud data, and selecting the preset point cloud data whose match with the target point cloud data meets the preset conditions; using the posture corresponding to the selected preset point cloud data to locate the current posture; wherein, the process of feature matching between the target point cloud data and each frame of preset point cloud data can be implemented using the above-mentioned point cloud matching method.
[0006] To solve the above technical problem, another technical solution adopted in the present application is: to provide an electronic device, which includes a processor and a memory coupled to the processor, wherein the memory stores program instructions for executing the program instructions stored in the memory to implement the above method.
[0007] In order to solve the above technical problems, another technical solution adopted by the present application is: providing a computer-readable storage medium storing program instructions, which can implement the above method when executed.
[0008] The beneficial effect of the present application is: through the implementation of the above-mentioned scheme, the present application corresponds to the semantic information through the second point cloud feature of the preset point cloud data of the present application. Therefore, after determining the semantic information corresponding to the first point cloud feature of the target point cloud data, the features of the target point cloud data and the preset point cloud data can be further matched based on the determined semantic information; and before matching, the point features corresponding to the dynamic objects in the first point cloud features are filtered based on the semantic information corresponding to the first point cloud features, and the filtered first point cloud features are matched with the second point cloud features of the preset point cloud data, so that the matching results obtained can be more accurate. BRIEF DESCRIPTION OF THE DRAWINGS
[0009] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. Among them:
[0010] Figure 1 It is a flow chart of an embodiment of the point cloud matching method of the present application;
[0011] Figure 2 It is a flowchart of another embodiment of the point cloud matching method of the present application;
[0012] Figure 3 yes Figure 2 The specific process diagram of S220;
[0013] Figure 4 yes Figure 2 The specific process diagram of S220;
[0014] Figure 5 yes Figure 4 The specific process diagram of S223;
[0015] Figure 6 yes Figure 1 The specific process diagram of S150;
[0016] Figure 7 yes Figure 6 The specific process diagram of S1531;
[0017] Figure 8 It is a flowchart of an embodiment of the positioning method of the present application;
[0018] Fig. 9 It is a structural schematic diagram of an embodiment of the electronic device of the present application;
[0019] Fig.10 is a structural schematic diagram of another embodiment of the electronic device of the present application;
[0020] Fig.11 It is a structural diagram of an embodiment of a computer-readable storage medium of the present application. DETAILED DESCRIPTION
[0021] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0022] Figure 1 is a flow chart of an embodiment of the point cloud matching method of the present application. It should be noted that if there are substantially the same results, this embodiment does not Figure 1 The process sequence shown is limited. Figure 1 As shown, this embodiment may include:
[0023] S110: Acquire a target image set and target point cloud data corresponding to the target posture by photographing and scanning the surrounding environment.
[0024] The target posture can be, but is not limited to, the current posture of the robot. The target image set includes multiple images of the target posture surrounding environment, which can be obtained by a device with a shooting function (such as a camera sensor). In a specific application scenario, the robot can obtain images of the target posture surrounding environment by rotating in situ, etc., so that the obtained target posture surrounding environment information is more comprehensive. Of course, the robot can also obtain images of the target posture surrounding environment by other methods, which are not limited here.
[0025] The target point cloud data may be point cloud data within a preset range around the target posture, which may be obtained by scanning the surrounding environment of the target posture, and may be obtained by scanning a scanning device (such as a laser radar sensor). The target point cloud data may be composed of multiple points, which may include information such as the coordinates of the points. The points in the target point cloud data may be points directly obtained by the scanning device, or points obtained by the scanning device after downsampling or voxelization.
[0026] S120: performing semantic segmentation on each image in the target image set to obtain semantic information of the image, and performing feature extraction on the target point cloud data to obtain a first point cloud feature of the target point cloud data.
[0027] The semantic segmentation neural network (SwiftNet) can be used, but is not limited to, to perform semantic segmentation on each image in the target image set to obtain the semantic information of the image. The semantic segmentation neural network relies on a lightweight architecture as the main recognition engine, which achieves a mean intersection over union (MIoU) of 75.5% on the classic Cityscapes dataset and a processing speed of nearly 40HZ at a resolution of 1024*2048 on a GTX1080T. The semantic information of the image may include categories such as pavement, sidewalk, trees, bushes, pedestrians, buildings, ground, walls, vehicles, shelves, etc.
[0028] The first point cloud feature may be a set of features of points in the target point cloud data, which may be obtained by, but is not limited to, extracting the target point cloud data using a point cloud feature extraction network (KPConv). Specifically, the point cloud feature extraction network may be based on each point x in the target point cloud data. i A sphere is defined with centered at r and radius r. The sphere may cover all points in the point cloud except x. i Other points other than x i '. Determine h core points within the sphere. These core points are not points in the point cloud, but some special pose points calculated by specific rules. Each core point has a weight matrix, and the kernel function can be used to calculate the x i 'weight matrix, and use the weight matrix to i ' features are transformed; the above method is used to obtain each x that falls within the sphere i ' features, and finally each x i The features of ' are accumulated and used as x i The eigenvector p of i , that is, x i characteristics.
[0029] S130: Determine semantic information corresponding to a first point cloud feature of the target point cloud data.
[0030] The semantic information corresponding to each point feature in the first point cloud feature can be determined based on the shooting parameters of the shooting device and the scanning parameters of the scanning device. In other words, the semantic information of the image can be projected onto the first point cloud feature based on the shooting parameters of the shooting device and the scanning parameters of the scanning device, so that each point feature in the first point cloud feature carries semantic information.
[0031] S140: Filtering point features corresponding to dynamic objects in the first point cloud features based on semantic information.
[0032] The point features corresponding to dynamic objects may be point features whose corresponding semantic information is dynamic objects in the first point cloud features, wherein dynamic objects may also be referred to as potential moving objects, i.e., objects that may move, such as vehicles, pedestrians, shelves, etc.
[0033] S150: Perform feature matching on the filtered first point cloud features and the second point cloud features of the preset point cloud data to obtain a matching result.
[0034] The preset point cloud data may be the preset point cloud data corresponding to the posture in the global map, that is, the point cloud data within a preset range around the posture in the global map. Among them, the global map may be a map constructed in advance according to the planned path of the robot, and the posture in the global map may be the posture in the planned path of the robot. The second point cloud feature extraction method is the same as the first point cloud feature extraction method. By using the remaining point features (static features) in the first point cloud features after filtering and the second point cloud features of the preset point cloud data for feature matching, the influence of dynamic objects on the subsequent judgment of the current posture of the robot can be reduced, so that the final posture is more accurate.
[0035] See also Figure 2 , before S150 can include:
[0036] S210: Counting the semantic information of the filtered first point cloud features to obtain semantic statistical information of the first point cloud features.
[0037] Optionally, the semantic statistical information of the first point cloud feature includes a semantic information category corresponding to the first point cloud feature and a proportion of each semantic information category.
[0038] Among them, the semantic information category corresponding to the first point cloud feature can be the semantic information category corresponding to the point feature in the first point cloud feature, and the proportion of each semantic information category in the first point cloud feature can be the proportion of each point feature corresponding to the same semantic information category in the first point cloud feature.
[0039] For example, if the semantic information corresponding to the point features in the first point cloud feature includes "sidewalk" and "building", then the semantic information categories corresponding to the first point cloud feature are "sidewalk" and "building". The proportion of the point features corresponding to the semantic information "sidewalk" in the first point cloud feature is the proportion of the semantic information category "sidewalk", and the proportion of the point features corresponding to the semantic information "building" in the first point cloud feature is the proportion of the semantic information category "building".
[0040] S220: Compare semantic statistical information of the first point cloud feature and the second point cloud feature.
[0041] Optionally, the semantic statistical information of the second point cloud feature includes the semantic information category corresponding to the second point cloud feature and the proportion of each semantic information category. For the method of obtaining the semantic statistical information, please refer to the method of obtaining the corresponding semantic information in the first point cloud feature mentioned above.
[0042] A specific method for comparing the semantic statistical information of the first point cloud feature and the second point cloud feature may be: respectively comparing the semantic information categories corresponding to the first point cloud feature and the second point cloud feature and the proportion of each semantic information category to obtain semantic similarity and proportion similarity.
[0043] See also Figure 3 In S220, comparing the semantic information categories corresponding to the first point cloud feature and the second point cloud feature to obtain the semantic similarity may include:
[0044] S221: Establishing category vectors for the first point cloud feature and the second point cloud feature respectively according to the semantic information categories corresponding to the first point cloud feature and the second point cloud feature.
[0045] Among them, each bit of the category vector corresponds to a semantic information category, and the corresponding bits of the category vectors of the first point cloud feature and the second point cloud feature correspond to the same semantic information category. If the bit of the category vector is the first character, it means that the semantic information category corresponding to the bit exists in the corresponding point cloud feature. If the bit of the category vector is the second character, it means that the semantic information category corresponding to the bit does not exist in the corresponding point cloud feature.
[0046] The number of bits in the category vector can be the total number of semantic information categories. The order of semantic information categories corresponding to the bits in the category vector can be pre-set. The order of semantic information categories corresponding to the bits in the category vector of the first point cloud feature is the same as the order of semantic information categories corresponding to the bits in the category vector of the second point cloud feature. If the characters on the corresponding bits in the category vectors of the first point cloud feature and the second point cloud feature are both the first characters, it is considered that the first point cloud feature and the second point cloud feature both have the category corresponding to the bit.
[0047] For example, set "0" as the first character and "1" as the second character, and the initial category vector is (0,0,0). The order of the semantic information categories corresponding to the three bits in the initial category vector is preset, the first bit corresponds to the semantic information category "sidewalk", the second bit corresponds to the semantic information category "tree", and the third bit corresponds to the semantic information category "building". If the semantic information categories corresponding to the first point cloud feature are "sidewalk" and "tree", and the semantic information categories corresponding to the second point cloud feature are "sidewalk" and "building", then the category vector of the first point cloud feature is (1,1,0), and the category vector of the second point cloud feature is (1,0,1).
[0048] S222: Calculate the Hamming distance between the category vectors of the first point cloud feature and the second point cloud feature to obtain semantic similarity.
[0049] Semantic similarity can also be called semantic information category similarity, which can be the number of different semantic information categories corresponding to the first point cloud feature and the second point cloud feature, that is, the number of different bits in the category vectors of the first point cloud feature and the second point cloud feature, which can be reflected as the Hamming distance between the category vectors of the first point cloud feature and the second point cloud feature. For example, the category vector of the first point cloud feature is (1,1,0), and the category vector of the second point cloud feature is (1,0,1), then the number of different bits in the two category vectors is 2, the Hamming distance between the two category vectors is 2, and the semantic similarity between the first point cloud feature and the second point cloud feature is 2.
[0050] See also Figure 4 In S220, comparing the proportions between the first point cloud feature and the second point cloud feature, and obtaining the corresponding proportion similarity may include:
[0051] S223: Based on the proportion of each semantic information category, establish a corresponding proportion vector.
[0052] Among them, the value of the proportion vector is used to represent the proportion of the corresponding semantic information category.
[0053] See also Figure 5 , S223 may include:
[0054] S2231: Establish a proportion vector of a preset number of digits.
[0055] Each bit represents a preset ratio.
[0056] For example, if the preset number of bits of the proportion vector is 20, the preset proportion is 5%, that is, the total proportion of 100% is divided into 20 equal parts, and each bit in the proportion vector represents the preset proportion of 5%.
[0057] S2232: Obtain a quotient between the proportion of the semantic information category and a preset proportion, and round up the quotient to obtain an integer quotient.
[0058] For example, the preset proportion is 5%, and the proportion of the semantic information category "sidewalk" corresponding to the first point cloud feature is 34%, then the integer quotient corresponding to the semantic information category "sidewalk" is 7.
[0059] S2233: Assign the units digit of the integer quotient in the proportion vector as the first character and the remaining digits as the second character according to a preset order.
[0060] For example, if the initial proportion vector is set to (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0), if the integer quotient corresponding to the semantic information category "sidewalk" corresponding to the first point cloud feature is 7, then the proportion vector of the semantic information category "sidewalk" corresponding to the first point cloud feature is (1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0), that is, the first 7 bits in the proportion vector are assigned to "1", and the remaining 13 bits are assigned to "0". And when the proportion of a semantic information category corresponding to the first point cloud feature is within (30%, 35%), it can be represented by a proportion vector with the first 7 bits as "1" and the remaining 13 bits as "0".
[0061] S224: Calculate the Hamming distance of the proportion vectors of the same semantic information category corresponding to the first point cloud feature and the second point cloud feature respectively.
[0062] If both the first point cloud feature and the second point cloud feature correspond to the semantic information category "sidewalk", and the proportion vector of the semantic information category "sidewalk" corresponding to the first point cloud feature is (1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0), and the proportion vector of the semantic information category "sidewalk" corresponding to the second point cloud feature is (1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0), then the Hamming distance between the semantic information category "sidewalk" proportion vectors of the first point cloud feature and the second point cloud feature is 2.
[0063] S225: Obtaining a proportional similarity based on the corresponding Hamming distance of each semantic information category corresponding to the first point cloud feature and the second point cloud feature.
[0064] Optionally, the corresponding Hamming distances of each semantic information category of the first point cloud feature and the second point cloud feature are summed to obtain the proportional similarity. In other words, the proportional similarity is the sum of the corresponding Hamming distances of each semantic information category of the first point cloud feature and the second point cloud feature.
[0065] S230: Determine whether to execute S150 according to the comparison result.
[0066] In a specific embodiment of the present application, if the sum of the semantic similarity and the proportion similarity is less than the similarity threshold, the point cloud feature matching degree between the target point cloud data and the preset point cloud data is calculated. When the sum of the semantic similarity and the proportion similarity between the first point cloud feature and the second point cloud feature is less than the similarity threshold, it is considered that the comparison result of the semantic statistical information of the first point cloud feature and the second point cloud feature meets the requirement, and thus the filtered first point cloud feature is further feature matched with the second point cloud feature of the preset point cloud data to obtain a matching result, that is, S150 is executed.
[0067] In another specific embodiment of the present application, when the robot positioning posture is lost, if the sum of the semantic similarity and the proportion similarity is less than the similarity threshold, and / or the posture corresponding to the preset point cloud data is within the preset range of the posture before the loss, S150 is executed.
[0068] See also Figure 6 , S150 can include:
[0069] S151: Matching the filtered first point cloud features with the second point cloud features of the preset point cloud data to obtain a plurality of matching point pairs between the target point cloud data and the preset point cloud data.
[0070] See also Figure 7 , S151 may include:
[0071] S1511: Take each point of the target point cloud data as a point to be matched, and use the first point cloud feature and the second point cloud feature to calculate the feature distance between the point to be matched and each point in the preset point cloud data, and calculate the coordinate distance between the point to be matched and each point in the preset point cloud data.
[0072] In a specific embodiment, the feature distance between the point to be matched and each point in the preset point cloud data can be the Hamming distance between the point feature (vector) corresponding to the point to be matched in the first point cloud data and the point feature (vector) in the second point cloud feature.
[0073] For example, P 1 is the second point cloud feature of the preset point cloud data, P 1 =(p 11 ,p 12 ,p 13 ), p 1i is the first point cloud feature P 1 The eigenvector of the i-th point in 2 =(p 21 ,p 22 ,p 23 ) is the second point cloud feature of the preset point cloud data, p 2i is the second point cloud feature P 2The eigenvector of the i-th point in 11 As the feature vector corresponding to the point to be matched, calculate p respectively 11 With p 21 ~p 23 The Hamming distance between the point to be matched and the preset point cloud data is 21 The Hamming distance between the corresponding point 1 is used as the characteristic distance between the point to be matched and point 1, and the point to be matched is compared with the preset point cloud data corresponding to p 22 The Hamming distance between the corresponding point 2 is used as the characteristic distance between the point to be matched and point 2. 23 The Hamming distance between the corresponding points 3 is used as the feature distance between the point to be matched and point 3.
[0074] In a specific implementation, the coordinate distance between the point to be matched and each point in the preset point cloud data may be a Euclidean distance.
[0075] S1512: performing weighted processing on the feature distance and coordinate distance between the to-be-matched point and each point in the preset point cloud data, respectively, to obtain corresponding points between the target point cloud data and the preset point cloud data and the similarity of the corresponding points.
[0076] Among them, the characteristic distance and coordinate distance between the matching point and the point in the preset point cloud data can be weighted by the following formula:
[0077] score=w 1 s+w 2 o,
[0078] Among them, score represents the similarity between the point to be matched and the point in the preset point cloud data, w 1 represents the weight of the characteristic distance between the point to be matched and the point in the preset point cloud data, s represents the characteristic distance between the point to be matched and the point in the preset point cloud data, and w 2 represents the weight of the coordinate distance between the point to be matched and the point in the preset point cloud data, and o represents the coordinate distance between the point to be matched and the point in the preset point cloud data.
[0079] By traversing the points in the preset point cloud data one by one, the point with the smallest similarity with the point to be matched is selected from the preset point cloud data as the point corresponding to the point to be matched in the preset point cloud data, that is, the point with the smallest similarity with the point to be matched in the preset point cloud data and the point to be matched are corresponding points, and the similarity between the point with the smallest similarity with the point to be matched in the preset point cloud data and the point to be matched is the similarity of the corresponding points.
[0080] S1513: Determine whether the similarity of the corresponding points is less than a preset threshold.
[0081] It is determined whether the similarity of each group of corresponding points between the target point cloud data and the preset point cloud data is less than a preset threshold. If so, S1514 is executed.
[0082] S1514: Use the corresponding points as matching point pairs.
[0083] The corresponding points between the target point cloud data and the preset point cloud data whose similarity is greater than a preset threshold are taken as matching point pairs.
[0084] S152: Using the number of matching point pairs as the point cloud feature matching degree between the target point cloud data and the preset point cloud data.
[0085] The point cloud feature matching degree between the target point cloud data and the preset point cloud data may be the number of matching point pairs between the target point cloud data and the preset point cloud data. The greater the number of matches, the higher the point cloud feature matching degree between the target point cloud data and the preset point cloud data.
[0086] Through the implementation of the above-mentioned embodiments, the second point cloud feature of the preset point cloud data of the present application corresponds to semantic information. Therefore, after determining the semantic information corresponding to the first point cloud feature of the target point cloud data, the features of the target point cloud data and the preset point cloud data can be further matched based on the determined semantic information; and before matching, the point features corresponding to the dynamic objects in the first point cloud features are filtered based on the semantic information corresponding to the first point cloud features, and the filtered first point cloud features are matched with the second point cloud features of the preset point cloud data, so that the matching results obtained can be more accurate.
[0087] Figure 8 It is a flow chart of an embodiment of the positioning method of the present application. It should be noted that if there are substantially the same results, this embodiment does not use Figure 8 The process sequence shown is limited. Figure 8 As shown, this embodiment may include:
[0088] S310: Using the current posture as the target posture, using a scanning device to scan the surrounding environment of the target posture to obtain target point cloud data.
[0089] The current posture referred to in this embodiment is the current posture of the robot, that is, the actual posture of the robot at present.
[0090] S320: Using the global map data, obtain a number of candidate point cloud data corresponding to a number of candidate poses.
[0091] The global map data may be the point cloud data corresponding to the global map mentioned in the above embodiment, that is, the data corresponding to the planned path of the robot, which may include candidate point cloud data corresponding to several candidate postures in the planned path of the robot. Among them, the candidate point cloud data of the candidate posture may refer to the point cloud data within a preset range around the candidate posture.
[0092] S330: Taking each frame of candidate point cloud data as preset point cloud data, and performing feature matching between the target point cloud data and each frame of preset point cloud data, and selecting the preset point cloud data whose match with the target point cloud data satisfies preset conditions.
[0093] The specific feature matching of this step can be achieved by the point cloud matching method in the first embodiment described above. In addition, referring to the first embodiment described above, in the feature matching process, if the sum of the semantic similarity and the proportion similarity between the target point cloud data and the preset point cloud data of the current frame is less than the preset threshold, and / or the posture corresponding to the preset point cloud data is within the preset range of the posture before the loss, the preset point cloud data of the current frame is added to the candidate matching set. Then, the point cloud feature matching degree between the target point cloud data and each preset point cloud data in the candidate matching set is calculated respectively, so as to find the preset point cloud data whose matching with the target point cloud data meets the preset conditions from the candidate point cloud data matching set.
[0094] The preset point cloud data whose match with the target point cloud data satisfies a preset condition may be preset point cloud data whose point cloud feature matching degree with the target point cloud data is greater than a point cloud feature matching degree threshold.
[0095] S340: Positioning the current posture using the posture corresponding to the selected preset point cloud data.
[0096] When there are multiple frames of selected preset point cloud data, you can select a frame of preset point cloud data from them, and use the posture corresponding to the preset point cloud data in this frame to locate the current posture in the global map. For example, select the posture corresponding to the preset point cloud data with the highest point cloud feature match between the target point cloud data as the initial value and pass it into the posture positioning algorithm to locate the current posture in the global map. Of course, you can also use the posture corresponding to each frame of the selected preset point cloud data as the initial value of the posture positioning algorithm to locate the current posture in the global map. Among them, the posture positioning algorithm can be an ICP algorithm, an NDT algorithm, etc.
[0097] Through the implementation of the above embodiments, the present application can utilize the point cloud matching method provided in the above first embodiment to match the target point cloud data with multiple frames of candidate point cloud data in the global map data to obtain the candidate point cloud data that best matches the target point cloud data, thereby being able to locate the robot's current posture in the global map based on the candidate posture corresponding to the candidate point cloud data.
[0098] Fig. 9 Schematic diagram of the structure of an embodiment of the electronic device of the present application. Fig. 9 As shown, the electronic device includes a processor 410 and a memory 420 coupled to the processor.
[0099] The memory 420 stores program instructions for implementing the method of any of the above embodiments; the processor 410 is used to execute the program instructions stored in the memory 420 to implement the steps of the above method embodiments. The processor 410 may also be referred to as a CPU (Central Processing Unit). The processor 410 may be an integrated circuit chip with signal processing capabilities. The processor 410 may also be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0100] In a specific embodiment of the present application, the electronic device may be a robot. Fig.10 In addition to the processor 410 and the memory 420 , the robot also includes a robot body 430 and a scanning device 431 and a shooting device 432 arranged on the robot body 430 .
[0101] The scanning device 431 may be a device with a scanning function, such as a laser radar, which may be used to scan the robot's surrounding environment to obtain point cloud data of the robot's surrounding environment. The shooting device 432 may be a device with a shooting function, such as a camera sensor, which may be used to shoot images of the robot's surrounding environment. Furthermore, the scanning device 431 and the shooting device 432 may send the acquired data to the processor 410 for processing.
[0102] Fig.11It is a structural diagram of an embodiment of a computer-readable storage medium of the present application. The computer-readable storage medium 500 of the embodiment of the present application stores a program instruction 510, and the program instruction 500 implements the method provided by the above-mentioned embodiment of the present application when it is executed. Among them, the program instruction 510 can form a program file and be stored in the above-mentioned computer-readable storage medium 500 in the form of a software product, so that a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor (processor) executes all or part of the steps of each implementation method of the present application. The aforementioned computer-readable storage medium 500 includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a disk or an optical disk, or a terminal device such as a computer, a server, a mobile phone, and a tablet.
[0103] The above description is only an implementation method of the present application, and does not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly used in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. A point cloud matching method, characterized in that: include: Determine semantic information corresponding to a first point cloud feature of target point cloud data, wherein the target point cloud data is obtained by scanning a surrounding environment of the target posture; filtering point features corresponding to dynamic objects in the first point cloud features based on the semantic information; Performing statistics on the semantic information of the filtered first point cloud features to obtain semantic statistical information of the first point cloud features; Comparing the semantic statistical information of the first point cloud feature and the second point cloud feature of the preset point cloud data; When the comparison result meets the requirements, feature matching is performed on the filtered first point cloud feature and the second point cloud feature of the preset point cloud data to obtain a matching result, including: matching the filtered first point cloud feature and the second point cloud feature of the preset point cloud data to obtain a number of matching point pairs between the target point cloud data and the preset point cloud data; and using the number of matching point pairs as the point cloud feature matching degree between the target point cloud data and the preset point cloud data.
2. The method according to claim 1, characterized in that Before determining the semantic information corresponding to the first point cloud feature of the target point cloud data, the method further includes: Acquire a target image set and target point cloud data corresponding to the surrounding environment of the target posture by photographing and scanning respectively; Performing semantic segmentation on each image in the target image set to obtain semantic information of the image, and performing feature extraction on the target point cloud data to obtain a first point cloud feature of the target point cloud data; The semantic information corresponding to the first point cloud feature of the target point cloud data is determined to include: The semantic information corresponding to each point feature in the first point cloud feature is determined based on the shooting parameters and the scanning parameters.
3. The method according to claim 2, characterized in that The semantic statistical information of the first point cloud feature includes the semantic information category corresponding to the first point cloud feature and the proportion of each semantic information category, and the semantic statistical information of the second point cloud feature includes the semantic information category corresponding to the second point cloud feature and the proportion of each semantic information category.
4. The method according to claim 3, characterized in that The comparing the semantic statistical information of the first point cloud feature and the second point cloud feature includes: Respectively comparing the semantic information categories corresponding to the first point cloud feature and the second point cloud feature and the proportion of each semantic information category to obtain semantic similarity and proportion similarity; The step of determining whether to perform feature matching between the filtered first point cloud feature and the second point cloud feature of the preset point cloud data to obtain a matching result according to the comparison result includes: If the sum of the semantic similarity and the proportion similarity is less than a preset threshold, performing feature matching of the filtered first point cloud feature with the second point cloud feature of the preset point cloud data to obtain a matching result; and / or, In the case where the robot positioning posture is lost, the target posture is the current posture of the robot. If the posture corresponding to the preset point cloud data is within the preset range of the posture before the loss, the step of performing feature matching of the filtered first point cloud features with the second point cloud features of the preset point cloud data is executed to obtain a matching result.
5. The method according to claim 4, characterized in that Comparing the semantic information categories corresponding to the first point cloud feature and the second point cloud feature to obtain semantic similarity includes: According to the semantic information categories corresponding to the first point cloud feature and the second point cloud feature, category vectors are established for the first point cloud feature and the second point cloud feature respectively, wherein each bit of the category vector corresponds to one of the semantic information categories, and the corresponding bits of the category vectors of the first point cloud feature and the second point cloud feature correspond to the same semantic information category, and if the bit of the category vector is the first character, it means that the semantic information category corresponding to the bit exists in the corresponding point cloud feature, and if the bit of the category vector is the second character, it means that the semantic information category corresponding to the bit does not exist in the corresponding point cloud feature; Calculating the Hamming distance between the category vectors of the first point cloud feature and the second point cloud feature to obtain the semantic similarity; Comparing the proportions between the first point cloud features and the second point cloud features to obtain a corresponding proportion similarity includes: Based on the proportion of each of the semantic information categories, a corresponding proportion vector is established, wherein the value of the proportion vector is used to represent the proportion of the corresponding semantic information category; Respectively calculating the Hamming distance of the proportion vectors of the same semantic information category corresponding to the first point cloud feature and the second point cloud feature; The proportion similarity is obtained based on the corresponding Hamming distance of each semantic information category corresponding to the first point cloud feature and the second point cloud feature.
6. The method according to claim 5, characterized in that The method of establishing a corresponding proportion vector based on the proportion of each semantic information category includes: Establishing a preset bit ratio vector, wherein each bit represents a preset ratio; Obtaining a quotient between the proportion of the semantic information category and the preset proportion, and rounding up the quotient to obtain an integer quotient; Assign the first character to the digit of the integer quotient in the proportion vector and the second character to the remaining digit according to a preset order; The proportion similarity is obtained based on the corresponding Hamming distance of each semantic information category corresponding to the first point cloud feature and the second point cloud feature, including: The corresponding Hamming distances of each semantic information category of the first point cloud feature and the second point cloud feature are summed to obtain the proportion similarity.
7. The method according to claim 1, characterized in that The step of matching the filtered first point cloud feature with the second point cloud feature of the preset point cloud data to obtain a plurality of matching point pairs between the target point cloud data and the preset point cloud data includes: Taking each point of the target point cloud data as a to-be-matched point, calculating a feature distance between the to-be-matched point and each point in the preset point cloud data using the first point cloud feature and the second point cloud feature, and calculating a coordinate distance between the to-be-matched point and each point in the preset point cloud data; Performing weighted processing on the feature distance and the coordinate distance between the to-be-matched point and each point in the preset point cloud data, respectively, to obtain corresponding points between the target point cloud data and the preset point cloud data and similarities of the corresponding points; If the similarity of the corresponding points is less than a preset threshold, the corresponding points are taken as matching point pairs.
8. A positioning method, characterized in that: include: Taking the current posture as the target posture, the surrounding environment of the target posture is scanned by a scanning device to obtain the target point cloud data; Using the global map data, a number of candidate point cloud data corresponding to a number of candidate poses are obtained; Taking each frame of the candidate point cloud data as preset point cloud data, and performing feature matching between the target point cloud data and the preset point cloud data of each frame, and selecting the preset point cloud data whose matching with the target point cloud data satisfies preset conditions; Positioning the current posture using the posture corresponding to the selected preset point cloud data; Wherein, the process of feature matching between the target point cloud data and the preset point cloud data is implemented using the method described in any one of claims 1 to 7.
9. An electronic device, characterized in that: The invention comprises a processor and a memory coupled to the processor, wherein: The memory stores program instructions; The processor is configured to execute the program instructions stored in the memory to implement the method according to any one of claims 1 to 8.
10. The device according to claim 9, characterized in that The electronic device is a robot, which further comprises a robot body and a scanning device and a shooting device arranged on the robot body.
11. A computer-readable storage medium, characterized in that: The storage medium stores program instructions, and when the program instructions are executed, the steps of the method according to any one of claims 1 to 8 are implemented.
