Path walking method, system, terminal device and storage medium
By presetting multiple sets of speed parameters and filtering the optimal speed parameters, the robot can turn to the target turning point within the preset time period, realize efficient walking and smooth steering, and judge and avoid temporary obstacles during walking, solving the problem of inefficient walking in the prior art.
Patent Information
- Application Number
- CN202210410132.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-19
- Publication Date
- 2025-04-18
- Estimated Expiration
- 2042-04-19
AI Technical Summary
The existing robot walking path planning method is complex and has low walking efficiency, making it difficult to achieve efficient path turning and obstacle avoidance.
By presetting multiple sets of speed parameters, it is determined that the robot can turn to the same direction as the target turning point within the preset time period, and filter the optimal speed parameters to achieve smooth steering and efficient walking, while judging and avoiding temporary obstacles.
It improves the efficiency and smoothness of robot walking, enhances robustness, and reduces dependence on real-time pose information and obstacles, improving the overall efficiency of path planning and walking.
Smart Images

Figure CN114879662B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of terminal equipment, and in particular to a path walking method, system, terminal equipment and storage medium. Background Art
[0002] At present, sweeping robots mainly clean based on grid maps. When the robot walks from point A to point B, it can directly calculate the grid coordinate array that it needs to pass through through various algorithms.
[0003] How to find an efficient path based on these grid coordinates has always been a common concern. If each grid coordinate is traversed in sequence, the robot's path will have too many turns and low efficiency; if only smoothing is done at the turning points between grids, it is impossible to predict the angle that the machine needs to adjust at the next moment when adjusting the wheel speed, making it difficult for the machine to turn smoothly.
[0004] In summary, the existing planning methods for robot walking paths have the problems of complex calculation methods and low walking efficiency. Summary of the invention
[0005] The main purpose of the present invention is to provide a path walking method, system, terminal device and storage medium, aiming to improve the walking efficiency of a robot when walking.
[0006] To achieve the above object, the present invention provides a path walking method, the path walking comprising:
[0007] S10, determining whether there is a target turning point that can be directly reached in the path coordinate array preset in the grid map;
[0008] S20, if yes, preset multiple groups of speed parameters, and determine whether it is possible to turn to a direction consistent with the target turning point direction within a preset time period based on the multiple groups of speed parameters;
[0009] S30, if it is determined based on the multiple groups of speed parameters that the vehicle can turn to the travel direction consistent with the target turning point direction within the preset time period, then determine the target speed parameter, and select the optimal speed parameter from the multiple groups of target speed parameters, so as to walk according to the travel direction and the optimal speed parameter, and determine whether there is a temporary obstacle in the walking path;
[0010] S40: If the temporary obstacle exists in the walking path, then executing step S10 when the temporary obstacle can be avoided until reaching the end point coordinates in the path coordinate array.
[0011] Optionally, the step of selecting an optimal speed parameter from the multiple groups of target speed parameters comprises:
[0012] Based on the difference between the two wheel speeds of the robot, the sum of the two wheel speeds of the robot, and the time / distance traveled corresponding to when the travel direction is consistent with the target turning point direction, the optimal speed parameter is selected from multiple groups of the target speed parameters.
[0013] Optionally, after the step of determining whether there is a temporary obstacle in the walking path, the method further includes:
[0014] If the temporary obstacle does not exist in the walking path, the walking continues in the walking direction while waiting for the turning point to be updated, so as to execute step S10 based on the updated turning point until the end point coordinates are reached.
[0015] Optionally, after the step of if the temporary obstacle exists in the walking path and before the step of performing step S10 when the temporary obstacle can be avoided, the method further includes:
[0016] Taking the current position of the robot as the center of the circle and determining the search radius based on the distance between the temporary obstacle and the current position;
[0017] A search area is constructed according to the center of the circle and the search radius, and whether the temporary obstacle can be avoided is determined within the search area.
[0018] Optionally, determining whether the temporary obstacle can be avoided within the search area includes:
[0019] A search is performed in the search area according to a preset detection angle to determine whether the temporary obstacle can be avoided based on the current detection angle, so that when the temporary obstacle can be avoided, a temporary turning point is determined according to the current detection angle and the search radius.
[0020] Optionally, after the step of determining whether there is a temporary obstacle in the walking path, the method further includes:
[0021] If there is a temporary obstacle in the walking path and it is impossible to avoid the temporary obstacle, the path coordinate array is determined again with walking to the temporary obstacle as the starting point, so as to enter step S10 again for walking based on the path coordinate array.
[0022] Optionally, before the step of determining whether there is a directly accessible target turning point in the path coordinate array preset in the grid map, the method further includes:
[0023] The preset initial path coordinate array is pruned to obtain the path coordinate array, wherein the path coordinate array includes valid inflection points.
[0024] Optionally, the step of determining whether there is a directly accessible target turning point in the path coordinate array preset in the grid map includes:
[0025] By searching from the end to the beginning, it is determined whether there is a directly accessible target turning point from the multiple valid turning points in the path coordinate array.
[0026] To achieve the above object, the present invention further provides a path walking system, the path walking system comprising:
[0027] The first determination module is used to determine whether there is a target turning point that can be directly reached in the path coordinate array preset in the grid map;
[0028] A second determination module is used to preset multiple groups of speed parameters, and determine whether it is possible to turn to a direction consistent with the target turning point direction within a preset time period based on the multiple groups of speed parameters;
[0029] A judgment module, used to determine a target speed parameter, and select an optimal speed parameter from multiple groups of the target speed parameters, so as to walk according to the travel direction and the optimal speed parameter, and to judge whether there is a temporary obstacle in the walking path;
[0030] The avoidance module is used to execute step S10 when the temporary obstacle can be avoided until the end point coordinates in the path coordinate array are reached.
[0031] Among them, each functional module of the path walking system of the present invention implements the steps of the path walking method described above during operation.
[0032] To achieve the above-mentioned purpose, the present invention also provides a terminal device, which includes: a memory, a processor, and a path walking program stored in the memory and executable on the processor, and the path walking program implements the steps of the path walking method described above when executed by the processor.
[0033] In addition, to achieve the above-mentioned purpose, the present invention also proposes a storage medium containing computer executable instructions, on which a path walking program is stored, and when the path walking program is executed by a processor, the steps of the path walking method described above are implemented.
[0034] In addition, to achieve the above-mentioned purpose, the present invention also provides a computer program product, wherein the computer program product includes a computer program, and when the computer program is executed by a processor, the steps of the path walking method described above are implemented.
[0035] The present invention provides a path walking method, system, terminal device, storage medium and computer program product. The path walking method comprises the following steps: S10, determining whether there is a target turning point that can be directly reached in a path coordinate array preset in a grid map; S20, if yes, presetting multiple groups of speed parameters, and determining whether it is possible to turn to a travel direction consistent with the direction of the target turning point within a preset time length based on the multiple groups of speed parameters; S30, if it is determined based on the multiple groups of speed parameters that it is possible to turn to a travel direction consistent with the direction of the target turning point within the preset time length, determining the target speed parameter, and selecting the optimal speed parameter from the multiple groups of target speed parameters, so as to walk according to the travel direction and the optimal speed parameter, and determining whether there is a temporary obstacle in the walking path; S40, if there is the temporary obstacle in the walking path, executing step S10 when the temporary obstacle can be avoided, until the end point coordinates in the path coordinate array are reached.
[0036] Compared with the walking method of the robot using grid traversal or smoothing at the turning points between grids in the prior art, the present invention presets multiple sets of speed parameters, predetermines the walking trajectory and robot orientation of the robot, ensures that the robot can turn to the direction of the target turning point within a preset time, and reaches the end coordinates in the path coordinate array in the most efficient walking method, while continuing to judge whether there are temporary obstacles in the process of going to the target turning point, ensuring the smooth walking of the robot. Therefore, the present invention proposes a robot walking strategy, which realizes smooth turning during the robot's walking process by pre-aiming whether the robot's orientation in the walking trajectory and the direction of the target turning point overlap, and has stronger robustness, and does not have high requirements on the robot's posture information and real-time obstacles during the walking process. On this basis, the present invention further improves the efficiency of robot path planning and walking. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] Figure 1 A schematic diagram of the structure of the hardware operating environment involved in the embodiment of the present invention;
[0038] Figure 2 A schematic diagram of a flow chart of an embodiment of a path walking method of the present invention;
[0039] Figure 3 This is a schematic diagram of the functional modules of an embodiment of a path walking system of the present invention.
[0040] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0041] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.
[0042] like Figure 1 As shown, Figure 1 It is a schematic diagram of the device structure of the hardware operating environment involved in the embodiment of the present invention.
[0043] It should be noted that the terminal device in the embodiment of the present invention may be a terminal device for implementing data extraction from multiple types of data sources, and the terminal device may specifically be a robot or the like.
[0044] like Figure 1 As shown, the device may include: a processor 1001, such as a CPU, a network interface 1004, a user interface 1003, a memory 1005, and a communication bus 1002. Among them, the communication bus 1002 is used to realize the connection and communication between these components. The user interface 1003 may include a display screen (Display), an input unit such as a keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface). The memory 1005 may be a high-speed RAM memory, or a stable memory (non-volatile memory), such as a disk memory. The memory 1005 may also be a storage device independent of the aforementioned processor 1001.
[0045] Those skilled in the art will understand that Figure 1 The device structure shown in the figure does not constitute a limitation of the device, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.
[0046] like Figure 1 As shown, the memory 1005 as a computer storage medium may include an operating system, a network communication module, a user interface module, and a path walking program. The operating system is a program that manages and controls the hardware and software resources of the device and supports the operation of the path walking program and other software or programs. Figure 1 In the device shown, the user interface 1003 is mainly used for data communication with the client; the network interface 1004 is mainly used for establishing a communication connection with the server; and the processor 1001 can be used to call the path walking program stored in the memory 1005 and perform the following operations:
[0047] S10, determining whether there is a target turning point that can be directly reached in the path coordinate array preset in the grid map;
[0048] S20, if yes, preset multiple groups of speed parameters, and determine whether it is possible to turn to a direction consistent with the target turning point direction within a preset time period based on the multiple groups of speed parameters;
[0049] S30, if it is determined based on the multiple groups of speed parameters that the vehicle can turn to the travel direction consistent with the target turning point direction within the preset time period, then determine the target speed parameter, and select the optimal speed parameter from the multiple groups of target speed parameters, so as to walk according to the travel direction and the optimal speed parameter, and determine whether there is a temporary obstacle in the walking path;
[0050] S40: If the temporary obstacle exists in the walking path, then executing step S10 when the temporary obstacle can be avoided until reaching the end point coordinates in the path coordinate array.
[0051] Furthermore, the processor 1001 may also be used to call a path walking program stored in the memory 1005, and perform the following operations:
[0052] Based on the difference between the two wheel speeds of the robot, the sum of the two wheel speeds of the robot, and the time / distance traveled corresponding to when the travel direction is consistent with the target turning point direction, the optimal speed parameter is selected from multiple groups of the target speed parameters.
[0053] Further, after the step of determining whether there is a temporary obstacle in the walking path, the processor 1001 may also be used to call the path walking program stored in the memory 1005, and perform the following operations:
[0054] If the temporary obstacle does not exist in the walking path, the walking continues in the walking direction while waiting for the turning point to be updated, so as to execute step S10 based on the updated turning point until the end point coordinates are reached.
[0055] Further, after the step of if the temporary obstacle exists in the walking path and before the step of executing step S10 when the temporary obstacle can be avoided, the processor 1001 may also be used to call a path walking program stored in the memory 1005, and further perform the following operations:
[0056] Taking the current position of the robot as the center of the circle and determining the search radius based on the distance between the temporary obstacle and the current position;
[0057] A search area is constructed according to the center of the circle and the search radius, and whether the temporary obstacle can be avoided is determined within the search area.
[0058] Furthermore, the processor 1001 may also be used to call a path walking program stored in the memory 1005, and perform the following operations:
[0059] A search is performed in the search area according to a preset detection angle to determine whether the temporary obstacle can be avoided based on the current detection angle, so that when the temporary obstacle can be avoided, a temporary turning point is determined according to the current detection angle and the search radius.
[0060] Further, after the step of determining whether there is a temporary obstacle in the walking path, the processor 1001 may also be used to call the path walking program stored in the memory 1005, and perform the following operations:
[0061] If there is a temporary obstacle in the walking path and it is impossible to avoid the temporary obstacle, the path coordinate array is determined again with walking to the temporary obstacle as the starting point, so as to enter step S10 again for walking based on the path coordinate array.
[0062] Furthermore, before the step of determining whether there is a directly accessible target turning point in the path coordinate array preset in the grid map, the processor 1001 may also be used to call a path walking program stored in the memory 1005, and further perform the following operations:
[0063] The preset initial path coordinate array is pruned to obtain the path coordinate array, wherein the path coordinate array includes valid inflection points.
[0064] Furthermore, the processor 1001 may also be used to call a path walking program stored in the memory 1005, and perform the following operations:
[0065] By searching from the end to the beginning, it is determined whether there is a directly accessible target turning point from the multiple valid turning points in the path coordinate array.
[0066] Reference Figure 2 , Figure 2 Schematic diagram of the flow chart of the first embodiment of the path walking method of the present invention.
[0067] In this embodiment, an embodiment of a path walking method is provided. It should be noted that although a logical order is shown in the flow chart, in some cases, the steps shown or described may be executed in a different order than that shown here.
[0068] Step S10, determining whether there is a target turning point that can be directly reached in the path coordinate array preset in the grid map;
[0069] When the robot walks from the starting point to the end point according to the grid map, it needs to predetermine the walking path coordinate array, and further obtain the target turning point that can be directly reached from the path coordinate array, so as to adjust the robot's direction and go straight to the target turning point.
[0070] Step S20: If yes, preset multiple groups of speed parameters, and determine whether it is possible to turn to a direction consistent with the target turning point direction within a preset time period based on the multiple groups of speed parameters;
[0071] It should be noted that in this embodiment, the speed parameter includes linear speed and angular speed. After the robot determines that there is a directly accessible target turning point in the path coordinate array, in order to reach the target turning point faster, it will preset multiple sets of linear speeds and multiple sets of angular speeds.
[0072] Specifically, for example, after presetting multiple sets of speed parameters, the robot will calculate the walking trajectory of the robot and the orientation of the robot on the trajectory within the preset time period according to the multiple sets of speed parameters, and further calculate whether the orientation of the robot at each position on the trajectory coincides with the target turning point direction. If the orientation of the robot coincides with the target turning point direction at a certain moment, it is considered that the robot can turn to the direction of the path consistent with the target turning point direction within the preset time period to walk in the direction of the path. In this embodiment, the preset time period is not specifically limited, and the preset time period can be specifically set according to the robot walking scene. For example, the preset time period can be set to 3s to determine whether the robot can turn to the direction of the path consistent with the target turning point direction within 3s.
[0073] It should be noted that, in this embodiment, the robot orientation and the target turning point direction are both based on the coordinate axis as a reference, and the target turning point direction is the angle between the line between the current position of the robot and the target turning point and the coordinate axis.
[0074] Step S30, if it is determined based on the multiple groups of speed parameters that the vehicle can turn to the direction consistent with the target turning point direction within the preset time period, a target speed parameter is determined, and an optimal speed parameter is selected from the multiple groups of target speed parameters to walk according to the direction of the vehicle and the optimal speed parameter, and it is determined whether there is a temporary obstacle in the walking path;
[0075] When the robot determines whether it can turn to a moving direction consistent with the target turning point direction within a preset time length based on multiple sets of speed parameters, if it is judged that it can turn to a moving direction consistent with the target turning point direction within the preset time length, then the corresponding speed parameter at this time can be used as the target speed parameter, that is, under the target speed parameter, the robot can turn to a moving direction consistent with the target turning point direction within the preset time length.
[0076] It should be noted that in this embodiment, there are far more than one set of speed parameters that can enable the robot to turn to the direction of the target turning point within a preset time. In order to improve the walking efficiency of the robot and enable the robot to reach the end point quickly, it is necessary to further select the optimal speed parameter from multiple sets of target speed parameters to walk in the direction of the path and the optimal speed parameter to the target turning point. At the same time, in the process of going to the target turning point, it is estimated that people need to judge whether there are temporary obstacles in the walking path to avoid the situation where the robot cannot walk due to the appearance of temporary obstacles.
[0077] Furthermore, in the above step S30, “selecting the optimal speed parameter from the multiple groups of target speed parameters” may include:
[0078] Step S301, based on the difference between the two wheel speeds of the robot, the sum of the two wheel speeds of the robot, and the time corresponding to when the travel direction is consistent with the target turning point direction or the traveled distance, select the optimal speed parameter from multiple groups of the target speed parameters.
[0079] It should be noted that in this embodiment, after obtaining multiple sets of target speed parameters that enable the robot to turn to a travel direction consistent with the target turning point direction within a preset time, in order to further improve the walking efficiency of the robot, it is necessary to screen the multiple sets of target speed parameters to obtain the optimal speed parameter, so as to walk according to the optimal speed parameter. In this embodiment, it is necessary to comprehensively consider three factors: the difference between the wheel speeds of the two wheels of the robot, the sum of the wheel speeds of the two wheels of the robot, and the time or distance traveled when the travel direction of the robot is consistent with the target turning point direction, so as to determine the optimal speed parameter.
[0080] Specifically, for example, the difference between the two wheel speeds of the robot is as small as possible to ensure the stability of the robot during walking; the sum of the two wheel speeds of the robot is as large as possible to improve the walking efficiency of the robot; the time corresponding to the direction of the robot's movement is consistent with the direction of the target turning point is as early as possible or the distance traveled when the direction of the robot's movement is consistent with the direction of the target turning point is as short as possible, so as to turn to the direction of the movement consistent with the target turning point as soon as possible. In this embodiment, after comprehensively considering the above three factors, the optimal speed parameter that meets the conditions is obtained, that is, the combination of the optimal linear speed and the optimal angular speed, and the robot will move to the target turning point at the optimal speed parameter.
[0081] Step S40: If the temporary obstacle exists in the walking path, then executing step S10 when the temporary obstacle can be avoided until reaching the end point coordinates in the path coordinate array.
[0082] When the robot walks in the direction consistent with the target turning point and with the optimal speed parameters, it is necessary to further determine whether there is an obstacle in the walking path, and continue to execute step S10 when the obstacle can be avoided, that is, to determine again whether there is a target turning point that can be directly reached in the path coordinate array.
[0083] It should be noted that, in this embodiment, although it has been predetermined in step 10 that the robot can reach the target turning point directly, that is, it will not encounter obstacles during walking, but in order to avoid the reduction of the robot's walking efficiency caused by temporary obstacles during walking or errors in the robot's path calculation, it is necessary to continue to determine whether there are obstacles during walking to further improve the robot's walking efficiency.
[0084] In this embodiment, when the robot walks from the starting point to the end point according to the grid map, it is necessary to predetermine the walking path coordinate array, and further obtain the target turning point that can be directly reached from the path coordinate array. After presetting multiple sets of speed parameters, the robot will calculate the walking trajectory of the robot and the direction of the robot on the trajectory within the preset time length according to the multiple sets of speed parameters, and further calculate whether the direction of the robot at each position on the trajectory coincides with the direction of the target turning point. If the direction of the robot coincides with the direction of the target turning point at a certain moment, it is considered that the robot can turn to the direction of the path consistent with the direction of the target turning point within the preset time length, and the speed parameter of the robot at this time can be used as the target speed parameter. In order to further improve the walking efficiency of the robot, it is necessary to screen multiple sets of target speed parameters. The screening principle is: the difference between the two wheel speeds of the robot is as small as possible to ensure the stability of the robot during walking; the sum of the two wheel speeds of the robot is as large as possible to improve the walking efficiency of the robot; the time corresponding to the direction of the robot's movement is consistent with the direction of the target turning point is as early as possible or the distance traveled when the direction of the robot's movement is consistent with the direction of the target turning point is as short as possible, so as to turn to the direction of movement consistent with the target turning point as soon as possible. In this embodiment, the optimal speed parameters that meet the conditions are obtained after comprehensively considering the above three factors.
[0085] Compared with the walking method of the robot in the prior art that adopts grid traversal or smoothing at the turning points between grids, the present invention presets multiple sets of speed parameters, predetermines the walking trajectory and robot orientation of the robot, ensures that the robot can turn to the direction of the target turning point within a preset time, and reach the end coordinates in the path coordinate array in the most efficient walking manner, while continuing to judge whether there are temporary obstacles in the process of going to the target turning point, thereby ensuring the smooth walking of the robot. Therefore, the present invention proposes a robot walking strategy, which realizes smooth turning during the robot's walking process by pre-aiming whether the robot orientation in the walking trajectory and the target turning point direction coincide, and has stronger robustness, and does not have high requirements on the robot's posture information and real-time obstacles during walking. On this basis, the present invention further improves the efficiency of robot path planning and walking.
[0086] Furthermore, based on the first embodiment of the path walking method of the present invention, a second embodiment of the path walking method of the present invention is proposed.
[0087] The difference between this embodiment and the first embodiment is that, after the above step S30 of "determining whether there is a temporary obstacle in the walking path", it also includes:
[0088] Step S50: If the temporary obstacle does not exist in the walking path, continue walking in the walking direction while waiting for the turning point to be updated, and execute step S10 based on the updated turning point until reaching the end point coordinates.
[0089] When the robot determines to walk in the direction and optimal speed parameters consistent with the direction of the target turning point, and when it determines that there are no obstacles in the walking path, it locks the direction of travel and continues walking until it detects that the turning point is updated, and based on the updated turning point, it determines again whether there is a target turning point that can be directly reached in the path coordinate array preset in the grid map, so as to finally reach the end coordinates in the path coordinate array.
[0090] Furthermore, after the above step S30 of “determining whether there is a temporary obstacle in the walking path”, the following steps are further included:
[0091] Further, after the above step S40, “if the temporary obstacle exists in the walking path” and before “execute step S10 when the temporary obstacle can be avoided”, the method further includes:
[0092] Step S60, taking the current position of the robot as the center of the circle and determining the search radius based on the distance between the temporary obstacle and the current position;
[0093] Step S70: construct a search area according to the center of the circle and the search radius, and determine whether the temporary obstacle can be avoided within the search area.
[0094] When the robot determines that there is a temporary obstacle in the walking path, in order to achieve efficient obstacle avoidance, the robot first calculates the distance R between the current position of the robot and the temporary obstacle, and takes R+2 (2 is two unit grids) as the radius. On this basis, a fan-shaped area of plus or minus 45 degrees in front of the robot is drawn, and the fan-shaped area is used as the search area to determine whether the temporary obstacle can be avoided within the fan-shaped search area.
[0095] Furthermore, in the above step S70, the step of “determining whether the temporary obstacle can be avoided in the search area” includes:
[0096] Step S701, searching in the search area according to a preset detection angle to determine whether the temporary obstacle can be avoided based on the current detection angle, so as to determine a temporary turning point according to the current detection angle and the search radius when the temporary obstacle can be avoided.
[0097] It should be noted that, in this embodiment, the preset detection angle is not specifically limited, and an example of a detection angle of 5 degrees is used for illustration.
[0098] After the robot determines that the fan-shaped area is the search area, it starts with the current direction of the robot and increases the detection angle by 5 degrees to detect whether there are obstacles at each angle. In this embodiment, the robot's search range is If there are temporary obstacles in the walking path, the robot will further perform precise scanning, starting from the current orientation of the robot, and detect whether there are obstacles on both sides at an increment of 5°, and determine the angle when there are no obstacles. Then, the temporary turning point X is determined based on the search radius R+2 at this time and the orientation angle of the robot when it detects that there are no obstacles. 0 It is worth noting that in this embodiment, when the robot detects whether there are temporary obstacles in the search area, in addition to the detection method of starting with the current direction and performing incremental detection at every 5° on both sides, in this embodiment, it can also start with the current direction and perform incremental detection at every 5° on the areas on both sides. This detection method can further improve the detection efficiency and quality of temporary obstacles.
[0099] Specifically, for example, the robot detects that there is an obstacle in the walking path, and the robot's orientation angle is α. If it detects that there is no obstacle after increasing by 10 degrees, the robot's orientation angle becomes (α+10). At this time, the temporary turning point X 0The relative coordinates can be expressed as [cos(α+10)(R+2), sin(α+10)(R+2)], when the coordinates of the robot's current position in the coordinate system are O(x 0 ,y 0 ), then the temporary inflection point X 0 The coordinates can be expressed as [x 0+ cos(α+10)(R+2),y 0+ sin(α+10)(R+2)] Then, step S10 is performed, that is, based on the temporary inflection point X 0 It is determined again whether there is a target turning point that can be directly reached in the preset path coordinate array in the grid map.
[0100] It should be noted that, in this embodiment, the temporary turning point X is determined according to the robot orientation angle, the current detection angle and the search radius. 0 After the relative coordinates are obtained, in addition to being able to determine the temporary turning point X according to the coordinates of the robot's current position in the coordinate system 0 The coordinates of the temporary turning point X can be determined again to determine whether there is a target turning point that can be reached directly in the preset path coordinate array in the grid map. 0 After the relative coordinates of the temporary inflection point X 0 The relative coordinates of the grid map are used to determine whether there is a target turning point that can be reached directly in the path coordinate array preset in the grid map.
[0101] Step S80: If there is a temporary obstacle in the walking path and the temporary obstacle cannot be avoided, the path coordinate array is determined again with walking to the temporary obstacle as the starting point, so as to enter step S10 again for walking based on the path coordinate array.
[0102] It should be noted that in this embodiment, when the robot determines to walk in a direction consistent with the target turning point and with the optimal speed parameters, and when it determines that there are obstacles in the walking path, there are two situations: being able to avoid temporary obstacles and being unable to avoid temporary obstacles.
[0103] Specifically, for example, if obstacles can be detected in the entire fan-shaped search area, it is considered that the obstacles are too large and exceed the machine's dynamic obstacle avoidance capabilities. At this time, there is no need to update the turning point. The robot will walk to the temporary obstacle and use the temporary obstacle as the starting point to INIT all processes and determine the path coordinate array again to walk based on the recalculated path coordinate array.
[0104] Furthermore, before the above step S10 of "determining whether there is a target turning point that can be directly reached in the preset path coordinate array in the grid map", it also includes:
[0105] Step S90, pruning the preset initial path coordinate array to obtain the path coordinate array, wherein the path coordinate array includes valid inflection points.
[0106] It should be noted that, in this embodiment, adjacent grid points of an obstacle can be used as inflection points, and effective inflection points are determined in a distance-first manner, and the pruning process is to determine effective inflection points with optimal distance.
[0107] The machine first uses the grid map to calculate a passable path array. The coordinate points stored in this array are not adjacent coordinates, but valid turning points obtained after pruning; for example, A is (0,0), B is (10,10), and the coordinate (5,5) is an obstacle point. At this time, the pruned array is arr{(0,0), (6,4), (10,10)}. It should be noted that the path coordinate data obtained after pruning can include at least one valid turning point. After obtaining the pruned path array, the machine will officially start walking. In this embodiment, the number of valid turning points is not specifically limited.
[0108] Furthermore, in the above step S10, "determining whether there is a target turning point that can be directly reached in the path coordinate array preset in the grid map" may include:
[0109] Step S101, determining whether there is a directly accessible target turning point from the plurality of valid turning points in the path coordinate array by traversing the path from the end to the beginning.
[0110] The robot searches from the end to the beginning to find out whether there is a target turning point that can be reached directly from the current position among the multiple valid turning points in the path coordinate array, that is, whether there is no obstacle in the walking path when going straight to the target turning point.
[0111] In this embodiment, when the robot judges that it is walking in accordance with the path direction and the optimal speed parameter consistent with the direction of the target turning point, when it judges that there is no obstacle in the walking path, it locks the path direction and continues to walk until the turning point is detected to be updated, and based on the updated turning point, it is determined again whether there is a target turning point that can be directly reached in the preset path coordinate array in the grid map, so as to finally reach the end point coordinate in the path coordinate array. When the robot judges that there is a temporary obstacle in the walking path, in order to achieve efficient obstacle avoidance, the robot first calculates the distance R between the current position of the robot and the temporary obstacle, and takes R+2 (2 is two grid units) as the radius, and on this basis draws a fan-shaped area of plus or minus 45 degrees in front of the robot, and uses the fan-shaped area as the search area to determine whether the temporary obstacle can be avoided in the fan-shaped search area. If the entire fan-shaped search area can detect obstacles, it is considered that the obstacle is too large and exceeds the ability of the machine to dynamically avoid obstacles. At this time, there is no need to update the turning point. When the machine hits the obstacle, all processes INIT, and recalculates the path coordinate array, so as to walk based on the recalculated path coordinate array. In addition, the robot can determine the directly accessible target turning point from multiple valid turning points through pruning technology.
[0112] In the present invention, when the robot is heading to the target turning point, it still needs to determine whether there is a temporary obstacle in the walking path and whether it can avoid the temporary obstacle. Therefore, the present invention realizes the flexible walking of the robot, has stronger robustness, and further improves the efficiency of the robot's path planning and walking.
[0113] In addition, the embodiment of the present invention also provides a path walking system, referring to Figure 3 , Figure 3 This is a functional module diagram of an embodiment of the path walking of the present invention. Figure 3 As shown, the path walking system of the present invention comprises:
[0114] The first determination module 10 is used to determine whether there is a target turning point that can be directly reached in the path coordinate array preset in the grid map;
[0115] A second determination module 20, for presetting a plurality of groups of speed parameters, and determining whether it is possible to turn to a direction consistent with the target turning point direction within a preset time period based on the plurality of groups of speed parameters;
[0116] The judging module 30 is used to determine the target speed parameter and select the optimal speed parameter from the multiple groups of the target speed parameters, so as to walk according to the travel direction and the optimal speed parameter, and to judge whether there is a temporary obstacle in the walking path;
[0117] The avoidance module 40 is used to determine whether there is a target turning point that can be directly reached in the path coordinate array preset in the grid map when the temporary obstacle can be avoided, until the end point coordinates in the path coordinate array are reached.
[0118] The judging module 30 comprises:
[0119] The screening unit is used to screen the optimal speed parameter from multiple groups of target speed parameters based on the difference between the wheel speeds of the two wheels of the robot, the sum of the wheel speeds of the two wheels of the robot, and the time / distance traveled when the travel direction is consistent with the direction of the target turning point.
[0120] The path walking system further includes:
[0121] The waiting inflection point update module is used to continue walking in the walking direction if the temporary obstacle does not exist in the walking path, and wait for the inflection point to be updated, so as to execute step S10 based on the updated inflection point until the end point coordinates are reached.
[0122] The path walking system further includes:
[0123] A search radius determination module is used to determine the search radius based on the distance between the temporary obstacle and the current position, taking the current position of the robot as the center of the circle;
[0124] A search area construction module is used to construct a search area according to the center of the circle and the search radius, and determine whether the temporary obstacle can be avoided within the search area.
[0125] Furthermore, the search area construction module includes:
[0126] The search unit is used to search in the search area according to a preset detection angle to determine whether the temporary obstacle can be avoided based on the current detection angle, so as to determine a temporary turning point according to the current detection angle and the search radius when the temporary obstacle can be avoided.
[0127] The path walking system further includes:
[0128] The program initialization module is used to determine the path coordinate array again by taking walking to the temporary obstacle as the starting point if there is a temporary obstacle in the walking path and the temporary obstacle cannot be avoided, so as to enter step S10 again for walking based on the path coordinate array.
[0129] The path walking system further includes:
[0130] The pruning module is used to prune the preset initial path coordinate array to obtain the path coordinate array, wherein the path coordinate array includes valid inflection points.
[0131] The first determining module 10 comprises:
[0132] The determination unit is used to determine whether there is a directly accessible target turning point from the multiple valid turning points in the path coordinate array by traversing from the end to the beginning.
[0133] The specific implementation of each functional module of the path walking system of the present invention is basically the same as the various embodiments of the path walking method described above, and will not be described in detail here.
[0134] In addition, an embodiment of the present invention further proposes a computer-readable storage medium, on which a path walking program is stored. When the path walking program is executed by a processor, the steps of the path walking method described above are implemented.
[0135] The various embodiments of the path walking system and the computer-readable storage medium of the present invention may all refer to the various embodiments of the path walking method of the present invention, and will not be described in detail here.
[0136] In addition, an embodiment of the present invention further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the steps of the path walking method described in any embodiment of the above path walking method are implemented.
[0137] The specific embodiments of the computer program product of the present invention are basically the same as the embodiments of the above-mentioned path walking method, and will not be described in detail here.
[0138] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.
[0139] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0140] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods 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 such an understanding, the technical solution of the present invention, 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, a magnetic disk, or an optical disk), and includes a number of instructions for enabling a terminal device (which can be a robot, etc.) to execute the methods described in each embodiment of the present invention.
[0141] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A path walking method, characterized in that: The path walking method is applied to a robot, and the path walking method comprises the following steps: S10, determining whether there is a target turning point that can be directly reached in the path coordinate array preset in the grid map; S20, if yes, preset multiple groups of speed parameters, and determine whether it is possible to turn to a direction consistent with the target turning point direction within a preset time period based on the multiple groups of speed parameters; S30, if it is determined based on the multiple groups of speed parameters that the vehicle can turn to the travel direction consistent with the target turning point direction within the preset time period, then determine the target speed parameter, and select the optimal speed parameter from the multiple groups of target speed parameters, so as to walk according to the travel direction and the optimal speed parameter, and determine whether there is a temporary obstacle in the walking path; S40, if the temporary obstacle exists in the walking path, executing step S10 when the temporary obstacle can be avoided until the end point coordinates in the path coordinate array are reached; After the step of if the temporary obstacle exists in the walking path and before the step of performing step S10 when the temporary obstacle can be avoided, the method further includes: Taking the current position of the robot as the center of the circle, and determining the search radius based on the distance between the temporary obstacle and the current position of the robot; A search area is constructed according to the circle center and the search radius to determine whether the temporary obstacle can be avoided within the search area.
2. The path walking method according to claim 1, characterized in that: The step of selecting the optimal speed parameter from the multiple groups of target speed parameters comprises: The optimal speed parameter is selected from multiple groups of target speed parameters according to the difference between the two wheel speeds of the robot, the sum of the two wheel speeds of the robot, and the time / distance traveled when the current movement direction of the robot is consistent with the direction of the target turning point.
3. The path walking method according to claim 1, characterized in that: After the step of determining whether there is a temporary obstacle in the walking path, the method further includes: If the temporary obstacle does not exist in the walking path, the walking continues in the walking direction while waiting for the turning point to be updated, so as to execute step S10 based on the updated turning point until the end point coordinates are reached.
4. The path walking method according to claim 1, characterized in that: The determining whether the temporary obstacle can be avoided in the search area includes: A search is performed in the search area according to a preset detection angle to determine whether the temporary obstacle can be avoided based on the current detection angle, so that when the temporary obstacle can be avoided, a temporary turning point is determined according to the current detection angle and the search radius.
5. The path walking method according to claim 1, characterized in that: After the step of determining whether there is a temporary obstacle in the walking path, the method further includes: If there is a temporary obstacle in the walking path and it is impossible to avoid the temporary obstacle, the path coordinate array is determined again with walking to the temporary obstacle as the starting point, so as to enter step S10 again for walking based on the path coordinate array.
6. The path walking method according to claim 1, characterized in that: Before the step of determining whether there is a directly accessible target turning point in the path coordinate array preset in the grid map, the method further includes: The preset initial path coordinate array is pruned to obtain the path coordinate array, wherein the path coordinate array includes valid inflection points.
7. The path walking method according to claim 6, characterized in that: The step of determining whether there is a directly accessible target turning point in the path coordinate array preset in the grid map includes: By searching from the end to the beginning, it is determined whether there is a directly accessible target turning point from the multiple valid turning points in the path coordinate array.
8. A path walking system, characterized in that: The path walking system comprises: The first determination module is used to determine whether there is a target turning point that can be directly reached in the path coordinate array preset in the grid map; A second determination module is used to preset multiple groups of speed parameters, and determine whether it is possible to turn to a direction consistent with the target turning point direction within a preset time period based on the multiple groups of speed parameters; A judgment module, used to determine a target speed parameter, and select an optimal speed parameter from multiple groups of the target speed parameters, so as to walk according to the travel direction and the optimal speed parameter, and to judge whether there is a temporary obstacle in the walking path; An avoidance module, used for determining whether there is a target turning point that can be directly reached in the path coordinate array preset in the grid map when the temporary obstacle can be avoided, until the end point coordinates in the path coordinate array are reached; The avoidance module is further configured to, after the step of determining if the temporary obstacle exists in the walking path and before the step of determining whether there is a target turning point that can be directly reached in the path coordinate array preset in the grid map when the temporary obstacle can be avoided, further include: Taking the current position of the robot as the center of the circle, and determining the search radius based on the distance between the temporary obstacle and the current position of the robot; A search area is constructed according to the circle center and the search radius to determine whether the temporary obstacle can be avoided within the search area.
9. A terminal device, characterized in that: The terminal device includes a memory, a processor, and a path walking program stored in the memory and executable on the processor, and the path walking program, when executed by the processor, implements the steps of the path walking method as described in any one of claims 1 to 7.
10. A storage medium containing computer executable instructions, characterized in that: The storage medium stores a path walking program, and when the path walking program is executed by the processor, the steps of the path walking method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Edgewise path selection method for robot obstacle crossing, chip, and robot
WO2022000961A1