Repositioning method and device

By matching single-frame point cloud data with grid maps, the problems of high robot repositioning complexity and collision risk in existing technologies are solved, achieving efficient and accurate repositioning.

CN115372980BActive Publication Date: 2025-09-30ZHEJIANG SINEVA INTELLIGENT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110558022.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-05-21
Publication Date
2025-09-30
Estimated Expiration
2041-05-21

AI Technical Summary

Technical Problem

Existing robot relocalization methods use multi-frame point cloud data for relocalization, which has high complexity, long calculation time and may cause robot collisions.

Method used

Single-frame point cloud data is used to obtain the topological map in the lidar coordinate system. Combined with the grid map in the global coordinate system, the robot's target position is determined through feature extraction and matching, reducing operation complexity and avoiding collisions caused by robot movement.

Benefits of technology

It improves the repositioning efficiency and accuracy, reduces the amount of calculation, and avoids collisions of robots during movement.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115372980B_ABST
    Figure CN115372980B_ABST
Patent Text Reader

Abstract

The present disclosure relates to the field of robotics, and in particular to a repositioning method and device for reducing the operational complexity of repositioning and improving repositioning efficiency. The method comprises the following steps: the repositioning device obtains N candidate poses based on a first topological map obtained from single-frame point cloud data and a second topological map obtained from a grid map. Then, based on the N candidate poses, the single-frame point cloud data is converted to a global coordinate system to obtain N corresponding sets of coordinates, and the target pose of the robot is determined from the N candidate poses based on the grid occupancy probability. In this way, the repositioning device can obtain the pose of the robot in the global coordinate system when it is turned on based on the single-frame point cloud data and the grid map, thereby reducing the operational complexity of repositioning, improving repositioning efficiency, and ensuring repositioning accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of robots, and in particular to a repositioning method and device. Background Art

[0002] Relocalization technology is a crucial prerequisite for robots to achieve autonomous navigation and intelligent environmental scanning and exploration. Due to factors such as human movement and the robot starting in an unknown area, the robot's initial global pose can be lost, making subsequent functions such as path planning and multi-vehicle scheduling impossible. Therefore, robot relocalization is necessary to obtain the robot's initial global pose.

[0003] Most existing robot relocalization methods involve moving the robot and obtaining multi-frame point cloud data for relocalization. However, the relocalization operation using multi-frame point cloud data is complex and time-consuming, and the movement of the robot may cause the robot to collide with other problems. Summary of the Invention

[0004] The present disclosure provides a repositioning method and device, which are used to reduce the operational complexity of repositioning, improve repositioning efficiency, and avoid robot collision.

[0005] The specific technical solutions provided by the embodiments of the present disclosure are as follows:

[0006] In a first aspect, a relocation method is provided, which is applied to a relocation device, comprising:

[0007] Acquire single-frame point cloud data in a laser radar coordinate system collected by a laser radar of the robot, and perform feature extraction on the single-frame point cloud data to obtain a first topological map;

[0008] Obtaining N candidate poses based on the first topological map and the second topological map, wherein the second topological map is obtained by performing feature extraction based on a grid map constructed in a global coordinate system;

[0009] Based on the N candidate poses, N groups of coordinates of the single-frame point cloud data in the global coordinate system are determined, and based on the grid occupancy probabilities of the grids corresponding to the N groups of coordinates, the target pose of the robot is determined from the N candidate poses, wherein the target pose is used to characterize the pose of the robot in the global coordinate system when it is turned on, and the grid occupancy probability of each grid is used to characterize the probability of an object existing in the corresponding grid.

[0010] In the disclosed embodiment, the repositioning device can obtain the position and posture of the robot in the global coordinate system when it is turned on based on the single-frame point cloud data and the grid map, thereby reducing the complexity of the repositioning operation, improving the repositioning efficiency, and ensuring the repositioning accuracy. At the same time, since only a single-frame point cloud data is required, there is no need to move the robot, thereby avoiding collisions of the robot during movement.

[0011] Optionally, based on the first topological map and the second topological map, N candidate poses are obtained, including:

[0012] Matching each first node with each second node based on a first edge length set corresponding to each first node contained in the first topology map, and based on a second edge length set corresponding to each second node contained in the second topology map; wherein each first edge length set includes the edge lengths of the edges connected to the corresponding first node, and each second edge length set includes the edge lengths of the edges connected to the corresponding second node;

[0013] The first and second nodes that are successfully matched are taken as target groups, and N candidate poses are obtained based on each target group.

[0014] In the disclosed embodiment, node matching is performed based on a first edge length set corresponding to a first node and a second edge length set corresponding to a second node, so that a target group can be determined quickly and accurately, thereby improving relocation efficiency and accuracy.

[0015] Optionally, matching each first node with each second node based on a first edge length set corresponding to each first node contained in the first topology map, and based on a second edge length set corresponding to each second node contained in the second topology map, includes:

[0016] Based on each first node included in the first topology map and each second node included in the second topology map, obtaining each matching group, wherein each matching group includes a first node and a second node of the same node type;

[0017] For each matching group, if the first edge length set corresponding to the first node in a matching group is a subset of the second edge length set corresponding to the second node in the same matching group, then it is determined that the first node and the second node in the matching group are matched successfully.

[0018] In the embodiment of the present disclosure, by comparing whether the first edge length set corresponding to the first node is a subset of the second edge length set corresponding to the second node, it is possible to quickly determine whether the first node and the second node match, thereby improving relocation efficiency.

[0019] Optionally, obtaining each matching group based on each first node included in the first topology map and each second node included in the second topology map includes:

[0020] From the first topological map, sequentially selecting a first node with the largest number of connected edges as a first node in a target multi-layer subgraph until the first topological map is empty, thereby obtaining a target multi-layer subgraph, wherein each time a first node is selected, the nodes connected to the first node are deleted from the first topological map, and each layer of the target multi-layer subgraph contains a first node;

[0021] Matching groups are obtained based on the first nodes included in the target multi-layer subgraph and the second nodes included in the second topology map.

[0022] In the embodiment of the present disclosure, by selecting first nodes with a large number of connected edges and matching them with each second node, the number of first nodes to be matched is reduced, thereby reducing the amount of calculation, thereby improving the relocation efficiency and ensuring the accuracy of the relocation results.

[0023] Optionally, based on each target group obtained, N candidate poses are obtained, including:

[0024] If the node type of the first node and the second node included in any one of the target groups is a corner point, determining a first distance, a second distance, and a posture angle of the robot based on the first node coordinates of the first node in the any one of the target groups; wherein the first node in the any one of the target groups is a corner point between a first line segment and a second line segment, the first distance is used to represent the distance between the robot and the first line segment, and the second distance is used to represent the distance between the robot and the second line segment;

[0025] determining a candidate position of the robot in the global coordinate system based on the first distance and the second distance, and based on a second node coordinate of a second node in the same target group;

[0026] Based on the attitude angle and the candidate position, a candidate pose is obtained.

[0027] In the embodiment of the present disclosure, for a node whose node type is a corner point, a candidate pose is determined by the first node coordinates of the first node and the second node coordinates of the second node, so that the determined candidate pose combines the relative position between the robot and the first node, thereby improving the repositioning accuracy.

[0028] Optionally, based on each target group obtained, N candidate poses are obtained, including:

[0029] If the node type of the first node and the second node included in any target group is a line segment, determining a third distance and a posture angle of the robot based on the first node coordinates of the first node in the any target group; wherein the third distance is used to represent the distance between the robot and the third line segment;

[0030] At least one candidate pose of the robot in the global coordinate system is obtained based on the second node coordinates of the second node in the same target group, the posture angle, and the third distance.

[0031] In the embodiment of the present disclosure, for nodes whose node type is a line segment, the candidate pose is determined by the first node coordinates of the first node and the second node coordinates of the second node, so that the determined candidate pose combines the relative position between the robot and the first node, thereby improving the repositioning accuracy.

[0032] Optionally, after obtaining N candidate poses based on the first topological map and the second topological map, the method further includes:

[0033] According to the N candidate poses, respectively based on the first node coordinates of each first node contained in the first topological map in the lidar coordinate system, obtaining the third node coordinates of each first node in the global coordinate system;

[0034] Determining, based on the third node coordinates of each of the first nodes, first matching scores corresponding to each of the N candidate poses, wherein the first matching score refers to the number of target nodes present in each of the first nodes, and the target node refers to a first node whose distance to any second node of the same node type in the second topological map is less than or equal to a preset threshold;

[0035] Selecting M candidate postures from the N candidate postures according to the first matching scores corresponding to the respective N candidate postures; wherein the value of M is smaller than the value of N;

[0036] Determining the coordinates of the single-frame point cloud data in the global coordinate system according to the N candidate poses, and determining the target pose of the robot from the N candidate poses according to grid occupancy probabilities of grids corresponding to the N groups of coordinates, including:

[0037] According to the M selected candidate poses, the coordinates of the single-frame point cloud data in the global coordinate system are determined respectively, and the target pose of the robot is determined from the M candidate poses according to the grid occupancy probabilities of the grids corresponding to the M groups of coordinates.

[0038] In the implementation of the present disclosure, by performing matching verification on N candidate poses, M candidate poses are selected from the N candidate poses, thereby reducing the amount of subsequent calculations and improving the repositioning efficiency.

[0039] Optionally, determining N groups of coordinates of the single-frame point cloud data in the global coordinate system based on the N candidate poses, and determining a target pose of the robot from the N candidate poses based on grid occupancy probabilities of grids corresponding to the N groups of coordinates, includes:

[0040] According to the N candidate poses, the single-frame point cloud data is respectively converted from the lidar coordinate system to the global coordinate system to obtain N sets of coordinates in the global coordinate system; wherein each candidate pose corresponds to a set of coordinates;

[0041] For any set of coordinates in the N sets of coordinates, if the grid occupancy probability of the grid to which any one of the coordinates in the set of coordinates belongs is greater than a preset threshold, then the second matching score of the candidate pose corresponding to the any set of coordinates is increased by a first set value; otherwise, the second matching score of the candidate pose corresponding to the any set of coordinates is subtracted from the second set value;

[0042] The candidate pose with the second highest matching score among the N candidate poses is used as the target pose of the robot.

[0043] In the implementation of the present disclosure, by matching single-frame point cloud data with a grid map, a target pose is determined from N candidate poses, so that the determined target pose combines the single-frame point cloud data with the distribution of objects in the grid map, thereby improving the repositioning accuracy.

[0044] Optionally, the candidate pose with the highest matching score among the N candidate poses is used as the target pose of the robot, including:

[0045] Using the optimization algorithm, the candidate pose with the highest matching score among the N candidate poses is optimized to obtain the optimized candidate pose;

[0046] The optimized candidate pose is used as the target pose of the robot.

[0047] In the implementation of the present disclosure, an optimization algorithm is adopted to optimize the candidate pose with the highest matching score among N candidate poses, thereby improving the relocalization accuracy.

[0048] Optionally, also include:

[0049] If the first topological map is not obtained after feature extraction is performed on the single-frame point cloud data, the boundary of the grid map is expanded according to the set expansion distance to obtain an expanded map;

[0050] All solutions are used as candidate poses to obtain N candidate poses, wherein all solutions are poses of all positions of the robot in the extended map.

[0051] In the implementation of the present disclosure, the grid map is expanded and all solutions are used as candidate poses. Since the situation where the robot is located at the edge of the grid map is taken into consideration, the accuracy of relocalization is improved.

[0052] In a second aspect, a repositioning device is provided, comprising:

[0053] an extraction unit, configured to obtain single-frame point cloud data in a laser radar coordinate system collected by a laser radar of the robot, and perform feature extraction on the single-frame point cloud data to obtain a first topological map;

[0054] A matching unit, configured to obtain N candidate poses based on the first topological map and the second topological map, wherein the second topological map is obtained by performing feature extraction based on a grid map constructed in a global coordinate system;

[0055] A determination unit is used to determine N groups of coordinates of the single-frame point cloud data in the global coordinate system based on the N candidate poses, and determine the target pose of the robot from the N candidate poses based on the grid occupancy probabilities of the grids corresponding to the N groups of coordinates, wherein the target pose is used to represent the pose of the robot in the global coordinate system when it is turned on, and the grid occupancy probability of each grid is used to represent the probability of an object existing in the corresponding grid.

[0056] Optionally, when N candidate poses are obtained based on the first topological map and the second topological map, the matching unit is specifically configured to:

[0057] Matching each first node with each second node based on a first edge length set corresponding to each first node contained in the first topology map, and based on a second edge length set corresponding to each second node contained in the second topology map; wherein each first edge length set includes the edge lengths of the edges connected to the corresponding first node, and each second edge length set includes the edge lengths of the edges connected to the corresponding second node;

[0058] The first and second nodes that are successfully matched are taken as target groups, and N candidate poses are obtained based on each target group.

[0059] Optionally, when matching each first node with each second node based on a first edge length set corresponding to each first node contained in the first topology map, and based on a second edge length set corresponding to each second node contained in the second topology map, the matching unit is specifically configured to:

[0060] Based on each first node included in the first topology map and each second node included in the second topology map, obtaining each matching group, wherein each matching group includes a first node and a second node of the same node type;

[0061] For each matching group, if the first edge length set corresponding to the first node in a matching group is a subset of the second edge length set corresponding to the second node in the same matching group, then it is determined that the first node and the second node in the matching group are matched successfully.

[0062] Optionally, when obtaining each matching group based on each first node included in the first topology map and each second node included in the second topology map, the matching unit is specifically configured to:

[0063] From the first topological map, sequentially selecting a first node with the largest number of connected edges as a first node in a target multi-layer subgraph until the first topological map is empty, thereby obtaining a target multi-layer subgraph, wherein each time a first node is selected, the nodes connected to the first node are deleted from the first topological map, and each layer of the target multi-layer subgraph contains a first node;

[0064] Matching groups are obtained based on the first nodes included in the target multi-layer subgraph and the second nodes included in the second topology map.

[0065] Optionally, when N candidate poses are obtained based on each target group, the matching unit is specifically configured to:

[0066] If the node type of the first node and the second node included in any one of the target groups is a corner point, determining a first distance, a second distance, and a posture angle of the robot based on the first node coordinates of the first node in the any one of the target groups; wherein the first node in the any one of the target groups is a corner point between a first line segment and a second line segment, the first distance is used to represent the distance between the robot and the first line segment, and the second distance is used to represent the distance between the robot and the second line segment;

[0067] determining a candidate position of the robot in the global coordinate system based on the first distance and the second distance, and based on a second node coordinate of a second node in the same target group;

[0068] Based on the attitude angle and the candidate position, a candidate pose is obtained.

[0069] Optionally, when N candidate poses are obtained based on each target group, the matching unit is specifically configured to:

[0070] If the node type of the first node and the second node included in any target group is a line segment, determining a third distance and a posture angle of the robot based on the first node coordinates of the first node in the any target group; wherein the third distance is used to represent the distance between the robot and the third line segment;

[0071] At least one candidate pose of the robot in the global coordinate system is obtained based on the second node coordinates of the second node in the same target group, the posture angle, and the third distance.

[0072] Optionally, after obtaining N candidate poses based on the first topology map and the second topology map, the matching unit is further configured to:

[0073] According to the N candidate poses, respectively based on the first node coordinates of each first node contained in the first topological map in the lidar coordinate system, obtaining the third node coordinates of each first node in the global coordinate system;

[0074] Determining, based on the third node coordinates of each of the first nodes, first matching scores corresponding to each of the N candidate poses, wherein the first matching score refers to the number of target nodes present in each of the first nodes, and the target node refers to a first node whose distance to any second node of the same node type in the second topological map is less than or equal to a preset threshold;

[0075] Selecting M candidate postures from the N candidate postures according to the first matching scores corresponding to the respective N candidate postures; wherein the value of M is smaller than the value of N;

[0076] When determining the coordinates of the single-frame point cloud data in the global coordinate system according to the N candidate poses, and determining the target pose of the robot from the N candidate poses according to the grid occupancy probabilities of the grids corresponding to the N groups of coordinates, the determining unit is specifically configured to:

[0077] According to the M selected candidate poses, the coordinates of the single-frame point cloud data in the global coordinate system are determined respectively, and the target pose of the robot is determined from the M candidate poses according to the grid occupancy probabilities of the grids corresponding to the M groups of coordinates.

[0078] Optionally, when determining N groups of coordinates of the single-frame point cloud data in the global coordinate system based on the N candidate poses, and determining the target pose of the robot from the N candidate poses based on grid occupancy probabilities of grids corresponding to the N groups of coordinates, the determining unit is specifically configured to:

[0079] According to the N candidate poses, the single-frame point cloud data is respectively converted from the lidar coordinate system to the global coordinate system to obtain N sets of coordinates in the global coordinate system; wherein each candidate pose corresponds to a set of coordinates;

[0080] For any set of coordinates in the N sets of coordinates, if the grid occupancy probability of the grid to which any one of the coordinates in the set of coordinates belongs is greater than a preset threshold, then the second matching score of the candidate pose corresponding to the any set of coordinates is increased by a first set value; otherwise, the second matching score of the candidate pose corresponding to the any set of coordinates is subtracted from the second set value;

[0081] The candidate pose with the second highest matching score among the N candidate poses is used as the target pose of the robot.

[0082] Optionally, when the candidate posture with the highest matching score among the N candidate postures is used as the target posture of the robot, the determining unit is specifically configured to:

[0083] Using the optimization algorithm, the candidate pose with the highest matching score among the N candidate poses is optimized to obtain the optimized candidate pose;

[0084] The optimized candidate pose is used as the target pose of the robot.

[0085] Optionally, the determining unit is further configured to:

[0086] If the first topological map is not obtained after feature extraction is performed on the single-frame point cloud data, the boundary of the grid map is expanded according to the set expansion distance to obtain an expanded map;

[0087] All solutions are used as candidate poses to obtain N candidate poses, wherein all solutions are poses of all positions of the robot in the extended map.

[0088] In a third aspect, an electronic device is provided, comprising at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor; and the instructions are executed by the at least one processor so that the at least one processor can execute the relocation method provided in the first aspect of the present disclosure.

[0089] According to a fourth aspect, a computer storage medium is provided, wherein the computer storage medium stores a computer program for executing the method according to the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0091] Figure 1 A schematic diagram of a flow chart of a relocation method provided in an embodiment of the present disclosure;

[0092] Figure 2 A schematic diagram of a first topological map provided in an embodiment of the present disclosure;

[0093] Figure 3 A schematic diagram of a process for obtaining N candidate poses provided in an embodiment of the present disclosure;

[0094] Figure 4 A logical diagram of angle matching provided by an embodiment of the present disclosure;

[0095] Figure 5 A logical diagram of line segment matching provided by an embodiment of the present disclosure;

[0096] Figure 6 A schematic diagram of an extended map provided in an embodiment of the present disclosure;

[0097] Figure 7 A schematic structural diagram of a repositioning device provided in an embodiment of the present disclosure;

[0098] Figure 8 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION

[0099] In order to solve the problem of low robot repositioning efficiency in the prior art and reduce the operational complexity during repositioning and improve repositioning efficiency, a repositioning solution is provided in an embodiment of the present disclosure. The solution is as follows: obtaining single-frame point cloud data collected by the robot's laser radar and performing feature extraction on the single-frame point cloud data to obtain a first topological map; constructing a second topological map based on the first topological map and a grid map to obtain N candidate poses; determining N groups of coordinates of the single-frame point cloud data in the global coordinate system based on the N candidate poses, and determining the target pose of the robot from the N candidate poses based on the grid occupancy probabilities of the grids corresponding to the N groups of coordinates, wherein the target pose is used to characterize the position and posture of the robot in the global coordinate system when it is turned on, and the grid occupancy probability of the grid is used to characterize the probability of the existence of an object in the grid.

[0100] In order to enable ordinary persons in the art to better understand the technical solutions of the present disclosure, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings.

[0101] Figure 1 This is a possible relocation method provided in the implementation of the present disclosure, and the specific process is as follows:

[0102] S101. The repositioning device obtains single-frame point cloud data in a laser radar coordinate system collected by a laser radar of the robot, and performs feature extraction on the single-frame point cloud data to obtain a first topological map.

[0103] In the disclosed embodiment, the single-frame point cloud data may be the first frame of point cloud data collected by the LiDAR after the robot is powered on. The LiDAR coordinate system is used to describe the relative position of an object and the LiDAR, where the origin of the LiDAR coordinate system is the geometric center of the LiDAR.

[0104] Specifically, the relocation device may extract features from the single-frame point cloud data to obtain the first topological map using, but not limited to, the following methods:

[0105] A1. The re-positioning device extracts features from the single-frame point cloud data to obtain each line segment and each corner point.

[0106] In the disclosed embodiments, line segment extraction can employ, but is not limited to, methods such as segmentation and merging, region growing, and Hough transform. When extracting line segments from a single frame of point cloud data, if two line segments intersect and the angle between them falls within a preset angle range, the intersection is considered a corner point. For example, the preset angle range can be between 80° and 120°.

[0107] A2. Using the extracted line segments and corner points as first nodes in the first topological map.

[0108] In the embodiment of the present disclosure, the node information corresponding to the first node may include but is not limited to one or more of the following information: node identification, node type, first node coordinates, and associated edges. Among them, the node identification can be represented by but is not limited to a number identification (Identity Document, ID), the node type of a first node can be a line segment or a corner point, the first node coordinates are used to characterize the coordinates of the first node in the laser radar coordinate system, and the associated edges are used to characterize the edges connected to the first node. For example, if the node type of a first node is a corner point, the first node coordinates of the first node are the coordinates of the corner point, and if the node type of a first node is a line segment, the first node coordinates of the first node are the coordinates of the two endpoints (the first and tail endpoints) of the line segment.

[0109] The following description will be made by taking node i as an example. Node i is any first node among the first nodes included in the first topology map.

[0110] If the node type of node i is a corner point, then the node information corresponding to node i may include:

[0111] The node identifier of node i, the node type of node i, the first node coordinates of node i, and the edges associated with node i, where the node type of node i represents that node i is a corner point, the first node coordinates of node i are (x, y), and the edges associated with node i include the identifier of the edges associated with node i.

[0112] If the node type of node i is a line segment, then the node information corresponding to node i includes:

[0113] The node identifier of node i, the node type of node i, the first node coordinates of node i, the edge associated with node i, and the line segment normal vector of node i. The node type of node i indicates that node i is a line segment. The first node coordinates of node i are the coordinates of the first and last endpoints of the line segment corresponding to node i (x0, y0) and (x1, y1). The line segment normal vector of node i is: Among them, n x The component of the normal vector of the line segment of node i in the X-axis direction, n y It is used to represent the component of the normal vector of the line segment of node i in the Y-axis direction. The edge associated with node i contains the identifier of the edge associated with node i.

[0114] As a first possible implementation, the relocation device may add a first node to the first topological map after extracting each corner point or line segment. As another possible implementation, the relocation device may also add each first node to the first topological map after extracting each corner point and each line segment.

[0115] In the process of adding the first node in the first topological map, if a feature extracted by the repositioning device is a corner point, the repositioning device takes the corner point as a first node in the first topological map, generates a node identifier of the first node corresponding to the corner point, sets the node type of the first node corresponding to the corner point to a corner point, uses the coordinates of the corner point in the lidar coordinate system as the first node coordinates of the first node corresponding to the corner point, and sets the associated edges of the first node corresponding to the corner point to empty.

[0116] Taking feature A as an example, feature A is any corner point extracted. After the relocation device takes feature A as a first node in the first topological map, it generates a node identifier for the first node corresponding to feature A. The generated node identifier is 1, that is, the first node corresponding to feature A is node 1. Then, the node type of node 1 is set to corner point, and the coordinates of feature A in the lidar coordinate system (x A ,y A ) as the first node coordinate of node 1, and set the associated edges of node 1 to empty.

[0117] If a feature extracted by the repositioning device is a line segment, the repositioning device will take the line segment as a first node in the first topological map, generate a node identifier for the first node corresponding to the line segment, set the node type of the first node corresponding to the line segment to a line segment, use the coordinates of the first and last endpoints of the line segment in the lidar coordinate system as the first node coordinates of the first node corresponding to the line segment, set the line segment normal vector, and set the associated edge of the first node corresponding to the line segment to empty.

[0118] Taking feature B as an example, feature B is any extracted line segment. After the repositioning device takes feature B as a first node in the first topological map, it generates a node identifier for the first node corresponding to feature B. The generated node identifier is 2, that is, the first node corresponding to feature B is node 2. The node type of node 2 is set to a line segment, and the coordinates of the first and last endpoints of feature B in the lidar coordinate system (x0, y0) and (x1, y1) are used as the first node coordinates of node 2. The line segment normal vector of node 2 is calculated based on (x0, y0) and (x1, y1), and the associated edge of node 2 is set to empty.

[0119] A3. The repositioning device calculates the distance between node i and node j based on the first node coordinates of node i and node j in each first node, and when it is determined that the distance between node i and node j is greater than a preset distance threshold, adds an edge between node i and node j in the first topological map.

[0120] In the disclosed embodiments, two first nodes can be connected via an edge. The edge information corresponding to each edge includes at least one or more of the following information: edge identifier, edge type, edge distance, and associated nodes. Edge types include, but are not limited to, point-to-point, point-to-line, parallel lines, and intersecting lines. Edge distance represents the physical distance between two first nodes and can also be referred to as edge length. Associated nodes represent the two first nodes connected by the edge.

[0121] In the following, edge x is used as an example for explanation. Edge x is any one of the edges. The edge information corresponding to edge x may include: edge identifier of edge x, edge type of edge x, edge distance of edge x, and nodes associated with edge x.

[0122] Among them, according to the edge type of edge x, there are but are not limited to the following cases:

[0123] The first possible case: The edge type of edge x is point-to-point, that is, edge x connects the first nodes of two nodes whose node types are both corner points. The edge distance of edge x can be expressed as:

[0124]

[0125] Among them, d is used to represent the edge distance of edge x, (x A ,y A ) and (x B ,y B ) are the coordinates of the two first nodes connected by edge x.

[0126] The second possible case: The edge type of edge x is point-line. That is, of the two first nodes connected by edge x, one first node is a line segment, and the other first node is a corner point. The edge distance of edge x can be expressed as:

[0127]

[0128] Among them, d is used to represent the edge distance of edge x, (x0, y0) and (x1, y1) are the coordinates of the end point of the line segment corresponding to the first node, (x A ,y A ) is the coordinate of the corner point corresponding to the other first node.

[0129] The third possible situation: the edge type of edge x is a parallel line, that is, the two nodes connected by edge x are both the first nodes of a line segment. The edge distance of edge x can be calculated using the above formula (2), where (x0, y0) and (x1, y1) are the coordinates of the first and last endpoints of the line segment corresponding to a first node, respectively. A ,y A ) is the coordinate of any endpoint of the line segment corresponding to the other first node.

[0130] The fourth possible situation: the edge type of edge x is a cross line, that is, the two nodes connected by edge x are both the first nodes of a line segment. Assume that the line segment normal vectors of the two first nodes are (n x1 , n y1 )、(n x2 , n y2 ) then the side distance of side x can be expressed as:

[0131]

[0132] The angle θ between the line segments corresponding to the two first nodes is used to represent the side distance of the side x, θ∈[0,π).

[0133] The following only takes node i and node j as an example. Node i and node j are any two first nodes among the first nodes. In the embodiment of the present disclosure, other first nodes can be connected in the above manner.

[0134] Specifically, depending on the node types of node i and node j, there are but are not limited to the following possible situations:

[0135] A first possible scenario: Node types of nodes i and j are both corner points. In this case, the preset distance threshold may be a preset corner point distance threshold, for example, the corner point distance threshold is 30 meters.

[0136] The relocation device calculates the distance between node i and node j using formula (1) based on the first node coordinates of node i and node j. If the distance between node i and node j is less than or equal to the preset corner point distance threshold, it is determined that there is an edge between node i and node j. Then, an edge is added between node i and node j in the first topological map.

[0137] The edge between node i and node j is called edge ij. After the relocation device adds edge ij between node i and node j in the first topology map, it can also add corresponding edge information for edge ij. Exemplarily, the edge information of edge ij can include: edge identifier, edge type, edge distance, and associated nodes.

[0138] Exemplarily, the relocation device may add corresponding edge information to edge ij in the following manner, but not limited to: the relocation device generates an edge identifier for edge ij, sets the edge type of edge ij to point-to-point, uses the distance between node i and node j as the edge distance of edge ij, and adds the node identifiers of node i and node j to the nodes associated with edge ij. Accordingly, the relocation device may add the edge identifier of edge ij to the edge associated with node i and node j.

[0139] Take nodes 1 and 3 as an example, see Figure 2As shown, it is assumed that node 1 and node 3 are the first nodes of the two node types of each first node, and the first node coordinates of node 1 and node 3 are (10, 10) and (10, 25) respectively. The relocation device calculates the distance between node 1 and node 3 as 15 according to the first node coordinate (10, 10) of node 1 and the first node coordinate (10, 25) of node 3 using formula (1). Assuming that the preset corner point distance threshold is 30 meters, the relocation device determines that the distance between node 1 and node 3 is less than 30 meters, determines that there is an edge between node 1 and node 3, and adds an edge between node 1 and node 3 in the first topological map. Further, the relocation device generates an edge identifier of the edge between node 1 and node 3 as edge 3, sets the edge type of edge 3 to point-point, and uses the distance between node 1 and node 3 as the edge distance of edge 3, and adds the node identifier of node 1 and the node identifier of node 3 in the associated node of edge 3. Correspondingly, the relocation device adds the edge identifier of edge 3 to the edges associated with node 1 , and adds the edge identifier of edge 3 to the edges associated with node 3 .

[0140] A second possible scenario is that nodes i and j are of different node types. For example, node i is a line segment and node j is a corner point, or node i is a corner point and node j is a line segment. In this case, the preset distance threshold can be a preset point-line distance threshold, for example, 30 meters.

[0141] Specifically, the relocation device calculates the distance between node i and node j using formula (2) based on the first node coordinates of node i and node j. If the distance between node i and node j is less than or equal to a preset point-line distance threshold, it is determined that there is an edge between node i and node j, and an edge is added between node i and node j in the first topological map.

[0142] The edge between node i and node j is called edge ij. After adding edge ij between node i and node j in the first topology map, the relocation device may further add corresponding edge information for edge ij.

[0143] Exemplarily, the relocation device may add corresponding edge information to edge ij in the following manner, but not limited to: generating an edge identifier for edge ij, setting the edge type of edge ij to point-line, using the distance between node i and node j as the edge distance of edge ij, and adding the node identifiers of node i and node j to the nodes associated with edge ij. Accordingly, the relocation device adds the edge identifier of edge ij to the edge associated with node i and node j.

[0144] Take nodes 1 and 2 as an example, see Figure 2As shown, it is assumed that node 1 is a first node with a node type of corner point among each first node, node 2 is a first node with a node type of line segment among each first node, the first node coordinates of node 1 are (10, 10), and the first node coordinates of node 2 are (15, 15) and (2, 2). The relocation device calculates the distance between node 1 and node 2 as 0 according to the first node coordinates (10, 10) of node 1 and the first node coordinates (15, 15) and (2, 2) of node 2 using formula (2). The preset point-line distance threshold is 30 meters. The relocation device determines that the distance between node 1 and node 2 is less than 30 meters, determines that there is an edge between node 1 and node 2, and adds an edge between node 1 and node 2 in the first topological map. Further, the relocation device generates an edge identifier of the edge between node 1 and node 2 as edge 1, sets the edge type of edge 1 to point-line, and uses the distance between node 1 and node 2 as the edge distance of edge 1, and adds the node identifier of node 1 and the node identifier of node 2 in the associated node of edge 1. Correspondingly, the relocation device adds the edge identifier of edge 1 to the edges associated with node 1 , and adds the edge identifier of edge 1 to the edges associated with node 2 .

[0145] The third possible situation: the node types of node i and node j are both line segments.

[0146] The relocation device calculates the angle between the line segments using formula (3) based on the first node coordinates of node i and node j. Depending on the value of the angle between the line segments, there are two cases:

[0147] Case A: The angle between the line segments corresponding to node i and node j is 0°, that is, the line segment corresponding to node i and the line segment corresponding to node j are parallel lines.

[0148] The relocation device calculates the distance between node i and node j using formula (2) based on the first node coordinates of node i and node j, and after determining that the distance between node i and node j is less than or equal to a preset point-line distance threshold, determines that there is an edge between node i and node j, and adds an edge between node i and node j in the first topological map.

[0149] The edge between node i and node j is called edge ij. After adding edge ij between node i and node j in the first topology map, the relocation device may further add corresponding edge information for edge ij.

[0150] Exemplarily, the relocation device may add corresponding edge information to edge ij in the following manner, but not limited to: generating an edge identifier for edge ij, setting the edge type of edge ij to a parallel line, using the distance between node i and node j as the edge distance of edge ij, and adding the node identifiers of node i and node j to the nodes associated with edge ij. Accordingly, the relocation device adds the edge identifier of edge ij to the edge associated with node i and node j.

[0151] Take nodes 2 and 5 as an example, see Figure 2 As shown, assuming that node 2 and node 5 are the first nodes of each first node whose node type is a line segment, the relocation device calculates the distance between node 1 and node 2 as 28 meters based on the first node coordinate of node 2 and the first node coordinate of node 5 using formula (2). The preset point-line distance threshold is 30 meters. The relocation device determines that the distance between node 2 and node 5 is less than 30 meters, determines that there is an edge between node 2 and node 5, and adds an edge between node 2 and node 5 in the first topological map. Further, the relocation device generates an edge identifier of the edge between node 2 and node 5 as edge 5, sets the edge type of edge 5 to a parallel line, and uses the distance between node 2 and node 5 as the edge distance of edge 5, and adds the node identifier of node 2 and the node identifier of node 5 to the associated node of edge 5. Accordingly, the relocation device adds the edge identifier of edge 5 to the associated edge of node 2, and adds the edge identifier of edge 5 to the associated edge of node 5.

[0152] Case 2: The angle between the line segments corresponding to nodes i and j is not 0°, that is, the line segments corresponding to nodes i and j are intersecting lines.

[0153] When the relocation device determines that the angle between the line segments corresponding to node i and node j is less than or equal to the preset angle threshold, it determines that there is an edge between node i and node j, and adds an edge between node i and node j in the first topological map.

[0154] The edge between node i and node j is called edge ij. After adding edge ij between node i and node j in the first topology map, the relocation device may further add corresponding edge information for edge ij.

[0155] Exemplarily, the relocation device may add corresponding edge information to edge ij in the following manner, but not limited to: generating an edge identifier for edge ij, setting the edge type of edge ij to a cross line, using the angle between line segments as the edge distance of edge ij, and adding the node identifiers of node i and node j to the nodes associated with edge ij. Accordingly, the relocation device adds the edge identifier of edge ij to the edge associated with node i and node j.

[0156] Take nodes 4 and 6 as an example, see Figure 2As shown, it is assumed that node 4 and node 6 are first nodes whose node types are line segments in each first node, and the angle between the line segments corresponding to node 4 and node 6 is 60°. The preset angle threshold is 120°, and the relocation device determines that the angle between the line segments corresponding to node 4 and node 6 is less than 120°, determines that there is an edge between node 4 and node 6, and adds an edge between node 4 and node 6 in the first topological map. Further, the relocation device generates an edge identifier of the edge between node 4 and node 6 as edge 6, sets the edge type of edge 6 to a cross line, and uses the angle between the line segments corresponding to node 4 and node 6 as the edge distance of edge 6, and adds the node identifier of node 4 and the node identifier of node 6 in the associated node of edge 6. Accordingly, the relocation device adds the edge identifier of edge 6 in the associated edge of node 4, and adds the edge identifier of edge 6 in the associated edge of node 6.

[0157] S102: The repositioning device obtains N candidate poses based on the first topological map and the second topological map, wherein the second topological map is obtained by performing feature extraction on a grid map constructed in a global coordinate system.

[0158] In the embodiment of the present disclosure, the process of obtaining the second topological map is similar to that of obtaining the first topological map, and will not be described in detail herein. The second topological map includes various second nodes, and the various second nodes are connected by edges.

[0159] For details, see Figure 3 As shown, when executing S102, the following methods may be used but are not limited to:

[0160] S1021. The relocation device matches each first node with each second node based on the first edge length set corresponding to each first node contained in the first topology map and the second edge length set corresponding to each second node contained in the second topology map.

[0161] Each first edge length set includes the edge lengths of edges connected to the corresponding first node, and each second edge length set includes the edge lengths of edges connected to the corresponding second node.

[0162] Specifically, when S1021 is executed, the following steps are included but not limited to:

[0163] S10211. The relocation device obtains matching groups based on the first nodes included in the first topology map and the second nodes included in the second topology map, wherein each matching group includes a first node and a second node of the same node type.

[0164] In some embodiments, in order to reduce the amount of calculation and improve the relocation efficiency, when executing S10211, the relocation device can select the first node with the largest number of connected edges from the first topological map in sequence as a first node in the target multi-layer subgraph until the first topological map is empty, and the target multi-layer subgraph is obtained, wherein each time a first node is selected, the node connected to the first node is deleted from the first topological map, and each layer in the target multi-layer subgraph contains a first node.

[0165] For example, see Figure 2 As shown, there are nodes 1, 2, ..., 6 in the first topological map. First, the relocation device selects node 1 with the largest number of connected edges from the first topological map as a first node, and deletes nodes 2, 3, and 4 connected to node 1 from the first topological map.

[0166] Furthermore, the relocation device obtains each matching group based on each first node included in the target multi-layer subgraph and each second node included in the second topology map.

[0167] In the embodiment of the present disclosure, the number of layers of the target multi-layer subgraph is K, where K is a positive integer.

[0168] For example, assuming that the first nodes contained in the target multi-layer subgraph are node 1 and node 9 respectively, and the second topology map contains node a, node b, and node c, then the relocation device obtains matching groups 1, ..., matching group 6 based on node 1 and node 9 contained in the target multi-layer subgraph and node a, node b, and node c contained in the second topology map, wherein matching group 1 contains node 1 and node a, matching group 2 contains node 1 and node b, matching group 3 contains node 1 and node c, matching group 4 contains node 9 and node a, matching group 5 contains node 9 and node b, and matching group 6 contains node 9 and node c.

[0169] See Figure 2 As shown, if there is a first node with a node type of corner point in the first topological map, then the node is connected to at least two first nodes with a node type of line segment. The first node with a node type of line segment can exist independently in the first topological map, that is, it is not connected to other first point nodes. In order to reduce the amount of calculation and thus improve the relocation efficiency, in the embodiment of the present disclosure, the first nodes are selected from the first topological map in sequence. In the process of obtaining the target multi-layer subgraph, the first nodes with a node type of corner point can be first extracted from the first topological map. After all the first nodes with a node type of corner point in the first topological map are deleted, the first nodes with a node type of line segment in the first topological map are extracted.

[0170] It should be noted that, in other embodiments, the relocation device may also directly obtain each matching group based on each first node included in the first topology map and each second node included in the second topology map. For example, assuming that the first topology map includes nodes 1 to 10, and the second topology map includes nodes a, b, and c, 30 matching groups are obtained, where matching group 1 includes node 1 and node a, and other matching groups are not described in detail.

[0171] S10212: For each matching group, if the first edge length set corresponding to node i in matching group x is a subset of the second edge length set corresponding to node j in matching group x, the relocation device determines that node i and node j in matching group x are matched successfully.

[0172] The matching group x is any matching group among the matching groups, and the matching group x includes the node i and the node j.

[0173] For example, matching group x is matching group 1, which contains nodes 1 and a. Node 1 is Figure 2 A first node in the first topological map shown, node a is a first node in the second topological map with a node type of corner point. The edges connected to node 1 include edge 1, edge 3, and edge 4, that is, the first edge length set corresponding to node 1 contains the edge lengths of edge 1, edge 3, and edge 4 connected to node 1, that is, the first edge length set corresponding to node 1 contains the edge distances of edge 1, edge 3, and edge 4 connected to node 1. Assume that the edge distances of edge 1, edge 3, and edge 4 are 0, 15, and 0 respectively, the first edge length set corresponding to node 1 is {0, 15, 0}, and the second edge length set corresponding to node a is {0, 15, 20, 0}. At this time, the first edge length set corresponding to node 1 is a subset of the second edge length set corresponding to node a, and the relocation device determines that node 1 and node a in matching group 1 are successfully matched.

[0174] S1022: The repositioning device obtains a target group based on the successfully matched first node and second node, and obtains N candidate poses based on each obtained target group.

[0175] In the following, only the target group x is used as an example for description. The target group x is any target group among the target groups. The target group x includes a first node (node ​​x1) and a second node (node ​​x2).

[0176] Depending on the node types of node x1 and node x2, there are two possible situations:

[0177] The first possible case: the node types of nodes x1 and x2 are corner points.

[0178] Specifically, the relocalization device determines a first distance, a second distance, and a posture angle of the robot based on the first node coordinate of the node x1 in the target group x; wherein the node x1 in the target group x is a corner point between the first line segment and the second line segment, the first distance is used to represent the distance between the robot and the first line segment, and the second distance is used to represent the distance between the robot and the second line segment;

[0179] Determine a candidate position of the robot in a global coordinate system based on the first distance and the second distance, and based on a second node coordinate of the node x2 in the target group x;

[0180] Based on the attitude angle and the candidate position, the candidate pose is obtained.

[0181] The second node coordinates are used to represent the coordinates of the corresponding second node in the global coordinate system.

[0182] For example, see Figure 4 As shown, the relocalization device determines the first distance L1, the second distance L2, and the attitude angle θ1 of the robot based on the first node coordinate of the node x1 in the target group x, where the node x1 is the intersection of the line segment 1 and the line segment 2. Based on the first distance L1, the second distance L2, and the second node coordinate of the node x2, the candidate position 1 and the candidate position 2 of the robot in the global coordinate system are determined, and based on the attitude angle θ1, the candidate position 1 and the candidate position 2, the candidate pose 1 and the candidate pose 2 are obtained, where the candidate pose 1 is T1 = [x1, y1, θ1], and the candidate pose 2 is T i =[x2, y2, θ1].

[0183] It should be noted that, in the embodiment of the present disclosure, the candidate pose can also be referred to as a possible pose solution. i =[x i ,y i ,θ i ], where x i Indicates the coordinate of the robot on the X axis in the global coordinate system, y i Indicates the Y-axis coordinate of the robot in the global coordinate system, θ i It represents the offset angle between the lidar coordinate system and the global coordinate system with the global coordinate system as the reference, θ i It can also be understood as the orientation of the robot in the global coordinate system.

[0184] The second possible situation: the node type of node x1 and node x2 is line segment.

[0185] Specifically, the repositioning device determines a third distance and an attitude angle of the robot based on the first node coordinate of the node x1 in the target group x; wherein the third distance is used to represent the distance between the robot and the third line segment corresponding to the node x1; based on the second node coordinate, attitude angle, and third distance of the node x2 in the target group x, at least one candidate posture of the robot in the global coordinate system is obtained.

[0186] For example, see Figure 5 As shown, the repositioning device determines that the third distance is L3 and the posture angle of the robot is θ2 based on the first node coordinate of the node x1 in the target group x, and obtains the candidate posture 1, candidate posture 2, ..., candidate posture N of the robot in the global coordinate system based on the second node coordinate of the node x2 in the target group x, the posture angle θ2, and the third distance L3.

[0187] Among them, at least one candidate pose can be obtained by sliding the line segment corresponding to the node x1 from one end to the other end of the line segment corresponding to the node x2 according to the set sliding step size.

[0188] In the embodiment of the present disclosure, the set sliding step size can be determined according to the grid resolution (resolution) of the grid map. The grid resolution includes the unit resolutions of the two coordinate axes in the global coordinate system, the unit resolution Xres of the X-axis and the unit resolution Yres of the Y-axis. As an example, the values ​​of Xres and Yres can be the same. As another example, the values ​​of Xres and Yres can also be different. This embodiment does not limit the specific value of the grid resolution.

[0189] S103. The repositioning device determines N groups of coordinates of the single-frame point cloud data in the global coordinate system based on the N candidate poses, and determines the target pose of the robot from the N candidate poses based on the grid occupancy probabilities of the grids corresponding to the N groups of coordinates, wherein the target pose is used to represent the pose of the robot in the global coordinate system when it is turned on, and the grid occupancy probability of each grid is used to represent the probability of an object existing in the corresponding grid.

[0190] Specifically, when the repositioning device determines N sets of coordinates of a single frame of point cloud data in the global coordinate system based on N candidate poses, the following steps may be adopted but are not limited to:

[0191] B1. The relocalization device converts the single-frame point cloud data from the LiDAR coordinate system to the global coordinate system based on N candidate poses, obtaining N sets of coordinates in the global coordinate system. Each candidate pose corresponds to a set of coordinates.

[0192] In the embodiment of the present disclosure, according to any one of the N candidate poses T i =[x i ,yi ,θ i ], the following formula (4) can be used to transform the single-frame point cloud data from the lidar coordinate system to the global coordinate system:

[0193] x′=cosθ i *x+sinθ i *y+x i

[0194] y′=-sinθ i *x+cosθ i *y+y i

[0195] Among them, (x, y) represents the point cloud data in the lidar coordinate system, and (x′, y′) represents the point cloud data in the global coordinate system.

[0196] B2. The repositioning device increases the second matching score of the candidate posture corresponding to any set of coordinates in the N sets of coordinates by a first set value if the grid occupancy probability of the grid to which any one coordinate in any set of coordinates belongs is greater than a preset threshold; otherwise, the second matching score of the candidate posture corresponding to any set of coordinates is subtracted from the second set value.

[0197] For any set of coordinates in the N sets of coordinates, the following formula (5) can be used to calculate the grid number to which any coordinate in any set of coordinates belongs:

[0198]

[0199]

[0200] Among them, (id x , id y ) represents the grid number, and (x0, y0) represents the origin coordinates of the grid map.

[0201] For example, assuming that the first set value and the second set value are both 1, and the preset threshold is 1, then if the grid occupancy probability of the grid to which any coordinate in any set of coordinates belongs is greater than 0, the second matching score of the candidate posture corresponding to any set of coordinates will be increased by 1, otherwise the matching score of the second candidate posture corresponding to any set of coordinates will be subtracted by 1.

[0202] B3. The relocalization device takes the candidate pose with the second highest matching score among the N candidate poses as the target pose of the robot.

[0203] Among them, the target pose is used to represent the pose of the robot in the global coordinate system when it is turned on. The pose of the robot includes the position and posture of the robot. The candidate pose T iFor example, the position of the robot is (x i ,y i ), the robot’s posture is θ i .

[0204] Exemplarily, the repositioning device may sort the candidate poses according to the values ​​of the second matching scores to obtain a candidate pose sequence, and then select the candidate pose with the highest second matching score from the candidate pose sequence as the target pose.

[0205] For example, assuming that the second matching scores of candidate postures T1, candidate postures T2, and candidate postures T3 are 30, 50, and 90 respectively, candidate posture T3 is used as the target posture of the robot.

[0206] In some embodiments, considering that the computational complexity is large when there are many candidate poses, in order to further improve the matching efficiency, after obtaining N candidate poses based on the first topological map and the second topological map, the relocalization device can also determine M candidate poses from the N candidate poses, and then determine the target pose of the robot from the M candidate poses. Specifically, determining M candidate poses from the N candidate poses can be done by, but not limited to, the following steps:

[0207] C1. The repositioning device obtains the third node coordinates of each first node in the global coordinate system based on the first node coordinates of each first node contained in the first topological map in the lidar coordinate system according to the N candidate postures.

[0208] When executing C1, the above formula (4) can be used to calculate the third node coordinates of the first node in the global coordinate system, which will not be repeated here. In the embodiment of the present disclosure, the third node coordinates of the first node are used to represent the coordinates of the first node in the global coordinate system.

[0209] C2. The repositioning device determines the first matching scores corresponding to the N candidate postures according to the third node coordinates of each first node.

[0210] Among them, the first matching score refers to the number of target nodes existing in each first node contained in the first topological map, and the target node refers to: a first node whose distance between the second node of the same node type as any one of the nodes in the second topological map is less than or equal to a preset threshold.

[0211] The following description is made by taking node i as an example, where node i is any first node among the first nodes included in the first topology map.

[0212] Specifically, according to the node type of node i, there are the following situations:

[0213] Case 1: The node type of node i is a corner point. In this case, the distance between node i and the second node of the same node type can be calculated using formula (1), which will not be repeated here.

[0214] For example, the preset threshold is 2*resolution. If there is a second node in the second topology map that has the same node type as node i and whose distance to node i is less than or equal to 2*resolution, node i is taken as a target node.

[0215] Case 2: Node i's node type is a line segment. If node i's node type is a line segment, the distance between node i and a second node of the same node type can also be understood as the angle between node i and the second node of the same node type. The preset threshold uses the angle threshold value. In this case, the distance between node i and the second node of the same node type can be calculated using formula (3), which is not repeated here.

[0216] For example, the preset threshold is 1°. If there is a second node in the second topology map that has the same node type as node i and a distance from node i that is less than or equal to 1°, node i is taken as a target node.

[0217] In some embodiments, the relocation device can also use the angle between the second node of the same type as any node in the second topological map as a target node, which is less than or equal to a preset angle threshold, and the first node whose third node coordinates meet the preset range. Assume that the third node coordinates of node i are (x1', y1'), (x2', y2'), and the second node coordinates of any second node whose node type is a line segment are (x0, y0), (x1, y1), and the third node coordinates meet the preset range can refer to x1', x2'∈[min(x0, x1), max(x0, x1)], y1', y2'∈[min(y0, y1), max(y0, y1)].

[0218] C3. The repositioning device selects M candidate postures from the N candidate postures according to the first matching scores corresponding to the N candidate postures, where the value of M is less than or equal to N, and both M and N are positive integers.

[0219] For example, the repositioning device may sort the N candidate poses to obtain a candidate pose sequence, and based on the candidate pose sequence, obtain M candidate poses. The repositioning device may sort the N candidate poses in descending order. As another possible implementation, the repositioning device may also sort the N candidate poses in descending order, which is not limited in this disclosure. The following description will only be based on an example of sorting from largest to smallest.

[0220] For example, assuming that the value of M is 2, the repositioning device obtains 10 candidate poses, which are T1, T2, T3, ..., T10. The repositioning device sorts the 10 candidate poses in descending order based on the first matching scores corresponding to each of the 10 candidate poses, and obtains a candidate pose sequence of T10, T2, ..., T1, T3. The repositioning device selects T10 and T2 from the candidate pose sequence of T10, T2, ..., T1, T3, and then determines the coordinates of the single-frame point cloud data in the global coordinate system based on T10 and T2, respectively.

[0221] In the process of determining the coordinates of a single frame of point cloud data in the global coordinate system based on N candidate poses, and determining the target pose of the robot from the N candidate poses based on the grid occupancy probabilities of the grids corresponding to the N sets of coordinates, the relocalization device can determine the coordinates of a single frame of point cloud data in the global coordinate system based on the selected M candidate poses, and determine the target pose of the robot from the M candidate poses based on the grid occupancy probabilities of the grids corresponding to the M sets of coordinates. Since the process of determining the target pose based on the M candidate poses is the same as the process of determining the target pose based on the N candidate poses, it will not be repeated here.

[0222] In some embodiments, after obtaining the candidate posture with the highest second matching score among the N candidate postures, the repositioning device can directly use the candidate posture as the target posture of the robot.

[0223] In some other embodiments, considering that the accuracy of the candidate pose with the second highest matching score among the N candidate poses obtained is resolution, to ensure the accuracy of the relocalization result, when obtaining the target pose of the robot, the following steps may be taken, but are not limited to:

[0224] The repositioning device uses an optimization algorithm to optimize the candidate posture with the second highest matching score among N candidate postures to obtain an optimized candidate posture; the optimized candidate posture is used as the target posture of the robot.

[0225] In the disclosed embodiment, the optimization algorithm may adopt, but is not limited to, an Iterative Closest Point (ICP) algorithm, a Correlation Scan Match (CSM) algorithm, or other laser frame-map matching algorithms.

[0226] For example, the repositioning device uses the ICP algorithm to optimize the candidate pose Tbest with the second highest matching score among N candidate poses to obtain the optimized candidate pose, and uses the optimized candidate pose as the target pose of the robot.

[0227] In some embodiments, considering that each point cloud data in the collected single-frame point cloud data may be discretely distributed, the repositioning device cannot extract line segments from the single-frame point cloud data, and thus cannot obtain the first topological map. Therefore, in the embodiment of the present disclosure, when obtaining N candidate poses in the case where the first topological map is not extracted, the repositioning device may adopt, but is not limited to, the following methods:

[0228] If the relocalization device fails to obtain the first topological map after performing feature extraction on the single-frame point cloud data, the boundary of the grid map is expanded according to the set expansion distance to obtain an extended map; all solutions are used as candidate poses to obtain N candidate poses, where all solutions are the poses of the robot at all positions in the extended map.

[0229] It should be noted that in the embodiment of the present disclosure, the expansion distance can be set according to the grid resolution of the grid map. For example, assuming that the grid resolution of the grid map is resolution, the expansion distance can be resolution or 2*resolution. The present disclosure does not impose any restrictions on this.

[0230] For example, suppose the grid resolution of the grid map is resolution, the expansion distance is set to D, and the value of D is resolution. Figure 6 As shown, if the repositioning device fails to obtain the first topological map after performing feature extraction on the single-frame point cloud data, the boundary of the grid map is expanded according to the set expansion distance D to obtain an expanded map.

[0231] The coordinates of the lower left corner of the expanded map are (x d ,y d ), the length and width of the expanded map are w and h respectively, the unit step length in the x-axis direction is resolution, and the total step length is n d =w / resolution;

[0232] The unit step length in the y-axis direction is resolution, and the total step length is n h =h / resolution;

[0233] Unit angle step size at each position The total angle step is n a =2π / δ a .

[0234] Therefore, the number of all solutions is n d *n h *n a Among them, any solution T=[x d +i*resolution,y d+j*resolution,k*δ a ], where i∈[0,n d ],j∈[0,n h ],k∈[0,n a ].

[0235] It should be noted that if the relocation device fails to obtain the first topology map, the first matching score of each solution may be set to 0 during the process of matching the first topology map with the second topology map.

[0236] To sum up, in the embodiment of the present disclosure, the repositioning device performs feature extraction on the single-frame point cloud data collected by the robot's laser radar to obtain a first topological map, and then performs feature extraction on the grid map constructed in the global coordinate system to obtain a second topological map, and based on the first topological map, obtains N candidate poses, and then, based on the N candidate poses, determines N groups of coordinates of the single-frame point cloud data in the global coordinate system, and determines the target pose of the robot from the N candidate poses based on the grid occupancy probabilities of the grids corresponding to the N groups of coordinates, wherein the target pose is used to characterize the position and posture of the robot in the global coordinate system when it is turned on, and the grid occupancy probability of the grid is used to characterize the probability of the existence of an object in the grid.

[0237] In this way, in the embodiment of the present disclosure, the repositioning device can obtain the position and posture of the robot in the global coordinate system when it is turned on based on the single-frame point cloud data and the grid map, which reduces the complexity of the repositioning operation, improves the repositioning efficiency, and ensures the repositioning accuracy. At the same time, since only a single-frame point cloud data is required, there is no need to move the robot, which avoids collisions of the robot during movement.

[0238] Based on the same inventive concept, see Figure 7 As shown, it is a repositioning device provided in an embodiment of the present disclosure. The repositioning device 700 at least includes: an extraction unit 701, a matching unit 702 and a determination unit 703.

[0239] The extraction unit 701 is configured to obtain single-frame point cloud data in a laser radar coordinate system collected by a laser radar of the robot, and perform feature extraction on the single-frame point cloud data to obtain a first topological map;

[0240] A matching unit 702 is configured to obtain N candidate poses based on the first topological map and the second topological map, wherein the second topological map is obtained by performing feature extraction based on a grid map constructed in a global coordinate system;

[0241] The determination unit 703 is used to determine N groups of coordinates of the single-frame point cloud data in the global coordinate system based on the N candidate poses, and determine the target pose of the robot from the N candidate poses based on the grid occupancy probabilities of the grids corresponding to the N groups of coordinates, wherein the target pose is used to characterize the pose of the robot in the global coordinate system when it is turned on, and the grid occupancy probability of each grid is used to characterize the probability of an object existing in the corresponding grid.

[0242] Optionally, when N candidate poses are obtained based on the first topology map and the second topology map, the matching unit 702 is specifically configured to:

[0243] Matching each first node with each second node based on a first edge length set corresponding to each first node contained in the first topology map, and based on a second edge length set corresponding to each second node contained in the second topology map; wherein each first edge length set includes the edge lengths of the edges connected to the corresponding first node, and each second edge length set includes the edge lengths of the edges connected to the corresponding second node;

[0244] The first and second nodes that are successfully matched are taken as target groups, and N candidate poses are obtained based on each target group.

[0245] Optionally, when matching each first node with each second node based on a first edge length set corresponding to each first node contained in the first topology map, and based on a second edge length set corresponding to each second node contained in the second topology map, the matching unit 702 is specifically configured to:

[0246] Based on each first node included in the first topology map and each second node included in the second topology map, obtaining each matching group, wherein each matching group includes a first node and a second node of the same node type;

[0247] For each matching group, if the first edge length set corresponding to the first node in a matching group is a subset of the second edge length set corresponding to the second node in the same matching group, then it is determined that the first node and the second node in the matching group are matched successfully.

[0248] Optionally, when obtaining each matching group based on each first node included in the first topology map and each second node included in the second topology map, the matching unit 702 is specifically configured to:

[0249] From the first topological map, sequentially selecting a first node with the largest number of connected edges as a first node in a target multi-layer subgraph until the first topological map is empty, thereby obtaining a target multi-layer subgraph, wherein each time a first node is selected, the nodes connected to the first node are deleted from the first topological map, and each layer of the target multi-layer subgraph contains a first node;

[0250] Matching groups are obtained based on the first nodes included in the target multi-layer subgraph and the second nodes included in the second topology map.

[0251] Optionally, when N candidate poses are obtained based on each target group, the matching unit 702 is specifically configured to:

[0252] If the node type of the first node and the second node included in any one of the target groups is a corner point, determining a first distance, a second distance, and a posture angle of the robot based on the first node coordinates of the first node in the any one of the target groups; wherein the first node in the any one of the target groups is a corner point between a first line segment and a second line segment, the first distance is used to represent the distance between the robot and the first line segment, and the second distance is used to represent the distance between the robot and the second line segment;

[0253] determining a candidate position of the robot in the global coordinate system based on the first distance and the second distance, and based on a second node coordinate of a second node in the same target group;

[0254] Based on the attitude angle and the candidate position, a candidate pose is obtained.

[0255] Optionally, when N candidate poses are obtained based on each target group, the matching unit 702 is specifically configured to:

[0256] If the node type of the first node and the second node included in any target group is a line segment, determining a third distance and a posture angle of the robot based on the first node coordinates of the first node in the any target group; wherein the third distance is used to represent the distance between the robot and the third line segment;

[0257] At least one candidate pose of the robot in the global coordinate system is obtained based on the second node coordinates of the second node in the same target group, the posture angle, and the third distance.

[0258] Optionally, after obtaining N candidate poses based on the first topology map and the second topology map, the matching unit 702 is further configured to:

[0259] According to the N candidate poses, respectively based on the first node coordinates of each first node contained in the first topological map in the lidar coordinate system, obtaining the third node coordinates of each first node in the global coordinate system;

[0260] Determining, based on the third node coordinates of each of the first nodes, first matching scores corresponding to each of the N candidate poses, wherein the first matching score refers to the number of target nodes present in each of the first nodes, and the target node refers to a first node whose distance to any second node of the same node type in the second topological map is less than or equal to a preset threshold;

[0261] Selecting M candidate postures from the N candidate postures according to the first matching scores corresponding to the respective N candidate postures; wherein the value of M is smaller than the value of N;

[0262] When determining the coordinates of the single-frame point cloud data in the global coordinate system according to the N candidate poses, and determining the target pose of the robot from the N candidate poses according to the grid occupancy probabilities of the grids corresponding to the N groups of coordinates, the determining unit 703 is specifically configured to:

[0263] According to the M selected candidate poses, the coordinates of the single-frame point cloud data in the global coordinate system are determined respectively, and the target pose of the robot is determined from the M candidate poses according to the grid occupancy probabilities of the grids corresponding to the M groups of coordinates.

[0264] Optionally, when determining N groups of coordinates of the single-frame point cloud data in the global coordinate system based on the N candidate poses, and determining the target pose of the robot from the N candidate poses based on grid occupancy probabilities of grids corresponding to the N groups of coordinates, the determining unit 703 is specifically configured to:

[0265] According to the N candidate poses, the single-frame point cloud data is respectively converted from the lidar coordinate system to the global coordinate system to obtain N sets of coordinates in the global coordinate system; wherein each candidate pose corresponds to a set of coordinates;

[0266] For any set of coordinates in the N sets of coordinates, if the grid occupancy probability of the grid to which any one of the coordinates in the set of coordinates belongs is greater than a preset threshold, then the second matching score of the candidate pose corresponding to the any set of coordinates is increased by a first set value; otherwise, the second matching score of the candidate pose corresponding to the any set of coordinates is subtracted from the second set value;

[0267] The candidate pose with the second highest matching score among the N candidate poses is used as the target pose of the robot.

[0268] Optionally, when the candidate posture with the highest matching score among the N candidate postures is used as the target posture of the robot, the determining unit 703 is specifically configured to:

[0269] Using the optimization algorithm, the candidate pose with the highest matching score among the N candidate poses is optimized to obtain the optimized candidate pose;

[0270] The optimized candidate pose is used as the target pose of the robot.

[0271] Optionally, the determining unit 703 is further configured to:

[0272] If the first topological map is not obtained after feature extraction is performed on the single-frame point cloud data, the boundary of the grid map is expanded according to the set expansion distance to obtain an expanded map;

[0273] All solutions are used as candidate poses to obtain N candidate poses, wherein all solutions are poses of all positions of the robot in the extended map.

[0274] After introducing a relocation method and apparatus according to an exemplary embodiment of the present disclosure, an electronic device according to another exemplary embodiment of the present disclosure is introduced next.

[0275] Those skilled in the art will appreciate that various aspects of the present disclosure may be implemented as systems, methods, or program products. Therefore, various aspects of the present disclosure may be implemented in the following forms: a complete hardware implementation, a complete software implementation (including firmware, microcode, etc.), or a combination of hardware and software implementations, which may be collectively referred to herein as "circuits," "modules," or "systems."

[0276] In some possible implementations, the electronic device according to the present disclosure may include at least one processor and at least one computer storage medium. The computer storage medium stores program code, and when the program code is executed by the processor, the processor executes the steps of the relocation method according to various exemplary embodiments of the present disclosure described above. For example, the processor may execute the following steps: Figure 1 、 3 Follow the steps shown in .

[0277] Refer to the following Figure 8 800 according to this embodiment of the present disclosure will be described. Figure 8 The electronic device 800 shown is merely an example and should not limit the functions and scope of use of the embodiments of the present disclosure.

[0278] like Figure 8As shown, electronic device 800 is a general electronic device. Components of electronic device 800 may include, but are not limited to, at least one processor 801, at least one computer storage medium 802, and a bus 803 connecting different system components (including computer storage medium 802 and processor 801).

[0279] Bus 803 represents one or more of several types of bus structures, including a computer storage media bus or computer storage media controller, a peripheral bus, a processor, or a local bus using any of a variety of bus architectures.

[0280] Computer storage media 802 may include readable media in the form of volatile computer storage media, such as random access computer storage media (RAM) 821 and / or cache storage media 822 , and may further include read-only computer storage media (ROM) 823 .

[0281] The computer storage medium 802 may also include a program / utility 825 having a set (at least one) of program modules 824, such program modules 824 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.

[0282] The electronic device 800 may also communicate with one or more external devices 804 (e.g., a keyboard, pointing device, etc.), one or more devices that enable a user to interact with the electronic device 800, and / or any device that enables the electronic device 800 to communicate with one or more other electronic devices (e.g., a router, a modem, etc.). Such communication may be performed via an input / output (I / O) interface 805. Furthermore, the electronic device 800 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) via a network adapter 806. As shown, the network adapter 806 communicates with other modules of the electronic device 800 via a bus 803. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 800, including but not limited to microcode, device drivers, redundant processors, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0283] In some possible implementations, various aspects of the relocation method provided by the present disclosure may also be implemented in the form of a program product, which includes program code. When the program product is run on a computer device, the program code is used to enable the computer device to execute the steps of the relocation method according to various exemplary embodiments of the present disclosure described above in this specification.

[0284] The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or component, or any combination thereof. More specific examples of readable storage media (a non-exhaustive list) include: an electrical connection having one or more wires, a portable disk, a hard disk, a random access computer storage medium (RAM), a read-only computer storage medium (ROM), an erasable programmable read-only computer storage medium (EPROM or flash memory), an optical fiber, a portable compact disk read-only computer storage medium (CD-ROM), an optical computer storage medium, a magnetic computer storage medium, or any suitable combination thereof.

[0285] The program product may be a portable compact disc read-only computer storage medium (CD-ROM) and include program code, and can be run on an electronic device. However, the program product of the present disclosure is not limited thereto. In this document, a readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.

[0286] A readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries readable program code. Such propagated data signals may take a variety of forms, including, but not limited to, electromagnetic signals, optical signals, or any suitable combination thereof. A readable signal medium may also be any readable medium other than a readable storage medium that can transmit, propagate, or transfer a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0287] Program code embodied on a readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.

[0288] The program code for performing the operations of the present disclosure may be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java, C++, and the like, as well as conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user electronic device, partially on the user device, as a stand-alone software package, partially on the user electronic device and partially on a remote electronic device, or entirely on a remote electronic device or server. In cases involving remote electronic devices, the remote electronic device may be connected to the user electronic device via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external electronic device (e.g., via the Internet using an Internet service provider).

[0289] It should be noted that although several modules of the device are mentioned in the detailed description above, this division is merely exemplary and not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more modules described above can be embodied in one module. Conversely, the features and functions of one module described above can be further divided and embodied by multiple modules.

[0290] Furthermore, although the operations of the disclosed method are described in a particular order in the accompanying drawings, this does not require or imply that the operations must be performed in this particular order, or that all illustrated operations must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps.

[0291] Those skilled in the art will appreciate that the embodiments of the present disclosure may be provided as methods, systems, or computer program products. Therefore, the present disclosure may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, the present disclosure may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk computer storage media, CD-ROM, optical computer storage media, etc.) containing computer-usable program code.

[0292] The present disclosure is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the present disclosure. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0293] These computer program instructions may also be stored in a computer-readable computer storage medium that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable computer storage medium produce an article of manufacture including an instruction device that implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.

[0294] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0295] Obviously, those skilled in the art may make various changes and modifications to the present disclosure without departing from the spirit and scope of the present disclosure. Thus, if these modifications and variations of the present disclosure fall within the scope of the claims of the present disclosure and their equivalents, the present disclosure is intended to include these modifications and variations.

Claims

1. A repositioning method, applied to a repositioning device, characterized in that: include: Acquire single-frame point cloud data in a laser radar coordinate system collected by a laser radar of the robot, and perform feature extraction on the single-frame point cloud data to obtain a first topological map; Obtaining matching groups based on each first node included in the first topological map and each second node included in the second topological map, wherein each matching group includes a first node and a second node of the same node type, and the second topological map is obtained by performing feature extraction based on a grid map constructed in a global coordinate system; For each matching group, if the first edge length set corresponding to the first node in the matching group is a subset of the second edge length set corresponding to the second node in the same matching group, then it is determined that the first node and the second node in the matching group are successfully matched, wherein each first edge length set includes the edge lengths connected to the corresponding first node, and each second edge length set includes the edge lengths connected to the corresponding second node; The first node and the second node that are successfully matched are taken as target groups, and N candidate poses are obtained based on each target group. Based on the N candidate poses, N groups of coordinates of the single-frame point cloud data in the global coordinate system are determined, and based on the grid occupancy probabilities of the grids corresponding to the N groups of coordinates, the target pose of the robot is determined from the N candidate poses, wherein the target pose is used to characterize the pose of the robot in the global coordinate system when it is turned on, and the grid occupancy probability of each grid is used to characterize the probability of an object existing in the corresponding grid.

2. The method according to claim 1, wherein Based on each first node included in the first topology map and each second node included in the second topology map, obtaining each matching group includes: From the first topological map, sequentially selecting a first node with the largest number of connected edges as a first node in a target multi-layer subgraph until the first topological map is empty, thereby obtaining a target multi-layer subgraph, wherein each time a first node is selected, the nodes connected to the first node are deleted from the first topological map, and each layer of the target multi-layer subgraph contains a first node; Matching groups are obtained based on the first nodes included in the target multi-layer subgraph and the second nodes included in the second topology map.

3. The method according to claim 1, wherein Based on the obtained target groups, N candidate poses are obtained, including: If the node type of the first node and the second node included in any one of the target groups is a corner point, determining a first distance, a second distance, and a posture angle of the robot based on the first node coordinates of the first node in the any one of the target groups; wherein the first node in the any one of the target groups is a corner point between a first line segment and a second line segment, the first distance is used to represent the distance between the robot and the first line segment, and the second distance is used to represent the distance between the robot and the second line segment; determining a candidate position of the robot in the global coordinate system based on the first distance and the second distance, and based on a second node coordinate of a second node in the same target group; At least one candidate pose is obtained based on the pose angle and the candidate position.

4. The method according to claim 1, wherein Based on the obtained target groups, N candidate poses are obtained, including: If the node type of the first node and the second node included in any target group is a line segment, determining a third distance and a posture angle of the robot based on the first node coordinates of the first node in the any target group; wherein the third distance is used to represent the distance between the robot and the third line segment; At least one candidate pose of the robot in the global coordinate system is obtained based on the second node coordinates of the second node in the same target group, the posture angle, and the third distance.

5. The method according to any one of claims 1 to 4, wherein After obtaining N candidate poses based on the first topological map and the second topological map, the method further includes: According to the N candidate poses, respectively based on the first node coordinates of each first node contained in the first topological map in the lidar coordinate system, obtaining the third node coordinates of each first node in the global coordinate system; Determining, based on the third node coordinates of each of the first nodes, first matching scores corresponding to each of the N candidate poses, wherein the first matching score refers to the number of target nodes present in each of the first nodes, and the target node refers to a first node whose distance to any second node of the same node type in the second topological map is less than or equal to a preset threshold; Selecting M candidate postures from the N candidate postures according to the first matching scores corresponding to the respective N candidate postures; wherein the value of M is smaller than the value of N; Determining the coordinates of the single-frame point cloud data in the global coordinate system according to the N candidate poses, and determining the target pose of the robot from the N candidate poses according to grid occupancy probabilities of grids corresponding to the N groups of coordinates, including: According to the M selected candidate poses, the coordinates of the single-frame point cloud data in the global coordinate system are determined respectively, and the target pose of the robot is determined from the M candidate poses according to the grid occupancy probabilities of the grids corresponding to the M groups of coordinates.

6. The method according to any one of claims 1 to 4, wherein Determining, based on the N candidate poses, N groups of coordinates of the single-frame point cloud data in the global coordinate system, and determining, based on grid occupancy probabilities of grids corresponding to the N groups of coordinates, a target pose of the robot from the N candidate poses, including: According to the N candidate poses, the single-frame point cloud data is respectively converted from the lidar coordinate system to the global coordinate system to obtain N sets of coordinates in the global coordinate system; wherein each candidate pose corresponds to a set of coordinates; For any set of coordinates in the N sets of coordinates, if the grid occupancy probability of the grid to which any one of the coordinates in the set of coordinates belongs is greater than a preset threshold, then the second matching score of the candidate pose corresponding to the any set of coordinates is increased by a first set value; otherwise, the second matching score of the candidate pose corresponding to the any set of coordinates is subtracted from the second set value; The candidate pose with the second highest matching score among the N candidate poses is used as the target pose of the robot.

7. The method according to claim 6, wherein The candidate pose with the highest matching score among the N candidate poses is used as the target pose of the robot, including: Using the optimization algorithm, the candidate pose with the highest matching score among the N candidate poses is optimized to obtain the optimized candidate pose; The optimized candidate pose is used as the target pose of the robot.

8. The method according to any one of claims 1 to 4, wherein Also includes: If the first topological map is not obtained after feature extraction is performed on the single-frame point cloud data, the boundary of the grid map is expanded according to the set expansion distance to obtain an expanded map; All solutions are used as candidate poses to obtain N candidate poses, wherein all solutions are poses of all positions of the robot in the extended map.

9. A repositioning device, characterized in that: include: an extraction unit, configured to obtain single-frame point cloud data in a laser radar coordinate system collected by a laser radar of the robot, and perform feature extraction on the single-frame point cloud data to obtain a first topological map; A matching unit is configured to obtain matching groups based on each first node contained in the first topological map and each second node contained in the second topological map, wherein each matching group includes a first node and a second node of the same node type, and the second topological map is obtained by feature extraction based on a grid map constructed in a global coordinate system. For each matching group, if a first edge length set corresponding to the first node in a matching group is a subset of a second edge length set corresponding to the second node in the same matching group, then it is determined that the first node and the second node in the matching group are successfully matched, wherein each first edge length set includes the edge length of the edge connected to the corresponding first node, and each second edge length set includes the edge length of the edge connected to the corresponding second node. The successfully matched first node and second node are used as target groups, and N candidate poses are obtained based on each obtained target group. A determination unit is used to determine N groups of coordinates of the single-frame point cloud data in the global coordinate system based on the N candidate poses, and determine the target pose of the robot from the N candidate poses based on the grid occupancy probabilities of the grids corresponding to the N groups of coordinates, wherein the target pose is used to represent the pose of the robot in the global coordinate system when it is turned on, and the grid occupancy probability of each grid is used to represent the probability of an object existing in the corresponding grid.

10. The device according to claim 9, wherein When obtaining each matching group based on each first node included in the first topology map and each second node included in the second topology map, the matching unit is specifically configured to: From the first topological map, sequentially selecting a first node with the largest number of connected edges as a first node in a target multi-layer subgraph until the first topological map is empty, thereby obtaining a target multi-layer subgraph, wherein each time a first node is selected, the nodes connected to the first node are deleted from the first topological map, and each layer of the target multi-layer subgraph contains a first node; Matching groups are obtained based on the first nodes included in the target multi-layer subgraph and the second nodes included in the second topology map.

11. The device according to claim 9, wherein When N candidate poses are obtained based on each target group, the matching unit is specifically used to: If the node type of the first node and the second node included in any one of the target groups is a corner point, determining a first distance, a second distance, and a posture angle of the robot based on the first node coordinates of the first node in the any one of the target groups; wherein the first node in the any one of the target groups is a corner point between a first line segment and a second line segment, the first distance is used to represent the distance between the robot and the first line segment, and the second distance is used to represent the distance between the robot and the second line segment; determining a candidate position of the robot in the global coordinate system based on the first distance and the second distance, and based on a second node coordinate of a second node in the same target group; Based on the attitude angle and the candidate position, a candidate pose is obtained.

12. The device according to claim 9, wherein When N candidate poses are obtained based on each target group, the matching unit is specifically used to: If the node type of the first node and the second node included in any target group is a line segment, determining a third distance and a posture angle of the robot based on the first node coordinates of the first node in the any target group; wherein the third distance is used to represent the distance between the robot and the third line segment; At least one candidate pose of the robot in the global coordinate system is obtained based on the second node coordinates of the second node in the same target group, the posture angle, and the third distance.

13. The device according to any one of claims 9 to 12, characterized in that After obtaining N candidate poses based on the first topological map and the second topological map, the matching unit is further configured to: According to the N candidate poses, respectively based on the first node coordinates of each first node contained in the first topological map in the lidar coordinate system, obtaining the third node coordinates of each first node in the global coordinate system; Determining, based on the third node coordinates of each of the first nodes, first matching scores corresponding to each of the N candidate poses, wherein the first matching score refers to the number of target nodes present in each of the first nodes, and the target node refers to a first node whose distance to any second node of the same node type in the second topological map is less than or equal to a preset threshold; Selecting M candidate postures from the N candidate postures according to the first matching scores corresponding to the respective N candidate postures; wherein the value of M is smaller than the value of N; When determining the coordinates of the single-frame point cloud data in the global coordinate system according to the N candidate poses, and determining the target pose of the robot from the N candidate poses according to the grid occupancy probabilities of the grids corresponding to the N groups of coordinates, the determining unit is specifically configured to: According to the M selected candidate poses, the coordinates of the single-frame point cloud data in the global coordinate system are determined respectively, and the target pose of the robot is determined from the M candidate poses according to the grid occupancy probabilities of the grids corresponding to the M groups of coordinates.

14. The device according to any one of claims 9 to 12, characterized in that When determining, based on the N candidate poses, N groups of coordinates of the single-frame point cloud data in the global coordinate system, and determining the target pose of the robot from the N candidate poses based on grid occupancy probabilities of grids corresponding to the N groups of coordinates, the determining unit is specifically configured to: According to the N candidate poses, the single-frame point cloud data is respectively converted from the lidar coordinate system to the global coordinate system to obtain N sets of coordinates in the global coordinate system; wherein each candidate pose corresponds to a set of coordinates; For any set of coordinates in the N sets of coordinates, if the grid occupancy probability of the grid to which any one of the coordinates in the set of coordinates belongs is greater than a preset threshold, then the second matching score of the candidate pose corresponding to the any set of coordinates is increased by a first set value; otherwise, the second matching score of the candidate pose corresponding to the any set of coordinates is subtracted from the second set value; The candidate pose with the second highest matching score among the N candidate poses is used as the target pose of the robot.

15. The device according to claim 14, wherein When the candidate posture with the highest matching score among the N candidate postures is used as the target posture of the robot, the determining unit is specifically configured to: Using the optimization algorithm, the candidate pose with the highest matching score among the N candidate poses is optimized to obtain the optimized candidate pose; The optimized candidate pose is used as the target pose of the robot.

16. The device according to any one of claims 9 to 12, characterized in that The determining unit is further configured to: If the first topological map is not obtained after feature extraction is performed on the single-frame point cloud data, the boundary of the grid map is expanded according to the set expansion distance to obtain an expanded map; All solutions are used as candidate poses to obtain N candidate poses, wherein all solutions are poses of all positions of the robot in the extended map.

17. An electronic device, characterized in that: The invention comprises at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor; the instructions are executed by the at least one processor so that the at least one processor can execute the method according to any one of claims 1 to 8.

18. A computer storage medium, characterized in that The computer storage medium stores a computer program for executing the method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Unmanned system rapid relocation method based on environmental geometry and topological characteristics

    CN111998846A

  • Pose determination method and device for mobile equipment

    CN112179330A