Path planning method, device, electronic device and computer storage medium
By updating boundaries and generating viewpoints from sensing data, combined with the evaluation of closed sub-regions, the problem of repeated paths in the autonomous exploration method is solved, achieving efficient path planning and improving exploration efficiency.
Patent Information
- Application Number
- CN202411624304.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-14
- Publication Date
- 2025-01-21
- Estimated Expiration
- 2044-11-14
AI Technical Summary
Existing autonomous exploration methods can easily lead to the problem of repeated paths when generating access sequences, especially in a messy environment. When greedy strategies choose the viewpoint with the largest information gain, small areas may be ignored, resulting in robots needing to explore these areas repeatedly.
By acquiring the robot perception data, updating the boundaries to determine the free area, generating viewpoints, and detecting closed sub-regions around the robot to evaluate the cost of each viewpoint, path planning is finally performed based on the cost of the viewpoint.
This method reduces repeated paths without prior data, improves exploration efficiency, solves the repeated path problem caused by greedy strategies, and achieves efficient single path exploration planning.
Smart Images

Figure CN119124179B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of intelligent robot technology, and in particular to a path planning method, device, electronic device and computer storage medium. Background Art
[0002] Automated exploration requires robots to have advanced intelligence and a high degree of independence. It is widely used and plays a huge role in tasks such as search and rescue and exploration. Using the data obtained by sensors, robots can quickly traverse and reconstruct unknown areas. During the exploration process, robots need to manage and apply a large amount of data to generate the optimal visit sequence. However, due to the limited field of view of sensors and the lack of global information, it is difficult to generate the best sequence to traverse unknown areas.
[0003] The current mainstream autonomous exploration methods use RAN-D cameras or LiDAR. For exploration using radar, this task is very difficult due to the sparsity and high complexity of point clouds and the lack of color information of objects. There are three specific existing solutions: sampling-based methods, boundary-based methods, and learning-based methods. The sampling-based method samples the starting points in free space, and then determines the priority of these points through a cost function based on their positions. Visits are made according to the priority of the points. The boundary-based method first finds the boundary between the known area and the unknown area. Then the boundary with the highest information gain is selected as the next target until all areas are explored. However, the learning-based method is too difficult to apply on intelligent robots due to its high computing resource requirements, and is not a commonly used solution.
[0004] The above scheme has the following key problems: The above scheme widely uses greedy strategies when generating access sequences, and usually chooses to visit the area with the largest information gain or the area closest to the robot. In a practical environment, if there are many small areas in a cluttered environment, the local optimal solution is not necessarily the global optimal solution. If these small areas are ignored because the robot chooses areas with larger information gain, then in subsequent exploration, the robot must come back to explore these previously ignored areas, which leads to repeated exploration of some areas, that is, repeated paths. Therefore, it is very important to develop a system that can comprehensively evaluate viewpoints. To address this problem, some methods assume scene boundaries to guide the robot to preferentially explore areas near these boundaries. However, not all boundaries are regular, and accurate boundaries cannot always be easily obtained in practical applications. Summary of the invention
[0005] The present application provides a path planning method, device, electronic device and computer storage medium to solve the above-mentioned technical problems existing in the related technology.
[0006] According to one embodiment of the present application, a path planning method is provided, including: acquiring robot perception data, updating a boundary based on the perception data, wherein the boundary is a boundary between a known area and an unknown area, and the known area includes a free area; determining a free area based on the boundary, and generating a viewpoint in the free area; detecting a closed sub-area around the robot, and evaluating the cost of each viewpoint based on the closed sub-area; and performing path planning based on the cost of the viewpoint.
[0007] According to another embodiment of the present application, a path planning device is provided, including: a boundary detection module, used to obtain robot perception data, and update the boundary according to the perception data, wherein the boundary is the boundary between a known area and an unknown area, and the known area includes a free area; a viewpoint evaluation module, used to determine the free area according to the boundary, and generate a viewpoint in the free area; detect the closed sub-area around the robot, and evaluate the cost of each viewpoint according to the closed sub-area; a path planning module, used to perform path planning according to the cost of the viewpoint.
[0008] Optionally, the boundary detection module includes an adding unit, which obtains a new grid set perceived from the first moment to the second moment; detects and adds a new boundary in the new grid set; and a deleting unit, which is used to detect a change in the state of a grid adjacent to an old boundary at the first moment, and if the grid state changes from an unknown state to a known state, removes the old boundary.
[0009] Optionally, the boundary detection module also includes a sampling unit, which is used to obtain point cloud data centered on the current position of the robot, establish a local coordinate system with the current position of the robot as the origin O, and align the X-axis and Y-axis of the local coordinate system with the X-axis and Y-axis of the global map respectively; sample the point cloud data to obtain a sampling point set, and for each sampling point, traverse the sampling point set to find multiple adjacent points adjacent to the sampling point; a first calculation unit, which is used to calculate the normal vector of the sampling point according to the surface formed by the adjacent points, and determine the quadrant to which the normal vector belongs; a judgment unit, which is used to count the number of normal vectors contained in each quadrant, if the number of normal vectors is greater than a first threshold, it is determined that the quadrant is occupied; if the number of occupied quadrants is greater than or equal to 3, it is determined that the area enclosed by the surface is a closed sub-area.
[0010] Optionally, the first calculation unit is further used to calculate the angle between the current normal vector and the XOY plane; the judgment unit is further used to judge whether the angle is greater than a second threshold; if the angle is greater than the second threshold, the current normal vector is discarded.
[0011] Optionally, the viewpoint evaluation module includes a second calculation unit, which is used to calculate the area boundary of the closed sub-area; for each viewpoint, if the viewpoint is not within the area boundary of the closed sub-area, the distance from the viewpoint to the center of the closed sub-area is calculated as the first generation value; the distance from the current position of the robot to the viewpoint is calculated as the second generation value; the third generation value is calculated based on the current speed of the robot, the viewpoint position and the current position of the robot; and the total cost of the viewpoint is calculated based on the first cost, the second cost and the third cost.
[0012] Optionally, the second computing unit also includes a computing subunit, which is used to obtain point cloud data centered on the current position of the robot, establish a local coordinate system with the current position of the robot as the origin O, and the X-axis and Y-axis of the local coordinate system are respectively aligned with the X-axis and Y-axis of the global map; a sampling unit, which is used to sample the point cloud data to obtain sampling points; a fitting unit, which is used to fit the sampling points in each quadrant to obtain a fitting plane; and a boundary determination unit, which is used to obtain the maximum coordinates and minimum coordinates of the fitting plane of each quadrant, and use them as the area boundary of the closed sub-area.
[0013] Optionally, the path planning device also includes a viewpoint refining unit, which is used to obtain, for each viewpoint, a set of neighbor viewpoints whose distance from the viewpoint is less than a third threshold; determine whether there are obstacles between the viewpoints in the neighbor viewpoint set; if there are no obstacles between the viewpoints in the neighbor viewpoint set, obtain the average viewpoint of the neighbor viewpoint set; retain the average viewpoint and remove the neighbor viewpoint set.
[0014] According to another embodiment of the present application, a computer storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above-mentioned device embodiments when running.
[0015] According to another embodiment of the present application, there is also provided an electronic device, including a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus; wherein: the memory is used to store computer programs; the processor is used to execute the steps in the above method by running the program stored in the memory.
[0016] According to another embodiment of the present application, a computer program product including instructions is also provided. When the computer program product is run on a computer, the computer is enabled to execute the steps in the above method.
[0017] The embodiments of the present application obtain robot perception data, update boundaries according to the perception data, wherein the boundaries are boundaries between known areas and unknown areas, and the known areas include free areas; determine free areas according to the boundaries, and generate viewpoints in the free areas; detect closed sub-areas around the robot, and evaluate the cost of each viewpoint according to the closed sub-areas; perform path planning according to the cost of the viewpoint, and consider the influence of the closed sub-areas when evaluating the viewpoint by detecting the closed sub-areas, thereby reducing repeated paths in the absence of prior data, solving the problem of repeated paths caused by the greedy strategy selecting the viewpoint with the largest information gain, and achieving efficient single-shot path exploration planning. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0019] Figure 1 is a hardware structure block diagram of a robot according to an embodiment of the present application;
[0020] Figure 2 is a flow chart of a path planning method according to an embodiment of the present application;
[0021] Figure 3 This is a schematic diagram of a path planning application scenario in an embodiment of the present application;
[0022] Figure 4 is a schematic diagram of a boundary update scenario in an embodiment of the present application;
[0023] Figure 5 It is a structural block diagram of a path planning device according to an embodiment of the present application. DETAILED DESCRIPTION
[0024] In order to enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only embodiments of a part of the present application, not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without creative work should fall within the scope of protection of the present application. It should be noted that the embodiments in the present application and the features in the embodiments can be combined with each other without conflict.
[0025] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0026] Example 1
[0027] The method embodiment provided in Embodiment 1 of the present application can be executed in a robot or a similar computing device. Taking running on a robot as an example, Figure 1 : is a hardware structure diagram of a robot in an embodiment of the present application. Figure 1 As shown, the robot may include one or more ( Figure 1 Only one is shown in the figure) a processor 12 (the processor 12 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 13 for storing data. Optionally, the above-mentioned computer may also include a transmission device 11 for communication functions and an input and output device 14. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the robot. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations are shown.
[0028] The memory 13 can be used to store robot programs, for example, software programs and modules of application software, such as a robot program corresponding to a path planning method in an embodiment of the present application. The processor 12 executes various functional applications and data processing by running the robot program stored in the memory 13, that is, implementing the above method. The memory 13 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory.
[0029] The transmission device 11 is used to receive or send data via a network. A specific example of the above network may include a wireless network provided by a communication provider of the robot.
[0030] In this embodiment, a path planning method is provided. Figure 2is a flow chart of a path planning method according to an embodiment of the present application. Figure 2 As shown, the process includes the following steps:
[0031] Step S10, acquiring robot perception data, and updating a boundary according to the perception data, wherein the boundary is a boundary between a known area and an unknown area, and the known area includes a free area;
[0032] Step S20, determining a free area according to the boundary, and generating a viewpoint in the free area;
[0033] Step S30, detecting a closed sub-region around the robot, and evaluating the cost of each viewpoint according to the closed sub-region;
[0034] Step S40: performing path planning according to the cost of the viewpoint.
[0035] During the movement of the intelligent robot, the sensor on the robot will continuously acquire sensory data, including point cloud data, etc. The boundary of the grid in the incompletely constructed map is detected and updated through the sensory data, wherein the grid state includes an unknown state and a known state. Specifically, the known state includes a free state and an obstacle, and the boundary is the boundary between a known area and an unknown area. If the state of a grid is a free state and the state of at least one adjacent grid is an unknown state, the grid is defined as a boundary. The free area in the map is determined according to the updated boundary, viewpoints are generated in the free area, and the cost of each viewpoint is evaluated. This embodiment preferably obtains the exploration order of viewpoints by solving the asymmetric traveling trader problem (ATSP), and uses a local planner to optimize the path and guide the robot to the next target point.
[0036] This embodiment obtains robot perception data, updates boundaries according to the perception data, and the boundaries are boundaries between known areas and unknown areas, and the known areas include free areas; determines the free areas according to the boundaries and generates viewpoints in the free areas; detects closed sub-areas around the robot and evaluates the cost of each viewpoint according to the closed sub-areas; performs path planning according to the cost of the viewpoint, and considers the influence of the closed sub-areas when evaluating the viewpoint by detecting the closed sub-areas, thereby reducing repeated paths in the absence of prior data, solving the problem of repeated paths caused by the greedy strategy selecting the viewpoint with the largest information gain, and realizing efficient single path exploration planning.
[0037] In exploration tasks, such as robotic exploration of unknown environments or geological exploration, boundary detection, that is, the accurate identification of the boundaries between known and unknown areas, is crucial. In related technologies, all grids in an incompletely constructed map need to be traversed and updated at a fixed frequency. In large or precise maps, boundary updates are very time-consuming and require a lot of computing resources, which leads to excessive delays in environmental information processing and reduces exploration efficiency.
[0038] Based on this, in one implementation of the present embodiment, updating the boundary according to the perception data includes: obtaining a new grid set perceived from a first moment to a second moment; detecting and adding a new boundary in the new grid set; detecting a change in the state of a grid adjacent to an old boundary at the first moment, and if the grid state changes from an unknown state to a known state, removing the old boundary.
[0039] Reference Figure 4 , from the first moment To the second moment , the sensor on the robot will sense the new area. In this embodiment, define For the first moment The old borders For the second moment The new borders for arrive A new set of newly perceived grids. Since new boundaries only appear in newly detected areas, only in the new grid set In addition, since the adjacent grids are updated, the old boundaries may no longer be a boundary, such as Figure 4 As shown, the yellow grid is the first moment Part of the old border , this part of the old boundary at the second moment , since the state of the grid adjacent to the old boundary changes from unknown to known, this part of the old boundary is no longer a boundary, so the old boundary is deleted, thereby completing the selective boundary update. Based on the updated boundary, it can be determined as follows Figure 4 The free area consists of meshes in a free state, and viewpoints are generated in the free area.
[0040] In this implementation, the new boundary and the old boundary are only locally updated in the newly sensed area rather than in the entire map, thereby achieving rapid boundary recognition, effectively improving the efficiency of exploring unknown environments and reducing the demand for computing resources.
[0041] In another implementation of this embodiment, if the robot is located near a smaller closed area, due to the long path, this implementation controls the priority access to the viewpoints in these closed sub-areas around the robot, and does not explore the distant area first. This implementation will only detect the point cloud within the cubic area centered on the robot. Since most environments that robots need to explore can be simplified to two dimensions, the closed sub-area detection in this implementation does not consider the z-axis characteristics. In this implementation, detecting the closed sub-area around the robot includes:
[0042] A31, acquiring point cloud data centered on the current position of the robot, establishing a local coordinate system with the current position of the robot as the origin O, wherein the X-axis and Y-axis of the local coordinate system are aligned with the X-axis and Y-axis of the global map respectively;
[0043] A32, sampling the point cloud data to obtain a sampling point set, and for each sampling point, traversing the sampling point set to find a plurality of adjacent points adjacent to the sampling point;
[0044] A33, calculating a normal vector of the sampling point according to the adjacent points, and determining a quadrant to which the normal vector belongs;
[0045] A34, counting the number of normal vectors contained in each quadrant, and if the number of normal vectors is greater than a first threshold, determining that the quadrant is occupied;
[0046] A35: If the number of occupied quadrants is greater than or equal to 3, determine that the area enclosed by the curved surface is a closed sub-area.
[0047] First, define a local coordinate system whose origin is located at the center of the local point cloud map (i.e., the robot position), and whose X-axis and Y-axis are aligned with the X-axis and Y-axis of the global map, respectively. Initialize the number of normal vectors in each quadrant , set the four quadrants to idle state (when the quadrant hour, ), the boundaries of the closed sub-region Initialized to empty ( Then, the input point cloud map is preprocessed to obtain the processed point cloud data; the processed point cloud data is uniformly sampled to obtain the sampling point set For each sampling point At the sampling point set Traverse in and find the distance to the sampling point The nearest (such as preset distance n adjacent points .
[0048] Calculate the normal vector of the sampling point based on the adjacent points , traverse the four quadrants and determine the normal vector quadrant in which the normal vector In the jth quadrant, the counter of the corresponding quadrant Plus one. If the number of normal vectors in a quadrant is If the number of occupied quadrants m is greater than or equal to 3, it is considered that there is a closed sub-region, that is, the area enclosed by the surfaces corresponding to the sampling points is determined as a closed sub-region.
[0049] In this embodiment, after calculating the normal vector of the sampling point, the method further includes: calculating the angle between the current normal vector and the XOY plane; determining whether the angle is greater than a second threshold; if the angle is greater than the second threshold, discarding the current normal vector.
[0050] Calculate the normal vector of the sampling point based on the adjacent points , calculate the normal vector Angle with XOY plane ; Determine whether the angle is greater than the second threshold :If the angle Greater than the second threshold , then skip the current sampling point The interference in the z-axis direction is eliminated, and the processing of the next sampling point is continued. In this implementation, the values of the first threshold and the second threshold can be set according to actual conditions.
[0051] Boundary-based exploration requires an effective order to visit viewpoints. Therefore, viewpoint evaluation plays an important role in determining viewpoint priority, which further affects the efficiency of exploration. In practical applications, boundary information is not always available. Therefore, the heuristic exploration method does not work very well. Especially in a cluttered environment, the greedy strategy tends to select the viewpoint with the largest information gain, which may cause small areas to be ignored. If many small areas are ignored, the robot must repeatedly return to explore these areas, which will result in a lot of time overhead. In order to solve this problem, this embodiment performs viewpoint evaluation based on closed sub-areas.
[0052] In an embodiment, evaluating the cost of each viewpoint according to the closed sub-region includes:
[0053] B31, calculating the region boundary of the closed sub-region;
[0054] Define the region boundary of the enclosed subregion as the outer box , this implementation can use the random sampling consensus algorithm (RANSAC) to fit the sampling points in each quadrant, and use the plane fitting points in each quadrant, which simplifies the process without significantly reducing the accuracy. In the RANSAC algorithm, only a set of points sampled uniformly are used, which reduces the computing resources. For the plane fitted in each quadrant, determine its maximum coordinate ( ) and the minimum coordinates ( , ). In fact, taking the boundary of the fitted plane in each quadrant can effectively represent the regional boundary of the closed sub-region , defined as: ;in, , and is the boundary of the closed subregion.
[0055] B32, for each viewpoint, if the viewpoint is not within the region boundary of the closed subregion, calculate the distance from the viewpoint to the center of the closed subregion as the first generation value;
[0056] In order to give a higher priority to the viewpoints in or near the closed sub-region, in this embodiment, the first cost of the viewpoint can be calculated by the following formula: :
[0057]
[0058] in, is the i-th viewpoint, is the nearest closed subregion The center of express arrive The Euclidean distance of .
[0059] B33, calculating the distance from the current position of the robot to the viewpoint as the second generation value;
[0060] The distance from the robot's current position to the viewpoint is another key factor in evaluating the viewpoint priority. Algorithm, or use other classic algorithms such as Dijkstra, breadth-first search, etc. to obtain the path length and use it as the second cost :
[0061]
[0062] in, Indicates the current position of the robot.
[0063] B34, calculates the third generation value based on the robot's current speed, viewpoint position and robot's current position;
[0064] Due to the time consumption of the robot's back-and-forth movement and the resulting reduction in exploration efficiency, this implementation takes into account the robot's direction change and calculates the third cost as follows:
[0065]
[0066] in is the robot's current position, It is The position of the viewpoint, is the current speed of the robot.
[0067] B35. Calculate the total cost of the viewpoint according to the first cost, the second cost and the third cost.
[0068] The total cost for each viewpoint is calculated as:
[0069]
[0070]
[0071] in Is a node The total cost, Is a node The information gain of is the total cost, , , The first price , the second price and the third price The weight of .
[0072] In another implementation of the present embodiment, after generating viewpoints in the free area, the method further includes: for each viewpoint, obtaining a set of neighbor viewpoints whose distance from the viewpoint is less than a third threshold; determining whether there are obstacles between the viewpoints in the neighbor viewpoint set; if there are no obstacles between the viewpoints in the neighbor viewpoint set, obtaining an average viewpoint of the neighbor viewpoint set; retaining the average viewpoint and removing the neighbor viewpoint set.
[0073] During the exploration process, viewpoints within the free area are randomly generated and filtered based on their ability to cover the boundary, making the viewpoints highly random. The robot must visit each viewpoint when exploring an unknown scene. However, the randomness may cause the robot to take a very complex path, which greatly reduces the efficiency of exploration.
[0074] In order to solve this problem, this embodiment effectively refines the viewpoints to achieve trajectory smoothing. , compared with other viewpoints With Viewpoint If the distance is less than the third threshold , then Put it into the neighbor viewpoint set If these viewpoints are close enough to each other and there are no obstacles between them, they are called a group In this implementation, each independent viewpoint is no longer retained, but the positions of these clustered viewpoints are replaced by their collective centroids, and their average information gain is used (or use median information gain, weighted information gain, etc.) as a factor for subsequent processing. This refinement of viewpoints and clustering of viewpoints not only reduces the number of viewpoints that the robot needs to pass through, but also ensures that it passes through the original boundaries. When the robot traverses these refined viewpoints, some original boundaries may have been covered, thereby reducing the number of viewpoints that need to be visited, avoiding complex routes, eliminating the problem of a large number of repetitions of scenes observed from multiple viewpoints, and effectively improving the smoothness of the planned path.
[0075] Reference Figure 3 , the application examples of path planning include: the first step is to transmit the detected perception data to the boundary detection module, in which the boundary is selectively updated, including adding new boundaries, deleting old boundaries, and performing closed sub-region detection. The second step is to generate viewpoints in free space and evaluate the cost of each viewpoint. Then the viewpoints are refined to focus the view according to their positions, so that the path is smoother. The third step is to obtain the exploration order by solving the asymmetric traveling trader problem (ATSP), and use a local planner to optimize the path and guide the robot to the next target point.
[0076] This embodiment only updates the strategy and corresponding planning algorithm of the newly discovered area, which effectively improves the efficiency of exploring unknown environments and reduces the demand for computing resources. This embodiment proposes the concept of closed sub-areas and the corresponding detection algorithm, which effectively solves the problem of repeated paths caused by back-and-forth turns due to incomplete exploration, making the planned path repetition rate lower and smoother.
[0077] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in each embodiment of the present application.
[0078] Example 2
[0079] In this embodiment, a path planning device is also provided to implement the above-mentioned embodiments and preferred implementation modes, which have been described and will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
[0080] Figure 5 is a structural block diagram of a path planning device according to an embodiment of the present application, such as Figure 5 As shown, the device comprises:
[0081] A boundary detection module 51 is used to obtain robot perception data, update the boundary according to the perception data, the boundary is the boundary between the known area and the unknown area, the known area includes the free area; and detect the closed sub-area around the robot;
[0082] A viewpoint evaluation module 52 is used to determine a free area according to the boundary, generate viewpoints in the free area, and evaluate the cost of each viewpoint according to the closed sub-area;
[0083] The path planning module 53 is used to perform path planning according to the cost of the viewpoint.
[0084] It should be noted that the above modules can be implemented by software or hardware. For the latter, it can be implemented in the following ways, but not limited to: the above modules are all located in the same processor; or the above modules are located in different processors in any combination.
[0085] Example 3
[0086] An embodiment of the present application further provides a computer storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when running.
[0087] Optionally, in this embodiment, the computer storage medium may be configured to store a computer program for performing the following steps:
[0088] S1, obtaining robot perception data, and updating the boundary according to the perception data, wherein the boundary is the boundary between the known area and the unknown area, and the known area includes the free area;
[0089] S2, determining a free area according to the boundary, and generating a viewpoint in the free area;
[0090] S3, detecting a closed sub-region around the robot, and evaluating the cost of each viewpoint according to the closed sub-region;
[0091] S4, performing path planning according to the cost of the viewpoint.
[0092] Optionally, in this embodiment, the above-mentioned computer storage medium may include but is not limited to: a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and other media that can store computer programs.
[0093] An embodiment of the present application further provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0094] Optionally, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.
[0095] Optionally, in this embodiment, the processor may be configured to perform the following steps through a computer program:
[0096] S1, obtaining robot perception data, and updating the boundary according to the perception data, wherein the boundary is the boundary between the known area and the unknown area, and the known area includes the free area;
[0097] S2, determining a free area according to the boundary, and generating a viewpoint in the free area;
[0098] S3, detecting a closed sub-region around the robot, and evaluating the cost of each viewpoint according to the closed sub-region;
[0099] S4, performing path planning according to the cost of the viewpoint.
[0100] Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments and optional implementation modes, and this embodiment will not be described in detail here.
[0101] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0102] In the above embodiments of the present application, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.
[0103] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0104] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0105] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0106] If the integrated unit 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 application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a computer storage medium, including several instructions to enable a computer device (which can be a personal computer, server or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned computer storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, disk or optical disk and other media that can store program codes.
[0107] The above is only a preferred implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A path planning method, characterized in that: The method comprises: Acquire robot perception data, and update the boundary according to the perception data, wherein the boundary is a boundary between a known area and an unknown area, and the known area includes a free area; Determine a free area according to the boundary, and generate a viewpoint in the free area; Detecting a closed sub-region around the robot, and evaluating the cost of each viewpoint according to the closed sub-region; Performing path planning according to the cost of the viewpoint; Detecting the closed sub-region around the robot includes: acquiring point cloud data centered on the current position of the robot, establishing a local coordinate system with the current position of the robot as the origin O, and aligning the X-axis and Y-axis of the local coordinate system with the X-axis and Y-axis of the global map respectively; sampling the point cloud data to obtain a sampling point set, and for each sampling point, traversing the sampling point set to find multiple adjacent points adjacent to the sampling point; calculating the normal vector of the sampling point based on the surface formed by the adjacent points, and determining the quadrant to which the normal vector belongs; counting the number of normal vectors contained in each quadrant, if the number of normal vectors is greater than a first threshold, determining that the quadrant is occupied; if the number of occupied quadrants is greater than or equal to 3, determining that the area enclosed by the surface is a closed sub-region.
2. The method according to claim 1, characterized in that Updating the boundary according to the sensing data includes: Obtain a new grid set perceived from the first moment to the second moment; Detect and add new boundaries to the new grid collection: A grid state change adjacent to an old boundary at a first moment is detected, and if the grid state change is transformed from an unknown state to a known state, the old boundary is removed.
3. The method according to claim 1, characterized in that After calculating the normal vector of the sampling point, the method further includes: Calculate the angle between the current normal vector and the XOY plane; Determining whether the angle is greater than a second threshold; If the angle is greater than a second threshold, the current normal vector is discarded.
4. The method according to claim 1, characterized in that: The cost of evaluating each viewpoint according to the closed subregion includes: Calculating the region boundary of the closed subregion; For each viewpoint, if the viewpoint is not within the region boundary of the closed subregion, the distance from the viewpoint to the center of the closed subregion is calculated as the first generation value; Calculate the distance from the current position of the robot to the viewpoint as the second generation value; Calculate the third generation value based on the robot's current speed, viewpoint position and robot's current position; The total cost of the viewpoint is calculated according to the first cost, the second cost and the third cost.
5. The method according to claim 4, characterized in that Calculating the region boundary of the closed subregion includes: Acquire point cloud data centered on the current position of the robot, establish a local coordinate system with the current position of the robot as the origin O, and align the X-axis and Y-axis of the local coordinate system with the X-axis and Y-axis of the global map respectively; Sampling the point cloud data to obtain sampling points; Fitting the sampling points in each quadrant to obtain a fitting plane; The maximum coordinate and the minimum coordinate of each quadrant fitting plane are obtained and used as the region boundary of the closed sub-region.
6. The method according to claim 1, characterized in that After generating a viewpoint in the free area, the method further comprises: For each viewpoint, obtaining a set of neighbor viewpoints whose distances to the viewpoint are less than a third threshold; Determine whether there are obstacles between viewpoints in the neighbor viewpoint set; If there is no obstacle between the viewpoints in the neighbor viewpoint set, obtaining the average viewpoint of the neighbor viewpoint set; The average viewpoint is retained, and the neighbor viewpoint set is removed.
7. A path planning device, characterized in that: include: A boundary detection module is used to obtain robot perception data, update the boundary according to the perception data, the boundary is the boundary between the known area and the unknown area, the known area includes the free area; detect the closed sub-area around the robot; A viewpoint evaluation module, used to determine a free area according to the boundary, generate viewpoints in the free area; and evaluate the cost of each viewpoint according to the closed sub-area; A path planning module, used for performing path planning according to the cost of the viewpoint; The boundary detection module also includes a sampling unit, which is used to obtain point cloud data centered on the current position of the robot, establish a local coordinate system with the current position of the robot as the origin O, and align the X-axis and Y-axis of the local coordinate system with the X-axis and Y-axis of the global map respectively; sample the point cloud data to obtain a sampling point set, and for each sampling point, traverse the sampling point set to find multiple adjacent points adjacent to the sampling point; A first calculation unit, configured to calculate a normal vector of the sampling point according to a surface formed by the adjacent points, and determine a quadrant to which the normal vector belongs; A judgment unit is used to count the number of normal vectors contained in each quadrant. If the number of normal vectors is greater than a first threshold, it is determined that the quadrant is occupied; if the number of occupied quadrants is greater than or equal to 3, the area enclosed by the surface is determined to be a closed sub-area.
8. An electronic device, characterized in that: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; wherein: Memory, used to store computer programs; A processor, configured to execute the path planning method according to any one of claims 1 to 6 by running a program stored in a memory.
9. A computer storage medium, characterized in that The computer storage medium includes a stored program, wherein the program executes the path planning method according to any one of claims 1 to 6 when running.
Citation Information
Patent Citations
Method for constructing three-dimensional map by mobile robot in unknown environment
CN109341707A
Quad-rotor unmanned aerial vehicle autonomous exploration mapping method and system
CN114355981A