Robot exploration mapping method, related equipment and computer program product
By dynamically updating the scope of random numbers and optimizing the sampling strategy using quadrant statistics, the RRT algorithm is improved, solving the problem of inefficient exploration caused by fixed scope and achieving high efficiency and global coverage for robot exploration and mapping.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-18
- Publication Date
- 2026-04-03
AI Technical Summary
In the process of robot exploration and mapping, the existing RRT algorithm has low exploration efficiency due to the random sampling strategy with a fixed scope, especially in the early stage of exploration when there are many invalid sampling points. Furthermore, the difference between the scope set by human experience and the actual exploration area further reduces the efficiency.
The system employs a dynamic update of the random number scope, adjusting the size of the random number scope based on the expansion of the explored map. Furthermore, it improves the effectiveness of sampling points and exploration efficiency through quadrant division and sampling probability optimization.
In the early stages of exploration, effective sampling points closer to the robot's current location are generated, reducing the number of iterations, improving map exploration efficiency, and ensuring global coverage.
Smart Images

Figure CN121783115A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of mobile robot technology, and more specifically, to a robot exploration mapping method, related equipment, and computer program products. Background Technology
[0002] In scenarios such as home robots, service robots, and industrial inspection robots, autonomous mobile robots need to quickly build complete maps in unknown environments. A current mainstream solution is to generate candidate exploration points based on the Rapidly-exploring Random Tree (RRT) algorithm to guide the robot in map building. The core idea of the RRT algorithm is to quickly expand a tree into the unknown region by randomly sampling points within a fixed scope, generating candidate exploration points. The performance of this method is highly dependent on the random sampling strategy.
[0003] Current RRT algorithms employ a fixed scope. To ensure global coverage of the exploration, existing techniques set the fixed scope to be larger than the entire area to be explored, thus guaranteeing the discovery of a complete map. Generally, the size of the fixed scope is manually set based on experience, depending on the scene to be explored. Taking a home robot mapping scenario as an example, considering that the area of a typical home is no more than 200 square meters, the width and height of the fixed scope can be set to 15m × 15m, or larger. In the early stages of robot exploration, this sampling strategy results in most random sampling points falling within the fixed scope, far from the already explored area. These sampling points are not very meaningful to the RRT algorithm, requiring multiple iterations to find effective exploration points, thus leading to low exploration efficiency. Summary of the Invention
[0004] In view of the above problems, this application is made to provide a robot exploration and mapping method, related equipment, and computer program products to improve the efficiency of robot exploration and mapping. The specific solution is as follows:
[0005] Firstly, a robot exploration mapping method is provided, including:
[0006] Obtain the map that the robot has explored at the current moment;
[0007] Based on the explored map, update the scope of the random number at the current moment, and the scope of the random number expands as the explored map expands;
[0008] Within the scope of the random number at the current moment, random sampling points are randomly generated, and the expansion direction of the random tree is quickly explored based on the sampling points to generate candidate exploration points;
[0009] Based on the candidate exploration points, the robot continues to explore and build a map until the exploration ends, thus obtaining a complete map.
[0010] In one possible design, in another implementation of the first aspect of the embodiments of this application, the process of updating the scope of the random number at the current moment based on the explored map includes:
[0011] If a change in the size of the explored map is detected, or if the change in the size of the explored map reaches a set threshold, the scope of the random number at the current moment is updated based on the explored map.
[0012] In one possible design, in another implementation of the first aspect of the embodiments of this application, the process of updating the scope of the random number at the current moment based on the size of the explored map includes:
[0013] If the number of times random sampling points are generated reaches the set number of iterations, the scope of the random number at the current moment is updated based on the explored map.
[0014] In one possible design, in another implementation of the first aspect of the embodiments of this application, the process of randomly generating sampling points within the random number scope at the current moment includes:
[0015] Based on the saved historical sampling points, the number of sampling points in each quadrant within the random number scope at the current moment is counted. The random number scope is divided into at least two quadrants according to a set division rule.
[0016] The sampling probability of each quadrant is determined based on the number of sampling points in each quadrant, and the sampling probability is negatively correlated with the number of sampling points.
[0017] According to the sampling probability of each quadrant, select the target quadrant from all quadrants, randomly generate sampling points in the target quadrant, and save the generated sampling points.
[0018] In one possible design, in another implementation of the first aspect of the embodiments of this application, the process of selecting the target quadrant from all quadrants according to the sampling probability of each quadrant includes:
[0019] Generate a universal random number dr0 between 0 and 1;
[0020] The sampling probabilities of each quadrant are accumulated sequentially to obtain the sampling probability interval of each quadrant. The lower limit of the sampling probability interval of the i-th quadrant is the sum of the sampling probabilities from the first quadrant to the (i-1)-th quadrant, and the upper limit of the sampling probability interval of the i-th quadrant is the sum of the sampling probabilities from the first quadrant to the i-th quadrant.
[0021] Determine the target sampling probability interval to which the general random number dr0 belongs, and select the quadrant corresponding to the target sampling probability interval as the target quadrant.
[0022] In one possible design, in another implementation of the first aspect of the embodiments of this application, the process of updating the scope of the random number at the current moment based on the explored map includes:
[0023] Obtain the attribute data of the explored map, including the coordinate origin, map resolution, and width and height data;
[0024] Based on the attribute data of the explored map, determine the center point of the random number scope at the current moment;
[0025] Based on the map resolution and width / height data of the explored map, the actual width / height data corresponding to the explored map is calculated, and the actual width / height data is scaled according to a set scaling factor to serve as the width / height data of the random number scope at the current moment.
[0026] In one possible design, in another implementation of the first aspect of the embodiments of this application, the scaling factor is set as a first scaling factor, which is used to enlarge the actual width and height data.
[0027] In one possible design, in another implementation of the first aspect of the embodiments of this application, when it is determined that the current exploration requirement is a local fine-grained exploration, the set scaling factor is adjusted to a second scaling factor, which is used to reduce the actual width and height data.
[0028] In a second aspect, a robotic device is provided, comprising: a memory and a processor;
[0029] The memory is used to store programs;
[0030] The processor is configured to execute the program to implement the various steps of the robot exploration mapping method described in any of the first aspects of this application.
[0031] Thirdly, a readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the various steps of the robot exploration mapping method described in any of the first aspects of this application.
[0032] Fourthly, a computer program product is provided, including a computer program that, when executed by a processor, implements the various steps of the robot exploration mapping method described in any of the first aspects of this application.
[0033] By employing the aforementioned technical solution, this application improves upon the traditional RRT algorithm in the robot's exploration and mapping process. This application abandons the traditional fixed-size random number scope and instead dynamically updates the size of the random number scope based on the map already explored by the robot at the current moment. That is, the random number scope expands as the explored map expands. Thus, in the early stages of exploration, sampling points can be randomly generated within a relatively small random number scope, guiding the expansion direction of the rapid exploration random tree to generate candidate exploration points. This makes the randomly generated sampling points closer to the robot's current position, meaning they are more meaningful to the RRT algorithm. Valid exploration points can be generated with a small number of iterations, thereby improving map exploration efficiency. Furthermore, the expansion of the random number scope with the exploration map ensures global coverage of the exploration. Attached Figure Description
[0034] Various other advantages and benefits will become apparent to those skilled in the art upon reading the following detailed description of preferred embodiments. The accompanying drawings are for illustrative purposes only and are not intended to limit the scope of this application. Furthermore, the same reference numerals denote the same parts throughout the drawings. In the drawings:
[0035] Figure 1 This is a schematic diagram of an implementation system architecture for the robot exploration and mapping method provided in this application embodiment;
[0036] Figure 2 This is a schematic diagram of a robot exploration and mapping method provided in an embodiment of this application;
[0037] Figure 3a This example illustrates the sampling process in the early stages of exploration using a traditional RRT algorithm.
[0038] Figure 3b An example is shown in the schematic diagram of the sampling process in the early stage of exploration of the improved RRT algorithm in this case;
[0039] Figure 4a This example illustrates the sampling process in the later stages of exploration using a traditional RRT algorithm.
[0040] Figure 4b An example is shown in the schematic diagram of the sampling process in the later stage of the exploration of the improved RRT algorithm in this case;
[0041] An example is shown in the schematic diagram of the semantic representation feature prediction process of a target text and candidate texts;
[0042] Figure 5 This application provides a schematic diagram of the structure of a robot exploration and mapping system.
[0043] Figure 6 This is a schematic diagram of the structure of a robot device provided in an embodiment of this application. Detailed Implementation
[0044] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0045] Before introducing the scheme of this application, we will first introduce the traditional RRT algorithm.
[0046] The basic extension process of RRT is:
[0047] 1. Random Sampling: Randomly generating a point X within a fixed-size configuration space (random number scope). rand .
[0048] 2. Find the nearest neighbor: Within the existing tree structure, find a neighbor that is a distance X. rand The nearest node X near .
[0049] 3. Extending Tree: From X near Towards X rand Expand the direction by a step size to obtain a new node X. new .
[0050] 4. Collision Checking: Checks path X near To X new Whether it collided with an obstacle.
[0051] If there is no collision, then X new Add to the tree and connect X. near and X new .
[0052] If a collision occurs, discard the sample and return to step 1.
[0053] Analysis of the problems with the above sampling strategy:
[0054] In the initial exploration phase, the robot's RRT tree has only explored a small corner (the explored area), while traditional RRT algorithms randomly sample within a large, fixed scope, resulting in a very high probability that X... randIt will land in unknown space far from the already explored area. For example, the tree is in the bottom left corner, while X... rand The sample was taken in the upper right corner.
[0055] Following the RRT algorithm's process, when searching for the nearest neighbor, since the tree is in the bottom left corner, the distance from the top right corner is X. rand The nearest node X near It must also be located at the outermost edge of the current tree (usually the furthest point extending towards the upper right corner). This X near And distant X rand Between them lies a vast, completely unknown region.
[0056] Furthermore, in the tree expansion and collision detection phase:
[0057] The RRT algorithm attempts to extract X near Towards the distant X rand Take a "step" (one stride, such as 0.5 meters). Due to X rand The next step, pointing to a completely unknown area, is extremely far away. This step is highly likely to result in a direct collision with unknown obstacles (such as walls or furniture), causing collision detection to fail. This sample is discarded, and the algorithm performs an expensive collision detection calculation, but the RRT tree structure remains unchanged.
[0058] These distant random points X rand It fails to effectively guide the tree to grow into unknown regions. The resulting expansion direction is "blind" because the space between the tree and random points is filled with unmapped obstacles. It consumes computational resources (performing nearest neighbor searches and collision detection) but makes no effective contribution to the tree's expansion. For these reasons, the vast majority of sampled points falling into distant regions fail to detect collisions. To obtain a "valid exploration point" that can successfully expand, the algorithm must perform numerous repetitive "sampling-failure" loops.
[0059] A "valid exploration point" that can be successfully expanded typically needs to satisfy the following condition: from X near To X rand In the direction of the tree, there exists a small free space (at least one step's distance). When the tree is surrounded by obstacles, this condition is only easily satisfied for points sampled near the "front edge" region of the obstacle's edge. Within a large sampling range, the probability of sampling these "front edge" regions is extremely low.
[0060] Therefore, in the early stages of exploration, the traditional RRT algorithm generates a very high proportion of invalid sampling points due to its excessively large sampling scope. These points are too far from the explored area, and there are almost always unknown obstacles on the lines connecting them to the tree, leading to expansion failure. The algorithm needs to spend a lot of computational iterations to "take a chance" and find those rare valid sampling points close to the current exploration frontier, thus severely reducing exploration efficiency.
[0061] Furthermore, traditional RRT algorithms often use a fixed sampling range based on human experience, which may significantly deviate from the actual area to be explored. For example, in a residential setting, a human might assume, based on experience, that the area is generally no more than 200 square meters, and therefore set a fixed random number range of 15m x 15m. However, in actual exploration, the map might be created for a one-bedroom apartment with an area of only 60 square meters, much smaller than the fixed random number range. This results in most sampling points falling outside the actual residential area, becoming invalid and severely reducing exploration efficiency.
[0062] This application provides a robot exploration mapping scheme based on an improved RRT algorithm, which can improve map exploration efficiency.
[0063] This application provides a robot exploration mapping method, which can be applied to, for example... Figure 1 The system architecture shown includes a robot 100 and a server 200. The server 200 may include one or more servers (…). Figure 1 (This example uses a server as an illustration).
[0064] Either robot 100 or server 200 can be used independently to execute the robot exploration and mapping method provided in the embodiments of this application. Alternatively, robot 100 and server 200 can also be used collaboratively to execute the robot exploration and mapping method provided in the embodiments of this application.
[0065] Among them, robots can be mobile robots such as home robots, server robots, and industrial inspection robots.
[0066] This application provides a robot exploration and mapping method, which is illustrated by applying the method to a robot system. Specifically, the robot system can be... Figure 1 The system may consist of robot 100 or a combination of robot 100 and server 200. (Refer to...) Figure 2 The robot's exploration and mapping method specifically includes the following steps:
[0067] Step S100: Obtain the map that the robot has explored at the current moment.
[0068] Specifically, during the exploration and mapping process, the robot starts from the initial point and gradually explores the map outwards, thus obtaining the map area that the robot has already explored at the current moment.
[0069] Step S110: Based on the explored map, update the random number scope at the current moment. The random number scope expands as the explored map expands.
[0070] This embodiment employs a dynamic random number scope, which is dynamically updated based on the explored map. As the explored map expands, the random number scope also gradually expands. It is understandable that in the later stages of exploration, the size of the random number scope is larger than that in the earlier stages.
[0071] The scope of random numbers refers to the space in which random sampling occurs. After obtaining the scope of random numbers at the current moment, random sampling can be performed within this scope to obtain sampling points.
[0072] Before starting the exploration, a small random number scope containing the robot's starting point can be configured. As the explored map expands, the size of the random number scope can be gradually expanded.
[0073] In one possible implementation, the scope of the random number can be set to cover the explored map. For example, the random number can be set to move a certain distance outward from the outer contour of the explored map, and the area enclosed by the moved contour can be used as the scope of the random number. This ensures that the scope of the random number covers the explored map without being too large.
[0074] In another possible implementation, when faced with specific exploration needs, such as when it is determined that a detailed local exploration is required, the size of the random number scope can be set to be slightly smaller than the already explored map. One alternative example is to move a set distance inward from the outer contour of the already explored map, with the area enclosed by the moved contour serving as the random number scope.
[0075] Step S120: Randomly generate sampling points within the random number scope at the current time, and guide the expansion direction of the random tree to generate candidate exploration points based on the sampling points.
[0076] After obtaining the latest random number scope in the previous step, random sampling can be performed within this scope to obtain sampling points. These sampling points are then used to guide the expansion direction of the RRT tree and generate candidate exploration points.
[0077] The process of expanding the RRT tree based on sampling points to generate candidate exploration points can be found in the relevant introduction to the RRT algorithm.
[0078] Step S130: Based on the candidate exploration points, guide the robot to continue exploring and mapping until the exploration end condition is met, and obtain the complete exploration map.
[0079] Specifically, after generating candidate exploration points, these points can be evaluated. Utility functions can be used to assess the information gain (how many new maps can be explored) and path cost (the distance the robot needs to travel to reach the candidate exploration point), etc., to determine an optimal target exploration point. The robot is then guided to continue exploring and mapping towards the target exploration point until the exploration ends, such as when a complete map is explored.
[0080] The robot exploration mapping method provided in this application improves upon the traditional Random Number Detection (RRT) algorithm during the robot exploration mapping process. This application abandons the traditional fixed-size random number scope and instead dynamically updates the size of the random number scope based on the map already explored by the robot at the current moment. That is, the random number scope expands as the explored map expands. Thus, in the early stages of exploration, sampling points can be randomly generated within a relatively small random number scope to guide the expansion direction of the rapid exploration random tree, generating candidate exploration points. This makes the randomly generated sampling points closer to the robot's current position, meaning they are more meaningful to the RRT algorithm. Valid exploration points can be generated with a small number of iterations, thereby improving map exploration efficiency. Furthermore, the expansion of the random number scope with the expansion of the explored map also ensures global coverage of the exploration.
[0081] Combination Figures 3a-3b The sampling strategies of the traditional RRT algorithm and the improved RRT algorithm provided in the embodiments of this application are compared and explained:
[0082] Figure 3a The example illustrates the use of a traditional fixed random number scope for sampling in the early stages of exploration. Due to the large area of the random number scope, most sampling points are distributed in areas far from the already explored map, which are inefficient or even invalid sampling points, and have little significance for the RRT algorithm, resulting in low exploration efficiency.
[0083] Figure 3b The example demonstrates the use of the dynamic random number scope of the improved RRT algorithm in the early stages of exploration. In the early stages of exploration, the area of the explored map is relatively small, and the corresponding random number scope can also be set to be small. Therefore, most sampling points are located around the explored area and are considered effective sampling points, which are of great significance to the RRT algorithm and improve exploration efficiency.
[0084] In some embodiments of this application, the aforementioned step S110 is described as the process of updating the random number scope at the current moment based on the explored map.
[0085] There are several possible scenarios for updating the scope of the random number.
[0086] One possible implementation is to trigger the random number scope update process when a change in the size of the explored map is detected (i.e., the explored map is updated). Another possible implementation is to trigger the random number scope update process when the size change of the explored map reaches a set threshold. Clearly, the first update method updates the random number scope promptly after a change in the explored map, resulting in more timely updates, but also increasing the computational load. The second update method, which triggers the random number scope update only when the size change of the explored map reaches the set threshold, effectively controls the frequency of random number scope updates and reduces the computational load.
[0087] In another possible implementation, the random number scope update process could be triggered after the RRT algorithm has completed a certain number of iterations. That is, the random number scope update process is triggered when the number of times random sampling points are generated reaches the set number of iterations.
[0088] Understandably, the timing of the random number scope update can be flexibly set, ensuring that the random number scope gradually expands as the explored map expands.
[0089] The above describes when the scope of random numbers is updated. The following section further describes the specific update process of the scope of random numbers.
[0090] Depending on the scenario to be explored, the shape of the random number scope can also be of various types, such as rectangles and circles. Subsequent embodiments of this application will use a rectangular random number scope as an example for illustration.
[0091] In one possible implementation, step S110 can be implemented as follows:
[0092] S1. Obtain the attribute data of the explored map. The attribute data includes the coordinate origin (ox, oy), map resolution mr, and width and height data (mw, mh).
[0093] S2. Based on the attribute data of the explored map, determine the center point of the random number scope at the current moment.
[0094] The center point (cx, cy) of the random number scope can be represented as:
[0095] cx = mw / 2 × mr + ox;
[0096] cy = mh / 2 × mr + oy.
[0097] S3. Based on the map resolution and width / height data of the explored map, calculate the actual width / height data corresponding to the explored map, and scale the actual width / height data according to the set scaling factor, and use it as the width / height data of the random number scope at the current moment.
[0098] The width and height (fw, fh) of the random number scope at the current moment can be represented as:
[0099] fw = mw × mr × r;
[0100] fh = mh × mr × r.
[0101] Here, r represents the scaling factor, which is used to enlarge or reduce the actual width and height data of the explored map, thereby effectively controlling the frequency of dynamic adjustment of the random number scope.
[0102] Understandably, the scaling factor r can be the first scaling factor r1, which is used to magnify the actual width and height data corresponding to the explored map. r1 > 1. The larger r1 is, the greater the magnification of the actual width and height of the explored map, and the larger the corresponding random number scope.
[0103] In some special scenarios, such as when the current exploration requirement is determined to be localized detailed exploration, the scaling factor r can be adjusted to a second scaling factor r2. The second scaling factor r2 is used to reduce the actual width and height data of the explored map. r2 < 1. The smaller r2 is, the greater the reduction in the actual width and height of the explored map, and the smaller the corresponding random number scope. Therefore, it is possible to focus on generating sampling points in a small local area, guiding detailed map exploration in that small local area.
[0104] The scaling factor can be a pre-defined constant or a variable parameter related to the size of the explored map.
[0105] The above steps S2 and S3 determine the center point and width and height data of the random number scope, respectively, which can locate the specific location of the random number scope.
[0106] Based on this, we can further calculate the positions of the four vertices (tl, tr, br, bl) of the random number scope:
[0107] tl = (cx + fw / 2, cy + fh / 2);
[0108] tr = (cx + fw / 2, cy - fh / 2);
[0109] br = (cx - fw / 2, cy - fh / 2);
[0110] bl = (cx - fw / 2, cy + fh / 2).
[0111] In the later stages of exploration, when the map expands to the boundary of the random number domain, the traditional RRT algorithm adopts a random sampling strategy within the fixed random number domain. Most of the sampling points fall in areas that have already been explored in the early stages, which means that the newly expanded areas (such as the end of a corridor) cannot obtain a higher sampling probability. This can easily lead to the robot repeatedly exploring the already covered areas. Finding new exploration points in the newly expanded areas will take more time, thus reducing the robot's exploration efficiency.
[0112] To address the aforementioned issues, this embodiment provides a sampling strategy for quadrant division and landing point statistics of the random number scope. Specifically:
[0113] This application can pre-configure a landing point recorder to save historically generated sampling points.
[0114] Furthermore, in this embodiment, the scope of the random number can be divided into quadrants, making it easier to count the number of historically generated sampling points within each quadrant.
[0115] There are several ways to divide the scope of a random number generator into quadrants. For example, the scope can be divided into 2, 3, 4, or more quadrants. A common approach is to divide a rectangular random number scope into 4 quadrants. For instance, using the center point of the rectangular random number scope as the origin and the two directions perpendicular to the side length as the X and Y axes, the scope can be divided into four quadrants.
[0116] Of course, various quadrant division methods can be used for random number scopes of different shapes. The number and shape of the divided quadrants can also be flexibly set.
[0117] In some possible implementations, the aforementioned step S120, the process of randomly generating sampling points within the random number scope at the current moment, may include:
[0118] S1. Based on the saved historical sampling points, count the number of sampling points in each quadrant within the scope of the random number at the current moment.
[0119] For example, the number of sampling points in the i-th quadrant can be represented as aq[i].
[0120] S2. Based on the number of sampling points aq[i] in each quadrant, determine the sampling probability pq[i] for each quadrant. The sampling probability pq[i] is negatively correlated with the number of sampling points aq[i].
[0121] In one alternative example, the probability pq[i] and the number of sampling points aq[i] can be expressed as the following formula:
[0122]
[0123] S3. Select the target quadrant from all quadrants according to the sampling probability pq[i] of each quadrant. That is, select the target quadrant from all quadrants with the sampling probability pq[i] of each quadrant as the probability of the quadrant being selected. Randomly generate sampling points in the target quadrant and save the generated sampling points.
[0124] In one alternative implementation, the process of selecting the target quadrant can employ a probability sampling method, selecting the target quadrant based on the sampling probability of each quadrant. Specifically:
[0125] First, generate a universal random number dr0 between 0 and 1.
[0126] The sampling probabilities of each quadrant are accumulated sequentially to obtain the sampling probability interval of each quadrant. The lower limit of the sampling probability interval of the i-th quadrant is the sum of the sampling probabilities from the first quadrant to the (i-1)-th quadrant, and the upper limit of the sampling probability interval of the i-th quadrant is the sum of the sampling probabilities from the first quadrant to the i-th quadrant.
[0127] Determine the target sampling probability interval to which the general random number dr0 belongs, and select the quadrant corresponding to the target sampling probability interval as the target quadrant.
[0128] For example, suppose there are four quadrants: A, B, C, and D, with sampling probabilities of 0.1, 0.2, 0.3, and 0.4 for each quadrant.
[0129] The probability of quadrant A is 0.1, corresponding to the sampling probability interval [0, 0.1), and the probability of being selected is 10%.
[0130] The probability of quadrant B is 0.2, corresponding to the sampling probability interval [0.1, 0.3), and the probability of being selected is 20%.
[0131] The probability of quadrant C is 0.3, corresponding to the sampling probability interval [0.3, 0.6), and the probability of being selected is 30%.
[0132] The probability of quadrant D is 0.4, corresponding to the sampling probability interval [0.6, 1.0), and the probability of being selected is 40%.
[0133] Therefore, quadrant D (with the highest sampling probability) has the highest chance of being selected, while quadrant A (with the lowest sampling probability) has the lowest chance of being selected.
[0134] According to the quadrant-based sampling strategy provided in this embodiment, the location and number of generated random sampling points are continuously recorded during the sampling process. The scope of the random number is divided into multiple quadrants, and the number of sampling points in each quadrant is counted. As the scope of the random number expands, the composition of sampling points in each quadrant changes accordingly. Based on the latest statistical information in each quadrant, the system decides which quadrant the next random sampling point should fall into, thus favoring sampling in quadrants with fewer generated sampling points, i.e., generating sampling points in newly explored areas, thereby improving the efficiency of map exploration. Simultaneously, the sampling strategy of this embodiment also preserves the opportunity to sample previously explored areas, ensuring the integrity of autonomous exploration mapping.
[0135] Combination Figures 4a-4b The sampling strategies of the traditional RRT algorithm and the improved RRT algorithm provided in the embodiments of this application are compared and explained:
[0136] Figure 4a The example illustrates the use of a traditional fixed random number scope for sampling in the later stages of exploration. Because the random number scope is relatively large, most sampling points are distributed in the already explored map area, and the probability of landing in the new exploration area is relatively small. This can easily lead to the robot repeatedly exploring the already covered area, and it takes more time to find new exploration points in the newly expanded area, thus reducing the robot's exploration efficiency.
[0137] Figure 4b The example demonstrates the quadrant-based sampling strategy employed in the later stages of exploration. Assuming the random number scope is divided into left and right quadrants, the sampling probability in the left quadrant is lower than that in the right quadrant (which contains newly explored areas with relatively fewer sampling points) because the left quadrant largely consists of already explored regions. Therefore, in the later stages of exploration, sampling points are more likely to be generated in the newly explored right quadrant, making it easier to find new exploration points in the expanded area and improving the robot's exploration efficiency.
[0138] In some embodiments of this application, an optional implementation of step S3 above, which involves randomly generating sampling points in the target quadrant, is described.
[0139] First, calculate the geometric center point (qox, qoy) of the target quadrant.
[0140] Furthermore, generate two universal random numbers, dr1 and dr2, between 0 and 1. Calculate the coordinates (x, y) of the random sampling points within the target quadrant:
[0141] x = dr1×fw / 2 + qox;
[0142] y = dr2×fh / 2 + qoy.
[0143] Reference Figure 5 The example illustrates a robot exploration mapping system, which includes a random sampling point generator, an RRT algorithm module, and a map update module.
[0144] The random sampling point generator is used to generate random sampling points and pass them to the RRT algorithm module. The RRT algorithm module guides the robot to quickly explore the expansion direction of the random tree based on the sampling points to generate candidate exploration points. Based on the candidate exploration points, the robot is guided to continue exploring and mapping.
[0145] The map update module updates the explored map based on the robot's exploration process.
[0146] The random sampling point generator includes a landing point recorder, a sampling probability determination module, a general random number generator, a scope update module, and a random sampling point generation module.
[0147] The landing point recorder is used to record historically generated sampling points.
[0148] The probability determination module calculates the sampling probability by counting the number of sampling points in each quadrant of the random number scope based on the historically generated sampling points saved by the landing point recorder.
[0149] The scope update module updates the scope of random numbers based on the explored map updated by the map update module. As the explored map expands, the scope of random numbers also expands.
[0150] A general random number generator is used to generate general random numbers, such as dr0, dr1, dr2, etc. mentioned above.
[0151] The random sampling point generation module selects the target quadrant in each quadrant based on the sampling probability of each quadrant within the scope of the latest random number, and refers to the general random number generated by the general random number generator. Then, it randomly generates sampling points in the target quadrant and saves the generated sampling points through the landing point recorder.
[0152] The detailed implementation process of each module can be found in the previous description of the robot exploration mapping method implementation.
[0153] In summary, the robot exploration mapping method provided in this application improves the sampling strategy in the traditional RRT algorithm, which significantly improves the exploration efficiency. Through the dual optimization of the scope of dynamic random numbers and quadrant statistics, the "effective sampling rate" (the proportion of generated landing points that can be used for RRT expansion) is greatly improved.
[0154] Furthermore, computational resources have been optimized, significantly reducing the number of invalid RRT expansion iterations. Simultaneously, the lightweight design of quadrant statistics effectively reduces additional computational overhead. The tendency for random placement and computational cost can also be balanced by setting different numbers of quadrants.
[0155] Moreover, while improving the efficiency of autonomous exploration and mapping, this application still retains the opportunity to continue exploring old areas of the map, thus ensuring the integrity of autonomous exploration.
[0156] This application also provides a robot in its embodiments. (See reference...) Figure 6 The diagram illustrates a structure suitable for implementing the robot in the embodiments of this application. The robot in the embodiments of this application may include, but is not limited to, mobile robots such as home robots, service robots, and industrial inspection robots. Figure 6 The robot shown is merely an example and should not be construed as limiting the functionality and scope of use of the embodiments of this application.
[0157] like Figure 6 As shown, the robot may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 1, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 2 or a program loaded from a storage device 8 into a random access memory (RAM) 3, to implement the robot exploration and mapping method of the foregoing embodiments of this application. When the robot is powered on, the RAM 3 also stores various programs and data required for robot operation. The processing device 1, ROM 2, and RAM 3 are interconnected via a bus 4. An input / output (I / O) interface 5 is also connected to the bus 4.
[0158] Typically, the following devices can be connected to I / O interface 5: input devices 6 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 7 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 8 including, for example, memory cards, hard drives, etc.; and communication devices 9. Communication device 9 allows the robot to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 6 A robot with various devices is shown, but it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed alternatively.
[0159] This application also provides a computer program product including computer-readable instructions, which, when executed on an electronic device, cause the electronic device to implement any of the robot exploration and mapping methods provided in this application.
[0160] This application also provides a computer-readable storage medium that carries one or more computer programs. When the one or more computer programs are executed by an electronic device, the electronic device can implement any of the robot exploration mapping methods provided in this application.
[0161] It should also be noted that the device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. In addition, in the device embodiment drawings provided in this application, the connection relationship between modules indicates that they have a communication connection, which can be implemented as one or more communication buses or signal lines.
[0162] Through the above description of the embodiments, those skilled in the art can clearly understand that this application can be implemented by means of software plus necessary general-purpose hardware, or it can be implemented by special-purpose hardware including application-specific integrated circuits, special-purpose CPUs, special-purpose memory, special-purpose components, etc. Generally, any function performed by a computer program can be easily implemented by corresponding hardware, and the specific hardware structure used to implement the same function can also be diverse, such as analog circuits, digital circuits, or special-purpose circuits. However, for this application, software program implementation is more often the preferred implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a readable storage medium, such as a computer floppy disk, USB flash drive, mobile hard disk, ROM, RAM, magnetic disk, or optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, training equipment, or network device, etc.) to execute the methods described in the various embodiments of this application.
[0163] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product.
[0164] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions may be transmitted from one website, computer, training device, or data center to another website, computer, training device, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a training device or data center that integrates one or more available media. The available media may be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., DVDs), or semiconductor media (e.g., solid-state drives (SSDs)).
[0165] The various embodiments in this specification are described in a progressive manner. Each embodiment focuses on the differences from other embodiments. The various embodiments can be combined as needed, and the same or similar parts can be referred to each other.
Claims
1. A robot exploration mapping method, characterized in that, include: Obtain the map that the robot has explored at the current moment; Based on the explored map, update the scope of the random number at the current moment, and the scope of the random number expands as the explored map expands; Within the scope of the random number at the current moment, random sampling points are randomly generated, and the expansion direction of the random tree is quickly explored based on the sampling points to generate candidate exploration points; Based on the candidate exploration points, the robot continues to explore and build a map until the exploration ends, thus obtaining a complete map.
2. The method according to claim 1, characterized in that, The process of updating the scope of random numbers at the current moment based on the explored map includes: If a change in the size of the explored map is detected, or if the change in the size of the explored map reaches a set threshold, the scope of the random number at the current moment is updated based on the explored map.
3. The process of updating the scope of the random number at the current moment based on the size of the explored map includes: If the number of times random sampling points are generated reaches the set number of iterations, the scope of the random number at the current moment is updated based on the explored map.
4. The method according to claim 1, characterized in that, The process of randomly generating sampling points within the random number scope at the current moment includes: Based on the saved historical sampling points, the number of sampling points in each quadrant within the random number scope at the current moment is counted. The random number scope is divided into at least two quadrants according to a set division rule. The sampling probability of each quadrant is determined based on the number of sampling points in each quadrant, and the sampling probability is negatively correlated with the number of sampling points. According to the sampling probability of each quadrant, select the target quadrant from all quadrants, randomly generate sampling points in the target quadrant, and save the generated sampling points.
5. The method according to claim 4, characterized in that, The process of selecting the target quadrant from all quadrants according to the sampling probability of each quadrant includes: Generate a universal random number dr0 between 0 and 1; The sampling probabilities of each quadrant are accumulated sequentially to obtain the sampling probability interval of each quadrant. The lower limit of the sampling probability interval of the i-th quadrant is the sum of the sampling probabilities from the first quadrant to the (i-1)-th quadrant, and the upper limit of the sampling probability interval of the i-th quadrant is the sum of the sampling probabilities from the first quadrant to the i-th quadrant. Determine the target sampling probability interval to which the general random number dr0 belongs, and select the quadrant corresponding to the target sampling probability interval as the target quadrant.
6. The method according to claim 1, characterized in that, The process of updating the scope of random numbers at the current moment based on the explored map includes: Obtain the attribute data of the explored map, including the coordinate origin, map resolution, and width and height data; Based on the attribute data of the explored map, determine the center point of the random number scope at the current moment; Based on the map resolution and width / height data of the explored map, the actual width / height data corresponding to the explored map is calculated, and the actual width / height data is scaled according to a set scaling factor to serve as the width / height data of the random number scope at the current moment.
7. The method according to claim 6, characterized in that, The scaling factor is set as a first scaling factor, which is used to enlarge the actual width and height data.
8. The method according to claim 6, characterized in that, If the current exploration requirement is determined to be localized fine-grained exploration, the set scaling factor is adjusted to a second scaling factor, which is used to reduce the actual width and height data.
9. A robotic device, characterized in that, include: Memory and processor; The memory is used to store programs; The processor is used to execute the program to implement each step of the robot exploration mapping method as described in any one of claims 1 to 8.
10. A readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements each step of the robot exploration mapping method as described in any one of claims 1 to 8.
11. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the various steps of the robot exploration mapping method as described in any one of claims 1 to 8.