Robot control method and device, robot and computer storage medium

By marking the boundaries of the working area in the robot's global map, the problem of the robot deviating from the working area when avoiding obstacles is solved, more efficient path correction and obstacle avoidance are achieved, and work efficiency is improved.

CN119806125APending Publication Date: 2025-04-11JUXING TECH SHENZHEN CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311307253.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-10-09
Publication Date
2025-04-11

AI Technical Summary

Technical Problem

When a robot encounters obstacles during global path planning, it may deviate from the work area, causing it to re-navigate back to the work area, reducing work efficiency.

Method used

By determining the work area in the robot's global map, it is determined whether the robot is within the work area and mark the boundary of the work area as non-obstruction or first obstacle when necessary to correct the work path so that the robot can avoid obstacles and remain within the work area.

Benefits of technology

It effectively avoids the robot from deviating from the working area during obstacle avoidance, improves the robot's working efficiency, and reduces the number of re-navigation times.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119806125A_ABST
    Figure CN119806125A_ABST
Patent Text Reader

Abstract

The invention discloses a robot control method and device, a robot and a computer readable storage medium. The robot control method comprises the steps of determining a working area of a robot; acquiring a departure position; judging whether the robot is in the working area or not according to the starting position, and executing the following steps: when the robot is not in the working area, marking the boundary of the working area as a non-obstacle, and controlling the robot to move to the working path; when the robot is in the working area, marking the boundary as a first obstacle; the robot is controlled to move along the working path, and when the second obstacle is detected, the working path is corrected and moves along the second obstacle so as to avoid the first obstacle and the second obstacle. According to the control method of the robot, whether the robot enters a working area or not is judged according to the current position of the robot, and the boundary is marked as a non-obstacle when the robot does not enter the working area; after entering, the boundary is marked as the first obstacle, so that the robot is far away from the boundary when moving, and the working efficiency of the robot is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of robot control technology, and more specifically, to a robot control method, a control device, a robot and a computer-readable storage medium. Background Art

[0002] During the global path planning process, the robot plans a path with high coverage and few repeated lines in the working area, obtains the working path, and works along the working path. In actual work, when the robot encounters obstacles, it needs to avoid them. For example, during the obstacle avoidance process of local path planning, the robot may deviate from the working area. Summary of the invention

[0003] Embodiments of the present invention provide a robot control method, a control device, a robot, and a computer-readable storage medium.

[0004] An embodiment of the present invention provides a control method for a robot, comprising: determining a working area of ​​the robot in a global map of the robot; obtaining a starting position of the robot; judging whether the robot is within the working area according to the starting position, and executing: when the robot is not within the working area, marking a boundary of the working area as a non-obstacle, controlling the robot to move to a preset working path, and after the robot moves to the working path, marking a boundary of the working area as a first obstacle, wherein the working path is located within the working area; when the robot is within the working area, marking a boundary of the working area as a first obstacle; controlling the robot to move along the working path, and when any second obstacle within the working area is detected, correcting the working path according to the first obstacle and the second obstacle, and controlling the robot to move along the corrected working path so that the robot avoids the first obstacle and the second obstacle.

[0005] In this way, whether the robot has entered the working area is determined according to the current position of the robot. When the robot has not entered the working area, the boundary is marked as a non-obstacle so that the robot can enter the working area smoothly. After the robot enters the working area, the boundary is marked as the first obstacle, so that the robot moves away from the boundary of the working area when moving during work or avoiding local obstacles, thereby preventing the robot from deviating from the working area during the obstacle avoidance process, thereby avoiding the robot from having to navigate back to the working area after completing the obstacle avoidance, thereby improving the robot's work efficiency.

[0006] In certain embodiments, after the working path is corrected according to the first obstacle and the second obstacle when any second obstacle is detected in the working area, the method further includes: if the working path is corrected successfully, controlling the robot to move according to the corrected working path; if the working path is corrected failed, controlling the robot to stop moving.

[0007] In this way, when the robot encounters any second obstacle, it corrects the working path according to the first obstacle and the second obstacle. If the working path can be corrected successfully, that is, there is a path that avoids the first obstacle and the second obstacle and continues to move, the robot is controlled to run according to the corrected working path to avoid the obstacle; if the working path correction fails, that is, there is no path that avoids the first obstacle and the second obstacle and continues to move, the robot is controlled to stop moving to avoid the robot colliding with the second obstacle or leaving the working area.

[0008] In some embodiments, after controlling the robot to stop moving if correction of the working path fails, the method further includes: determining whether the second obstacle is cleared within a preset time length, and if so, controlling the robot to continue moving along the working path; if not, controlling the robot to maintain a stopped moving state and report trapped information.

[0009] In this way, if the second obstacle can be cleared within the preset time, the robot resumes moving without the need for user intervention; if the second obstacle still exists within the preset time, the robot stays where it is and reports an error message to the user, so that the user can handle it in time.

[0010] In some embodiments, controlling the robot to move to a preset working path includes: planning a moving path according to the starting position and the starting point of the working path, the end point of the moving path being located at the starting point of the working path; controlling the robot to move toward the working path along the moving path, and when the robot encounters a third obstacle during the process of moving along the moving path, planning an obstacle avoidance path, the obstacle avoidance path being a path for the robot to avoid the third obstacle, and the end point of the obstacle avoidance path being located on the working path; controlling the robot to move to the working path along the obstacle avoidance path.

[0011] In this way, by planning a moving path and controlling the robot to move along the moving path, the robot can be moved from the starting position to the working path; in the process of moving along the moving path, if the robot encounters a third obstacle, an obstacle avoidance path is planned to avoid the third obstacle; since the end point of the obstacle avoidance path is on the working path, the robot is controlled to move along the obstacle avoidance path, and while avoiding the third obstacle, the robot can also be controlled to move to the working path.

[0012] In some embodiments, the moving path and the working path are composed of discrete points; controlling the robot to move to a preset working path also includes: setting index identifiers for the points constituting the moving path and the working path, and the index identifiers are set incrementally from the starting point of the moving path to the end point of the working path; when planning the obstacle avoidance path, the index identifier of the end point of the obstacle avoidance path is greater than or equal to the index identifier of the starting point of the working path.

[0013] In this way, the position of any point on the moving path or the working path can be determined by the index identifier of the point. Since the index identifier is set incrementally and the end point of the obstacle avoidance path is on the working path, the index identifier of the end point of the obstacle avoidance path is greater than or equal to the index identifier of the starting point of the working path.

[0014] In some embodiments, controlling the robot to move to the working path along the obstacle avoidance path includes: controlling the robot to move along the obstacle avoidance path and obtaining the current position of the robot in real time; determining in real time whether the distance between the current position and the end point of the obstacle avoidance path is less than a preset threshold, and if so, determining that the robot has moved to the working path, and if not, determining that the robot has not moved to the working path.

[0015] In this way, the distance between the robot's current position and the end point of the obstacle avoidance path is used to determine whether the robot has reached the end point of the obstacle avoidance path, that is, whether it has reached the starting point of the working path. If it has reached it, the robot is controlled to move along the working path; if it has not reached it, the robot is controlled to continue moving along the obstacle avoidance path.

[0016] In some embodiments, after controlling the robot to move according to the working path, the method further includes: marking the boundary of the working area as a non-obstacle when the robot completes the work.

[0017] In this way, the robot marks the boundary as a non-obstacle after completing the work, so that the robot can re-plan the path to any position after completing the work or reaching the end of the work path without being affected by the boundary.

[0018] The present invention provides a control device for a robot, comprising a determination module, an acquisition module, a judgment module and a control module, wherein the determination module is used to determine a working area of ​​the robot in a global map of the robot; the acquisition module is used to acquire a starting position of the robot; the judgment module is used to judge whether the robot is in the working area according to the starting position, and executes: when the robot is not in the working area, marking a boundary of the working area as a non-obstacle, controlling the robot to move to a preset working path, and after the robot moves to the working path, marking the boundary of the working area as a first obstacle, and the working path is located inside the working area; when the robot is located in the working area, marking the boundary of the working area as a first obstacle; the control module is used to control the robot to move along the working path, and when any second obstacle in the working area is detected, correcting the working path according to the first obstacle and the second obstacle, and controlling the robot to move along the corrected working path, so that the robot avoids the first obstacle and the second obstacle.

[0019] In this way, whether the robot has entered the working area is judged according to the current position of the robot. When the robot has not entered the working area, the boundary is marked as a non-obstacle so that the robot can enter the working area smoothly. After the robot enters the working area, by marking the boundary as the first obstacle, the robot is kept away from the boundary of the working area when moving during work or avoiding local obstacles, so as to prevent the robot from deviating from the working area during the obstacle avoidance process, thereby improving the robot's work efficiency.

[0020] The present invention provides a robot, comprising one or more processors and a memory, wherein the memory stores a computer program, and when the computer program is executed by the processor, the steps of the control method described in any one of the above embodiments are implemented.

[0021] In this way, whether the robot has entered the working area is judged according to the current position of the robot. When the robot has not entered the working area, the boundary is marked as a non-obstacle so that the robot can enter the working area smoothly. After the robot enters the working area, by marking the boundary as the first obstacle, the robot is kept away from the boundary of the working area when moving during work or avoiding local obstacles, so as to prevent the robot from deviating from the working area during the obstacle avoidance process, thereby improving the robot's work efficiency.

[0022] The present invention provides a computer-readable storage medium, wherein the computer-readable storage medium is used to store a computer program, and when the computer program is executed by a processor, the control method described in any one of the above embodiments is implemented.

[0023] In this way, whether the robot has entered the working area is judged according to the current position of the robot. When the robot has not entered the working area, the boundary is marked as a non-obstacle so that the robot can enter the working area smoothly. After the robot enters the working area, by marking the boundary as the first obstacle, the robot is kept away from the boundary of the working area when moving during work or avoiding local obstacles, so as to prevent the robot from deviating from the working area during the obstacle avoidance process, thereby improving the robot's work efficiency.

[0024] Additional aspects and advantages of the present invention will be given in part in the following description and in part will be obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] The above and / or additional aspects and advantages of the present invention will become apparent and easily understood from the description of the embodiments in conjunction with the following drawings, in which:

[0026] Figure 1 is a flow chart of a control method according to an embodiment of the present invention;

[0027] Figure 2 is a schematic diagram of a control device according to an embodiment of the present invention;

[0028] Figure 3 is a flow chart of a control method according to an embodiment of the present invention;

[0029] Figure 4 is a schematic diagram of a control device according to an embodiment of the present invention;

[0030] Figure 5 is a flow chart of a control method according to an embodiment of the present invention;

[0031] Figure 6 is a schematic diagram of a control device according to an embodiment of the present invention;

[0032] Figure 7 is a flow chart of a control method according to an embodiment of the present invention;

[0033] Figure 8 is a schematic diagram of a control device according to an embodiment of the present invention;

[0034] Fig. 9 is a flow chart of a control method according to an embodiment of the present invention;

[0035] Fig.10 Schematic diagram of a control device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0036] The embodiments of the present invention are described in detail below, and the embodiments of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements with the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and cannot be understood as limiting the present invention.

[0037] In actual work, when a robot encounters an obstacle, it needs to avoid it, such as performing local path planning to avoid the obstacle. During the obstacle avoidance process, the robot may deviate from the working area, so that after the obstacle avoidance is completed, the route needs to be replanned to return to the working area.

[0038] See also Figure 1 , an embodiment of the present invention provides a robot control method, comprising:

[0039] 01: Determine the robot’s working area in the robot’s global map;

[0040] 02: Get the robot's starting position;

[0041] 03: Determine whether the robot is in the working area based on the starting position and execute:

[0042] 031: When the robot is not in the working area, the boundary of the working area is marked as non-obstacle, and the robot is controlled to move to the preset working path. After the robot moves to the working path, the boundary of the working area is marked as the first obstacle, and the working path is located inside the working area;

[0043] 032: When the robot is in the working area, mark the boundary of the working area as the first obstacle;

[0044] 04: Control the robot to move along the working path. When any second obstacle is detected in the working area, the working path is corrected according to the first obstacle and the second obstacle. The robot is controlled to move along the corrected working path so that the robot avoids the first obstacle and the second obstacle.

[0045] Specifically, see Figure 2The control method of the embodiment of the present invention can be implemented by the control device 100 of the embodiment of the present invention. The control device 100 includes a determination module 10, an acquisition module 20, a judgment module 30 and a control module 40, wherein step 01 can be implemented by the determination module 10, step 02 can be implemented by the acquisition module 20, step 03, step 031 and step 032 can be implemented by the judgment module 30, and step 04 can be implemented by the determination module 10. That is, the determination module 10 is used to determine the working area of ​​the robot in the global map of the robot; the acquisition module 20 is used to obtain the starting position of the robot; the judgment module 30 is used to judge whether the robot is in the working area according to the starting position. In the working area, the following are executed: when the robot is not in the working area, the boundary of the working area is marked as a non-obstacle, and the robot is controlled to move to a preset working path. After the robot moves to the working path, the boundary of the working area is marked as a first obstacle, and the working path is located inside the working area; when the robot is located in the working area, the boundary of the working area is marked as a first obstacle; the control module 40 is used to control the robot to move along the working path, and when any second obstacle is detected in the working area, the working path is corrected according to the first obstacle and the second obstacle, and the robot is controlled to move along the corrected working path so that the robot avoids the first obstacle and the second obstacle.

[0046] The robot determines the working area in the global map and performs full coverage path planning in the working area to plan the working path and obtain the starting position of the robot, that is, the initial position of the robot. The method for judging whether the robot is in the working area based on the starting position can be judged by radar ranging or other methods, or it can be judged by the current position of the robot and the starting position of the working path. If the robot is not in the working area, the robot needs to be controlled to move onto the working path within the working area. At this time, the boundary of the working area is marked as a non-obstacle so that the robot can pass freely at the boundary of the working area, and the robot is controlled to move to the working path. When the robot reaches the working path, it can be regarded as having entered the working area; if the starting position of the robot is within the working area or the robot moves from outside the working area into the working area, in order to prevent the robot from leaving the working area during the movement along the working path or during the local obstacle avoidance process, the boundary of the working area is set as the first obstacle, so that when the robot encounters any second obstacle in the working area, the local obstacle avoidance path planning is performed according to the first obstacle and the second obstacle to correct the working path. The corrected working path avoids the first obstacle and the second obstacle, and the robot is controlled to move according to the corrected path, thereby avoiding the boundary of the working area and the second obstacle in the working area, so as to prevent the robot from leaving the working area during local obstacle avoidance, thereby improving the work efficiency of the robot.

[0047] In this way, whether the robot has entered the working area is determined according to the current position of the robot. When the robot has not entered the working area, the boundary is marked as a non-obstacle so that the robot can enter the working area smoothly. After the robot enters the working area, the boundary is marked as the first obstacle, so that the robot moves away from the boundary of the working area when moving during work or avoiding local obstacles, thereby preventing the robot from deviating from the working area during the obstacle avoidance process, thereby avoiding the robot from having to navigate back to the working area after completing the obstacle avoidance, thereby improving the robot's work efficiency.

[0048] In the embodiment of the present invention, after the working area of ​​the robot is determined, the boundary of the working area can be extracted, and the boundary of the working area can be saved in the global map in the form of a grid to facilitate subsequent processing.

[0049] See also Figure 3 In some embodiments, after step 04 (correcting the working path according to the first obstacle and the second obstacle when any second obstacle is detected in the working area), the method further includes:

[0050] 041: If the working path is corrected successfully, the robot is controlled to move according to the corrected working path;

[0051] 042: If the working path correction fails, the robot is controlled to stop moving.

[0052] Specifically, see Figure 4 The control module 40 also includes a first control submodule 41 and a second control submodule 43, wherein step 041 can be implemented by the first control submodule 41, and step 042 can be implemented by the second control submodule 43, that is, if the working path is corrected successfully, the first control submodule 41 can be used to control the robot to move according to the corrected working path; if the working path is corrected unsuccessfully, the second control submodule 43 can be used to control the robot to stop moving.

[0053] Among them, since the boundary point of the working area is set as the first obstacle, the robot will avoid the boundary point of the working area during operation. If the local obstacle avoidance path planning is successfully performed when encountering the second obstacle, the working path will be corrected according to the local obstacle avoidance path, and the robot will be controlled to move according to the corrected working path to avoid the second obstacle and the boundary of the working area; if the path within the working area cannot be successfully planned, the correction of the working path fails. In order to prevent the robot from leaving the working area or colliding with the second obstacle, the robot stops moving and maintains the stopped state within a preset time.

[0054] In this way, when the robot encounters any second obstacle, it corrects the working path according to the first obstacle and the second obstacle. If the working path can be corrected successfully, that is, there is a path that avoids the first obstacle and the second obstacle and continues to move, the robot is controlled to run according to the corrected working path to avoid the obstacle; if the working path correction fails, that is, there is no path that avoids the first obstacle and the second obstacle and continues to move, the robot is controlled to stop moving to avoid the robot colliding with the second obstacle or leaving the working area.

[0055] See also Figure 3 In some embodiments, after step 042 (if the working path correction fails, the robot is controlled to stop moving), the method further includes:

[0056] 043: Determine whether the second obstacle is cleared within a preset time length. If so, control the robot to continue moving along the working path. If not, control the robot to maintain a stopped moving state and report trapped information.

[0057] Specifically, see Figure 4 The control module 40 also includes a third control submodule 45. Step 043 can be implemented by the third control submodule 45. That is, the third control submodule 45 can be used to determine whether the second obstacle is cleared within a preset time length. If so, the robot is controlled to continue moving along the working path. If not, the robot is controlled to maintain a stopped moving state and report trapped information.

[0058] Among them, the preset time length can be a pre-set time length, which is not limited here. If the second obstacle is cleared within the preset time length, the robot continues to move along the working path; if the second obstacle continues to exist within the preset time length, the robot maintains a stopped moving state to ensure that the robot remains in the working area, avoids the robot colliding with the second obstacle or leaving the working area, and reports an error message to remind the user to deal with the abnormal situation.

[0059] In this way, if the second obstacle can be cleared within the preset time, the robot resumes moving without the need for user intervention; if the second obstacle still exists within the preset time, the robot stays where it is and reports an error message to the user, so that the user can handle it in time.

[0060] See also Figure 5 In some embodiments, step 031 (controlling the robot to move to a preset working path) includes:

[0061] 0311: Plan a moving path according to the starting position and the starting point of the working path, and the end point of the moving path is located at the starting point of the working path;

[0062] 0312: Control the robot to move along the moving path to the working path. When the robot encounters a third obstacle while moving along the moving path, plan an obstacle avoidance path. The obstacle avoidance path is a path for the robot to avoid the third obstacle. The end point of the obstacle avoidance path is on the working path.

[0063] 0313: Control the robot to move to the working path along the obstacle avoidance path.

[0064] Specifically, see Figure 6 The judgment module 30 also includes a first planning submodule 31, a second planning submodule 33, and an obstacle avoidance control submodule 35, wherein step 0311 can be implemented by the first planning submodule 31, step 0312 can be implemented by the second planning submodule 33, and step 0313 can be implemented by the obstacle avoidance control submodule 35, that is, the first planning submodule 31 can be used to plan a moving path according to the starting position and the starting point of the working path, and the end point of the moving path is located at the starting point of the working path; the second planning submodule 33 can be used to control the robot to move to the working path along the moving path, and when the robot encounters a third obstacle in the process of moving along the moving path, an obstacle avoidance path is planned, and the obstacle avoidance path is a path for the robot to avoid the third obstacle, and the end point of the obstacle avoidance path is located on the working path; the obstacle avoidance control submodule 35 can be used to control the robot to move to the working path along the obstacle avoidance path.

[0065] Among them, when the starting position of the robot is not in the working area, the robot needs to go to the starting point of the working path to enter the working area to work. Therefore, the moving path is planned according to the starting position of the robot and the starting point of the working path, so that the robot can move along the moving path, from the starting position to the starting point of the working path. The third obstacle can be outside the working area. If the robot encounters the third obstacle in the process of moving along the moving path, the robot performs local path planning to obtain an obstacle avoidance path, and the robot can move along the obstacle avoidance path to avoid the third obstacle. Since the end point of the obstacle avoidance path is on the working path, when the robot moves to the end point of the obstacle avoidance path, the robot reaches the working path.

[0066] In this way, by planning a moving path and controlling the robot to move along the moving path, the robot can be moved from the starting position to the working path; in the process of moving along the moving path, if the robot encounters a third obstacle, an obstacle avoidance path is planned to avoid the third obstacle; since the end point of the obstacle avoidance path is on the working path, the robot is controlled to move along the obstacle avoidance path, and while avoiding the third obstacle, the robot can also be controlled to move to the working path.

[0067] See also Figure 5In some embodiments, the moving path and the working path are composed of discrete points; step 031 (controlling the robot to move to a preset working path) further includes:

[0068] 0314: Set index identifiers for the points that make up the moving path and the working path. The index identifiers are set incrementally from the starting point of the moving path to the end point of the working path. When planning an obstacle avoidance path, the index identifier of the end point of the obstacle avoidance path is greater than or equal to the index identifier of the starting point of the working path.

[0069] Specifically, see Figure 6 , the judgment module 30 also includes a setting submodule 37. Step 0314 can be implemented by the setting submodule 37. That is, the setting submodule 37 can be used to set index identifiers for points constituting the moving path and the working path. The index identifiers are set incrementally from the starting point of the moving path to the end point of the working path. When planning the obstacle avoidance path, the index identifier of the end point of the obstacle avoidance path is greater than or equal to the index identifier of the starting point of the working path. The moving path and the working path are set with index identifiers, and the index identifiers are set incrementally from the starting point of the moving path to the end point of the working path, that is, they are set incrementally from the starting position of the robot to the end point of the working path. Since the end point of the moving path is the starting point of the working path, if the index identifiers of all points on the moving path are less than or equal to the index identifier of the starting point of the working path, and the index identifiers of all points on the working path are greater than or equal to the index identifier of the starting point of the working path, the index identifier of the starting point of the working path can be set to a preset comparison value, so that it is possible to judge whether the point is located on the moving path or on the working path according to the comparison result of the index identifier of any point and the preset comparison value. Since the end point of the obstacle avoidance path is on the working path, the index identifier of the point of the end point of the obstacle avoidance path on the working path is greater than or equal to the index identifier of the starting point of the working path.

[0070] In addition, when the robot does not encounter a third obstacle during its movement along the moving path, the robot continues to move along the moving path. At this time, based on the comparison result of the index coordinates of the robot's current position point and the index coordinates of the starting point of the working path, it can be determined whether the robot has reached the working path. When the index coordinates of the current position point are less than the index coordinates of the starting point of the working path, it is determined that the robot has not reached the working path; when the index coordinates of the current position point are greater than or equal to the index coordinates of the starting point of the working path, it is determined that the robot has reached the working path, and the robot is controlled to move along the working path.

[0071] In this way, the position of any point on the moving path or the working path can be determined by the index identifier of the point. Since the index identifier is set incrementally and the end point of the obstacle avoidance path is on the working path, the index identifier of the end point of the obstacle avoidance path is greater than or equal to the index identifier of the starting point of the working path.

[0072] See also Figure 7 In some embodiments, step 0313 (controlling the robot to move to the working path according to the obstacle avoidance path) includes:

[0073] 03131: Control the robot to move along the obstacle avoidance path and obtain the current position of the robot in real time;

[0074] 03132: Determine in real time whether the distance between the current position and the end point of the obstacle avoidance path is less than a preset threshold. If so, determine that the robot has moved to the working path; if not, determine that the robot has not moved to the working path.

[0075] Specifically, see Figure 8 The obstacle avoidance control submodule 35 includes an obstacle avoidance control unit 351 and a judgment unit 353. Step 03131 can be implemented by the obstacle avoidance control unit 351, and step 03132 can be implemented by the judgment unit 353. That is to say, the obstacle avoidance control submodule 35 can be used to control the robot to move along the obstacle avoidance path and obtain the current position of the robot in real time; the judgment unit 353 can be used to determine in real time whether the distance between the current position and the end point of the obstacle avoidance path is less than a preset threshold. If so, it is determined that the robot has moved to the working path, and if not, it is determined that the robot has not moved to the working path.

[0076] Among them, in the process of the robot moving along the obstacle avoidance path, the current position of the robot is obtained in real time, and the laser radar technology can be used to determine in real time whether the distance between the current position and the end point of the obstacle avoidance path is less than a preset threshold. If the distance is less than the preset threshold, it is determined that the robot has reached the end point of the obstacle avoidance path. Since the end point of the obstacle avoidance path is on the working path, it is determined that the robot has moved to the working path at this time; if the distance is greater than the preset threshold, the robot has not reached the end point of the obstacle avoidance path at this time, that is, it has not moved to the working path, and the robot is controlled to continue moving along the obstacle avoidance path.

[0077] In this way, the distance between the robot's current position and the end point of the obstacle avoidance path is used to determine whether the robot has reached the end point of the obstacle avoidance path, that is, whether it has reached the starting point of the working path. If it has reached it, the robot is controlled to move along the working path; if it has not reached it, the robot is controlled to continue moving along the obstacle avoidance path.

[0078] See also Fig. 9 In some embodiments, after step 04 (controlling the robot to move according to the working path), the method further includes:

[0079] 05: When the robot completes the work, mark the boundaries of the work area as non-obstacles.

[0080] Specifically, see Fig.10, the control device 100 also includes a marking module 50, and step 05 can be implemented by the marking module 50, that is, the comparison module can be used to mark the boundary of the working area as a non-obstacle when the robot completes the work. When the robot completes the work, or when the robot moves along the working path and reaches the end point, the boundary of the working area originally marked as the first obstacle is marked as a non-obstacle, that is, the robot can re-plan the path to any position without being affected by the boundary, and any position includes any position inside or outside the working area. In one embodiment, after the robot completes the work, the boundary of the working area is marked as a non-obstacle, and a new working area is re-determined, that is, step 01 is repeated.

[0081] In this way, the robot marks the boundary as a non-obstacle after completing the work, so that the robot can re-plan the path to any position after completing the work or reaching the end of the work path without being affected by the boundary.

[0082] The present invention provides a robot, which includes one or more processors and a memory. The memory stores a computer program. When the computer program is executed by the processor, the steps of the control method of any one of the above-mentioned embodiments are implemented.

[0083] In this way, whether the robot has entered the working area is judged according to the current position of the robot. When the robot has not entered the working area, the boundary is marked as a non-obstacle so that the robot can enter the working area smoothly. After the robot enters the working area, by marking the boundary as the first obstacle, the robot is kept away from the boundary of the working area when moving during work or avoiding local obstacles, so as to prevent the robot from deviating from the working area during the obstacle avoidance process, thereby improving the robot's work efficiency.

[0084] The present invention provides a computer-readable storage medium, which is used to store a computer program. When the computer program is executed by a processor, the control method of any one of the above-mentioned embodiments is implemented.

[0085] In this way, whether the robot has entered the working area is judged according to the current position of the robot. When the robot has not entered the working area, the boundary is marked as a non-obstacle so that the robot can enter the working area smoothly. After the robot enters the working area, by marking the boundary as the first obstacle, the robot is kept away from the boundary of the working area when moving during work or avoiding local obstacles, so as to prevent the robot from deviating from the working area during the obstacle avoidance process, thereby improving the robot's work efficiency.

[0086] In an embodiment of the present invention, the robot may be a cleaning robot such as a sweeping robot, and the working area may be the cleaning area of ​​the cleaning robot. For a full coverage cleaning scenario, it is usually necessary to first extract an outer frame of a working area, and then perform path planning to maximize coverage within the frame, that is, to perform path planning within the working area, and to ensure as much as possible a path planning solution with high coverage and few repeated routes. However, since global planning must be based on the premise of static planning, scenes requiring local obstacle avoidance may appear at any time during the actual navigation process. Once the obstacle is relatively large in size, the robot may run out of the original working area due to the continuous calculation of the obstacle avoidance path, which deviates greatly from the actual working path, resulting in the completion of obstacle avoidance, but the need to re-plan the navigation route to return to the original path.

[0087] In order to solve the technical problem of running out of the predetermined working area during the local obstacle avoidance process and having to perform global navigation again, in the embodiment of the present invention, if the robot itself is outside the working area, the boundary of the working area is not treated as an obstacle, otherwise the robot cannot enter the working area to perform tasks. When the robot enters the working area, the boundary of the working area is treated as an obstacle to ensure that in the process of local obstacle avoidance, the path away from the boundary is selected as far as possible. If there is no such path that can be bypassed in the working area, the robot reports planning failure and stops in the working area, and does not run out of the working area. Within a given time, if the obstacle can be removed, it will resume normal driving. If it exceeds the time limit, it will report being trapped.

[0088] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "illustrative embodiments", "examples", "specific examples" or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiments or examples are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. In addition, those skilled in the art may combine and combine different embodiments or examples described in this specification and the features of different embodiments or examples without contradiction.

[0089] In addition, the term "connection" should be understood in a broad sense, for example, it can include fixed connection, detachable connection, or integral connection; it can include direct connection, indirect connection through an intermediate medium, and internal communication between two elements. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0090] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In the description of the present invention, the meaning of "plurality" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined.

[0091] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, segment or portion of code comprising one or more executable instructions for implementing the steps of a specific logical function or process, and the scope of the preferred embodiments of the present invention includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in reverse order depending on the functions involved, which should be understood by technicians in the technical field to which the embodiments of the present invention belong.

[0092] Although the embodiments of the present invention have been shown and described above, it is to be understood that the above embodiments are exemplary and are not to be construed as limitations of the present invention. A person skilled in the art may change, modify, replace and vary the above embodiments within the scope of the present invention.

Claims

1. A robot control method, characterized in that: include: Determining a working area of ​​the robot in a global map of the robot; Obtaining the starting position of the robot; Determine whether the robot is within the working area according to the starting position, and execute: When the robot is not in the working area, marking the boundary of the working area as a non-obstacle, controlling the robot to move to a preset working path, and after the robot moves to the working path, marking the boundary of the working area as a first obstacle, and the working path is located inside the working area; When the robot is located in the working area, the boundary of the working area is marked as a first obstacle; the robot is controlled to move along the working path, and when any second obstacle is detected in the working area, the working path is corrected according to the first obstacle and the second obstacle, and the robot is controlled to move along the corrected working path so that the robot avoids the first obstacle and the second obstacle.

2. The control method according to claim 1, characterized in that: After correcting the working path according to the first obstacle and the second obstacle when any second obstacle is detected in the working area, the method further includes: If the working path is modified successfully, then controlling the robot to move according to the modified working path is executed; If the working path is not corrected, the robot is controlled to stop moving.

3. The control method according to claim 2, characterized in that: After controlling the robot to stop moving if the working path correction fails, the method further includes: Determine whether the second obstacle is cleared within a preset time length, if so, control the robot to continue moving along the working path, if not, control the robot to maintain a stopped moving state and report trapped information.

4. The control method according to claim 1, characterized in that: The controlling the robot to move to a preset working path comprises: Planning a moving path according to the starting position and the starting point of the working path, wherein the end point of the moving path is located at the starting point of the working path; Controlling the robot to move toward the working path along the moving path, and planning an obstacle avoidance path when the robot encounters a third obstacle during the process of moving along the moving path, wherein the obstacle avoidance path is a path for the robot to avoid the third obstacle, and an end point of the obstacle avoidance path is located on the working path; The robot is controlled to move to the working path according to the obstacle avoidance path.

5. The control method according to claim 4, characterized in that: The moving path and the working path are composed of discrete points; The controlling the robot to move to a preset working path also includes: Setting index marks for points constituting the moving path and the working path, wherein the index marks are set incrementally from the starting point of the moving path to the end point of the working path; When planning the obstacle avoidance path, the index identifier of the end point of the obstacle avoidance path is greater than or equal to the index identifier of the starting point of the working path.

6. The control method according to claim 4, characterized in that: The controlling the robot to move to the working path according to the obstacle avoidance path comprises: Controlling the robot to move along the obstacle avoidance path and obtaining the current position of the robot in real time; It is determined in real time whether the distance between the current position and the end point of the obstacle avoidance path is less than a preset threshold value. If so, it is determined that the robot has moved to the working path; if not, it is determined that the robot has not moved to the working path.

7. The control method according to any one of claims 1 to 6, characterized in that: After controlling the robot to move according to the working path, the method further includes: When the robot completes the work, the boundary of the work area is marked as a non-obstacle.

8. A robot control device, characterized in that: include: A determination module, used to determine a working area of ​​the robot in a global map of the robot; An acquisition module, used to acquire the starting position of the robot; A judgment module is configured to judge whether the robot is within the working area according to the starting position, and execute: When the robot is not in the working area, marking the boundary of the working area as a non-obstacle, controlling the robot to move to a preset working path, and after the robot moves to the working path, marking the boundary of the working area as a first obstacle, and the working path is located inside the working area; When the robot is located in the working area, the boundary of the working area is marked as a first obstacle; a control module is used to control the robot to move along the working path, and when any second obstacle is detected in the working area, the working path is corrected according to the first obstacle and the second obstacle, and the robot is controlled to move along the corrected working path so that the robot avoids the first obstacle and the second obstacle.

9. A robot, characterized in that: The robot includes one or more processors and a memory, wherein the memory stores a computer program, and when the computer program is executed by the processor, the steps of the control method according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium for storing a computer program, characterized in that: When the computer program is executed by a processor, the control method according to any one of claims 1 to 7 is implemented.