A method for a robot to explore an unknown environment
By creating and updating raster maps and path maps, dynamic calculations explore the benefits and path distances, the rapid and efficient exploration of mobile robots in unknown environments is achieved, and the problems of large computing volume and low path planning efficiency in the existing technology are solved.
Patent Information
- Application Number
- CN202211190571.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-28
- Publication Date
- 2025-05-06
- Estimated Expiration
- 2042-09-28
AI Technical Summary
When existing mobile robots independently explore unknown environments, the calculation amount is large, making it difficult to quickly and efficiently plan better exploration paths. Especially in large-scale and complex environments, the robot needs to stop motion and wait for path planning results, making it difficult to obtain high-quality exploration paths.
By creating a raster map and path map, set the iteration frequency; update the area blocks in the raster map based on sensor data; update the path map dynamically; determine candidate viewpoints in known areas and calculate exploration benefits; calculate the optimal exploration path based on utility functions, and iterate until the exploration is completed.
It realizes planning the optimal exploration path with low computational volume, improves the exploration efficiency of the robot in unknown environments, and can complete the exploration work in a shorter time.
Smart Images

Figure CN115542907B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of robot environment exploration, and in particular to a method for a robot to explore an unknown environment. Background Art
[0002] With the advancement of science and technology, robotics technology has developed rapidly. Robots are widely used in various fields and have great potential to promote social development. Mobile robots are a type of robot that can be widely used in mission scenarios such as search and rescue, inspection, and environmental reconstruction. In these mission scenarios, robots need to autonomously explore unknown environments to obtain environmental information.
[0003] However, existing mobile robot autonomous exploration methods require a lot of calculations to plan a good exploration path. Due to the limited onboard computing resources of the robot, it is unable to respond to the perceived environmental information in a timely manner during the movement. In large-scale and complex unknown environments, the robot even needs to stop moving to wait for the path planning results, and it is difficult to obtain a high-quality exploration path, and it is impossible to explore the unknown environment efficiently. Summary of the invention
[0004] In view of this, an embodiment of the present invention provides a method for a robot to explore an unknown environment with low computational effort and high speed and efficiency.
[0005] The embodiment of the present invention provides a method for a robot to explore an unknown environment, comprising: creating a grid map and a path map, setting a first iteration frequency and a second iteration frequency; wherein the first iteration frequency is the frequency of updating and iterating the grid map, and the second iteration frequency is the calculation iteration frequency; updating the known area, unknown area, and boundary area blocks in the grid map according to the unknown environment data collected by the sensor; wherein the boundary area blocks are determined according to the known area and the unknown area; the grid map is updated and iterated at the first iteration frequency; dynamically updating the path map according to the barrier-free part of the known area in the grid map; determining candidate viewpoints in the known area, and calculating the exploration benefits of the candidate viewpoints; wherein the exploration benefits are the number of the boundary area blocks connected by the candidate viewpoints; based on the grid map and the path map, constructing a utility function to calculate the optimal exploration path connecting all the candidate viewpoints according to the exploration benefits and the distances of the paths between all the candidate viewpoints; and iteratively calculating the optimal exploration path according to the current position of the robot according to the second iteration frequency until the exploration of the unknown environment is completed.
[0006] Optionally, updating the known areas, unknown areas, and boundary area blocks in the grid map according to the unknown environmental data collected by the sensor includes: determining the collection range of the sensor according to the maximum perception distance of the sensor, and collecting environmental data within the collection range by the sensor; marking the known areas, unknown areas, and boundary area blocks in the grid map according to the collected environmental data; the boundary area blocks are grids of the boundary portions of the known areas and the unknown areas.
[0007] Optionally, determining candidate viewpoints in the known area and calculating the exploration benefit of the candidate viewpoints include: taking the current position of the robot as the center of the circle, determining a sampling radius, constructing a sampling range, and taking a portion of the known area of the sampling range without obstacles as the sampling area; determining evenly spaced points in the sampling area as first sampling points; connecting each of the boundary area blocks to the nearest first sampling point; determining the first sampling point connected to the boundary area block as a candidate viewpoint; and calculating the number of the boundary area blocks connected to each candidate viewpoint as the exploration benefit of the candidate viewpoint.
[0008] Optionally, based on the grid map and the path map, according to the exploration benefit and the path distance between all the candidate viewpoints, constructing a utility function to calculate the optimal exploration path connecting all the candidate viewpoints, includes: based on the grid map and the path map, calculating a first path distance and a second path distance; wherein the first path distance is the path distance between all the candidate viewpoints, and the second path distance is the path distance from the current position of the robot to all the candidate viewpoints; organizing all the candidate viewpoints into a sequence, constructing a utility function, and calculating the highest total utility sequence through the utility function according to the first path distance, the second path distance and the exploration benefit; adding the current position of the robot to the head of the highest utility sequence to obtain an optimal exploration sequence; and sequentially splicing the paths between adjacent candidate viewpoints in the optimal exploration sequence to obtain an optimal exploration path.
[0009] Optionally, all the candidate viewpoints are grouped into a sequence, a utility function is constructed, and the highest total utility sequence is calculated by the utility function according to the first path distance, the second path distance and the exploration benefit, including: sorting all the candidate viewpoints in descending order, and constructing the sorted candidate viewpoints into an initial sequence; wherein the basis for the descending order is the exploration benefit or the second path distance; calculating the total utility of the initial sequence according to the exploration benefit and the first path distance; obtaining a continuous sequence with more than two candidate viewpoints in the initial sequence; inverting the continuous sequence and inserting it into the original acquisition position as the first calculation sequence; calculating the total utility of the first calculation sequence according to the exploration benefit and the first path distance; obtaining other continuous sequences with more than two candidate viewpoints from the initial sequence, and returning to execute the step of obtaining a continuous sequence with more than two candidate viewpoints in the initial sequence, until the first calculation sequence with the highest total utility is obtained as the first utility sequence.
[0010] When the total utility of the first utility sequence is less than and / or equal to the total utility of the initial sequence, the initial sequence is taken as the highest total utility sequence; when the total utility of the first utility sequence is greater than the total utility of the initial sequence, the first utility sequence is taken as the initial sequence, and the step of calculating the total utility of the initial sequence according to the exploration benefit and the first path distance is returned to execute until the total utility of the first utility sequence is less than and / or equal to the total utility of the initial sequence, and the initial sequence is taken as the highest total utility sequence.
[0011] Optionally, the step of judging whether the exploration of the unknown environment is completed includes: setting an exploration benefit threshold, determining the number of candidate viewpoints whose exploration benefit is greater than the exploration benefit threshold; when the number is greater than 0, determining that the exploration of the unknown environment is not completed; when the number is less than 0, determining that the exploration of the unknown environment is completed.
[0012] Optionally, the method further includes: generating motion instructions according to the optimal exploration path, and controlling the robot to move along the optimal exploration path through the motion instructions.
[0013] The embodiment of the present invention further provides a system for a robot to explore an unknown environment, comprising: a first module, the first module is used to create a grid map and a path map, and set a first iteration frequency and a second iteration frequency; wherein the first iteration frequency is the frequency of updating and iterating the grid map, and the second iteration frequency is the calculation iteration frequency; a second module, the second module is used to update the known area, unknown area, and boundary area blocks in the grid map according to the unknown environment data collected by the sensor; wherein the boundary area blocks are determined according to the known area and the unknown area; the grid map is updated and iterated according to the first iteration frequency; a third module is used to update and iterate according to the grid map The fourth module is used to determine candidate viewpoints in the known area and calculate the exploration benefits of the candidate viewpoints; wherein the exploration benefits are the number of boundary area blocks connected to the candidate viewpoints; the fifth module is used to construct a utility function based on the grid map and the path map, according to the exploration benefits and the distances of the paths between all the candidate viewpoints, to calculate the optimal exploration path connecting all the candidate viewpoints; the sixth module is used to iteratively calculate the optimal exploration path according to the current position of the robot at the second iteration frequency until the exploration of the unknown environment is completed.
[0014] An embodiment of the present invention further provides an electronic device, comprising a processor and a memory; the memory is used to store a program; the processor executes the program to implement the above method.
[0015] An embodiment of the present invention further provides a computer-readable storage medium, wherein the storage medium stores a program, and the program is executed by a processor to implement the above method.
[0016] The embodiments of the present invention have the following beneficial effects: the embodiments of the present invention set a first iteration frequency and a second iteration frequency by creating a grid map and a path map; wherein the first iteration frequency is the frequency of updating and iterating the grid map, and the second iteration frequency is the calculation iteration frequency; the known area, unknown area, and boundary area blocks in the grid map are updated according to the unknown environment data collected by the sensor; wherein the boundary area blocks are determined according to the known obstacle-free area and the unknown area; the grid map is updated and iterated according to the first iteration frequency; the path map is dynamically updated according to the obstacle-free part of the known area in the grid map; candidate viewpoints are determined in the known area, and the exploration benefits of the candidate viewpoints are calculated; wherein the exploration benefits are the number of boundary area blocks connected by the candidate viewpoints; based on the grid map and the path map, a utility function is constructed to calculate the optimal exploration path connecting all the candidate viewpoints according to the exploration benefits and the distance of the path between all the candidate viewpoints; according to the second iteration frequency, the optimal exploration path is iteratively calculated according to the current position of the robot until the exploration of the unknown environment is completed, the optimal exploration path can be planned with less calculation, the unknown environment can be explored efficiently, and the exploration of the unknown environment can be completed in a shorter time. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0018] Figure 1 is a flowchart of method steps provided by some embodiments of the present invention;
[0019] Figure 2 is a partial schematic diagram of a grid map provided by some embodiments of the present invention;
[0020] Figure 3 is a schematic diagram of a path diagram provided by some embodiments of the present invention;
[0021] Figure 4 It is a robot structure diagram provided by some embodiments of the present invention. DETAILED DESCRIPTION
[0022] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0023] In view of the problem that the current robot exploration method has a large amount of calculation and is difficult to quickly and efficiently plan a good exploration path, refer to Figure 1 , Figure 1 is a flowchart of method steps provided by some embodiments of the present invention, and an embodiment of the present invention provides a method for a robot to explore an unknown environment, including: creating a grid map and a path map, setting a first iteration frequency and a second iteration frequency; wherein the first iteration frequency is the frequency of updating and iterating the grid map, and the second iteration frequency is the calculation iteration frequency; updating the known area, unknown area, and boundary area blocks in the grid map according to the unknown environment data collected by the sensor; wherein the boundary area is determined according to the known area and the unknown area; the grid map is updated and iterated at the first iteration frequency; the path map is dynamically constructed according to the known area of the grid map; candidate viewpoints are determined in the known area, and the exploration benefits of the candidate viewpoints are calculated; wherein the exploration benefits are the number of boundary area blocks connected by the candidate viewpoints; based on the grid map and the path map, according to the exploration benefits and the distance of the path between all candidate viewpoints, a utility function is constructed to calculate the optimal exploration path connecting all candidate viewpoints; according to the second iteration frequency, the optimal exploration path is iteratively calculated according to the current position of the robot until the exploration of the unknown environment is completed.
[0024] Specifically, the above steps will be described in detail below. The embodiment of the present invention includes steps S100 to S600:
[0025] S100, creating a grid map and a path map, and setting a first iteration frequency and a second iteration frequency; wherein the first iteration frequency is the frequency of updating iterations of the grid map, and the second iteration frequency is the calculation iteration frequency.
[0026] Specifically, a grid map and a path map are created, and the first iteration frequency and the second iteration frequency are set to prepare the robot for exploring unknown environments; the first iteration frequency is the frequency of updating and iterating the grid map, and the second iteration frequency is the calculation iteration frequency. It should be noted that the grid map can be continuously updated and iterated according to the first iteration frequency as the robot explores, and it represents the entire environment; the first iteration frequency and the second iteration frequency can be consistent or inconsistent, depending on the computing power of the onboard computer. Figure 4 , Figure 4 is a robot structure diagram provided by some embodiments of the present invention, and the onboard computing platform 42 may be an Inter-NUC onboard computing platform configured on the robot.
[0027] S200, updating the known areas, unknown areas, and boundary area blocks in the grid map according to the unknown environment data collected by the sensor; wherein the boundary area blocks are determined according to the known areas and the unknown areas; and updating the grid map at a first iteration frequency.
[0028] Specifically, determining the known area, the unknown area and the boundary area blocks is conducive to performing exploration calculations and forming exploration results; step S200 includes steps S210 to S220:
[0029] S210: Determine a collection range of the sensor according to a maximum sensing distance of the sensor, and collect environmental data within the collection range through the sensor.
[0030] Specifically, refer to Figure 4 The sensor 41 can be installed on the top of the robot, or alternatively, it can be installed in other locations, such as the inside, the bottom, etc. The sensor 41 can be a laser radar, more specifically, a Velodyne VLP-16 laser radar. The laser radar takes its own position as the center and the maximum sensing distance as the radius, and collects unknown environment data within its circular sensing range. Figure 2 , Figure 2 is a partial schematic diagram of a grid map provided by some embodiments of the present invention, and the maximum sensing distance of the sensor is d max , when the robot is at point p1, with point p1 as the center, d max The circular range with the point as the radius is the maximum perception range of the laser radar.
[0031] S220, marking the known area, unknown area, and boundary area block in the grid map according to the collected environmental data; the boundary area block is the grid of the boundary part between the known area and the unknown area.
[0032] Specifically, in the grid map, according to the unknown environment data collected by the sensor 41, the known area and the unknown area are marked in the grid map, and the grid at the intersection of the marked known area and the unknown area is determined as a boundary area block. Figure 2 In the embodiment of the present invention, refer to Figure 2 According to the data collected by the sensor 41, the obstacle area 23 can be further marked in the known area 24 of the grid map. It can be understood that during the robot's exploration process, the known area 24, the unknown area 21, and the boundary area block 22 together constitute the grid map; wherein the known area 24 includes the obstacle-free area and the obstacle area 23.
[0033] S300, dynamically updating the path map according to the barrier-free parts of the known areas in the grid map.
[0034] Specifically, refer to Figure 3 , Figure 3It is a schematic diagram of a path map provided by some embodiments of the present invention. Multiple path points are randomly selected within the barrier-free range of the known area in the initial grid map, random paths are generated between each path point, and the path map is updated. The above path map can be dynamically updated according to the update iteration of the known area in the grid map. Constructing a path map in the barrier-free part of the known area can enable the robot to avoid obstacles and explore unknown environments more efficiently.
[0035] S400, determining candidate viewpoints in a known area, and calculating exploration benefits of the candidate viewpoints; wherein the exploration benefits are the number of boundary area blocks connected to the candidate viewpoints.
[0036] Specifically, step S400 includes the following steps S410 to S450:
[0037] S410, taking the current position of the robot as the center of the circle, determining the sampling radius, constructing the sampling range, and taking the obstacle-free part of the known area of the sampling range as the sampling area.
[0038] Specifically, refer to Figure 2 , taking the robot's current position as the center, select a sampling radius d within the sensing range of sensor 41 s The sampling range is constructed, where the sampling radius d s The sensor 41 can sense the radius d max 1 / 3, that is Other radius sizes are also possible, such as In the embodiment of the present invention, the sampling radius d is not s In the sampling range, the known area is used as the sampling area.
[0039] S420: Determine evenly spaced points in the sampling area as first sampling points.
[0040] Specifically, evenly spaced points are determined in the sampling area as the first sampling points, referring to Figure 2 , the interval between the first sampling points is d r .
[0041] S430: Connect each boundary area block to the nearest first sampling point.
[0042] Specifically, refer to Figure 2 , connecting each boundary area block 22 with its nearest first sampling point, and the same sampling point can connect multiple boundary area blocks.
[0043] S440: Determine the first sampling point connected to the boundary area block as a candidate viewpoint.
[0044] Specifically, the first sampling point connected to the boundary area block is taken as the candidate viewpoint v k According to the above description, it can be understood that the candidate viewpoint v k They are all within the obstacle-free area of the known area, so that the robot will not collide with obstacles during the movement.
[0045] S450 , calculating the number of boundary area blocks connected to each candidate viewpoint as the exploration benefit of each candidate viewpoint.
[0046] Specifically, calculate each candidate viewpoint v k The number of connected boundary area blocks is used as the exploration benefit G for each candidate viewpoint. v .
[0047] S500 , based on the grid map and the path graph, construct a utility function to calculate the optimal exploration path connecting all candidate viewpoints according to the exploration benefits and the distances of the paths between all candidate viewpoints.
[0048] Specifically, step S500 includes the following steps S510 to S540:
[0049] S510. Based on the grid map and the path map, calculate the first path distance and the second path distance; wherein the first path distance is the path distance between all candidate viewpoints, and the second path distance is the path distance from the current position of the robot to all candidate viewpoints.
[0050] S520: All candidate viewpoints are grouped into a sequence, a utility function is constructed, and the highest total utility sequence is calculated through the utility function according to the first path distance, the second path distance and the exploration benefit.
[0051] Specifically, all candidate viewpoints v k Composed sequence, we get the sequence V = [v1, v2, ..., v k ,…,v n ], it should be noted that according to different candidate viewpoints v k The sequence positions are different, and the sequence V has n! possibilities for sequence arrangement. The embodiment of the present invention constructs a utility function to solve the sequence with the highest total utility. The utility function constructed by the embodiment of the present invention is:
[0052]
[0053] Among them, V * is the highest total utility sequence, v0 is the current position of the robot, U(v k )=G(v k )·P(v k ) is the candidate viewpoint v k The utility of is the total utility of a sequence, G(v k ) is the candidate viewpoint v k The exploration benefit, P(v k )=exp(-c·L(v0·v k )) is the viewpoint v k The penalty function, c is the penalty factor, L(v0·v k ) is along the sequence V from v0 to v k It can be understood that the above-mentioned cumulative path distance is the accumulation of the first path distance in the calculation process.
[0054] Step S520 includes the following steps S521 to S528:
[0055] S521, sorting all candidate viewpoints in descending order, and constructing the sorted candidate viewpoints into an initial sequence; wherein the descending order is based on the exploration gain or the second path distance.
[0056] Specifically, all candidate viewpoints v k According to its exploration benefit G v or their distances to the robot’s current position are sorted in descending order, and the initial sequence V = [v1, v2, …, v k ,…,v n ], according to different candidate viewpoints v k The sequence V has n! possible arrangements depending on its sequence position.
[0057] S522. Calculate the total utility of the initial sequence according to the exploration benefit and the first path distance.
[0058] Specifically, according to the exploration benefit G v The total utility of the first calculation sequence is calculated by calculating the distance between the paths of all candidate viewpoints. In the embodiment of the present invention, the utility of a candidate viewpoint is: U(v k )=G(v k )·P(v k ), where G(v k ) is the candidate viewpoint v k The exploration benefit, P(v k )=exp(-c·L(v0·v k )) is the viewpoint v k The penalty function, c is the penalty factor, L(v0·v k ) is along the sequence V from the robot's current position v0 to the candidate viewpoint v k It can be understood that the above-mentioned cumulative path distance is the accumulation of the first path distance in the calculation process.
[0059] S523: Obtain a continuous sequence having more than two candidate viewpoints in the initial sequence.
[0060] Specifically, a continuous sequence having more than two candidate viewpoints is obtained in the initial sequence. It can be understood that the number of elements in the continuous sequence can be at least 2 and at most the number of all candidate viewpoints.
[0061] S524: Invert the continuous sequence and insert it into the original acquisition position as the first calculation sequence.
[0062] S525. Calculate the total utility of the first calculation sequence according to the exploration benefit and the first path distance.
[0063] Specifically, according to the exploration benefit G v The total utility of the first calculation sequence is calculated by calculating the distance between the paths of all candidate viewpoints. In the embodiment of the present invention, the utility of a candidate viewpoint is: U(v k )=G(v k )·P(v k ), where G(v k ) is the candidate viewpoint v k The exploration benefit, P(v k )=exp(-c·L(v0·v k )) is the viewpoint v k The penalty function, c is the penalty factor, L(v0·v k ) is along the sequence V from the robot's current position v0 to the candidate viewpoint v k The cumulative distance is understood to be the accumulation of the first path distance in the calculation process. The total utility of the first calculation sequence can be obtained through the above calculation. It can be understood that the first calculation sequence is a sequence obtained by inverting the continuous sequence based on the initial sequence.
[0064] S526, obtaining other continuous sequences having more than two candidate viewpoints from the initial sequence, and returning to execute the step of obtaining a continuous sequence having more than two candidate viewpoints in the initial sequence, until a first calculation sequence with the highest total utility is obtained as the first utility sequence.
[0065] Specifically, other continuous sequences with more than two candidate viewpoints are obtained from the initial sequence, and the step of inverting the continuous sequence and inserting it into the original acquisition position as the first calculation sequence is returned to execute until the first calculation sequence with the highest total utility is obtained. The method of obtaining the above-mentioned first calculation sequence with the highest total utility is as follows: the total utility of the first calculation sequence obtained by each round of cyclic calculation is compared with the highest total utility currently recorded. If the total utility of this round is greater than the highest total utility currently recorded, the total utility of this round of calculation is updated to the current highest total utility; if the total utility of this round is less than or equal to the highest total utility currently recorded, the current highest total utility is kept unchanged until all possible sequences in the initial sequence are traversed, and the first calculation sequence corresponding to the current highest total utility is the first calculation sequence with the highest total utility, which is used as the first utility sequence.
[0066] It should be noted that the above method of obtaining the first calculation sequence with the highest total utility is only an optional implementation. In the embodiment of the present invention, other methods can also be selected to compare and obtain the first calculation sequence with the highest total utility, and the embodiment of the present invention is not limited to this.
[0067] S527: When the total utility of the first utility sequence is less than and / or equal to the total utility of the initial sequence, the initial sequence is taken as the highest total utility sequence.
[0068] S528. When the total utility of the first utility sequence is greater than the total utility of the initial sequence, the first utility sequence is used as the initial sequence, and the step of calculating the total utility of the initial sequence based on the exploration benefit and the first path distance is returned to execute until the total utility of the first utility sequence is less than and / or equal to the total utility of the initial sequence, and the initial sequence is used as the highest total utility sequence.
[0069] This concludes the description of step S520.
[0070] S530, adding the robot's current location point to the head of the highest utility sequence to obtain an optimal exploration sequence.
[0071] S540 , sequentially splicing paths between adjacent candidate viewpoints in the optimal exploration sequence to obtain an optimal exploration path.
[0072] Specifically, the optimal exploration path passing through all candidate viewpoints can be obtained through the processing of steps S530 and S540, and the optimal exploration path can take the current position of the robot as the starting point and continue the current route to ensure the continuity of the path.
[0073] Through step S500, the optimal exploration path based on the current position of the robot can be obtained with less calculation, so that the robot can explore a large-scale unknown environment quickly and efficiently.
[0074] S600, at a second iteration frequency, iteratively calculating an optimal exploration path according to the current position of the robot until the exploration of the unknown environment is completed.
[0075] Specifically, according to the set iteration frequency, the optimal exploration path is iteratively calculated according to the current position of the robot, that is, the optimal exploration path explored by the robot is updated at the set iteration frequency to ensure that the robot can obtain the optimal exploration path in time during the movement process and realize the continuous exploration function.
[0076] After completing the calculation of the optimal exploration path, it is determined whether the exploration of the unknown environment is completed. If the exploration is not completed, the above steps S200 to S500 are repeated according to the second iteration frequency. The step of determining whether the exploration of the unknown environment is completed includes the following steps 1 to 3:
[0077] Step 1: Set an exploration gain threshold and determine the number of candidate viewpoints whose exploration gain is greater than the exploration gain threshold.
[0078] Step 2: When the number is greater than 0, it is determined that the exploration of the unknown environment is not completed.
[0079] Step 3: When the number is less than 0, it is determined that the exploration of the unknown environment is complete.
[0080] The method of the embodiment of the present invention further includes step S700:
[0081] S700 , generating motion instructions according to the optimal exploration path, and controlling the robot to move along the optimal exploration path through the motion instructions.
[0082] Specifically, after each update of the optimal exploration path, motion instructions are generated based on the optimal exploration path, and the robot is controlled to move along the optimal exploration path through the motion instructions. Since the embodiment of the present invention updates the optimal exploration path at a certain frequency, the motion instructions are also generated at a frequency, and the robot's movement is continuous without pause until the exploration of the unknown environment is completed.
[0083] In addition, refer to Figure 4 , calculating the optimal exploration path and generating motion instructions can be completed in the onboard computing platform 42 carried by the robot, which can process the data collected by the sensor and execute the method of exploring the unknown environment of this embodiment to drive the robot to explore the unknown environment.
[0084] The embodiment of the present invention also provides a system for a robot to explore an unknown environment, comprising: a first module, the first module is used to create a grid map and a path map, and set a first iteration frequency and a second iteration frequency; wherein the first iteration frequency is the frequency of updating and iterating the grid map, and the second iteration frequency is the calculation iteration frequency; a second module, the second module is used to update the known area, the unknown area, and the boundary area blocks in the grid map according to the unknown environment data collected by the sensor; wherein the boundary area is determined according to the known area and the unknown area; the grid map is updated and iterated at the first iteration frequency; a third module, the third module is used to dynamically construct a path map according to the known area of the grid map; a fourth module, determines candidate viewpoints in the known area, and calculates the exploration benefits of the candidate viewpoints; wherein the exploration benefits are the number of boundary area blocks connected by the candidate viewpoints; a fifth module, the fifth module is used to construct a utility function based on the grid map and the path map, according to the exploration benefits and the distance of the path between all candidate viewpoints, to calculate the optimal exploration path connecting all candidate viewpoints; a sixth module, the sixth module is used to iteratively calculate the optimal exploration path according to the current position of the robot at the second iteration frequency until the exploration of the unknown environment is completed.
[0085] An embodiment of the present invention further provides an electronic device, including a processor and a memory; the memory is used to store programs; the processor executes the program to implement the above method.
[0086] An embodiment of the present invention further provides a computer-readable storage medium, wherein the storage medium stores a program, and the program is executed by a processor to implement the above method.
[0087] The following is an application scenario provided by an embodiment of the present invention:
[0088] In an unknown environment to be explored, a method for exploring an unknown environment with a robot of the present invention is used, firstly, to create a grid map and a path map, and set a first iteration frequency and a second iteration frequency; wherein the first iteration frequency is the frequency of updating and iterating the grid map, and the second iteration frequency is the calculation iteration frequency; the known area, the unknown area, and the boundary area blocks in the grid map are updated according to the unknown environment data collected by the sensor; wherein the boundary area blocks are determined according to the known area and the unknown area; the grid map is updated and iterated according to the first iteration frequency; the path map is dynamically updated according to the barrier-free part of the known area in the grid map; candidate viewpoints are determined in the known area, and the exploration benefits of the candidate viewpoints are calculated; wherein the exploration benefits are the number of boundary area blocks connected by the candidate viewpoints; based on the grid map and the path map, according to the exploration benefits and the distances of the paths between all the candidate viewpoints, a utility function is constructed to calculate the optimal exploration path connecting all the candidate viewpoints; motion instructions are generated according to the optimal exploration path, and the robot is controlled to move along the optimal exploration path through the motion instructions; according to the second iteration frequency, the optimal exploration path is iteratively calculated according to the current position of the robot until the exploration of the unknown environment is completed.
[0089] The following are the beneficial effects produced by the embodiments of the present invention: Through the method of exploring an unknown environment provided by this embodiment, the optimal exploration path based on the current position of the robot can be obtained with less calculation amount, so that the robot can explore large-scale unknown environments quickly and efficiently in a shorter time and shorter movement distance.
[0090] In some selectable embodiments, the function / operation mentioned in the block diagram may not occur in the order mentioned in the operation diagram. For example, depending on the function / operation involved, the two boxes shown in succession can actually be executed substantially simultaneously or the boxes can sometimes be executed in reverse order. In addition, the embodiment presented and described in the flow chart of the present invention is provided by way of example, for the purpose of providing a more comprehensive understanding of technology. The disclosed method is not limited to the operation and logic flow presented herein. Selectable embodiments are expected, wherein the order of various operations is changed and the sub-operation of a part for which is described as a larger operation is performed independently.
[0091] If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods of each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.
[0092] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in conjunction with such instruction execution systems, devices or apparatuses. For the purposes of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in conjunction with such instruction execution systems, devices or apparatuses.
[0093] More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or more wires (electronic device), a portable computer disk case (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be a paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, deciphering, or processing in another suitable manner as necessary, and then stored in a computer memory.
[0094] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "examples", "specific examples", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.
[0095] Although the embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the claims and their equivalents.
[0096] The above is a specific description of the preferred implementation of the present invention, but the present invention is not limited to the embodiments. Those skilled in the art can make various equivalent modifications or substitutions without violating the spirit of the present invention. These equivalent modifications or substitutions are all included in the scope defined by the claims of the present invention.
Claims
1. A method for a robot to explore an unknown environment, characterized in that: include: Create a grid map and a path map, and set a first iteration frequency and a second iteration frequency; wherein the first iteration frequency is the frequency of updating iterations of the grid map, and the second iteration frequency is the calculation iteration frequency; updating the known area, the unknown area, and the boundary area block in the grid map according to the unknown environment data collected by the sensor; wherein the boundary area block is determined according to the barrier-free part of the known area and the unknown area; and the grid map is updated and iterated according to the first iteration frequency; Dynamically updating a path map based on the barrier-free portion of the known area in the grid map; Determine a candidate viewpoint in the known area, and calculate the exploration benefit of the candidate viewpoint; wherein the exploration benefit is the number of the boundary area blocks connected to the candidate viewpoint; Based on the grid map and the path graph, constructing a utility function to calculate an optimal exploration path connecting all the candidate viewpoints according to the exploration benefits and the distances of the paths between all the candidate viewpoints; Iteratively calculating the optimal exploration path according to the current position of the robot at the second iteration frequency until the exploration of the unknown environment is completed; The method of constructing a utility function to calculate an optimal exploration path connecting all the candidate viewpoints based on the grid map and the path map and according to the exploration benefits and the distances of the paths between all the candidate viewpoints comprises: Based on the grid map and the path map, a first path distance and a second path distance are calculated; wherein the first path distance is the path distance between all the candidate viewpoints, and the second path distance is the path distance from the current position of the robot to all the candidate viewpoints; All the candidate viewpoints are grouped into a sequence, a utility function is constructed, and a highest total utility sequence is calculated by the utility function according to the first path distance, the second path distance and the exploration benefit; Adding the current location of the robot to the head of the highest total utility sequence to obtain an optimal exploration sequence; The paths between adjacent candidate viewpoints in the optimal exploration sequence are sequentially spliced to obtain an optimal exploration path.
2. A method for a robot to explore an unknown environment according to claim 1, characterized in that: The updating of the known areas, unknown areas, and boundary area blocks in the grid map according to the unknown environment data collected by the sensor includes: Determine the collection range of the sensor according to the maximum sensing distance of the sensor, and collect environmental data within the collection range through the sensor; According to the collected environmental data, the known area, unknown area, and boundary area block in the grid map are marked; the boundary area block is a grid of the boundary portion between the known area and the unknown area.
3. A method for a robot to explore an unknown environment according to claim 1, characterized in that: The determining of candidate viewpoints in the known area and calculating exploration benefits of the candidate viewpoints include: Taking the current position of the robot as the center of the circle, determining the sampling radius, constructing the sampling range, and taking the obstacle-free part of the known area of the sampling range as the sampling area; Determine evenly spaced points in the sampling area as first sampling points; Connect each of the boundary area blocks to the nearest first sampling point; Determine the first sampling point connected to the boundary area block as a candidate viewpoint; The number of the boundary area blocks connected to each candidate viewpoint is calculated as the exploration benefit of the candidate viewpoint.
4. A method for a robot to explore an unknown environment according to claim 1, characterized in that: The step of forming a sequence of all the candidate viewpoints, constructing a utility function, and calculating a highest total utility sequence through the utility function according to the first path distance, the second path distance, and the exploration benefit includes: Sorting all the candidate viewpoints in descending order, and constructing the sorted candidate viewpoints into an initial sequence; wherein the descending order is based on the exploration benefit or the second path distance; Calculate the total utility of the initial sequence according to the exploration benefit and the first path distance; Acquire a continuous sequence having more than two candidate viewpoints in the initial sequence; Inverting the continuous sequence and inserting it into the original acquisition position as the first calculation sequence; Calculate the total utility of the first calculation sequence according to the exploration benefit and the first path distance; Acquire other continuous sequences having more than two candidate viewpoints from the initial sequence, and return to execute the step of acquiring the continuous sequence having more than two candidate viewpoints in the initial sequence until the first calculation sequence with the highest total utility is obtained as the first utility sequence; When the total utility of the first utility sequence is less than and / or equal to the total utility of the initial sequence, the initial sequence is taken as the highest total utility sequence; When the total utility of the first utility sequence is greater than the total utility of the initial sequence, the first utility sequence is used as the initial sequence, and the step of calculating the total utility of the initial sequence based on the exploration benefit and the first path distance is returned to execute until the total utility of the first utility sequence is less than and / or equal to the total utility of the initial sequence, and the initial sequence is used as the highest total utility sequence.
5. The method for a robot to explore an unknown environment according to claim 1, characterized in that: The step of determining until the exploration of the unknown environment is completed includes: Setting an exploration benefit threshold, and determining the number of the candidate viewpoints whose exploration benefits are greater than the exploration benefit threshold; When the number is greater than 0, it is determined that the exploration of the unknown environment is not completed; When the number is less than 0, it is determined that the exploration of the unknown environment is completed.
6. A method for a robot to explore an unknown environment according to claim 1, characterized in that: Also includes: A motion instruction is generated according to the optimal exploration path, and the robot is controlled to move along the optimal exploration path through the motion instruction.
7. A system for a robot to explore an unknown environment, characterized in that: include: A first module, the first module is used to create a grid map and a path map, and set a first iteration frequency and a second iteration frequency; wherein the first iteration frequency is the frequency of updating iterations of the grid map, and the second iteration frequency is the calculation iteration frequency; A second module, the second module is used to update the known area, the unknown area, and the boundary area block in the grid map according to the unknown environment data collected by the sensor; wherein the boundary area block is determined according to the barrier-free part of the known area and the unknown area; the grid map is updated and iterated according to the first iteration frequency; A third module, the third module is used to dynamically update the path map according to the barrier-free part of the known area in the grid map; The fourth module determines a candidate viewpoint in the known area, and calculates the exploration benefit of the candidate viewpoint; wherein the exploration benefit is the number of the boundary area blocks connected to the candidate viewpoint; A fifth module, the fifth module is used to construct a utility function to calculate the optimal exploration path connecting all the candidate viewpoints based on the grid map and the path map according to the exploration benefits and the distances of the paths between all the candidate viewpoints; A sixth module, the sixth module is used to iteratively calculate the optimal exploration path according to the current position of the robot at the second iteration frequency until the exploration of the unknown environment is completed; The fifth module is specifically used for: Based on the grid map and the path map, a first path distance and a second path distance are calculated; wherein the first path distance is the path distance between all the candidate viewpoints, and the second path distance is the path distance from the current position of the robot to all the candidate viewpoints; All the candidate viewpoints are grouped into a sequence, a utility function is constructed, and a highest total utility sequence is calculated by the utility function according to the first path distance, the second path distance and the exploration benefit; Adding the current location of the robot to the head of the highest total utility sequence to obtain an optimal exploration sequence; The paths between adjacent candidate viewpoints in the optimal exploration sequence are sequentially spliced to obtain an optimal exploration path.
8. An electronic device, characterized in that: including a processor and a memory; The memory is used to store programs; The processor executes the program to implement the method according to any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that: The storage medium stores a program, and the program is executed by a processor to implement the method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Indoor map building method for improving robot path planning efficiency
CN104898660A
Real-time planning method for safe movement track of mobile robot
CN112432648A