Robot walking control method and device and robot

Through local maps and preset path planning algorithms, combined with obstacle expansion layer and trajectory algorithms, the obstacle collision problem caused by insufficient global map accuracy is solved, and dynamic obstacle avoidance and efficient path planning of the robot during walking is realized.

CN120469412APending Publication Date: 2025-08-12SHENZHEN YUNSHI ROBOT CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510513699.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-23
Publication Date
2025-08-12

AI Technical Summary

Technical Problem

During the walking process, the indoor robot cannot ensure that all obstacle information is contained in the global map due to the limited map construction accuracy, which causes the path planning to avoid all obstacles, causing the robot to collide with the obstacle and stop.

Method used

The local map is combined with preset path planning algorithm and trajectory algorithm to re-plan the robot path to avoid obstacles, and judge the path through the obstacle expansion layer. The A* algorithm is used to optimize the path planning, and the walking trajectory is determined in combination with the robot speed parameters to achieve dynamic obstacle avoidance.

Benefits of technology

It effectively realizes that the robot avoids obstacles during walking, saves computing resources, and improves the accuracy and efficiency of path planning.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120469412A_ABST
    Figure CN120469412A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of robots, and discloses a robot walking control method and device and a robot, and the method comprises the steps: if the robot passes through an obstacle region when it is determined that the robot walks according to a current first path in a local map, carrying out the re-planning of the first path according to a preset path planning algorithm, so as to form a second path, updating the second path to the global path; if the robot cannot walk linearly between the current coordinate point of the robot and the terminal point of the current sub-path, determining a corresponding walking track from the current coordinate point of the robot to the terminal point of the current sub-path according to a preset track algorithm; wherein the current sub-path is a section of path in the first path or the second path; and controlling the robot to walk according to the walking track so that the robot avoids the obstacle. Through the method, the robot can realize dynamic collision avoidance.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of robotics technology, and in particular to a robot walking control method, device, and robot. Background Art

[0002] Indoor robots often encounter obstacles while moving. However, due to limited mapping accuracy, it's impossible to ensure that all obstacle information is included in the global map. This often causes the robot to stop when encountering obstacles. For example, a sweeping robot often needs to plan a path and move to areas that have not been cleaned or those specified by the user. Without comprehensive obstacle information in the path planning, it's difficult to ensure that the planned path avoids all obstacles. This can ultimately cause the sweeping robot to collide with an obstacle and stop, preventing it from reaching its destination. Summary of the Invention

[0003] In view of this, embodiments of the present application provide a robot walking control method, device, and robot to achieve dynamic collision avoidance of the robot.

[0004] In a first aspect, an embodiment of the present application provides a robot walking control method, comprising:

[0005] If it is determined that the robot passes through an obstacle area while walking along the current first path in the local map, replan the first path according to a preset path planning algorithm to form a second path, and update the second path into the global path;

[0006] If the robot cannot walk in a straight line between the current coordinate point of the robot and the end point of the current sub-path, determine a walking trajectory corresponding to the current coordinate point of the robot to the end point of the current sub-path according to a preset trajectory algorithm; wherein the current sub-path is a section of the first path or the second path;

[0007] The robot is controlled to walk according to the walking trajectory so that the robot avoids obstacles.

[0008] In some embodiments, before determining that the robot passes through an obstacle area while walking along the current first path in the local map, the method further includes:

[0009] When the robot is walking, if an obstacle is detected, the detected obstacle is mapped at a corresponding position on the local map;

[0010] Expanding the obstacle body in at least one stage to form a multi-stage expansion layer; wherein the radius of the first stage expansion layer is determined according to the radius of the robot;

[0011] Projecting the current first path into the local map.

[0012] In some embodiments, the obstacle region includes an obstacle body and the multi-stage expansion layer;

[0013] Determining whether the robot passes through an obstacle area when walking along the current first path in the local map includes:

[0014] When the robot passes through the first-level expansion layer of the obstacle body while walking along the current first path in the local map, it is determined that the robot passes through the obstacle area while walking along the current first path.

[0015] In some embodiments, the preset path planning algorithm adopts an Astar algorithm; and replanning the first path according to the preset path planning algorithm to form a second path includes:

[0016] When the first path is replanned using the Astar algorithm, a cost of the degree of fit between the replanned candidate path and the first path before replanning is added, and a cost of the distance between the replanned candidate path and the expansion layer of the obstacle is added.

[0017] In some embodiments, determining that the robot can walk in a straight line between the current coordinate point of the robot and the end point of the current subpath includes:

[0018] When the robot is walking between the current sub-paths, detecting in real time whether there is an obstacle in the area in front of the robot;

[0019] If there is no obstacle, determine the walking trajectory corresponding to the current coordinate point of the robot to the end point of the current sub-path according to a preset trajectory algorithm;

[0020] If there is an obstacle, construct a target line along the current orientation of the robot; wherein the width of the target line is the same as the diameter of the robot;

[0021] When the distance between the currently existing obstacle and the target straight line is less than a preset distance, the robot is controlled to stop walking.

[0022] In some embodiments, when the distance between the currently existing obstacle and the target straight line is less than a preset distance, before controlling the robot to stop walking, the method further includes:

[0023] The distance between the obstacle and the target straight line is determined according to the contact position between the target straight line and the expansion layer of the obstacle body.

[0024] In some embodiments, determining the walking trajectory corresponding to the robot's current coordinate point to the end point of the current sub-path according to a preset trajectory algorithm includes:

[0025] Determining at least one target wheel speed group based on a plurality of speed parameters of the robot; wherein the speed parameters include linear speed and angular speed;

[0026] Calculating the position information of each predicted time point according to the speed parameter corresponding to each target wheel speed group, so as to obtain a predicted trajectory corresponding to the predicted time according to the position information of each predicted time point; wherein the predicted time point is a time point within the predicted time;

[0027] Each predicted trajectory is scored according to a preset scoring rule, so that the predicted trajectory with the highest score is used as the walking trajectory.

[0028] In some embodiments, determining at least one target wheel speed set based on a plurality of speed parameters of the robot includes:

[0029] Determine a linear velocity group according to a preset linear velocity interval within the robot linear velocity range, and determine an angular velocity group according to a preset angular velocity interval within the robot angular velocity range;

[0030] determining a plurality of combinations of linear velocities and angular velocities based on the linear velocities in the linear velocity group and the angular velocities in the angular velocity group;

[0031] Calculating the left wheel speed and the right wheel speed of the robot according to each combination of linear velocity and angular velocity;

[0032] At least one target wheel speed group is determined according to the wheel speed screening rule.

[0033] In a second aspect, an embodiment of the present application provides a robot walking control device, comprising:

[0034] a planning module, configured to, upon determining that the robot passes through an obstacle area while walking along a current first path in the local map, replan the first path according to a preset path planning algorithm to form a second path, and update the second path into the global path;

[0035] a determination module configured to determine, if the robot can travel in a straight line between the current coordinate point of the robot and the end point of the current sub-path, a walking trajectory corresponding to the current sub-path from the current coordinate point of the robot to the end point of the current sub-path according to a preset trajectory algorithm; wherein the current sub-path is a section of the first path or the second path;

[0036] The control module is used to control the robot to walk according to the walking trajectory so that the robot avoids obstacles.

[0037] In a third aspect, an embodiment of the present application provides a robot, comprising an obstacle detection component, a processor, and a memory, wherein the obstacle detection component is used to detect obstacles in front of the robot, the memory stores a computer program, and the processor is used to execute the computer program to implement the above-mentioned robot walking control method.

[0038] The embodiments of the present application have the following beneficial effects: the present application first determines whether the robot will pass through an obstacle when walking along the current first path based on a local map. If it passes through an obstacle area, the current first path of the robot is replanned so that the replanned second path does not pass through the obstacle area. In addition, when the robot is walking from point to point, when walking between each two points, it is first determined whether the robot can walk in a straight line between the current coordinate point of the robot and the end point of the current sub-path. If not, the walking trajectory corresponding to the current coordinate point of the robot to the end point of the current sub-path is determined according to a preset trajectory algorithm, so that the robot will not pass through obstacles when walking from the current coordinate point of the robot to the end point of the current sub-path. In this way, the present application can effectively achieve obstacle avoidance and save computing resources. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other relevant drawings can be obtained based on these drawings without creative work.

[0040] Figure 1 A first flow chart of a robot walking control method according to an embodiment of the present application is shown;

[0041] Figure 2 A second flow chart of the robot walking control method according to an embodiment of the present application is shown;

[0042] Figure 3 A schematic diagram of an obstacle expansion layer according to an embodiment of the present application is shown;

[0043] Figure 4 A third flow chart of the robot walking control method according to an embodiment of the present application is shown;

[0044] Figure 5 A fourth flow chart of the robot walking control method according to an embodiment of the present application is shown;

[0045] Figure 6 A fifth flow chart of the robot walking control method according to an embodiment of the present application is shown;

[0046] Figure 7 A sixth flow chart of the robot walking control method according to an embodiment of the present application is shown;

[0047] Figure 8 A first schematic diagram of a predicted trajectory according to an embodiment of the present application is shown;

[0048] Figure 9 A second schematic diagram of the predicted trajectory according to an embodiment of the present application is shown;

[0049] Figure 10 A structural schematic diagram of a robot walking control device according to an embodiment of the present application is shown. DETAILED DESCRIPTION

[0050] The technical solutions in the embodiments of the present application will be described clearly and completely below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments.

[0051] The components of the embodiments of the present application generally described and illustrated in the drawings herein may be arranged and designed in a variety of different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the claimed application, but rather merely represents selected embodiments of the present application. All other embodiments obtained by those skilled in the art based on the embodiments of the present application without creative effort are within the scope of protection of the present application.

[0052] Hereinafter, the terms "including", "having" and their cognates used in various embodiments of the present application are intended only to indicate specific features, numbers, steps, operations, elements, components or combinations of the aforementioned items, and should not be understood as excluding the existence of one or more other features, numbers, steps, operations, elements, components or combinations of the aforementioned items or adding the possibility of one or more features, numbers, steps, operations, elements, components or combinations of the aforementioned items. In addition, the terms "first", "second", "third" and the like are only used to distinguish descriptions and should not be understood as indicating or implying relative importance.

[0053] Unless otherwise defined, all terms used herein (including technical and scientific terms) have the same meaning as commonly understood by those skilled in the art to which the various embodiments of the present application belong. The terms (such as those defined in generally used dictionaries) will be interpreted as having the same meaning as in the context of the relevant technical field and will not be interpreted as having an idealized meaning or an overly formal meaning unless clearly defined in the various embodiments of the present application.

[0054] The following describes some embodiments of the present application in detail with reference to the accompanying drawings. In the absence of conflict, the following embodiments and features in the embodiments may be combined with each other.

[0055] During the cleaning process, a robot vacuum will encounter various obstacles, such as furniture, walls, and tables. However, due to the limited accuracy of maps, especially for moving obstacles, it is difficult for the robot to accurately mark all obstacles on the global map. Therefore, a dynamic obstacle avoidance method is required when the robot is moving to ensure that it does not collide with obstacles. Among them, the embodiments of this application are mainly applicable to wheeled robots.

[0056] Based on this, an embodiment of the present application proposes a robot walking control method to achieve dynamic collision avoidance of the robot.

[0057] The robot walking control method is described below with reference to some specific embodiments.

[0058] Figure 1 A flow chart of a robot walking control method according to an embodiment of the present application is shown. Exemplarily, the robot walking control method includes the following steps:

[0059] Step S110: If it is determined that the robot passes through an obstacle area when walking along the current first path in the local map, the first path is replanned according to a preset path planning algorithm to form a second path, and the second path is updated to the global path.

[0060] The robot in this application mainly refers to a sweeping robot. When the sweeping robot starts working, it first plans a path from the current position to the end point through the global map. However, since the global map is not accurate enough and the amount of calculation is large when predicting the trajectory or re-planning the path, it will be combined with the local map to enable the sweeping robot to work efficiently and accurately.

[0061] The global map is not accurate enough and requires a lot of computation for trajectory prediction or re-path planning. This is mainly reflected in the following aspects: First, the global map is small in scale, which means it cannot contain a lot of detailed information. For the operation of a sweeping robot, local, high-precision maps are more important, because the sweeping robot needs to accurately avoid obstacles and clean detailed areas such as the underside of furniture. Second, the environment encountered by the sweeping robot during the cleaning process is constantly changing, and the global map cannot reflect these changes in real time, such as furniture movement and new obstacles. Local high-precision maps can update this information more quickly, improving prediction accuracy. Third, sweeping robots usually rely on local environmental information when performing tasks. The global map can only provide a macro perspective, but the robot needs detailed local information when performing tasks. By using local maps, the robot can better optimize path planning and obstacle avoidance strategies. Fourth, many trajectory prediction and path planning algorithms are designed based on the local environment. The global map contains too much information, which is inefficient to process and may not be directly applicable to local tasks. Therefore, using local high-precision maps can run these algorithms more efficiently.

[0062] Since the global map cannot clearly identify obstacles, after planning a path from the robot's starting position to its final position using the global map, the local map is used to determine obstacles along the path and to avoid them in a certain way.

[0063] In some embodiments, as Figure 2 As shown, before step S110, steps 210 to S230 are also included:

[0064] Step S210: When the robot is walking, if an obstacle is detected, the detected obstacle is drawn at a corresponding position on the local map.

[0065] Step S220 , performing at least one level of expansion on the obstacle body to form a multi-level expansion layer.

[0066] The radius of the first-level expansion layer is determined according to the radius of the robot.

[0067] Step S230: Project the current first path into the local map.

[0068] In this embodiment, the global map cannot ensure that it contains all obstacle information in the environment due to accuracy issues, which makes it impossible for the robot to avoid obstacles accurately. When there are obstacles, the global map is not convenient for local path replanning, so it is necessary to build a local map.

[0069] In this embodiment, the OPENCV image processing library is used to construct a local map, wherein the local map is a map with the robot's current position coordinates as the center point, and the range of the local map is usually larger than the range that the obstacle detection component can detect. During the robot's walking process, the obstacle detection component detects in real time whether there are obstacles around the robot. If an obstacle is detected, the obstacle point scanned by the obstacle detection component (which can be a radar or obstacle detection sensor) is drawn into the local map according to the corresponding position relationship, and the obstacle body is expanded at multiple levels at the same time. In practice, different levels of expansion layers can be distinguished by using different colors. The obstacle expansion layer is as follows: Figure 3 As shown, the first-level expansion layer is white, and the color of the expansion layer becomes darker as it moves outward.

[0070] Obstacle detection components detect obstacles, and the resulting obstacle points can be treated as point masses. However, the robot has a certain size, and the relationship between the robot and the obstacle points cannot be simply treated as point masses. Inflating the robot itself would greatly increase the algorithm complexity, so the obstacle points need to be inflated.

[0071] When inflating the obstacle itself, the first-level expansion layer is the innermost expansion layer of the obstacle point. Its radius is typically the same as the robot's radius. This first-level expansion layer can be considered an unreachable layer; if the robot enters this first-level expansion layer, it is considered to have collided with the obstacle. Furthermore, multiple expansion layers (such as a second-level expansion layer, a third-level expansion layer, and so on) can be added outside the first-level expansion layer. The number of expansion layers can be set as needed, and the thickness of each expansion layer is also preset. This helps to determine the distance between the robot and the obstacle when the robot approaches the obstacle. The relationship between the expansion layers can provide a rough estimate of the distance between the robot and the obstacle.

[0072] It is understood that obtaining the distance between the robot and the obstacle body in the above manner can reduce performance loss (i.e., there is no need to directly calculate the distance between the robot and the obstacle body. Since the thickness of the expansion layer of each level of the obstacle body is known, the distance between the robot and the obstacle body can be directly obtained based on the relationship between the expansion layers of the robot and the obstacle body). It should be noted that the expansion layers other than the first-level expansion layer can be considered as expansion layers that the robot can enter. However, after entering these expansion layers, the robot needs to adjust its walking speed. The closer to the first-level expansion layer, the lower its speed.

[0073] After the obstacle is determined in the local map and the obstacle body is expanded, the current first path in the global map is projected into the local map to subsequently determine whether the robot will pass through the obstacle area when walking along the current first path.

[0074] For example, Figure 4 As shown, determining if the robot passes through an obstacle area when walking along the current first path in the local map includes steps S410 to S430:

[0075] Step S410 , determining whether the robot passes through the first expansion layer of the obstacle body when walking along the current first path in the local map.

[0076] After the local map is obtained, it can be determined whether the current first path passes through the first-level expansion layer of the obstacle body directly according to the distance between the current first path mapped in the local map and each obstacle body in the local map.

[0077] If it is determined that the current first path passes through the first-level expansion layer of the obstacle body, step S420 is executed to determine whether the robot passes through the obstacle area when walking along the current first path. If it is determined that the current first path does not pass through the first-level expansion layer of the obstacle body, step S430 is executed to determine whether the robot does not pass through the obstacle area when walking along the current first path. The obstacle area includes the obstacle body and the multi-level expansion layers of the obstacle.

[0078] When executing step S110, if it is determined that the robot passes through an obstacle area while walking along the current first path, the current first path is replanned according to the preset path planning algorithm to form a current second path, and the current second path is updated to the global path.

[0079] In step S110, if it is determined that the robot will pass through an obstacle area if traveling along the current first path, the current first path is replanned to prevent the robot from passing through the obstacle area. This will make it easier to obtain an obstacle-avoiding trajectory when performing trajectory prediction using the DWA algorithm. After replanning the current first path, the replanned current second path is also updated into the global path, replacing the original current first path with the current second path.

[0080] Exemplarily, the preset path planning algorithm can be an Astar algorithm (a heuristic search algorithm), that is, when it is determined that the robot passes through an obstacle area when walking along the current first path in the local map, the current first path can be replanned by the Astar algorithm to form a current second path; wherein, when the current first path is replanned by the Astar algorithm, the cost of the degree of fit between the replanned candidate path and the current first path before replanning is added, and the distance cost between the replanned candidate path and the expansion layer of the obstacle is added.

[0081] The Astar algorithm is an algorithm in the prior art and will not be described in detail here. In this embodiment, when the Astar algorithm is used for path replanning, it creatively uses the cost of the degree of fit between the replanned candidate path and the current first path before replanning and the cost of the distance between the replanned candidate path and the expansion layer of the obstacle as the path cost of the Astar algorithm.

[0082] The logic of the local map is similar to that of the global map. Both are based on the grid map. Each point in the grid map has attributes corresponding to the real environment. When planning, the AStar algorithm determines whether it is reachable based on the attributes of the traversed points.

[0083] Since the expanded radar point cloud data is added to the local high-precision map, the actual reflection on the local grid map is: do not go to the points in the first-level expansion layer ( Figure 3 The other expansion layers will be darker in grayscale than the white expansion layer. When replanning the path, different path costs are set for the grayscale values of the corresponding expansion layers. The closer the grayscale value is to white, the higher the cost (when it is completely white, the cost is infinite, which means it is unreachable). Conversely, the lower the cost, that is, the closer to the first-level expansion layer, the greater the path cost. This can guide the Astar algorithm to select points away from obstacles and ultimately obtain a local path away from obstacles.

[0084] In addition, the degree of fit with the original current first path must be added as a cost. The worse the fit, the higher the cost. This is to prevent the locally replanned path from being too far away from the original path, which will cause the robot to be unable to connect directly (such as a large angle turn on the path). Specifically, the degree of fit with the previous first path is added as a cost: the AStar algorithm traverses in a manner similar to the breadth-based search (BFS), but the Astar algorithm adds the cost calculation of each point, and will obtain a path with the lowest cost if the target point is finally reached. Therefore, the "degree of fit with the previous path" can be added to the cost calculation.

[0085] The matching cost is calculated by calculating the Manhattan distance between the current traversal point of AStar and the previous path point. The farther the current traversal point is from the previous path point, the greater the cost will be, and vice versa. Therefore, when replanning a local path, if there are multiple paths that can reach the target point, the path closer to the previous path will be preferred, thereby preventing the local replanned path from being too far away from the original path. It is understood that the specific cost value can be set by the user through the parameter setting interface. It should be noted that if the replanning path is unsuccessful, the current first path can be replanned by modifying the various cost values in the AStar algorithm.

[0086] In some implementations, the local path planning in this embodiment is visualized, such as Figure 8 、 Figure 9 As shown, the purple line points are the original path, and the blue-green line points are the current first path. The white block with gradient edge blocks is the graphics after the obstacle is expanded, and the edge gradient layers are different expansion layers. The white in the center here can be regarded as an impassable expansion layer (first-level expansion layer), which is generally set to the same diameter as the robot. When the path passes through it, it is considered that the machine will collide with the obstacle body; the white, red, and yellow arcs in the middle are multiple groups of "predicted trajectories composed of predicted time points" obtained by the subsequent DWA algorithm. Among them, the white part of the arc indicates that there is no obstacle; the red part of the arc indicates that the predicted trajectory is in the expansion layer of the obstacle; the yellow part of the line indicates that the front end of the predicted trajectory is already in the expansion layer of the obstacle. As shown Figure 8 The current first path (blue-green line and dots) shown passes through the expansion layer of the obstacle body; Figure 9 The current second path (also blue-green line points) is obtained by replanning the current first path, which avoids the expansion layer of the obstacle body.

[0087] Step S120 : If the robot can walk in a straight line between the current coordinate point of the robot and the end point of the current sub-path, a walking trajectory corresponding to the current coordinate point of the robot to the end point of the current sub-path is determined according to a preset trajectory algorithm.

[0088] First, it should be noted that step S110 involves the robot traveling along a current first path within the global path. If an obstacle appears on the current first path, the robot replans the current first path to avoid collision with the obstacle itself, and the resulting replanned current second path is then updated to the global path. Because straight-line travel can conserve resources, step S120 involves the robot determining whether a straight line is possible between the robot's current coordinate point and the endpoint of the current sub-path. If so, the robot determines the trajectory corresponding to the path from the robot's current coordinate point to the endpoint of the current sub-path based on a preset trajectory algorithm.

[0089] In this embodiment, the robot's current first or second path is divided into multiple sub-paths from the starting position to the end position. The starting point of the first sub-path is the robot's starting position (the starting point of the entire path), and the end point of the last sub-path is the end point of the entire path (i.e., the planned end point). The end point of the first sub-path is the starting point of the second sub-path, and the end point of the second sub-path is the starting point of the third sub-path, and so on, until the robot reaches the planned end point in the entire map. The preset segmentation method is to ensure that the paths are all point-to-point paths.

[0090] After determining each sub-path, the robot moves in a point-to-point manner. The starting point of the path is the robot's current position, and the end point of the path is the current target point (i.e., the end point of the current sub-path). When the robot begins point-to-point walking, if it is its first run, it must first rotate to the target angle. After completing the walk between the previous two points, if the robot is not heading toward the target point between the two points, it can also automatically select a direction to the target point. It can be understood that the concept of the robot's first run is the first point-to-point run after the global path planning. During the point-to-point run, the robot walks according to the end point of each sub-path in the path (selecting the most appropriate sub-path, calculating the Euclidean distance between the sub-path end point and the robot's current position, and taking the one with the smallest (closest) distance value and the correct direction (from the starting point to the end point is the correct direction, and the reverse direction is an error)).

[0091] In some embodiments, as Figure 5 As shown, the process of determining whether the robot can walk in a straight line between the current coordinate point of the robot and the end point of the current sub-path includes steps S510 to S560:

[0092] Step S510 : While the robot is walking on the current sub-path, it detects in real time whether there are any obstacles in the area in front of the robot.

[0093] In this step, the robot will check in real time whether there are obstacles in the area in front of the robot that can be detected by the obstacle detection component when walking from point to point.

[0094] If no obstacle is detected in the area in front of the robot, step S520 is executed to determine the walking trajectory corresponding to the current coordinate point of the robot to the end point of the current sub-path according to a preset trajectory algorithm.

[0095] If there are no obstacles, indicating a clear path ahead, the robot can proceed in a straight line. The preset trajectory algorithm can then determine the trajectory from the robot's current coordinate point to the end point of the current subpath. This eliminates the need for DWA and dynamic obstacle avoidance logic, allowing the robot to move more smoothly and reduce unnecessary logic operations.

[0096] If an obstacle is detected in the area in front of the robot, step S530 is executed to construct a target straight line along the current direction of the robot.

[0097] In this step, a target line with a width equal to the robot's diameter is constructed in the local / global map corresponding to the robot's current path. The target line can be a line from the robot's current coordinates to the end coordinates. In this embodiment, the robot's top-down projection is circular or nearly circular.

[0098] Step S540 determines whether the distance between the currently existing obstacle and the target line is less than a preset distance. If the distance between the obstacle and the target line is less than the preset distance, step S550 is executed to control the robot to stop walking. It will be understood that if the distance between the obstacle and the target line is less than the preset distance, the robot is determined to be unable to walk in a straight line. If the distance between the obstacle and the target line is not less than the preset distance, step S560 is executed to determine that the robot is able to walk in a straight line.

[0099] The reason for setting a preset distance is that the robot only performs obstacle avoidance when relatively close to an obstacle. This means that if the obstacle is far away, the robot will not immediately perform an avoidance maneuver and will continue to move. This preset distance can be adjusted based on actual operational results. Furthermore, when determining the distance between the robot and an obstacle, the distance between the obstacle and the target line can be determined based on the contact position between the target line and the obstacle's expansion layer. This means that the thickness of each expansion layer is constant. Therefore, as long as we know which level of the obstacle's expansion layer the target line contacts, we can determine the distance between the robot and the obstacle. If the target line does not contact the expansion layer, it means that the robot and the obstacle will not collide.

[0100] Additionally, during point-to-point walking, if the robot's current azimuth angle is not within the preset target azimuth angle range, the robot will first spin in place to return to the correct orientation. This logic is constantly executed in the software to ensure the robot's orientation is correct. The preset target azimuth angle range can be set according to actual needs.

[0101] If, during step S120, it is determined that the robot can travel in a straight line from the robot's current coordinate point to the end point of the current sub-path, the robot is controlled to travel in a straight line. If, during step S120, it is determined that the robot cannot travel in a straight line from the robot's current coordinate point to the end point of the current sub-path, a corresponding walking trajectory from the robot's current coordinate point to the end point of the current sub-path is determined based on a preset trajectory algorithm.

[0102] Step 130: Control the robot to walk according to the walking trajectory so that the robot avoids obstacles.

[0103] A predicted trajectory is a prediction of the robot's trajectory over a certain period of time using different combinations of linear and angular velocities, based on the robot's current posture. A predicted trajectory is a set of points at multiple prediction time points, each of which is calculated from a prediction interval. A prediction is performed at each prediction interval until the total prediction time is reached, at which point the predicted trajectory ends.

[0104] In some embodiments, as Figure 6 , determining the walking trajectory corresponding to the robot's current coordinate point to the end point of the current sub-path according to the preset trajectory algorithm, including steps S610-S630:

[0105] Step S610: determining at least one target wheel speed group based on multiple speed parameters of the robot.

[0106] The velocity parameters include linear velocity and angular velocity.

[0107] In some embodiments, as Figure 7 As shown, step S610 includes steps S710 to S740:

[0108] Step S710: determining a linear velocity group within the robot linear velocity range according to a preset linear velocity interval, and determining an angular velocity group within the robot angular velocity range according to a preset angular velocity interval.

[0109] Step S720: determining a plurality of combinations of linear velocities and angular velocities according to the linear velocities in the linear velocity group and the angular velocities in the angular velocity group.

[0110] In this embodiment, it is necessary to set the range of the linear velocity according to the robot. In this embodiment, the linear velocity generally does not have negative values, so the linear velocity is generally set to a minimum value greater than 0 to a maximum value that the robot can reach; the angular velocity also needs to be determined according to the range of the angular velocity set for the robot. In this embodiment, the angular velocity has negative values. The positive and negative values actually reflect the direction of rotation of the robot, clockwise or counterclockwise. In this embodiment, the angular velocity is generally set to an absolute maximum value that the robot can reach, ranging from the negative absolute maximum value to the positive absolute maximum value. When the angular velocity is 0, if there is a linear velocity, the machine moves in a straight line.

[0111] After determining the range of linear velocity and the range of angular velocity, multiple linear velocities can be obtained according to the preset linear velocity interval, and multiple angular velocities can be obtained according to the preset angular velocity interval, and then the multiple linear velocities and multiple angular velocities are randomly combined to form multiple linear velocity and angular velocity combinations.

[0112] Step S730: Calculate the left wheel speed and the right wheel speed of the robot according to each combination of linear velocity and angular velocity.

[0113] The calculation formula for the left wheel speed is: The calculation formula for the right wheel speed is: In the formula, LeftSpeed is the left wheel speed, Rightspeed is the right wheel speed, v is the linear velocity, w is the angular velocity, and L is the wheelbase of the two wheels.

[0114] The left and right wheel speeds corresponding to each combination of linear velocity and angular velocity can be calculated using the above formula.

[0115] Step S740: Determine at least one target wheel speed group according to the wheel speed screening rule.

[0116] The target wheel speed group is a combination of the left wheel speed and the corresponding right wheel speed.

[0117] Exemplarily, when determining the target wheel speed, the wheel speed screening rules in this embodiment include, but are not limited to, the left and / or right wheel speeds being greater than a preset maximum wheel speed, the left and / or right wheel speeds being less than a preset minimum wheel speed, and the left and right wheel speeds being either negative and positive or both negative. If the calculated left and right wheel speeds meet any of the wheel speed screening rules, that set of wheel speeds is deleted, and the linear velocity and angular velocity sum corresponding to that set of wheel speeds also does not meet the requirements. After removing the left and right wheel speed combinations that do not meet the requirements, the remaining combinations are considered the target wheel speed set.

[0118] Step S620 , calculating the posture information of each predicted time point according to the speed parameters corresponding to each target wheel speed group, so as to obtain the predicted trajectory corresponding to the predicted time according to the posture information of each predicted time point.

[0119] The velocity parameters include linear velocity and angular velocity.

[0120] Since this embodiment calculates the posture information of multiple predicted time points based on the robot's current coordinate posture, current linear velocity and angular velocity, predicted time interval and predicted total time, and finally forms a predicted trajectory; it can be understood that this embodiment needs to predict the robot's trajectory within a certain period of time. Therefore, the predicted time is the time corresponding to the trajectory of the robot in which period of time needs to be predicted. When predicting the predicted trajectory of the robot within the predicted time, it is necessary to predict the robot's posture at each predicted time point (including but not limited to orientation, position and other information). According to the posture at each predicted time point, the predicted trajectory of the robot within the predicted time can be obtained.

[0121] The calculation formula for the pose information at each predicted time point is as follows:

[0122] theta m =theta n +w×dt;

[0123] x=x n +v×dt×cos(theta m );

[0124] y=y n -v×dt×sin(theta m );

[0125] In the formula, theta m To predict the robot’s orientation angle at a given time, theta n is the current robot posture towards the azimuth, w is the angular velocity, v is the linear velocity, dt is the time interval from the current time to the predicted time point, x n is the current x coordinate of the robot, y n is the current y coordinate of the robot.

[0126] It should be noted that if you want to have more optional trajectories in front of the robot, you can make the interval of the angular velocity of the robot's direction smaller. In this way, the robot has more angular velocity values in the direction it is facing, and more predicted trajectories in front of the robot can be obtained. This can also avoid the problem of abnormal swinging of the robot due to insufficient accuracy of the angular velocity of the predicted path when the robot needs to use the DWA algorithm to predict the path score in an environment with obstacles.

[0127] In step S630 , each predicted trajectory is scored according to a preset scoring rule, so that the predicted trajectory with the highest score is used as the walking trajectory.

[0128] In step S630, each predicted trajectory is scored according to the scoring rules. This means that the total score of all scoring items is added up, and the predicted trajectory with the highest total score is selected for execution. For each predicted trajectory that includes multiple predicted time points, the total score is the sum of the scores for each predicted time point.

[0129] Scoring items have scores and weights derived from actual calculations. The scores come from the results of each calculation, and the weights can be adjusted based on the actual needs of the robot during operation.

[0130] The scoring items include basic scores and dynamic obstacle avoidance scores. The basic scores include but are not limited to the angular difference between the predicted time point and the current path target point, the angular difference between the predicted trajectory final direction and the current path target point, the left and right wheel target speed difference, the left and right wheel target speed sum, and the left and right wheel target speed smoothness. The dynamic obstacle avoidance score includes but is not limited to the left and right wheel target speed difference compensation and the score for the predicted time point being in the obstacle expansion layer.

[0131] For the direction angle difference from the predicted time point to the current path target point, the smaller the difference, the more consistent the predicted path is with the required path to the target point. The smaller the difference, the higher the score.

[0132] For the angular difference between the final direction of the predicted trajectory and the target point of the current path, a single predicted trajectory has a fixed angular velocity, which means that the direction of the trend is fixed. The angular difference between the final direction of the predicted trajectory and the target point is calculated based on the trending direction. For example, if the robot needs to face 180 degrees to reach the target point, the predicted trajectory trend direction is the positive direction of the azimuth angle, and the predicted trajectory final direction is 190 degrees, then the calculated difference is 360-190+180=350 (it needs to continue to circle in the positive direction of the angle to return to the 180-degree direction). For another example, if the robot needs to face 180 degrees to reach the target point, the predicted trajectory trend direction is the positive direction of the azimuth angle, and the predicted trajectory final direction is 170 degrees, then the calculated difference is 180-170=10 (it needs to continue to circle in the positive direction of the angle 10 degrees to reach the 180-degree direction). Similarly, the smaller the difference, the higher the score. For the difference between the target wheel speeds of the left and right wheels, the larger the difference, the greater the angular velocity, the more conducive to turning around the arc, and the larger the difference, the higher the score.

[0133] For the sum of the left and right target wheel speeds, a larger sum indicates a faster arrival speed, resulting in a higher score. For the smoothness of the left and right target wheel speeds, the smoother the speed, the smoother the machine's movement. Therefore, a higher smoothness score is assigned. For the difference compensation between the left and right target wheel speeds, dynamic obstacle avoidance requires a difference in wheel speeds. A higher difference indicates a faster and more capable obstacle avoidance response. Therefore, this score is incorporated. A higher difference in this score indicates a higher score.

[0134] For scores where the predicted time point falls within the obstacle expansion layer, if the predicted trajectory point falls within the obstacle expansion layer, it means that the current predicted trajectory will cross the obstacle expansion layer. Depending on the different expansion distances of the expansion layer, when the robot chooses this predicted trajectory for travel, it may cause the machine to approach or collide with obstacles. Therefore, the closer the predicted trajectory point is to the machine, the lower the score. After obtaining the score for each scoring item at each predicted time point, the weights of each scoring item are combined and the score of each predicted time point is obtained by adding up the scores of each scoring item. The score of the predicted trajectory is obtained based on the scores of each predicted time point on the predicted trajectory. The highest score is the confirmed walking trajectory.

[0135] It should be noted that when adding the scoring items, normalization is performed first to avoid the problem of incomparability caused by different weights of the scoring items. After normalization, all scoring items are added together to finally obtain the predicted trajectory with the highest score.

[0136] In this application, when the robot is walking, it detects in real time whether there are obstacles around it. If there are obstacles, it constructs a local map and draws the detected obstacles into the local map. Then, the current first path is also projected into the local map. Then, based on the local map, it determines whether the robot has passed through obstacles when walking on the current first path. If it has passed through obstacles, the current first path of the robot is replanned so that the replanned current second path does not pass through obstacles. In addition, when the robot is walking from point to point, when walking between each two points, it first determines whether the robot can walk in a straight line between the current coordinate point of the robot and the end point of the current sub-path. If not, the walking trajectory corresponding to the current coordinate point of the robot to the end point of the current sub-path is determined according to the preset trajectory algorithm, so that the robot will not pass through obstacles when walking between the current coordinate point of the robot and the end point of the current sub-path. In this way, this application can effectively achieve obstacle avoidance and save computing resources.

[0137] Figure 10 A schematic diagram of the structure of a robot walking control device according to an embodiment of the present application is shown. Exemplarily, the robot walking control device includes:

[0138] A planning module 100 is configured to, upon determining that the robot passes through an obstacle area while walking along a current first path in the local map, replan the first path according to a preset path planning algorithm to form a second path, and update the second path into the global path;

[0139] Determining module 200, for determining a walking trajectory corresponding to the robot's current coordinate point to the end point of the current sub-path according to a preset trajectory algorithm if the robot can walk in a straight line between the robot's current coordinate point and the end point of the current sub-path; wherein the current sub-path is a section of the first path or the second path;

[0140] The control module 300 is used to control the robot to walk according to a walking trajectory so that the robot can avoid obstacles.

[0141] It can be understood that the device of this embodiment corresponds to the robot walking control method of the above embodiment, and the options in the above embodiment are also applicable to this embodiment, so they will not be repeated here.

[0142] The present application also provides a robot. Exemplarily, the robot includes an obstacle detection component, a processor and a memory, wherein the obstacle detection component is used to detect obstacles in front of the robot, the memory stores a computer program, and the processor runs the computer program to enable the robot to execute the above-mentioned robot walking control method or the functions of each module in the above-mentioned robot walking control device.

[0143] The obstacle detection component is usually a radar or an obstacle detection sensor; the obstacle detection sensor can be an infrared sensor, an ultrasonic sensor, etc.

[0144] Among them, the processor can be an integrated circuit chip with signal processing capabilities. The processor can be a general-purpose processor, including a central processing unit (CPU), a graphics processing unit (GPU) and a network processor (NP), a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or at least one of other programmable logic devices, discrete gate or transistor logic devices, and discrete hardware components. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc., which can implement or execute the disclosed methods, steps and logic block diagrams in the embodiments of the present application.

[0145] The memory may be, but is not limited to, a random access memory (RAM), a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), etc. The memory is used to store a computer program, and the processor may execute the computer program accordingly after receiving an execution instruction.

[0146] The present application also provides a computer-readable storage medium for storing the computer program used in the robot. For example, the computer-readable storage medium may include, but is not limited to, various media capable of storing program code, such as a USB flash drive, a mobile hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0147] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can also be implemented in other ways. The device embodiments described above are merely schematic. For example, the flowcharts and structure diagrams in the accompanying drawings show the possible architectures, functions and operations of the devices, methods and computer program products according to the multiple embodiments of the present application. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of the code, and the module, program segment or a part of the code contains one or more executable instructions for implementing the specified logical functions. It should also be noted that in an alternative implementation, the functions marked in the box can also occur in an order different from that marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the structure diagram and / or flowchart, and the combination of boxes in the structure diagram and / or flowchart, can be implemented using a dedicated hardware-based system that performs the specified function or action, or can be implemented using a combination of dedicated hardware and computer instructions.

[0148] In addition, the functional modules or units in the various embodiments of the present application can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.

[0149] If the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling a computer device (which can be a smart phone, personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application.

[0150] The above is only a specific implementation method of the present application, but the scope of protection of the present application is not limited thereto. Any technician familiar with this technical field can easily think of changes or replacements within the technical scope disclosed in this application, which should be covered by the scope of protection of the present application.

Claims

1. A robot walking control method, characterized in that: include: If it is determined that the robot passes through an obstacle area while walking along the current first path in the local map, replan the first path according to a preset path planning algorithm to form a second path, and update the second path into the global path; If the robot cannot walk in a straight line between the current coordinate point of the robot and the end point of the current sub-path, determine a walking trajectory corresponding to the current coordinate point of the robot to the end point of the current sub-path according to a preset trajectory algorithm; wherein the current sub-path is a section of the first path or the second path; The robot is controlled to walk according to the walking trajectory so that the robot avoids obstacles.

2. The robot walking control method according to claim 1, characterized in that: Before determining that the robot passes through an obstacle area when walking along the current first path in the local map, the method further includes: When the robot is walking, if an obstacle is detected, the detected obstacle is mapped at a corresponding position on the local map; Expanding the obstacle body in at least one stage to form a multi-stage expansion layer; wherein the radius of the first stage expansion layer is determined according to the radius of the robot; Projecting the current first path into the local map.

3. The robot walking control method according to claim 2, characterized in that: The obstacle area includes an obstacle body and the multi-stage expansion layer; Determining whether the robot passes through an obstacle area when walking along the current first path in the local map includes: When the robot passes through the first-level expansion layer of the obstacle body while walking along the current first path in the local map, it is determined that the robot passes through the obstacle area while walking along the current first path.

4. The robot walking control method according to claim 2, characterized in that: The preset path planning algorithm adopts the Astar algorithm; and replanning the first path according to the preset path planning algorithm to form a second path includes: When the first path is replanned using the Astar algorithm, a cost of the degree of fit between the replanned candidate path and the first path before replanning is added, and a cost of the distance between the replanned candidate path and the expansion layer of the obstacle is added.

5. The robot walking control method according to claim 2, characterized in that: The process of determining whether the robot can walk in a straight line between the current coordinate point of the robot and the end point of the current subpath includes: When the robot is walking between the current sub-paths, detecting in real time whether there is an obstacle in the area in front of the robot; If there is no obstacle, determine the walking trajectory corresponding to the current coordinate point of the robot to the end point of the current sub-path according to a preset trajectory algorithm; If there is an obstacle, construct a target line along the current orientation of the robot; wherein the width of the target line is the same as the diameter of the robot; When the distance between the currently existing obstacle and the target straight line is less than a preset distance, the robot is controlled to stop walking.

6. The robot walking control method according to claim 5, characterized in that: Before controlling the robot to stop walking when the distance between the currently existing obstacle and the target straight line is less than a preset distance, the method further includes: The distance between the obstacle and the target straight line is determined according to the contact position between the target straight line and the expansion layer of the obstacle body.

7. The robot walking control method according to claim 1, characterized in that: The determining of the walking trajectory corresponding to the current coordinate point of the robot to the end point of the current sub-path according to a preset trajectory algorithm includes: Determining at least one target wheel speed group based on a plurality of speed parameters of the robot; wherein the speed parameters include linear speed and angular speed; Calculating the position information of each predicted time point according to the speed parameter corresponding to each target wheel speed group, so as to obtain a predicted trajectory corresponding to the predicted time according to the position information of each predicted time point; wherein the predicted time point is a time point within the predicted time; Each predicted trajectory is scored according to a preset scoring rule, so that the predicted trajectory with the highest score is used as the walking trajectory.

8. The robot walking control method according to claim 7, characterized in that: The determining of at least one target wheel speed group based on a plurality of speed parameters of the robot comprises: Determine a linear velocity group according to a preset linear velocity interval within the robot linear velocity range, and determine an angular velocity group according to a preset angular velocity interval within the robot angular velocity range; determining a plurality of combinations of linear velocities and angular velocities based on the linear velocities in the linear velocity group and the angular velocities in the angular velocity group; Calculating the left wheel speed and the right wheel speed of the robot according to each combination of linear velocity and angular velocity; At least one target wheel speed group is determined according to the wheel speed screening rule.

9. A robot walking control device, characterized in that: include: a planning module, configured to, upon determining that the robot passes through an obstacle area while walking along a current first path in the local map, replan the first path according to a preset path planning algorithm to form a second path, and update the second path into the global path; a determination module configured to determine, if the robot cannot travel in a straight line between the current coordinate point of the robot and the end point of the current sub-path, a walking trajectory corresponding to the walking trajectory from the current coordinate point of the robot to the end point of the current sub-path according to a preset trajectory algorithm; wherein the current sub-path is a section of the first path or the second path; The control module is used to control the robot to walk according to the walking trajectory so that the robot avoids obstacles.

10. A robot, characterized in that: The robot includes an obstacle detection component, a processor and a memory, the obstacle detection component is used to detect obstacles in front of the robot, the memory stores a computer program, and the processor is used to execute the computer program to implement the robot walking control method described in any one of claims 1-8.