Topological map processing method and device, equipment and storage medium
By determining the pending nodes and alternative map construction areas in the topology map and performing optimization segmentation processing, the problem of position loss when the robot deviates from the topology route is solved, and the map construction efficiency and reliability are improved.
Patent Information
- Application Number
- CN202510161957.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-13
- Publication Date
- 2025-05-30
AI Technical Summary
Robots tend to lose positions when deviating from topological routes, because the original topological map does not contain texture points that deviate from the position.
By determining the pending nodes in the pending topology map, determining the alternative map construction areas based on the node type, and segmenting these areas through an optimization algorithm to obtain the processed topology map.
It realizes the automatic determination of the mapping area corresponding to the topological path in the topological map, improves the mapping efficiency and reliability, and avoids the loss of position of the robot when deviating from the topological route.
Smart Images

Figure CN120066019A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of robot control technology, and in particular, to a topological map processing method, apparatus, device, and storage medium. Background Art
[0002] In fields such as warehousing, logistics, and factory production, there are problems related to the route planning of robots. Robots can determine the driving route based on a pre-provided map and perform positioning and navigation according to the map. Maps for robot navigation can be grid maps, feature maps, topological maps, etc. Among them, the topological map focuses on the connectivity from point to point on the map and is widely used in path planning.
[0003] In the related art, the original topological map only has texture points on the topological route for positioning and navigation. When the robot deviates from the topological route during the task execution, since the original topological map may not contain the texture points at the position where the robot deviates, it is easy to cause position loss. Summary of the Invention
[0004] Embodiments of the present disclosure provide a topological map processing method, apparatus, device, and storage medium to solve the problem that the position of the robot is easily lost when deviating from the topological route in the related art.
[0005] In a first aspect, embodiments of the present disclosure provide a topological map processing method, which includes:
[0006] Determine a to-be-processed node in the to-be-processed topological map, where the to-be-processed node is used to represent the starting point of an unprocessed topological edge;
[0007] Based on the type of the to-be-processed node, determine an alternative mapping area for the topological edge corresponding to the to-be-processed node;
[0008] Based on an optimization algorithm, perform segmentation processing on the alternative mapping area to obtain a target mapping area corresponding to the to-be-processed node;
[0009] Based on the target mapping area, obtain a processed topological map.
[0010] In a second aspect, embodiments of the present disclosure provide a topological map processing apparatus, which includes:
[0011] A preprocessing module, configured to determine a to-be-processed node in the to-be-processed topological map, where the to-be-processed node is used to represent the starting point of an unprocessed topological edge;
[0012] A classification module, configured to determine an alternative mapping area for the topological edge corresponding to the to-be-processed node based on the type of the to-be-processed node;
[0013] A segmentation module, configured to perform segmentation processing on an alternative mapping area based on an optimization algorithm to obtain a target mapping area corresponding to a node to be processed;
[0014] A processing module, configured to obtain a processed topological map based on the target mapping area.
[0015] In a third aspect, an embodiment of the present disclosure further provides a control device, which includes:
[0016] At least one processor;
[0017] And a memory communicatively connected to the at least one processor;
[0018] Wherein, the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the control device to execute the topological map processing method according to the first aspect of the present disclosure.
[0019] In a fourth aspect, an embodiment of the present disclosure further provides a computer-readable storage medium, in which computer-executable instructions are stored, and when the computer-executable instructions are executed by a processor, they are used to implement the topological map processing method according to the first aspect of the present disclosure.
[0020] In a fifth aspect, an embodiment of the present disclosure further provides a computer program product, which includes computer-executable instructions, and when the computer-executable instructions are executed by a processor, they are used to implement the topological map processing method according to the first aspect of the present disclosure.
[0021] The topological map processing method, device, device and storage medium provided by the embodiments of the present disclosure determine the nodes to be processed in the topological map to be processed, then determine the alternative mapping areas of the topological edges corresponding to the nodes to be processed based on the types of the nodes to be processed, and then perform segmentation processing on the mapping areas based on the optimization algorithm. Finally, based on the target mapping area obtained after the segmentation processing, a processed topological map is obtained. Thus, it is possible to automatically determine the mapping area corresponding to the topological path in the topological map, and be able to jointly process the topological edges adjacent to the nodes according to different types of nodes, and can balance the mapping speed and reliability of the obtained mapping area by optimizing the segmentation of the mapping area, maximizing the mapping efficiency and reliability of the topological map. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] The accompanying drawings herein are incorporated into the specification and constitute a part of the specification, showing embodiments consistent with the present disclosure, and are used together with the specification to explain the principles of the present disclosure.
[0023] Figure 1 It is an application scenario diagram of the topological map processing method provided by the embodiments of the present disclosure;
[0024] Figure 2 Flow chart of the topological map processing method provided by an embodiment of the present disclosure;
[0025] Figure 3a Flow chart of the topological map processing method provided by another embodiment of the present disclosure;
[0026] Figure 3b For Figure 3a Flow chart of the method for obtaining the mapping area corresponding to the bidirectional edge provided in the illustrated embodiment;
[0027] Figure 3c For Figure 3a Schematic diagram of the shape of the edge to be processed provided in the illustrated embodiment;
[0028] Figure 3d For Figure 3a Schematic diagram of the shape of the dilated edge corresponding to the edge to be processed provided in the illustrated embodiment;
[0029] Figure 3e For Figure 3a Schematic diagram of the structure of the mapping area corresponding to the edge to be processed provided in the illustrated embodiment;
[0030] Figure 3f For Figure 3a Schematic diagram of the structure of the intersection node provided in the illustrated embodiment;
[0031] Figure 3g For Figure 3a Flow chart of the method for determining the adjacent edges corresponding to the non - intersection nodes provided in the illustrated embodiment;
[0032] Figure 4a Flow chart of the topological map processing method provided by another embodiment of the present disclosure;
[0033] Figure 4b For Figure 4a Schematic diagram of the mapping area obtained by dividing the mapping area of the topological edge based on a single segmentation point provided in the illustrated embodiment;
[0034] Figure 4c For Figure 4a Schematic diagram of the mapping area obtained by dividing the mapping area of the topological edge based on two segmentation points provided in the illustrated embodiment;
[0035] Figure 4d For Figure 4a Schematic diagram of the mapping area including the no - entry area provided in the illustrated embodiment;
[0036] Figure 5 Schematic diagram of the structure of the topological map processing device provided by another embodiment of the present disclosure;
[0037] Figure 6 Structural schematic diagram of a control device provided by an embodiment of the present disclosure.
[0038] Through the above-mentioned drawings, specific embodiments of the present disclosure have been shown, and more detailed descriptions will be given hereinafter. These drawings and textual descriptions are not intended to limit the scope of the concept of the present disclosure in any way, but to illustrate the concept of the present disclosure to those skilled in the art by referring to specific embodiments. Detailed implementation manners
[0039] Exemplary embodiments will be described in detail herein, and examples are shown in the drawings. When the following description refers to the drawings, unless otherwise indicated, the same numerals in different drawings represent the same or similar elements. The implementation manners described in the following exemplary embodiments do not represent all implementation manners consistent with the present disclosure. On the contrary, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.
[0040] The technical solution of the present disclosure and how the technical solution of the present disclosure solves the above technical problems will be described in detail below with specific embodiments. These several specific embodiments below can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present disclosure will be described below with reference to the drawings.
[0041] The following are concept explanations involved in the embodiments of the present disclosure:
[0042] Topological map processing: In the embodiments of the present disclosure, it is used to represent the process of determining the mapping area where texture points need to be collected on the basis of an original topological map that only contains topological nodes and topological edges. Through topological map processing, the mapping area corresponding to the topological map can be determined, so as to actually collect texture points in the mapping area and obtain a topological map that can also provide texture points for the robot to locate and navigate when the robot deviates from the topological path.
[0043] Topological path: In the embodiments of the present disclosure, each segment of the topological path includes a topological edge and topological nodes at both ends of the topological edge. The topological edge includes a driving direction. Therefore, the topological edge includes a bidirectional edge, that is, a topological edge that can drive in two directions.
[0044] Mapping area: That is, the mapping area corresponding to the topological path. In the embodiments of the present disclosure, it is used to represent the range of the collection area during the collection of texture points of the topological map. The mapping area includes the topological path and the area after dilation processing based on the topological path. Each mapping area is a rectangular area parallel to the coordinate axes, and the mapping areas in the topological map are a set of several rectangular areas.
[0045] Adjacent edge: In the embodiments of the present disclosure, it is used to represent a topological edge that is related to a node to be processed and can simultaneously determine its corresponding mapping area. Therefore, an adjacent edge can be a topological edge with one of its endpoints being the node to be processed, or a topological edge whose endpoints do not include the node to be processed, as long as it meets the requirement of being able to be processed simultaneously with other topological edges related to the node to be processed.
[0046] In fields such as warehousing, logistics, and factory production, problems related to robot route planning are involved. By pre-determining the map corresponding to the robot's travel route (i.e., mapping), the robot can automatically determine the travel route according to the map and perform positioning and navigation based on the map, thereby achieving automated travel based on the map. The map used for robot navigation can be a grid map, a feature map, a topological map, etc. Among them, the topological map focuses on the connectivity from point to point on the map and is widely used in path planning.
[0047] In related technologies, the original topological map provides texture points (such as the patterns of floor tiles on the travel route) to facilitate the robot's positioning based on the texture points. However, usually only the texture points on the topological route are collected in the original topological map for positioning and navigation. When the robot deviates from the topological route during the task execution, since the texture points at the robot's location are not included in the original topological map, it is easy to cause position loss. If it is necessary to broaden the collection range of texture points based on the topological route, on the one hand, the collection range is difficult to define, often manually circled, and it is easy to have situations where the range is too large or too small, and there is often an overlap in the collection ranges between different paths, resulting in low collection efficiency, a large amount of mapping labor, and often still unable to solve the problem that the robot is prone to position loss when deviating from the topological route.
[0048] To solve this problem, the embodiments of the present disclosure provide a topological map processing method. After preprocessing the topological map, the mapping areas corresponding to the topological edges are sequentially determined based on the nodes to be processed and segmented, so that the collection area of the texture points can be automatically determined, and the balance between collection efficiency and reliability is achieved, effectively solving the problem that the robot is prone to position loss when deviating from the topological route.
[0049] The application scenarios of the embodiments of the present disclosure are explained below:
[0050] Figure 1 It is an application scenario diagram of the topological map processing method provided by the embodiments of the present disclosure. As Figure 1 shown, in an intelligent warehousing system, the robot 100 will move from one topological node 112 to the next topological node 112 along the topological route 111 according to the received topological map 110, and perform positioning and navigation based on the topological map 110 to effectively complete the movement operation of the robot.
[0051] It should be noted that Figure 1 in the illustrated scenario, only one example of the robot, topological map, topological route, and topological node is given for illustration, but the present disclosure is not limited thereto. That is to say, the number of robots, topological maps, topological routes, and topological nodes can be arbitrary.
[0052] The following details the topological map processing method provided by the present disclosure through specific embodiments.
[0053] Figure 2 It is a flowchart of the topological map processing method provided by an embodiment of the present disclosure. As Figure 2 shown, the topological map processing method provided in this embodiment includes the following steps:
[0054] Step S201, determine the node to be processed in the topological map to be processed.
[0055] Among them, the node to be processed is used to represent the starting point of the unprocessed topological edge.
[0056] Specifically, the execution subject of the topological map processing method provided by the embodiment of the present disclosure is a server or a processor (collectively referred to as the server hereinafter).
[0057] Before processing the topological map, the server needs to first input the topological map to be processed. The topological map to be processed is the original topological map that only contains topological nodes and topological edges. When the server obtains the topological map to be processed, it will check whether there are unprocessed topological edges in it. If there are no unprocessed topological edges, it means that the processing of the topological map is completed, and the processing result can be directly output. If there are unprocessed topological edges, the nodes to be processed can be determined in sequence to determine the corresponding target mapping area according to the nodes to be processed.
[0058] The server will record the status of each node in the topological map to be processed, so as to quickly determine the node to be processed according to the record in the server.
[0059] After processing the selected node to be processed and its adjacent edges, the node to be processed that is closest to the node to be processed and its adjacent edges will be preferentially selected for continued processing until all the nodes to be processed are processed, all the corresponding mapping areas are generated, and then through the optimization of the mapping areas, the processed topological map can be obtained.
[0060] Step S202, determine the alternative mapping areas of the topological edges corresponding to the node to be processed based on the type of the node to be processed.
[0061] Specifically, after determining the node to be processed, it is necessary to determine the adjacent edges of the node to be processed according to the type of the node to be processed, so as to further determine the alternative mapping areas corresponding to the adjacent edges.
[0062] The type of the node to be processed is determined according to the type of the adjacent edge corresponding to the node to be processed. For example, if the node to be processed is connected to multiple topological edges at the same time, the node to be processed is an intersection node. At this time, if the inflation process is performed separately on each topological edge connected to the node to be processed and the mapping area is determined, a large number of overlaps of the mapping areas will occur, resulting in duplicate labor in the mapping process. Therefore, it is necessary to jointly process these topological edges to jointly determine the corresponding mapping area, so as to reduce the possible overlap problem of the mapping area and improve the mapping efficiency.
[0063] In another case, if the node to be processed is not an intersection node but is only connected to two topological edges (the direction of one topological edge is into the node to be processed, that is, the incoming edge, and the direction of the other topological edge is out of the node to be processed, that is, the outgoing edge), then multiple topological edges along the direction of the outgoing edge can be considered together, and the mapping areas corresponding to the multiple topological edges can be determined at the same time, reducing the number of divisions and improving the mapping efficiency.
[0064] After determining the adjacent edges corresponding to the node to be processed, the mapping area containing all the determined adjacent edges can be directly obtained based on the adjacent edges corresponding to the node to be processed as the alternative mapping area, that is, the area expected to be used for mapping (the final obtained target mapping area is obtained based on this alternative mapping area).
[0065] Step S203: Based on the optimization algorithm, perform segmentation processing on the alternative mapping area to obtain the target mapping area corresponding to the node to be processed.
[0066] Specifically, after determining the alternative mapping area, the alternative mapping area can be segmented into a combination of multiple mapping areas to remove the part that does not contain the topological path after the inflation process, so as to reduce the total area of the mapping area, thereby saving the mapping time and improving the mapping efficiency.
[0067] For the specific segmentation processing method, it is necessary to jointly consider the position of the segmentation point, the size of the mapping area corresponding to different segmentation point positions, and the mapping time corresponding to the mapping areas of different sizes. Therefore, it is necessary to introduce an optimization algorithm to obtain the optimal result of the segmentation point position to save the mapping time to the greatest extent.
[0068] After obtaining the segmentation point position based on the optimization algorithm, the segmented mapping area, that is, the target mapping area, can be obtained based on the segmentation point position.
[0069] Step S204: Based on the mapping area after the segmentation processing, obtain the processed topological map.
[0070] Specifically, by sequentially determining the target mapping area corresponding to each node to be processed and combining the mapping area corresponding to the bidirectional edge obtained by the preprocessing, the processed topological area can be obtained.
[0071] Through the topological map processing method provided by the embodiments of the present disclosure, the determination of the mapping area in the topological map can be automatically completed, and it is ensured that the mapping area can optimize the mapping time while meeting the positioning and navigation requirements of the Miracle Man when deviating from the topological route, thereby improving the practicability of the topological map.
[0072] The topological map processing method provided by the embodiments of the present disclosure preprocesses the topological paths in the topological map to be processed, determines the nodes to be processed in the topological map to be processed, then determines the alternative mapping areas of the topological edges corresponding to the nodes to be processed based on the types of the nodes to be processed, and then performs segmentation processing on the mapping areas based on the optimization algorithm. Finally, based on the target mapping areas obtained after the segmentation processing, the processed topological map is obtained. Thus, it is possible to automatically determine the mapping areas corresponding to the topological paths in the topological map, and to jointly process the topological edges adjacent to the nodes according to different types of nodes, and to balance the mapping speed and reliability of the obtained mapping areas through the optimal segmentation of the mapping areas, maximizing the mapping efficiency and reliability of the topological map.
[0073] Figure 3a It is a flowchart of the topological map processing method provided by an embodiment of the present disclosure. As Figure 3a shown, the topological map processing method provided by this embodiment includes the following steps:
[0074] Step S301, determine the bidirectional edges in the topological map to be processed.
[0075] Specifically, when preprocessing the topological map to be processed, it is first necessary to traverse all topological paths to determine all bidirectional edges therein for preprocessing the bidirectional edges. After preprocessing all bidirectional edges, the nodes to be processed are then determined.
[0076] Step S302, take one of the directions of the bidirectional edge as the direction to be processed, and determine the topological edge that coincides with the bidirectional edge and has the direction to be processed as the only direction as the edge to be processed.
[0077] Specifically, since the two mapping areas corresponding to the bidirectional edge are actually two overlapping rectangular areas (because the corresponding topological edges are the same, only the directions are different), therefore, one of the directions can be selected as the only direction of the edge to be processed, and the edge to be processed is obtained based on the bidirectional edge, and then the corresponding mapping area is generated to avoid duplicate calculations.
[0078] In terms of specific implementation, the server will compare the outgoing edges of each topological edge. If the end point of the outgoing edge of a topological edge is the same as the start point of another topological edge, and the control points of these two edges are exactly opposite, then these two topological edges form a bidirectional edge. At this time, this topological edge will be marked as processed, and it will not be processed again during subsequent optimization and segmentation (to achieve the effect of selecting a topological edge in one direction as the edge to be processed).
[0079] The mapping area of the topological edge in either direction can be arbitrarily selected and is not restricted here.
[0080] Step S303: Based on the set distance parameter, expand the edge to be processed in the normal direction of the topological edge to obtain the mapping area corresponding to the edge to be processed.
[0081] Specifically, the expansion process is to translate in the positive and negative directions of the normal of the topological edge. Based on the translated topological edge, the mapping area corresponding to the topological edge can be obtained.
[0082] The following further describes this process. As Figures 3b to 3e shown, where Figure 3b is the flowchart of the method for obtaining the mapping area corresponding to the bidirectional edge,[[]]END]] Figure 3c is the schematic diagram of the shape of the edge to be processed,[[]]END]] Figure 3d is the schematic diagram of the shape of the expanded edge corresponding to the edge to be processed,[[]]END]] Figure 3e is the schematic diagram of the structure of the mapping area corresponding to the edge to be processed. The method for obtaining the mapping area includes the following steps:
[0083] Step S3031: Based on the set distance parameter, translate the edge to be processed in the positive and negative directions of the normal of the topological edge respectively to obtain two expanded edges corresponding to the edge to be processed.
[0084] Specifically, for the case where the topological edge is a straight line, the topological edge can be directly translated in the positive and negative directions of the normal to obtain the corresponding expanded edge (the expanded edge is the edge obtained by translating the topological edge); for the case where the topological edge is a curve, based on the positive and negative directions of the normal corresponding to the tangent of each point on the topological edge, the points on the topological edge can be translated to obtain the corresponding expanded edge, as Figure 3c and Figure 3d shown, Figure 3c and Figure 3d the solid line in is the edge to be processed (which is also the topological edge), Figure 3d and the polyline in is the expanded edge.
[0085] The determination of the translation direction can be achieved by discrete sampling and then translation. That is, sample n points on the topological edge, obtain the tangent directions of these n points, and use the perpendicular direction of the tangent as the translation direction. Then translate each sampled point by the set distance in the translation direction to obtain the expanded edge.
[0086] The set translation distance can be selected from pre-configured values, that is, the set distance parameter, such as 50 cm or any other pre-set value; the larger the set distance parameter, the larger the area of the mapping region corresponding to the topological edge. Therefore, the set distance parameter can be configured according to the applicable robot size and the overall size of the topological map, and no further limitation is made here.
[0087] Step S3032: Determine the coordinate maximum and minimum values of the two inflated edges along the coordinate axes.
[0088] Specifically, the topological map is established in the corresponding coordinate system, and each point on the topological map has a corresponding coordinate. Therefore, the coordinates of the points on the inflated edge can also be calculated.
[0089] Since the inflated edge may be a curve, for the convenience of calculation, instead of directly using the coordinates of the two endpoints of the inflated edge, the coordinate maximum and minimum values of the inflated edge along the coordinate axes are used, such as the coordinate values of the leftmost and rightmost ends along the x-axis (that is, the x-axis minimum value and the x-axis maximum value of the inflated edge). Similarly, there are also the coordinate maximum and minimum values along the y-axis (that is, the y-axis minimum value and the y-axis maximum value of the inflated edge).
[0090] Compare the coordinate maximum and minimum values of the two inflated edges to obtain the coordinate maximum and minimum values of the two inflated edges along the coordinate axes. Taking the two inflated edges as inclined straight line segments as an example, the coordinate maximum and minimum values of these two inflated edges along the x-axis are respectively the x-axis coordinate value of the lowermost endpoint of the upper inflated edge and the x-axis coordinate value of the uppermost endpoint of the lower inflated edge, and the coordinate maximum and minimum values along the y-axis are the y-axis coordinate value of the uppermost endpoint of the upper inflated edge and the y-axis coordinate value of the lowermost endpoint of the lower inflated edge.
[0091] Another way to determine the coordinate maximum and minimum values is to draw a straight line perpendicular to the x-axis (if it is a y-axis-based segmentation, it is a straight line perpendicular to the y-axis) with the coordinate value of the current segmentation point (before the specific coordinates of the segmentation point are determined, it can be considered that the segmentation point can move along the coordinate axis), and solve the intersection points of the straight line and the two inflated edges. Finally, calculate the maximum and minimum values of the x and y axes in the region segmented by the two inflated edges, that is, the coordinate maximum and minimum values. Then, the rectangular contour can be obtained according to the coordinate maximum and minimum values. After determining the segmentation point coordinates, the coordinate maximum and minimum values can also be updated according to the determined segmentation point coordinates, and then the corresponding rectangular contour can be updated.
[0092] Step S3033: Determine the region enclosed by the coordinate points corresponding to the minimum value and the coordinate points corresponding to the maximum value in the coordinate maximum and minimum values as the mapping region corresponding to the topological edge.
[0093] Specifically, as Figure 3e shown, where the rectangle composed of dotted lines is the mapping region. Combining Figure 3c 、 Figure 3d andFigure 3e Take the minimum value of the x-axis and the minimum value of the y-axis in the two inflated edges as the coordinates of one endpoint of the mapping area (i.e., the coordinate point corresponding to the minimum value among the coordinate maximum and minimum values), and take the maximum value of the x-axis and the maximum value of the y-axis in the two inflated edges as the coordinates of the other endpoint of the mapping area (i.e., the coordinate point corresponding to the minimum value among the coordinate maximum and minimum values). The rectangular area based on these two endpoints (each side of the rectangle is parallel to the coordinate axis) is the mapping area corresponding to the topological edge, that is, the mapping area corresponding to the edge to be processed.
[0094] Step S304: Determine a topological edge of a non-bidirectional edge from the topological map to be processed, and determine the starting point of the topological edge of the non-bidirectional edge as the node to be processed.
[0095] Specifically, after preprocessing the bidirectional edges, the topological edges in the topological map to be processed can be traversed to find the unprocessed topological edges, and their starting points are determined as the nodes to be processed.
[0096] Step S305: Determine the type of the node to be processed based on the number of incoming edges and outgoing edges corresponding to the node to be processed.
[0097] Among them, the types of the nodes to be processed include intersection nodes and non-intersection nodes; the topological edges corresponding to the nodes to be processed include incoming edges and outgoing edges.
[0098] Specifically, an intersection node is a node corresponding to multiple topological edges (such as a node connected to three or more topological edges), while a non-intersection node is a node connected to only one or two topological edges (when there is only one topological edge connected, the node is only one endpoint connected to the topological edge).
[0099] Therefore, in practical applications, the type of the node to be processed can be determined by calculating the number of incoming edges and outgoing edges corresponding to the node to be processed (the number of incoming edges and outgoing edges can also be expressed as in-degree and out-degree). For example, when the number is greater than 2, the node to be processed is an intersection node, and when it is less than or equal to 2, the node to be processed is a non-intersection node.
[0100] Step S306: If the node to be processed is an intersection node, determine the alternative mapping areas of the topological edges corresponding to the node to be processed based on all adjacent edges of the node to be processed.
[0101] Specifically, the adjacent edges of intersection nodes are often relatively close to each other, which results in a large overlap between the mapping areas obtained after inflating the adjacent edges. If these adjacent edges are uniformly incorporated into the optimization algorithm and the form of the objective function is used to guide the algorithm to obtain the optimal solution of the segmentation point. This can greatly reduce the redundancy of the mapping areas of the adjacent edges of intersection nodes, and at the same time reduce the amount of calculation and improve the processing efficiency.
[0102] Such as Figure 3fAs shown, it is a schematic structural diagram of an intersection node. Figure 3f In it, AB is a two-way edge, B is a node to be processed, and the topological edges to be processed connected to point B include BD, BC, and BE. Therefore, point B is an intersection node, and thus BD, BC, and BE can be processed together.
[0103] Combined with Figure 3f , when the node to be processed is an intersection node, the unprocessed topological edges connected to all nodes to be processed can be determined as the adjacent edges of the node to be processed. At this time, the alternative map-building areas corresponding to the topological edges of the node to be processed can be jointly determined based on these adjacent edges.
[0104] Specifically, in implementation, the breadth-first search method can be used to obtain all the adjacent edges of each intersection, and then these adjacent edges are comprehensively considered to obtain the covered rectangle. The specific approach is as follows: First, add the current node to be processed to the search queue. Then start the loop search, take an unprocessed node from the queue. Traverse the outgoing edges of this node. If the outgoing edge belongs to an intersection edge (that is, the starting point of this outgoing edge is connected to multiple topological edges), then add this outgoing edge to the optimized edge set for subsequent unified processing in the optimization algorithm. Next, continue to traverse the incoming edges of this unprocessed node. Similarly, if the incoming edge belongs to an intersection edge (that is, the end point of this incoming edge is connected to multiple topological edges), then add it to the optimized edge set. To balance the processing capacity and efficiency of the server, both the search queue and the optimized edge set are set with upper limits. When the search queue is empty or the optimized edge set has reached the upper limit, the search is exited.
[0105] After determining the optimized edge set (after completing the processing of the topological edges corresponding to the optimized edge set, the optimized edge set will be cleared to add the topological edges corresponding to the next node to be processed), the dilation processing can be performed on all these adjacent edges in the optimized edge set, and then based on the region enclosed by the coordinate points corresponding to the minimum value and the maximum value among the coordinate maximum and minimum values of all these adjacent edges, it is determined as the map-building area corresponding to these adjacent edges. Since the map-building area determined at this time is only a preliminary determination result and not the final result, it is recorded as the alternative map-building area.
[0106] Step S307, if the node to be processed is a non-intersection node, based on the depth-first search method, determine the adjacent edges corresponding to the node to be processed.
[0107] Specifically, although for non-intersection topological paths, the dilated map-building areas do not have a large amount of overlap like intersection nodes. However, because if there are arcs and oblique lines in the topological edges, this type of topological path will still have a large overlap with adjacent topological edges after dilation. To minimize the overlapping area as much as possible, the optimized edge set of non-intersection nodes is obtained based on the depth-first search method at this time.
[0108] Such as Figure 3cPoints A and B shown in [figure] are non-intersection nodes, so AB and BC can be processed together.
[0109] Combined with Figure 3c , the significance of doing this first is that for non-intersection nodes, since the node to be processed is connected to only one or two unprocessed topological edges, the mapping area is determined only based on these two topological edges, and its calculation efficiency deviates. Ideally, based on the direction of the node to be processed and the unprocessed topological edges, multiple consecutive topological edges should be processed simultaneously. For this purpose, it is necessary to search along the incoming edge direction of the starting point of the node to be processed in the depth-first search manner until reaching the depth threshold or the intersection node, and then start recursively adding topological edges to the optimized edge set. Then, search along the outgoing edge direction of the starting point of the node to be processed, and add a topological edge to the optimized set each time a search is made until reaching the depth threshold or the intersection. Thus, the orderliness of the topological edges in the optimized edge set can be ensured. According to the search process of this module, the edges in the optimized set will be arranged in an orderly manner from the incoming edge to the outgoing edge, which is convenient for subsequent optimized solution. The following further explains this.
[0110] Furthermore, as Figure 3g shown, it is a flowchart of the method for determining the adjacent edges corresponding to non-intersection nodes, which includes the following steps:
[0111] Step S3071: If the node to be processed is a non-intersection node, determine the first intersection node searched along the direction of the unprocessed topological edge where the node to be processed is located as the termination node.
[0112] Specifically, when determining the adjacent edges of a non-intersection node, each node will be searched sequentially forward based on the direction of the unprocessed topological edge where the node to be processed is located, and it is judged whether the node is an intersection node (the judgment method is as before). If the searched node is a non-intersection node, continue to search the next node and make a judgment until the searched node is an intersection node (i.e., the first intersection node searched). At this time, this node can be determined as the termination node and the search is stopped.
[0113] Step S3072: Determine the topological edge between the termination node and the node to be processed as the adjacent edge corresponding to the node to be processed.
[0114] Specifically, all topological edges from the node to be processed to the termination node can be determined as the adjacent edges corresponding to the node to be processed, and the mapping areas corresponding to these adjacent edges can be determined simultaneously.
[0115] Step S308: Determine the alternative mapping area corresponding to the adjacent edge as the alternative mapping area corresponding to the topological edge of the node to be processed.
[0116] Specifically, the method for determining the corresponding alternative mapping area based on the determined adjacent edge is the same as the method in step S306, which will not be elaborated here.
[0117] Steps S307 to S308 are optional steps parallel to step S306, and those skilled in the art can select the corresponding steps for execution according to the actual situation.
[0118] Step S309, based on the optimization algorithm, perform segmentation processing on the alternative mapping area to obtain the target mapping area corresponding to the node to be processed.
[0119] Step S310, based on the target mapping area, obtain the processed topological map.
[0120] Specifically, steps S309 to S310 are the same as the corresponding step contents in the Figure 2 illustrated embodiment, and will not be elaborated here.
[0121] The topological map processing method provided by the embodiments of the present disclosure determines the bidirectional edges in the original topological map, determines the mapping area corresponding to the bidirectional edges, then finds the nodes to be processed, and according to whether the nodes to be processed belong to intersection nodes or non-intersection nodes, determines the adjacent edges corresponding to the nodes to be processed, and at the same time determines the alternative mapping areas corresponding to the adjacent edges. By performing segmentation processing, the target mapping area is obtained, and then the processed topological map is obtained. Thus, it can automatically complete the determination of the corresponding mapping area according to the types of topological edges and nodes to be processed, ensure the efficiency of determining the mapping area, and at the same time ensure that the size of the mapping area meets the requirements of robot positioning and navigation, thereby ensuring the reliability of the processed topological map.
[0122] Figure 4a is a flowchart of the topological map processing method provided by an embodiment of the present disclosure. As Figure 4a shown, the topological map processing method provided in this embodiment includes the following steps:
[0123] Step S401, determine the node to be processed in the topological map to be processed.
[0124] Among them, the node to be processed is used to represent the starting point of the unprocessed topological edge.
[0125] Specifically, this embodiment mainly further describes the part of the mapping area segmentation processing.
[0126] Step S402, based on the type of the node to be processed, determine the mapping area of the topological edge corresponding to the node to be processed.
[0127] Specifically, steps S401 to S402 are the same as the corresponding step contents in the Figure 2 illustrated embodiment, and will not be elaborated here.
[0128] Step S403: Determine the number of segmentation points corresponding to the alternative mapping area based on the size of the alternative mapping area.
[0129] Specifically, there may be multiple areas in the alternative mapping area that do not actually contain any part of the topological edge or its corresponding dilated edge, that is, blank areas. To save mapping time, these blank areas can be removed from the alternative mapping area. For the convenience of calculation, the alternative mapping area is segmented based on several segmentation points, and then the segmentation area corresponding to the topological edge between two adjacent segmentation points is re-determined, so as to reduce the coverage range of each mapping area and reduce the area of possible blank areas.
[0130] In some embodiments, the determination of the segmentation points can be based on the number of topological edges contained in the alternative mapping area. For example, one topological edge corresponds to one segmentation point (when the adjacent edges corresponding to the node to be processed are three sequentially connected topological edges, three segmentation points can be set), or N topological edges correspond to N - 1 segmentation points (when the adjacent edges corresponding to the node to be processed are two topological edges connected to the node to be processed, only one segmentation point can be set).
[0131] In some embodiments, the determination of the segmentation points can also be based on whether the node to be processed belongs to an intersection node or a non-intersection node. For example, if the current belongs to the intersection mode, this section will determine the number of segmentation points n according to the total area size S after the topological path is dilated. The formula can be:
[0132] n=(S / S 0 ) + 1,
[0133] S 0 is a preset segmentation threshold. If the current belongs to the non-intersection mode, the number of segmentation points n may be determined according to the number of path segments n 0 and the total path length L. The calculation formula can be:
[0134] n = max(n 0 , L / l 0 ),
[0135] where l 0 is a preset path length threshold.
[0136] In some embodiments, the segmentation points can also be determined according to the size of the alternative mapping area and a preset size threshold (such as comparing the length of the alternative mapping area in a certain coordinate axis direction with the size threshold and rounding down the result). For example, if the size threshold is 1m and the length of the alternative mapping area along the x-axis is 2.7m, then two segmentation points can be set.
[0137] In some embodiments, for the coordinate axis size of the alternative mapping area size used for calculation, the x-axis can also be preferentially selected.
[0138] In some embodiments, if there is a topological edge parallel to the y-axis among the topological edges to be processed, and at this time the topological edge cannot be divided relying on the x coordinate, the y-axis coordinate can be selected for the size of the alternative mapping area used for calculation.
[0139] Step S404: Substitute the mapping time, the number of the divided mapping areas, and the positions of the division points into the optimization algorithm to obtain the target number of division points and the target positions of the division points of the mapping area.
[0140] Among them, the mapping time is positively correlated with the size and shape of the divided mapping areas, the size of the divided mapping areas is related to the positions of the division points, and the number of the divided mapping areas is determined based on the number of division points.
[0141] Specifically, the positions of the specific division points need to be jointly determined by combining the mapping time of each divided mapping area and the number of the divided mapping areas when dividing the mapping area at different division point positions. During specific calculation, the optimization calculation is carried out with the goal of minimizing the total mapping time corresponding to the alternative mapping areas.
[0142] Furthermore, the mapping time includes the sum of the first time, the second time, the third time, and the fourth time. Among them, the first time is used to represent the time required for a single loop drive along the outer contour of the divided mapping area, the second time is used to represent the time required for the I-shaped texture mapping drive within the divided mapping area, the third time is used to represent the time required for the turning actions during the loop drive and the I-shaped texture mapping drive, and the fourth time is used to represent the time required to leave the divided mapping area.
[0143] The first time, the second time, the third time, and the fourth time are all related to the driving speed of the robot during mapping and the area of the corresponding mapping area. The driving speed during mapping can be configured with corresponding parameters. In order to more accurately estimate the mapping time, the time planning of the present invention all adopts the T-shaped time allocation, that is, it is assumed that the robot accelerates to the maximum speed with the maximum acceleration, then travels at a constant speed for a period of time, and finally decelerates to zero with the maximum deceleration. The same is true during the rotation of the robot, which accelerates to the maximum angular velocity with the maximum angular acceleration, then rotates at the maximum angular velocity, and finally decelerates to zero with the maximum angular deceleration. In the same topological map, it can be considered that the change in its mapping time is only related to the change in the size of the mapping area.
[0144] In an embodiment of the present disclosure, in order to restrict the sizes of the respective mapping regions, when the size of the mapped region after segmentation is greater than the set maximum area threshold or less than the set minimum area threshold, when calculating the mapping time during optimization, a corresponding penalty value (such as 100 seconds) will be added. Because if the area of the mapping region is too small, there are likely to be many mapping regions, resulting in low mapping efficiency. If the area of the mapping region is too large, it will increase the difficulty and significantly increase the time for driving in a loop along the outer contour of the mapping region.
[0145] Such as Figure 4b and Figure 4c shown, where Figure 4b is a schematic diagram of the mapped region obtained by segmenting the mapped region of the topological edge shown based on a single segmentation point Figure 3c ; Figure 4c is a schematic diagram of the mapped region obtained by segmenting the mapped region of the topological edge shown based on two segmentation points Figure 3c . Comparing Figure 3e , Figure 4b , Figure 4c , by increasing the segmentation points, the area of each mapped region becomes smaller and smaller, and the time for the robot to move during the mapping process is shorter, but the number of mapped regions will also increase, and the time required for the robot to perform operations will also increase. Therefore, further optimization is required.
[0146] Furthermore, substituting the mapping time T, the number n of the mapped regions after segmentation, and the segmentation point position t i into the objective function f of the optimization algorithm, where the constraint conditions of the objective function f of the optimization algorithm include:
[0147]
[0148] where f is the objective function in the optimization algorithm, x t represents the coordinate value of the segmentation point on the x-axis, t i is the relative position of the x-axis coordinate value of the i-th segmentation point in the region between x min and x max (that is, the ratio of the difference between the x-axis coordinate value of t i and the x-axis coordinate value of x min to the difference between x max and x min ), T i is the mapping time corresponding to the mapped region formed between the i-th segmentation point and the previous segmentation point; based on the optimization algorithm, the target number of segmentation points and the target segmentation point positions of the mapped region are obtained. Combining Figure 4b and Figure 4c , where x 1 and x 2They are the 1st and 2nd segmentation points. By optimizing the positions of each segmentation point, the total mapping time can be minimized.
[0149] What can be used for calculation can be the coordinate value of the segmentation point on the x-axis or the coordinate value on the y-axis (in this case, the second term in the above formula is y t =(y max -y min )*t + y min ).
[0150] For the specific optimization algorithm, a derivative-free optimization method can be selected as the optimization solver, such as the Powell algorithm. This method does not require taking the derivative of the objective function and can also be applied when the derivative of the objective function is discontinuous. Therefore, the Powell algorithm is a very effective direct search method. The Powell algorithm can be used to solve general unconstrained optimization problems and can obtain relatively satisfactory results for the optimization problems of objective functions with fewer dimensions.
[0151] The core of the Powell method is to gradually approach the minimum value of the function using a set of linearly independent search directions. First, generate n search directions, and generally, an identity matrix can be directly initialized. Then, gradually iterate the optimal solution of the function according to the n search directions. The specific approach is that for each direction, a linearly optimal step size needs to be searched, and then the difference between the function value after updating the function variables and the value before updating is calculated. And record the direction with the largest decrease in the difference to accelerate the convergence speed based on this direction.
[0152] Among them, the golden section method and the parabolic method can be used to find the linearly optimal step size. For example, the Brent algorithm that combines the golden section method and the parabolic method can be used.
[0153] In addition, when finding the linearly optimal step size, a step size interval also needs to be specified, so the forward-backward method can be used to solve the unimodal interval.
[0154] The specific result obtained by solving, that is, the value of t i , is also the position of the segmentation point.
[0155] In some embodiments of the present disclosure, for the optimized result, there may be two or more segmentation points with overlapping positions. At this time, the segmentation points with overlapping positions can be deleted, that is, the number of segmentation points is reduced. After deleting the segmentation points with overlapping positions, the number of target segmentation points corresponding to the mapping area and the positions of each target segmentation point can be obtained.
[0156] Step S405: Based on the number of target segmentation points and the positions of the target segmentation points, perform segmentation processing on the mapping area.
[0157] Specifically, the number of target segmentation points that are eager to be obtained can determine the number of mapping areas after the segmentation processing. Based on the position of the target segmentation point, that is, the maximum value of the expansion edge coordinate corresponding to the target segmentation point, each mapping area after the segmentation processing can be determined, that is, the segmentation processing of the mapping area.
[0158] In one embodiment of the present disclosure, steps S303 to S305 are for the scenario where the adjacent edge of the node to be processed is not parallel to the coordinate axis, and for the scenario where the adjacent edge of the node to be processed is a topological edge parallel to the coordinate axis, the mapping area corresponding to the topological edge of the node to be processed can be directly segmented based on the preset length threshold. For example, if the preset length threshold is 1m and the total length of the adjacent edge is 3m, the segmentation point can be set.
[0159] Step S406: If there are overlapping parts between any two target mapping areas after the segmentation process, the overlapping parts are determined as overlapping mapping areas.
[0160] Specifically, the rectangle set (i.e., the target mapping area set) obtained by the optimization in the above steps cannot be directly output as the final result. This is because the optimization process in the above steps is a discretization process for the nodes to be processed, and only a set of rectangles corresponding to a part of the topological edges can be generated each time. Therefore, the rectangle set obtained in the whole process is definitely not the global optimal solution.
[0161] In addition, the expansion mapping areas corresponding to the topological edges of oblique lines and arcs are irregular. In order to cover these areas, the generated rectangles will inevitably introduce some redundant mapping areas. These redundant areas may be inaccessible spaces such as bases, or they may be empty areas. Therefore, it is necessary to further process the target mapping areas obtained in the above steps.
[0162] First, there may still be overlapping parts in the mapping area after segmentation, such as the mapping area of the adjacent edge corresponding to the node to be processed overlaps with the mapping area corresponding to the bidirectional edge determined in the preprocessing. If there is such an overlapping mapping area, it is necessary to process this part of the mapping area. Therefore, it is necessary to compare the target mapping areas in pairs to determine whether there is any overlap.
[0163] Step S407 : if the ratio of the overlapping mapping regions to the total area of the corresponding two target mapping regions is greater than a set ratio threshold, a corresponding replacement mapping region is determined based on the endpoints of the two target mapping regions.
[0164] The alternative mapping area is a rectangular area covering all endpoints of the two target mapping areas.
[0165] Specifically, if the overlapping part of two regions is large, a larger rectangular region can be directly used to enclose these two regions to improve the mapping efficiency (the mapping time for irregular regions is longer).
[0166] Step S408: Replace the two target mapping regions corresponding to the overlapping mapping regions with a substitute mapping region.
[0167] Specifically, replacing these two overlapping mapping regions with a substitute mapping region can usually make the shape of the mapping region simpler and the complexity lower. At this time, the corresponding mapping time is lower and the mapping efficiency is higher.
[0168] Step S409: If the proportion of the overlapping mapping region in the total area of the two corresponding target mapping regions is less than the set proportion threshold, delete the overlapping part in the overlapping mapping region.
[0169] Specifically, when the overlapping region is small, the two target mapping regions can be directly merged, that is, the overlapping part in the overlapping mapping region is deleted, so as to avoid repeated labor in the mapping process.
[0170] Step S410: Based on the set discrete resolution, collect a set number of image points in each segmented target mapping region.
[0171] Specifically, since the target mapping regions obtained in the foregoing steps are all based on rectangular regions, there will be redundant regions in actual situations where the vehicle will not drive. Therefore, these redundant regions need to be set as no-go zones to reduce the actual mapping area and improve the mapping efficiency.
[0172] Step S411: If the image point is not located in the region between the inflated edges corresponding to the topological edges in the segmented target mapping region, determine the set-shaped region corresponding to the image point as a no-go zone.
[0173] Specifically, the specific setting method of the no-go zone is as follows: Set a certain discrete resolution, then sample according to the discrete resolution in the target mapping region, collect a number of points, each point represents a square with a set area, and then detect whether the point is within the region after the topological edge is inflated. If not, mark this square as a no-go zone. As Figure 4d shown, the square with the diagonal pattern is the no-go zone in the target mapping region. By setting the no-go zone, the area of the region that needs to be mapped can be significantly reduced.
[0174] Step S412: Based on the segmented mapping region, obtain the processed topological map.
[0175] Specifically, step S412 and Figure 2The corresponding step contents in the illustrated embodiments are the same and will not be elaborated here.
[0176] For the topological map processing method provided by an embodiment of the present disclosure, after determining the alternative mapping area, by determining the number of segmentation points and performing optimization calculations based on the positions of the segmentation points, the target number of segmentation points and the target positions of the segmentation points are determined, and accordingly, the alternative mapping area is segmented to obtain the processed topological map. Thereby, the obtained mapping area is optimized in terms of both the mapping time and the size of the mapping area, so as to improve the mapping efficiency and ensure the usability of the processed topological map.
[0177] Figure 5 It is a schematic structural diagram of a topological map processing device provided by an embodiment of the present disclosure. As Figure 5 shown, the topological map processing device 500 includes: a preprocessing module 510, a classification module 520, a segmentation module 530, and a processing module 540. Among them:
[0178] The preprocessing module 510 is configured to determine the nodes to be processed in the topological map to be processed, where the nodes to be processed are used to represent the starting points of the unprocessed topological edges;
[0179] The classification module 520 is configured to determine the alternative mapping areas of the topological edges corresponding to the nodes to be processed based on the types of the nodes to be processed;
[0180] The segmentation module 530 is configured to perform segmentation processing on the alternative mapping areas based on an optimization algorithm to obtain the target mapping areas corresponding to the nodes to be processed;
[0181] The processing module 540 is configured to obtain the processed topological map based on the target mapping areas.
[0182] Optionally, the preprocessing module 510 is specifically configured to determine a topological edge with a non - bidirectional edge from the topological map to be processed, and determine the starting point of the topological edge with the non - bidirectional edge as the node to be processed.
[0183] Optionally, before determining the nodes to be processed in the topological map to be processed, the preprocessing module 510 is further configured to determine the bidirectional edges in the topological map to be processed; take one of the directions of the bidirectional edges as the direction to be processed, and determine the topological edge that coincides with the bidirectional edge and has the direction to be processed as the only direction as the edge to be processed; perform dilation processing on the edge to be processed in the normal direction of the topological edge based on a set distance parameter to obtain the mapping area corresponding to the edge to be processed; determine the nodes to be processed from the starting points of the unprocessed topological edges in the topological map to be processed.
[0184] Optionally, the preprocessing module 510 is specifically configured to translate the to-be-processed edge along the positive and negative directions of the normal of the topological edge respectively based on the set distance parameter to obtain two dilated edges corresponding to the to-be-processed edge; determine the coordinate maximum and minimum values of the two dilated edges along the coordinate axes; and determine the region enclosed by the coordinate points corresponding to the minimum value and the coordinate points corresponding to the maximum value in the coordinate maximum and minimum values as the mapping region corresponding to the topological edge.
[0185] Optionally, the classification module 520 is specifically configured to, if the types of the to-be-processed nodes include intersection nodes and non-intersection nodes, and the topological edges corresponding to the to-be-processed nodes include incoming edges and outgoing edges, determine the type of the to-be-processed node based on the number of the incoming edges and the outgoing edges corresponding to the to-be-processed node; if the to-be-processed node is an intersection node, determine the alternative mapping regions of the topological edges corresponding to the to-be-processed node based on all the adjacent edges of the to-be-processed node; if the to-be-processed node is a non-intersection node, determine the adjacent edges corresponding to the to-be-processed node based on the depth-first search method; and determine the alternative mapping regions corresponding to the adjacent edges as the alternative mapping regions of the topological edges corresponding to the to-be-processed node.
[0186] Optionally, the classification module 520 is specifically configured to, if the to-be-processed node is a non-intersection node, determine the first intersection node searched along the direction of the unprocessed topological edge where the to-be-processed node is located as the termination node; and determine the topological edge between the termination node and the to-be-processed node as the adjacent edge corresponding to the to-be-processed node.
[0187] Optionally, the segmentation module 530 is specifically configured to determine the number of segmentation points corresponding to the alternative mapping region based on the size of the alternative mapping region; substitute the mapping time, the number of the segmented mapping regions, and the segmentation point positions into the optimization algorithm to obtain the target number of segmentation points and the target segmentation point positions of the mapping region, where the mapping time is positively correlated with the size and shape of the segmented mapping region, the size of the segmented mapping region is related to the segmentation point positions, and the number of the segmented mapping regions is determined based on the number of segmentation points; perform segmentation processing on the mapping region based on the target number of segmentation points and the target segmentation point positions; and use the segmented mapping region as the target mapping region corresponding to the to-be-processed node.
[0188] Optionally, the segmentation module 530 specifically includes that the mapping time includes the sum of a first time, a second time, a third time, and a fourth time, where the first time is used to represent the time required for a single loop drive along the outer contour of the segmented mapping region, the second time is used to represent the time required for I-shaped texture mapping drive within the segmented mapping region, the third time is used to represent the time required for turning actions during the loop drive and the I-shaped texture mapping drive, and the fourth time is used to represent the time required to leave the segmented mapping region.
[0189] Optionally, the segmentation module 530 is specifically configured to use the mapping time T, the number n of the segmented mapping regions, and the segmentation point positions ti Substitute it into the objective function f of the optimization algorithm, where the constraint conditions of the objective function f of the optimization algorithm include:
[0190]
[0191] where f is the objective function in the optimization algorithm, and x t represents the coordinate value of the segmentation point on the x-axis, and t i is the relative position of the x-axis coordinate value of the i-th segmentation point in the region between x min and x max ; T i is the mapping time corresponding to the mapping region formed between the i-th segmentation point and the previous segmentation point; Based on the optimization algorithm, the number of target segmentation points and the positions of the target segmentation points in the mapping region are obtained.
[0192] Optionally, the segmentation module 530 is specifically configured to, if the adjacent edge corresponding to the node to be processed is a topological edge parallel to the coordinate axis, based on a preset length threshold, perform segmentation processing on the mapping region of the topological edge corresponding to the node to be processed to obtain the target mapping region corresponding to the node to be processed.
[0193] Optionally, the segmentation module 530 is further configured to, after performing segmentation processing on the alternative mapping region based on the optimization algorithm to obtain the target mapping region corresponding to the node to be processed, if there is an overlapping part between any two target mapping regions after the segmentation processing, determine the overlapping part as the overlapping mapping region; if the proportion of the overlapping mapping region in the total area of the corresponding two target mapping regions is greater than the set proportion threshold, based on the endpoints of the two target mapping regions, determine the corresponding alternative mapping region, where the alternative mapping region is a rectangular region covering all the endpoints of the two target mapping regions; replace the two target mapping regions corresponding to the overlapping mapping region with the alternative mapping region; if the proportion of the overlapping mapping region in the total area of the corresponding two target mapping regions is less than the set proportion threshold, delete the overlapping part in the mapping region where the overlapping occurs.
[0194] Optionally, the segmentation module 530 is further configured to, after performing segmentation processing on the alternative mapping region based on the optimization algorithm to obtain the target mapping region corresponding to the node to be processed, collect a set number of image points in each target mapping region after the segmentation processing based on the set discrete resolution; if the image points are not located in the region between the dilated edges corresponding to the topological edges in the target mapping region after the segmentation processing, determine the set-shaped region corresponding to the image points as the no-go area.
[0195] In this embodiment, the topological map processing device solves the problem in the related art that the robot is prone to position loss when deviating from the topological route through the combination of various modules, so that the obtained mapping area achieves a balance in mapping speed and reliability, and maximally improves the mapping efficiency and reliability of the topological map.
[0196] Figure 6 The structural schematic diagram of the control device provided by an embodiment of the present disclosure is shown as Figure 6 shown. The control device 600 includes: a memory 610 and a processor 620.
[0197] Among them, the memory 610 stores a computer program executable by at least one processor 620. The computer program is executed by at least one processor 620 to enable the control device to implement the material extraction method provided in any of the above embodiments or the topological map processing method provided in any of the above embodiments.
[0198] Among them, the memory 610 and the processor 620 can be connected through a bus 630.
[0199] For relevant descriptions, reference can be made to the corresponding descriptions and effects in the method embodiments, which will not be elaborated here.
[0200] For relevant descriptions, reference can be made to the corresponding descriptions and effects in the method embodiments, which will not be elaborated here.
[0201] An embodiment of the present disclosure provides a computer-readable storage medium, on which a computer program is stored, and the computer program is executed by a processor to implement the material extraction method provided in any of the above method embodiments or the topological map processing method provided in any of the above embodiments.
[0202] Among them, the computer-readable storage medium can be ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, optical data storage device, etc.
[0203] An embodiment of the present disclosure provides a computer program product, which includes computer execution instructions, and when the computer execution instructions are executed by a processor, they are used to implement the material extraction method in the above method embodiments or the topological map processing method provided in any of the above embodiments.
[0204] In several embodiments provided by the present disclosure, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of modules is only a logical function division. In actual implementation, there may be other division methods. For example, multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed coupling or direct coupling or communication connection to each other can be through some interfaces. The indirect coupling or communication connection of devices or modules can be in electrical, mechanical or other forms.
[0205] Those skilled in the art will readily conceive of other embodiments of the present disclosure after considering the specification and practicing the disclosure herein. The present disclosure is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include known common knowledge or conventional technical means in the technical field not disclosed herein. The specification and examples are only regarded as exemplary, and the true scope and spirit of the present disclosure are pointed out by the following claims.
[0206] It should be understood that the present disclosure is not limited to the exact structures described above and shown in the drawings, and various modifications and changes can be made without departing from its scope. The scope of the present disclosure is only limited by the appended claims.
Claims
1. A topological map processing method, characterized in that: The topological map processing method comprises: Determine a node to be processed in the topological map to be processed, wherein the node to be processed is used to represent a starting point of an unprocessed topological edge; Based on the type of the node to be processed, determining a candidate mapping area for the topological edge corresponding to the node to be processed; Based on the optimization algorithm, the candidate mapping area is segmented to obtain the target mapping area corresponding to the node to be processed; Based on the target mapping area, a processed topological map is obtained.
2. The method according to claim 1, characterized in that: The step of determining the nodes to be processed in the topological map to be processed includes: A non-bidirectional topological edge is determined from the to-be-processed topological map, and a starting point of the non-bidirectional topological edge is determined as the to-be-processed node.
3. The method according to claim 2, characterized in that Before determining the nodes to be processed in the topological map to be processed, the method includes: Determine bidirectional edges in the topological map to be processed; One of the directions of the bidirectional edges is used as a direction to be processed, and a topological edge that coincides with the bidirectional edge and has the direction to be processed as the only direction is determined as an edge to be processed; Based on the set distance parameter, the edge to be processed is expanded in the normal direction of the topological edge to obtain a mapping area corresponding to the edge to be processed.
4. The method according to claim 3, characterized in that The step of expanding the edge to be processed in the direction of the topological edge based on the set distance parameter to obtain a mapping area corresponding to the edge to be processed includes: Based on the set distance parameter, the edge to be processed is translated along the positive and negative directions of the normal of the topological edge respectively, to obtain two expansion edges corresponding to the edge to be processed; Determine the maximum coordinates of the two expansion edges along the coordinate axis direction; The area enclosed by the coordinate point corresponding to the minimum value and the coordinate point corresponding to the maximum value in the coordinate extreme values is determined as the mapping area corresponding to the topological edge.
5. The method according to claim 1, characterized in that The types of nodes to be processed include intersection nodes and non-intersection nodes; the topological edges corresponding to the nodes to be processed include inbound edges and outbound edges; The determining, based on the type of the node to be processed, a candidate mapping region corresponding to the topological edge of the node to be processed includes: Determine the type of the node to be processed based on the number of incoming edges and outgoing edges corresponding to the node to be processed; If the node to be processed is an intersection node, determining a candidate mapping area corresponding to the topological edge of the node to be processed based on all adjacent edges of the node to be processed; If the node to be processed is a non-intersection node, determine the adjacent edge corresponding to the node to be processed based on a depth-first search method; The candidate mapping region corresponding to the adjacent edge is determined as the candidate mapping region of the topological edge corresponding to the node to be processed.
6. The method according to claim 5, characterized in that If the node to be processed is a non-intersection node, determining the adjacent edge corresponding to the node to be processed based on a depth-first search method includes: If the node to be processed is a non-intersection node, the first intersection node searched along the direction of the unprocessed topological edge where the node to be processed is located is determined as the termination node; A topological edge between the suspended node and the node to be processed is determined as an adjacent edge corresponding to the node to be processed.
7. The method according to any one of claims 1 to 6, characterized in that The segmentation process of the candidate mapping area based on the optimization algorithm to obtain the target mapping area corresponding to the node to be processed includes: Based on the size of the candidate mapping area, determining the number of segmentation points corresponding to the candidate mapping area; Substituting the mapping time, the number of mapping areas after segmentation and the position of the segmentation points into the optimization algorithm, obtaining the target number of segmentation points and the target position of the segmentation points in the mapping area, wherein the mapping time is positively correlated with the size and shape of the mapping area after segmentation, the size of the mapping area after segmentation is related to the position of the segmentation points, and the number of mapping areas after segmentation is determined based on the number of segmentation points; Based on the number of target segmentation points and the positions of the target segmentation points, segmenting the mapping area; The segmented mapping area is used as the target mapping area corresponding to the node to be processed.
8. The method according to claim 7, characterized in that The mapping time includes the sum of the first time, the second time, the third time and the fourth time, wherein the first time is used to indicate the time required for a loop driving along the outer contour of the segmented mapping area, the second time is used to indicate the time required for I-shaped texture mapping driving within the segmented mapping area, the third time is used to indicate the time required for turning during the loop driving and the I-shaped texture mapping driving, and the fourth time is used to indicate the time required to leave the segmented mapping area.
9. The method according to claim 7, characterized in that: Substituting the mapping time, the number of segmented mapping areas, and the segmentation point positions into an optimization algorithm to obtain the target number of segmentation points and the target segmentation point positions of the mapping area includes: The mapping time T, the number of segmented mapping areas n and the segmentation point position t i Substitute into the objective function f of the optimization algorithm, wherein the constraints of the objective function f of the optimization algorithm include: Among them, f is the objective function in the optimization algorithm, x t Indicates the coordinate value of the split point on the x-axis, t i is the x-axis coordinate value of the i-th segmentation point at x min to x max The relative position of the area between i is the mapping time corresponding to the mapping area formed between the i-th segmentation point and the previous segmentation point; Based on the optimization algorithm, the number of target segmentation points and the positions of target segmentation points in the mapping area are obtained.
10. The method according to any one of claims 1 to 6, characterized in that The segmentation process of the candidate mapping area based on the optimization algorithm to obtain the target mapping area corresponding to the node to be processed includes: If the adjacent edge corresponding to the node to be processed is a topological edge parallel to the coordinate axis, based on a preset length threshold, the mapping area corresponding to the topological edge of the node to be processed is segmented to obtain the target mapping area corresponding to the node to be processed.
11. The method according to any one of claims 1 to 6, characterized in that After the candidate mapping area is segmented based on the optimization algorithm to obtain the target mapping area corresponding to the node to be processed, the method further includes: If there are overlapping parts between any two target mapping areas after the segmentation process, the overlapping parts are determined as overlapping mapping areas; If the ratio of the overlapping mapping area to the total area of the corresponding two target mapping areas is greater than a set ratio threshold, a corresponding alternative mapping area is determined based on the endpoints of the two target mapping areas, and the alternative mapping area is a rectangular area covering all the endpoints of the two target mapping areas; Replacing two target mapping regions corresponding to the overlapping mapping regions with the alternative mapping regions; If the ratio of the overlapping mapping areas to the total area of the corresponding two target mapping areas is less than a set ratio threshold, the overlapped portion of the overlapping mapping areas is deleted.
12. The method according to any one of claims 1 to 6, characterized in that After the candidate mapping area is segmented based on the optimization algorithm to obtain the target mapping area corresponding to the node to be processed, the method further includes: Based on the set discrete resolution, a set number of image points are collected in each segmented target mapping area; If the image point is not located in the area between the topological edges corresponding to the dilated edges in the target mapping area after the segmentation process, the set shape area corresponding to the image point is determined as a prohibited area.
13. A topological map processing device, characterized in that: The topological map processing device comprises: A preprocessing module, used to determine a to-be-processed node in a to-be-processed topological map, wherein the to-be-processed node is used to represent a starting point of an unprocessed topological edge; A classification module, used to determine a candidate mapping area for a topological edge corresponding to the node to be processed based on the type of the node to be processed; A segmentation module, used to segment the candidate mapping area based on an optimization algorithm to obtain a target mapping area corresponding to the node to be processed; The processing module is used to obtain a processed topological map based on the target mapping area.
14. A control device, characterized in that: include: at least one processor; and a memory communicatively coupled to the at least one processor; The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the control device to perform the topology map processing method as described in any one of claims 1 to 12.
15. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by a processor, they are used to implement the topology map processing method according to any one of claims 1 to 12.
16. A computer program product, characterized in that The computer program product comprises computer-executable instructions, which are used to implement the topology map processing method according to any one of claims 1 to 12 when executed by a processor.