Path replanning method and device, self-moving device and readable storage medium
By fusing the global cost map and the desired path cost map to generate a fused map, the problem of the Lattice Planner algorithm having no solution is solved, and the feasibility of path planning and the closeness of the desired path are realized.
Patent Information
- Application Number
- CN202310379603.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-31
- Publication Date
- 2026-02-27
- Estimated Expiration
- 2043-03-31
AI Technical Summary
The Lattice Planner algorithm may encounter situations where there is no solution during path planning, resulting in the inability to obtain a local path. Therefore, path replanning needs to be performed in conjunction with the actual obstacle map.
The global cost map and the expected path cost map of the target area are merged to generate a merged map. The target path between the starting point and the ending point is determined based on the cost value of each point in the merged map, and the expected path is considered for planning.
This avoids the situation where local paths are unsolvable and obtains a new path that is feasible and close to the desired path.
Smart Images

Figure CN116358592B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application belongs to the technical field of path planning, and particularly relates to a path re-planning method and device, a self-moving device, and a readable storage medium. BACKGROUND
[0002] The purpose of path planning is to find a collision-free and safe path from a start point to an end point for a target object in a specified range. In some path planning scenarios, it is sometimes necessary to optimize the expected path. The expected path is specified by a user or output by other path planning algorithms. However, the expected path does not always take into account the positions of obstacles, and in order to avoid the situation where the expected path has obstacles and affects the movement of the self-moving device, path re-planning needs to be combined with the actual obstacle map.
[0003] When a user performs path planning using the Lattice Planner algorithm, the trajectory output by the Lattice Planner is a smooth, collision-free, and smooth safe local trajectory that satisfies the kinematic constraints and speed constraints of the vehicle.
[0004] Based on the principle of the Lattice Planner algorithm, sometimes there is no solution in the solving process of the Lattice Planner algorithm, so that a local path cannot be obtained. In this case, path re-planning needs to be combined with the actual obstacle map. SUMMARY
[0005] The embodiments of the present application provide a path re-planning method, device, self-moving device, readable storage medium, and computer program product, which can solve the problem of no local path obtained due to no solution of the Lattice Planner algorithm.
[0006] In a first aspect, the embodiments of the present application provide a path re-planning method, comprising:
[0007] fusing a global cost map of a target region and an expected path cost map to obtain a fused map, the expected path cost map being a cost map generated according to an expected path, each point in the fused map corresponding to a cost value;
[0008] determining a target path between a start point and an end point of the expected path according to the cost values of the points in the fused map.
[0009] Optionally, before fusing the global cost map of the target region and the expected path cost map to obtain the fused map, the method further comprises:
[0010] mapping the expected path to a newly created map to obtain a mapped path map;
[0011] The preset negative gradient operator is used to generate an expected path cost map according to the mapping path map, and the expected path cost map includes a negative value of each point in the expected path.
[0012] Optionally, the preset negative gradient operator is used to generate an expected path cost map according to the mapping path map, and the expected path cost map includes a negative value of each point in the expected path.
[0013] A preset distance operator is obtained, and a value of each operator position in the preset distance operator is a distance from the operator position to an operator center point of the preset distance operator.
[0014] The preset function is used to generate a preset negative gradient operator according to the preset distance operator.
[0015] The preset negative gradient operator is used to traverse the mapping path map, and an expected path cost map is obtained.
[0016] Optionally, a target path between a start point and an end point of the expected path is determined according to the value of each point in the fusion map, and the target path includes:
[0017] A feasible region of the fusion map is obtained.
[0018] In the feasible region, a path between the start point and the end point of the expected path is planned according to the value of each point in the fusion map, and the target path is determined.
[0019] Optionally, in the feasible region, a path between the start point and the end point of the expected path is planned according to the value of each point in the fusion map, and the target path is determined, and the planning includes:
[0020] After the start point is taken as a current point, an expansion value of a neighboring point of the current point is calculated according to the value, and a target point with the minimum expansion value is determined, and the neighboring point is located in the feasible region.
[0021] When the target point is not the end point, the target point is taken as the current point, and the step of calculating the expansion value of the neighboring point of the current point according to the value and determining the target point with the minimum expansion value is performed.
[0022] When the target point is the end point, all target points from the end point to the start point are connected, and a target path from the end point to the start point is obtained.
[0023] Optionally, the expansion value of the neighboring point of the current point is calculated according to the value, and the calculation includes:
[0024] For each neighboring point, a transition cost of the neighboring point to the current point is calculated.
[0025] A distance of the neighboring point to the end point is calculated.
[0026] The expansion value of the neighboring point is determined according to the transition cost, the distance, and the value of the neighboring point.
[0027] Optionally, the global cost map of the target region and the expected path cost map are fused to obtain a fusion map, including:
[0028] The initial cost value of each point in the global cost map is superimposed with the negative cost value of the corresponding point in the expected path cost map to obtain the cost value corresponding to each point in the fusion map.
[0029] In a second aspect, an embodiment of the present application provides a path re-planning device, including:
[0030] A map obtaining module is configured to fuse the global cost map of the target region and the expected path cost map to obtain a fusion map, the expected path cost map being a cost map generated according to an expected path, and each point in the fusion map corresponding to a cost value;
[0031] A path determining module is configured to determine a target path between the start point and the end point of the expected path according to the cost value of each point in the fusion map.
[0032] In a third aspect, an embodiment of the present application provides a self-moving device, including:
[0033] A vehicle body including a vehicle body and wheels; and
[0034] A control module is configured to execute the method of any one of the above first aspect.
[0035] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement the method of any one of the above first aspect.
[0036] Compared with the related art, the embodiment of the present application has the beneficial effects that:
[0037] The embodiment of the present application fuses the global cost map of the target region and the expected path cost map to obtain a fusion map, the expected path cost map being a cost map generated according to an expected path, and determines a target path between the start point and the end point of the expected path according to the cost value of each point in the fusion map, so that the expected path cost map is also considered in the process of planning the path, i.e., the expected path is considered when planning the path, and a new path that is feasible and close to the expected path is obtained.
[0038] Moreover, the method provided by the present application plans a path based on the cost value corresponding to each point in the fusion map, and the corresponding path can be planned according to the difference between the cost values of the points in the fusion map, so that the situation that there is no solution for a local path is avoided. BRIEF DESCRIPTION OF DRAWINGS
[0039] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the embodiments or prior art description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without any creative effort based on these drawings.
[0040] Figure 1 is a schematic diagram of a system provided by an embodiment of the present application;
[0041] Figure 2 is a schematic diagram of a path re-planning method provided by an embodiment of the present application;
[0042] Figure 3 is an example diagram of a global cost map provided by an embodiment of the present application;
[0043] Figure 4 is an example diagram of a fusion map provided by an embodiment of the present application;
[0044] Figure 5 is a schematic diagram of a path re-planning method provided by an embodiment of the present application;
[0045] Figure 6 is a schematic diagram of a mapping path map provided by an embodiment of the present application;
[0046] Figure 7 is an example diagram of a preset distance operator provided by an embodiment of the present application;
[0047] Figure 8 is an example diagram of an expected path cost map provided by an embodiment of the present application
[0048] Figure 9 is a schematic diagram of a path re-planning method provided by an embodiment of the present application
[0049] Figure 10 is a schematic diagram of a path re-planning method provided by an embodiment of the present application;
[0050] Figure 11 is a schematic diagram of a backtracking path method provided by an embodiment of the present application;
[0051] Figure 12 is a schematic diagram of a path re-planning device provided by an embodiment of the present application;
[0052] Figure 13 is a schematic diagram of a system of a self-moving device provided by an embodiment of the present application. DETAILED DESCRIPTION
[0053] In the following description, for purposes of explanation and not limitation, specific details are set forth such as particular architectures, techniques, etc. in order to provide a thorough understanding of the embodiments of the present application. However, it will be apparent to those skilled in the art that the present application can be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known methods, devices, circuits, and
[0054] It is to be understood that the terminology "includes", "has", "holds", "contains" or "comprising", "including", "having" and the like, when used in the present specification and in the accompanying claims, is used to indicate included, has, holds, contains or comprises but does not exclude other integers or additional integers.
[0055] It is also to be understood that the terminology "and / or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items, and that the term "at least one of A and B" is equivalent to "A, B, or A and B" and the like.
[0056] As used in the present specification and in the accompanying claims, the term "if can be interpreted as meaning "when" or "once" or "in response to a determination" or "in response to detecting" depending on the context. Similarly, the phrase "if it is determined" or "if [a described condition or event] is detected" can be interpreted as meaning "once it is determined" or "in response to a determination" or "once [a described condition or event] is detected" or "in response to detecting [a described condition or event]" depending on the context.
[0057] In addition, the terms "first", "second", "third", etc. as used in the description of the specification and the appended claims are used only to distinguish different elements, and are not to be construed as implying relative importance.
[0058] Reference to "one embodiment" or "some embodiments" or "one implementation" or "some implementations" etc. in the present description means that a particular feature, structure, or characteristic described in connection with the embodiment is included in at least one embodiment of the present application. The appearances of the phrases "in one embodiment", "in some embodiments", "in other embodiments", "in additional embodiments", etc. in various places in the specification are not necessarily all referring to the same embodiment, although they can. Furthermore, the terms "comprising", "including", "containing", and "having" etc. are meant to be interpreted as "including but not limited to" unless otherwise indicated.
[0059] The Lattice Planner algorithm is a kind of local path planner, which takes localization information, obstacle perception information and static reference information as input, and outputs a local planning path, which is input to the controller to complete the tracking control of the local path.
[0060] When a user plans a path by using the Lattice Planner algorithm, based on the principle of the Lattice Planner algorithm, it can be known that the trajectory output by the Lattice Planner is a smooth collision-free local trajectory that satisfies the kinematic constraints and speed constraints of the vehicle and is smooth and safe. It can be known that the Lattice Planner algorithm has requirements for the input path, and cannot guarantee a solution. When there is no solution in the solving process of the Lattice Planner algorithm, the local path cannot be obtained, and at this time, path re-planning needs to be performed in combination with the actual obstacle map.
[0061] In order to solve the above problems, an embodiment of the present application provides a path re-planning method, which fuses a global cost map of a target area and an expected path cost map to obtain a fusion map, the expected path cost map being a cost map generated according to an expected path; determines a target path between a starting point and an ending point of the expected path according to the cost values of the points in the fusion map, so that the expected path is considered when planning the path in the process of planning the path, a new path that is feasible and close to the expected path is obtained, and the situation that there is no solution for the local path can be avoided.
[0062] Corresponding to the above path re-planning method, an embodiment of the present application provides a system architecture. Figure 1 FIG. 1 is a schematic diagram of a system architecture provided by an embodiment of the present application. As shown in FIG. 1, the system architecture can include a terminal device 11, a network 12 and a server 13. The terminal device 11 can include a smart phone, a tablet computer, a notebook computer, a smart voice interactive device, a smart home appliance, a vehicle-mounted terminal, a self-moving device, etc. The server 13 can be a stand-alone physical server, or a server cluster or a distributed system composed of multiple physical servers, or a cloud server providing cloud computing services. The network 12 can be a communication medium of various connection types capable of providing a communication link between the terminal device 11 and the server 13, for example, a wired communication link or a wireless communication link. The self-moving device can be a device containing a self-moving assistance function, or a semi-self-moving device or a fully autonomous mobile device. The self-moving device can be a device containing a self-moving assistance function. The self-moving assistance function can be implemented by a vehicle-mounted terminal, and the corresponding self-moving device can be a vehicle with the vehicle-mounted terminal. The self-moving device can also be a semi-self-moving device or a fully autonomous mobile device. For example, a lawn mower, a sweeper, a robot with a navigation function, etc. Figure 1
[0063] According to implementation requirements, the system architecture in the embodiments of the present application can have any number of terminal devices, networks and servers. For example, the server 13 can be a server group composed of multiple server devices. In addition, the path re-planning method provided by the embodiments of the present application can be applied to the terminal device 11, can be applied to the server 13, or can be jointly implemented by the terminal device 11 and the server 13, and the present application does not make special limitations on this.
[0064] Figure 2 is a flowchart of a path re-planning method provided by an embodiment of the present application. As shown in Figure 2 , the method comprises:
[0065] S11: fuse the global cost map of the target area and the expected path cost map to obtain a fused map.
[0066] The target area is an area to be walked by the self-moving device. The expected path cost map is a cost map generated according to the expected path. Each point in the fused map corresponds to a cost value.
[0067] Figure 3 is an example diagram of a global cost map provided by an embodiment of the present application. As shown in Figure 3 , the global cost map of the target area, the height of each point of the global cost map represents an initial cost value.
[0068] The global cost map can include one or more of a static map layer, an obstacle map layer and an inflation layer. In some embodiments, the initial cost value of each point in the global cost map can be the sum of the cost values corresponding to the point in the static map layer, the obstacle map layer and the inflation layer. The static map layer is a static map established by simultaneous localization and mapping (SLAM). The obstacle map layer records the obstacle information sensed by the sensor. The inflation layer is a layer obtained by inflation on the static map layer and the obstacle map layer to avoid the self-moving device from colliding with the obstacle.
[0069] In one possible implementation, the initial cost value of each point in the global cost map is superimposed with the negative cost value of the corresponding point in the expected path cost map to obtain the cost value corresponding to each point in the fused map.
[0070] Figure 4 is an example diagram of a fused map provided by an embodiment of the present application. As shown in Figure 4 , the concave curve from the lower left corner to the upper right corner is the expected path, and the height of each point of the fused map represents the corresponding cost value.
[0071] Correspondingly, the fused map can include a static map layer, an obstacle map layer, an inflation layer, and a desired path cost map layer. In some embodiments, the cost value of each point in the fused map can be the sum of the cost values of the point in the static map layer, the obstacle map layer, the inflation layer, and the desired path cost map layer.
[0072] S12: Determine a target path between the start point and the end point of the desired path according to the cost values of the points in the fused map.
[0073] In applications, based on the start point and the end point of the desired path, a point with the minimum cost value between the start point and the end point is calculated according to the cost values of the points in the fused map. The start point, the point with the minimum cost value, and the end point are connected to obtain the target path.
[0074] Embodiments of the present application fuse the global cost map of the target region and the desired path cost map to obtain a fused map, the desired path cost map being a cost map generated according to the desired path; determine a target path between the start point and the end point of the desired path according to the cost values of the points in the fused map, so that the desired path cost map is also considered in the process of planning the path, i.e., the desired path is considered when the path is planned, and a new path that is feasible and close to the desired path is obtained.
[0075] Moreover, the method provided by the present application plans a path based on the cost values of each point in the fused map, and can certainly plan a corresponding path according to the differences between the cost values of the points in the fused map, thereby avoiding the situation that there is no solution for a local path.
[0076] Figure 5 is a flowchart of a path re-planning method provided by an embodiment of the present application. As shown in Figure 5 Before step S11, the method further includes:
[0077] S21: Map the desired path to a newly created map to obtain a mapped path map.
[0078] In applications, each point of the desired path is mapped to the newly created map to obtain a mapped path map. The mapped path map only includes information of the desired path.
[0079] Figure 6 is a schematic diagram of the mapped path map provided by an embodiment of the present application. As shown in Figure 6 The path from the lower left corner to the upper right corner is the desired path.
[0080] S22: Generate a desired path cost map according to the mapped path map based on a preset negative gradient operator.
[0081] The desired path cost map includes the negative cost values of each point in the desired path.
[0082] In a possible implementation, step S22 comprises:
[0083] S221: Obtain a preset distance operator, wherein a value of each operator position in the preset distance operator is a Manhattan distance of the operator position to a center point of the preset distance operator.
[0084] In a possible implementation, the Manhattan distance of the operator position to the center point of the preset distance operator is a Manhattan distance. Figure 7 is an example diagram of the preset distance operator provided by an embodiment of the present application. As shown in Figure 7 the square with a Manhattan distance of 0 in the preset distance operator is the center point. The value of 1 on the square indicates that the Manhattan distance of the operator position to the center point is 1. The value of 2 on the square indicates that the Manhattan distance of the operator position to the center point is 2.
[0085] S222: Generate a preset negative gradient operator according to the preset distance operator based on a preset function.
[0086] The preset function is set according to an actual scenario.
[0087] In a possible implementation, the Manhattan distance is substituted into the preset function to obtain a negative gradient value corresponding to each square, and the negative gradient operator is obtained.
[0088] For example, the preset function is:
[0089] The negative gradient value = -50 * exp{-0.5 * (the Manhattan distance of the operator position to the center point)}.
[0090] According to the preset function and the preset distance operator, the preset negative gradient operator is generated. The preset negative gradient operator can be an operator with a size of 3*3. For example, the preset negative gradient operator can be:
[0091] -18.3940-30.3265-18.3940
[0092] -30.3265-50.0000-30.3265
[0093] -18.3940-30.3265-18.3940
[0094] S223: Traverse the mapping path graph by using the preset negative gradient operator to obtain an expected path cost graph.
[0095] In an application, because the mapping path graph only includes the expected path, after the mapping path graph is traversed by using the preset negative gradient operator, only the points of the expected path correspond to negative values, that is, the points of the expected path of the expected path cost graph correspond to negative values. Figure 8is an example of the expected path cost map provided by an embodiment of the present application. As shown, the path from the lower left corner to the upper right corner is the expected path, and the height corresponding to the expected path represents the negative cost value. Figure 8
[0096] An embodiment of the present application maps the expected path to a newly created map to obtain a mapping path map, generates the expected path cost map based on a preset negative gradient operator according to the mapping path map, and the expected path cost map includes the negative cost value of each point in the expected path, so as to obtain the expected path cost map and provide a basis for obtaining a new path that is feasible and close to the expected path.
[0097] Figure 9 is a flowchart of a path re-planning method provided by an embodiment of the present application. As shown in Figure 9 , step S12 includes:
[0098] S121: Obtain a feasible region of the fusion map.
[0099] The feasible region is an obstacle-free region.
[0100] S122: In the feasible region, plan a path between the start point and the end point of the expected path according to the cost value of each point in the fusion map to determine a target path.
[0101] In one possible implementation, the path can be planned based on the principle of the A* algorithm. The start point is the current point, and the start point is put into the open list. Then the adjacent points of the start point are checked (ignoring the adjacent points occupied by other objects), and the adjacent points that can be walked or reached are put into the open list, and the start point is taken as the last node of these adjacent points. Then the start point is removed from the open list and put into the close list. Then the target point with the minimum expansion value is determined in the open list. Then the target point is taken as the current point, and the target point is put into the close list. The next target point with the minimum expansion value is determined according to the above principle, and the process stops until the end point is put into the close list.
[0102] An embodiment of the present application plans a path between the start point and the end point of the expected path according to the cost value of each point in the fusion map in the feasible region to determine a target path, so that the expected path cost map is also used for planning in the process of planning the path, that is, the expected path is considered when planning the path, and a new path that is feasible and close to the expected path is obtained.
[0103] Moreover, the method provided by the present application plans a path based on the cost value corresponding to each point in the fusion map, and can certainly plan a corresponding path according to the difference between the cost values of the points in the fusion map, thereby avoiding the situation that there is no solution for a local path.
[0104] Figure 10 is a flowchart of a path re-planning method provided by an embodiment of the present application. As shown in Figure 10 step S122 includes:
[0105] S31: After the start point is taken as the current point, the expansion value of the adjacent point of the current point is calculated according to the generation value, and the target point with the minimum expansion value is determined, the adjacent point being located in the feasible region.
[0106] S32: When the target point is not the end point, the target point is taken as the current point, and the step of calculating the expansion value of the adjacent point of the current point according to the generation value and determining the target point with the minimum expansion value is executed.
[0107] Specifically, the expansion value of the adjacent point of the current point is calculated according to the generation value, including:
[0108] For each adjacent point, the transition cost of the adjacent point to the current point is calculated.
[0109] The expansion value of the adjacent point is determined according to the transition cost, the distance and the generation value of the adjacent point.
[0110] Wherein, the transition cost of the adjacent point to the current point is the cost of the adjacent point to the current point. The distance of the adjacent point to the end point is the Euclidean distance. The generation value of the adjacent point is the generation value of the point of the fused map.
[0111] In application, the expansion value calculation formula is F=G+H+cost, wherein F is the expansion value, G is the transition cost, H is the distance, and cost is the generation value of the adjacent point.
[0112] S33: When the target point is the end point, all target points from the end point to the start point are connected to obtain the target path from the end point to the start point.
[0113] In a possible implementation manner, Figure 11 is a schematic diagram of a backtracking path method provided by an embodiment of the present application. As shown in Figure 11 the backtracking path method is used to constantly find the last node pointed to by the target point from the end point s0 until the start point s * is obtained, so as to obtain the target path, which is the gray straight line in the figure.
[0114] This embodiment of the application calculates the expansion value of neighboring points based on the cost value after setting the starting point as the current point, and determines the target point with the minimum expansion value. Neighboring points are located within the feasible region. When the target point is not the destination, it is set as the current point, and the following steps are executed: calculating the expansion value of neighboring points based on the cost value, and determining the target point with the minimum expansion value. This method replaces the existing A* replanning algorithm, considering the value of the expected path cost graph when calculating the expansion value, so that the subsequent obtained target path is feasible and close to the expected path.
[0115] Moreover, the method provided in this application plans paths based on the cost value of each point in the fused map, which can inevitably plan corresponding paths according to the differences in cost value of each point in the fused map, thereby avoiding the situation where there is no solution for local paths.
[0116] Figure 12 This is a schematic diagram of the path replanning device provided in one embodiment of this application. Figure 12 As shown, the device includes:
[0117] The map acquisition module 20 is used to fuse the global cost map and the expected path cost map of the target area to obtain a fused map. The expected path cost map is a cost map generated based on the expected path. Each point in the fused map has a corresponding cost value.
[0118] The path determination module 21 is used to determine the target path between the starting point and the ending point of the desired path based on the cost value of each point in the fused map.
[0119] In one embodiment of this application, the above-described apparatus further includes:
[0120] The path mapping module is used to map the desired path to a newly created graph, resulting in a mapped path graph.
[0121] The cost map generation module is used to generate a desired path cost map based on a preset negative gradient operator and the mapping path map. The desired path cost map includes the negative cost value of each point in the desired path.
[0122] In one embodiment of this application, the cost map generation module is specifically used to obtain a preset distance operator, wherein the value of each operator position in the preset distance operator is the distance from the operator position to the operator center point of the preset distance operator; based on a preset function, a preset negative gradient operator is generated according to the preset distance operator; and the preset negative gradient operator is used to traverse the mapping path map to obtain the desired path cost map.
[0123] In one embodiment of this application, the path determination module is specifically used to obtain feasible areas of the fused map; in the feasible areas, the path between the starting point and the ending point of the desired path is planned according to the cost value of each point in the fused map, and the target path is determined.
[0124] In an embodiment of the present application, the map obtaining module is specifically configured to superimpose the initial cost value of each point in the global cost map and the negative cost value of the corresponding point in the expected path cost map to obtain the cost value corresponding to each point in the fusion map.
[0125] Figure 13 A structural schematic diagram of a system of a self-moving device is provided for an embodiment of the present application. As shown in the figure, the system 3 of the self-moving device of this embodiment comprises at least one processor 30 (only one is shown in the figure), a memory 31, and a computer program 33 stored in the memory 31 and executable on the at least one processor 30, wherein the processor 30 implements the steps in any of the method embodiments described above when executing the computer program 33. Figure 13 Figure 13 The system 3 of the self-moving device can include, but is not limited to, the processor 30 and the memory 31. Those skilled in the art can understand that the system 3 of the self-moving device is only an example and does not constitute a limitation on the system 3 of the self-moving device, and can include more or fewer components than those shown in the figure, or combine certain components, or different components, for example, can also include an input / output device, a network access device, etc.
[0126] The system 3 of the self-moving device can include, but is not limited to, the processor 30 and the memory 31. Those skilled in the art can understand that the system 3 of the self-moving device is only an example and does not constitute a limitation on the system 3 of the self-moving device, and can include more or fewer components than those shown in the figure, or combine certain components, or different components, for example, can also include an input / output device, a network access device, etc. Figure 13
[0127] The processor 30 can be a central processing unit (CPU), and can also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic components, discrete hardware components, etc. The general-purpose processor can be a microprocessor or can also be any conventional processor.
[0128] The memory 31 can be an internal storage unit of the system 3 of the self-moving device in some embodiments, for example, a hard disk or a memory of the system 3 of the self-moving device. The memory 31 can also be an external storage device of the system 3 of the self-moving device in other embodiments, for example, a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the system 3 of the self-moving device. Further, the memory 31 can include both the internal storage unit and the external storage device of the system 3 of the self-moving device. The memory 31 is used to store an operating system, an application program, a boot loader, data, and other programs, etc., for example, program codes of the computer program, etc. The memory 31 can also be used to temporarily store data that has been output or will be output.
[0129] It should be noted that the information interaction, execution process, etc. between the above devices / units, since based on the same concept as the method embodiments of the present application, the specific functions and the brought technical effects can be referred to the method embodiments part, and will not be repeated here.
[0130] Those skilled in the art can clearly understand that, for the convenience and brevity of description, only the above-mentioned division of functional units and modules is exemplified, and in actual application, the above-mentioned functions can be completed by different functional units and modules according to needs, that is, the internal structure of the device is divided into different functional units or modules to complete all or part of the functions described above. Each functional unit and module in the embodiment can be integrated in one processing unit, or each unit can exist physically, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of software functional unit. In addition, the specific names of each functional unit and module are only for easy distinction, and do not limit the protection scope of the present application. The specific working process of the unit and module in the above system can refer to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0131] The self-moving device provided in the embodiments of the present application comprises: a vehicle body comprising a vehicle body and a wheel; and a control module configured to perform the steps in the method embodiments.
[0132] The computer readable storage medium provided in the embodiments of the present application stores a computer program, and the computer program is executed by a processor to implement the steps in the method embodiments.
[0133] The integrated unit, if implemented in the form of a software function unit and sold or used as an independent product, can be stored in a computer readable storage medium. Based on such understanding, the present application can implement all or part of the processes in the above-mentioned embodiment methods through a computer program to instruct relevant hardware to complete, and the computer program can be stored in a computer readable storage medium. When the computer program is executed by a processor, the steps of each method embodiment described above can be implemented. The computer program includes computer program code, which can be in the form of source code, object code, executable files or some intermediate forms. The computer readable medium at least includes any entity or device capable of carrying the computer program code to the photographing device / terminal equipment, recording medium, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signal, telecommunication signal and software distribution medium. For example, U disk, mobile hard disk, magnetic disk or optical disk, etc. In some jurisdictions, according to legislation and patent practice, the computer readable medium can not be an electrical carrier signal and a telecommunication signal.
[0134] In the above embodiments, the description of each embodiment has its own focus, and the parts not described or recorded in detail in a certain embodiment can be referred to the relevant description of other embodiments.
[0135] Those of ordinary skill in the art can understand that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be implemented in electronic hardware or a combination of computer software and electronic hardware. Whether the functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Professionals can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.
[0136] In the embodiments provided by the present application, it should be understood that the disclosed apparatus / network device and method can be implemented in other ways. For example, the above-described apparatus / network device embodiments are merely schematic, for example, the division of the modules or units is only a logical function division, and actual implementation can have another division manner, for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the shown or discussed each other can be indirect coupling or communication connection through some interfaces, devices or units, and can be electrical, mechanical or other forms.
[0137] The units described as separate components may or may not be physically separate, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may also be distributed to multiple network units. Part or all of the units can be selected to achieve the purpose of the embodiment scheme according to actual needs.
[0138] The above embodiments are only used to illustrate the technical solutions of the present application, but not limit them; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that the technical solutions recorded in the foregoing embodiments can still be modified, or some technical features can be replaced by equivalents; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and should be included in the protection scope of the present application.
Claims
1. A method of path replanning, characterized in that, The method comprises the following steps: mapping the expected path to a newly created graph to obtain a mapping path graph; generating an expected path cost graph based on a preset negative gradient operator according to the mapping path graph, the expected path cost graph comprising a negative cost value of each point in the expected path; fusing a global cost map of a target region and an expected path cost graph to obtain a fused map, the expected path cost graph being a cost graph generated according to an expected path, each point in the fused map corresponding to a cost value; determining a target path between a start point and an end point of the expected path according to the cost values of the points in the fused map.
2. The method of claim 1, wherein, The method comprises the following steps: obtaining a preset distance operator, the value of each operator position in the preset distance operator being the distance from the operator position to the operator center point of the preset distance operator; generating the preset negative gradient operator based on a preset function according to the preset distance operator; traversing the mapping path graph by using the preset negative gradient operator to obtain the expected path cost graph.
3. The method according to claim 1 or 2, characterized in that, The method comprises the following steps: obtaining a feasible region of the fused map; planning a path between the start point and the end point of the expected path according to the cost values of the points in the fused map in the feasible region to determine the target path.
4. The method of claim 3, wherein, The method comprises the following steps: after taking the start point as a current point, calculating the expansion value of the adjacent points of the current point according to the cost value and determining a target point with the minimum expansion value, the adjacent points being located in the feasible region; when the target point is not the end point, taking the target point as the current point and performing the step of calculating the expansion value of the adjacent points of the current point according to the cost value and determining a target point with the minimum expansion value; when the target point is the end point, connecting all the target points from the end point to the start point to obtain the target path from the end point to the start point.
5. The method of claim 4, wherein, The method comprises the following steps: for each adjacent point, calculating the transition cost from the adjacent point to the current point; calculating the distance from the adjacent point to the end point; determining the expansion value of the adjacent point according to the transition cost, the distance and the cost value of the adjacent point.
6. The method of claim 1, wherein, The method comprises the following steps: superimposing the initial cost value of each point in the global cost map and the negative cost value of the corresponding point in the expected path cost graph to obtain the cost value corresponding to each point in the fused map.
7. A route replanning device characterized by comprising: The method comprises the following steps: a path mapping module for mapping the expected path to a newly created graph to obtain a mapping path graph; The cost map generation module is configured to generate an expected path cost map based on a preset negative gradient operator and according to the mapping path map, the expected path cost map including a negative cost value of each point in an expected path; The map acquisition module is configured to fuse a global cost map of the target region and an expected path cost map to obtain a fused map, the expected path cost map being a cost map generated according to an expected path, and each point in the fused map corresponding to a cost value; The path determination module is configured to determine a target path between a starting point and an ending point of the expected path according to the cost values of the points in the fused map.
8. A self-moving device, characterized in that, The vehicle comprises: a vehicle body including a vehicle body and wheels; and a control module configured to perform the method according to any one of claims 1 to 6. The computer program is executed by a processor to implement the method according to any one of claims 1 to 6.
9. A computer-readable storage medium storing a computer program, the computer program comprising instructions that, when executed by a computer, cause the computer to perform the method of any one of claims 1 to 8. The computer program is executed by a processor to implement the method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Path planning method and device, robot and readable storage medium
CN115326057A