Robot control method, robot, and storage medium

By determining the maximum inline rectangular task area of ​​the road network area in the robot environment map and planning the cleaning path to avoid retrograde, the risk of robot collision with vehicles in complex road network environments is solved, and the operation safety and integrity of cleaning tasks are improved.

CN120533684APending Publication Date: 2025-08-26YOUDI ROBOT (WUXI) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510600554.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-09
Publication Date
2025-08-26

AI Technical Summary

Technical Problem

Robots are prone to reverse directions in complex road network environments that are opposite to the vehicle's driving direction, which increases the risk of collision with vehicles and affects operational safety.

Method used

The maximum inline rectangular task area of ​​the road network area is determined in the map of the environment in which the robot is located, and the path points on the first and second boundary lines are determined based on the cleaning width of the robot. The cleaning path is planned through the connection line, so that the path is parallel to the lane direction and avoid retrograde.

Benefits of technology

Reduces the risk of robots and vehicles collide, and improves operational safety and cleaning tasks in complex road network environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120533684A_ABST
    Figure CN120533684A_ABST
Patent Text Reader

Abstract

The invention discloses a robot control method, a robot and a storage medium, and relates to the technical field of robots, and the method comprises the steps: determining a road network region corresponding to a road network in an external environment in an environment map of the external environment where the robot is located, and determining a maximum inscribed rectangle of the road network region as a task region of the robot; determining path points on the first boundary line and the second boundary line based on the cleaning width of the robot; determining a cleaning path based on each connecting line between each path point on the first boundary line and each path point on the second boundary line, and determining the driving direction of each cleaning path based on the lane direction of the road network; and performing path planning on the robot based on each cleaning path to obtain a target path, and controlling the robot to travel according to the target path. According to the method, the risk that the robot collides with the vehicle due to retrograde running in the complex road network environment is reduced, and the operation safety of the robot in the complex road network environment is improved.
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 control method, a robot, and a storage medium. Background Art

[0002] With the development of robotics technology, the application scenarios of robots are becoming increasingly extensive, and they are often used in places with complex road network environments such as underground garages, shopping malls, and stations. Such places contain multiple criss-crossing driving lanes and the frequency of vehicles entering and exiting the garage is extremely high, forming a dynamically changing and uncertain traffic environment. As a result, cleaning robots are prone to reverse driving in the opposite direction of vehicle travel during actual operations, increasing the risk of collision between the robot and the vehicle, affecting the safety of the robot during operation.

[0003] The above content is only used to assist in understanding the technical solution of this application and does not constitute an admission that the above content is prior art. Summary of the Invention

[0004] The main purpose of this application is to provide a robot control method, a robot and a storage medium, aiming to solve the technical problem of low safety when the robot works in a road network area.

[0005] To achieve the above objectives, the present application proposes a robot control method, which includes:

[0006] Determining a road network area corresponding to a road network in the external environment in an environment map of the robot, and determining a maximum inscribed rectangle of the road network area as a task area of ​​the robot;

[0007] Determining path points on a first boundary line and a second boundary line based on a cleaning width of the robot, wherein the first boundary line and the second boundary line are boundary lines of the task area in a direction perpendicular to the lanes of the road network, a distance between each path point on the first boundary line is less than or equal to the cleaning width, and a distance between each path point on the second boundary line is equal to a distance between each path point on the first boundary line;

[0008] Determining a cleaning path based on each connecting line between each path point on the first boundary line and each path point on the second boundary line, and determining a driving direction of each cleaning path based on a lane direction of the road network, wherein each cleaning path is parallel to a boundary line of the task area in the lane direction;

[0009] Path planning is performed on the robot based on each of the cleaning paths to obtain a target path, and the robot is controlled to travel along the target path.

[0010] In one embodiment, the step of determining the path points on the first boundary line and the second boundary line based on the cleaning width of the robot includes:

[0011] According to the lane direction, the task area is divided into a first area and a second area in the lane direction, wherein the lane directions of the first area and the second area are opposite;

[0012] If the first area width and the second area width are equal, and the vertical boundary width of the task area is an even multiple of the cleaning width of the robot, the cleaning width is determined as the interval width between the path points, and the path points on the first boundary line are determined based on the interval width, and the path points on the second boundary line are determined based on the interval width, wherein the first area width is the width of the first area in the vertical direction of the lane, the second area width is the width of the second area in the vertical direction of the lane, and the vertical boundary width is the width of the task area in the vertical direction of the lane;

[0013] If the first area width and the second area width are not equal, and / or the vertical boundary width is not an even multiple of the cleaning width, the interval width is determined based on the first area width, the second area width and the cleaning width, and the path points on the first boundary line and the second boundary line are determined based on the interval width.

[0014] In one embodiment, the step of determining a path point on the first boundary line based on the interval width includes:

[0015] Determine an intersection point of a region dividing line between the first region and the second region and a dividing line of the first boundary line, add a first initial point whose distance between the first region boundary line and the intersection point of the dividing line is half of the interval width to a first region path point list, and add a second initial point whose distance between the second region boundary line and the intersection point of the dividing line is half of the cleaning width to a second region path point list; wherein the first region boundary line is a boundary line of the first region in the first boundary line, and the second region boundary line is a boundary line of the second region in the first boundary line;

[0016] Determine the first initial point as the first current point, add a first target point on the first area boundary line whose distance from the first current point is the cleaning width to the first area path point list, update the first target point to the first current point, and update the first area path point list based on the first current point until the distance between the first initial point and the vertex of the first area boundary line is less than the cleaning width, thereby obtaining the first area path point list;

[0017] Determine the second initial point as the second current point, add a second target point on the second area boundary line that is at a distance of the cleaning width from the second current point to the second area path point list, update the second target point to the second current point, and update the second area path point list based on the two current points until the distance between the first initial point and the vertex of the first area boundary line is less than the cleaning width, thereby obtaining the second area path point list;

[0018] The waypoints in the first area waypoint list and the second area waypoint list are determined as waypoints on the first boundary line.

[0019] In one embodiment, the step of determining the space width based on the first area width, the second area width, and the cleaning width comprises:

[0020] A first calculated width is obtained by subtracting the cleaning width from the first area width, a result of dividing the first calculated width by the cleaning width is input into a rounding function to obtain a first number of divisions, and a first area path spacing width is obtained by dividing the first calculated width by the first number of divisions;

[0021] subtracting the cleaning width from the second area width to obtain a second calculated width, inputting the result of dividing the second calculated width by the cleaning width into the ceiling function to obtain a second number of divisions, and dividing the second calculated width by the second number of divisions to obtain a second area path spacing width;

[0022] The first area path interval width and the second area path interval width are determined as the interval width.

[0023] In one embodiment, the step of determining the cleaning path based on the connecting line between each path point on the first boundary line and each path point on the second boundary line includes:

[0024] Determining each connecting line between each path point on the first boundary line and each path point on the second boundary line as an initial path, wherein each of the initial paths is parallel to the boundary line of the task area in the lane direction;

[0025] Traversing each of the initial paths, offsetting the starting endpoint of the initial path into the path by the cleaning width to obtain a path starting point, offsetting the ending endpoint of the initial path into the path by the cleaning width to obtain a path ending point, and determining the path between the path ending point and the path starting point as a cleaning path.

[0026] In one embodiment, the step of performing path planning on the robot based on each of the cleaning paths to obtain a target path includes:

[0027] determining a path traversal order of each cleaning path based on the number of the cleaning paths and the travel direction of each cleaning path;

[0028] Determining a plurality of path pairs adjacent in path traversal order from the cleaning paths, traversing each of the path pairs, and generating a curved connecting path based on the same-side endpoints of two cleaning paths in the path pairs;

[0029] Each of the cleaning paths and each of the curve connection paths are connected in accordance with the path traversal order to obtain the target path of the robot.

[0030] In one embodiment, the step of determining the path traversal order of each cleaning path based on the number of the cleaning paths and the travel direction of each cleaning path includes:

[0031] Determining a to-be-supplemented area and a target area in the first area and the second area of ​​the task area, wherein the number of cleaning paths in the to-be-supplemented area is smaller than that in the target area;

[0032] determining a new path interval width based on the area width of the area to be replenished and the number of cleaning paths in the target area;

[0033] generating new path points based on the new path interval width, determining a new cleaning path based on the new path points and the width of the area to be replenished in the vertical direction of the lane, and determining the new cleaning path as the cleaning path for the area to be replenished;

[0034] A path traversal order of each cleaning path is determined based on the driving direction of the cleaning path in the to-be-replenished area and the driving direction of the cleaning path in the target area.

[0035] In one embodiment, the step of determining the curve connecting paths and the turn connecting paths between the paths includes:

[0036] determining an end point of a first cleaning path and a starting point of a second cleaning path in the path pair;

[0037] Extending a first control point at the end point of the first cleaning path in a direction opposite to the travel direction of the first cleaning path according to a preset first offset, and extending a second control point at the starting point of the second cleaning path in a positive direction of the travel direction according to a preset second offset;

[0038] Taking the end point of the first cleaning path as the starting point, the starting point of the second cleaning path as the ending point, and the first control point and the second control point as the intermediate control points, a cubic Bezier curve is generated as the curve connection path;

[0039] If the maximum curvature of the curve connection path is greater than the maximum allowable curvature of the robot, the first offset and / or the second offset are adjusted until the maximum curvature of the curve connection path is less than or equal to the maximum allowable curvature.

[0040] In addition, to achieve the above-mentioned purpose, the present application also proposes a robot, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the robot control method as described above.

[0041] In addition, to achieve the above-mentioned purpose, the present application also proposes a storage medium, which is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by the processor, the steps of the robot control method described above are implemented.

[0042] In this application, the robot's task area is determined by identifying the road network area corresponding to the road network in the environment map of the robot's surroundings. Compared to planning a path without boundaries throughout a complex road network, this application narrows the planning scope, reduces unnecessary path calculations, and improves planning efficiency. Furthermore, using the maximum inscribed rectangle as the task area can maximize coverage of the portion of the road network area suitable for robot operation, ensuring the integrity of the cleaning task, avoiding omissions of important areas, and providing a foundation for subsequent path planning.

[0043] Based on the robot's cleaning width, path points on a first boundary line and a second boundary line are determined, wherein the first boundary line and the second boundary line are the boundary lines of the task area in a direction perpendicular to the lanes of the road network, the distance between each path point on the first boundary line is less than or equal to the cleaning width, and the distance between each path point on the second boundary line is equal to the distance between each path point on the first boundary line. The cleaning width is the maximum width over which the robot can perform a cleaning operation. By determining the spacing between path points based on the cleaning width, the robot can ensure that it can fully cover and clean the task area during movement, avoiding blind spots.

[0044] The cleaning paths are determined based on the connecting lines between each path point on the first boundary line and each path point on the second boundary line. The direction of each cleaning path is determined based on the lane orientation of the road network, and each cleaning path is parallel to the lane orientation of the task area. By determining the direction of the cleaning paths based on the lane orientation of the road network, the robot's direction of travel is aligned with that of the vehicle, standardizing the robot's travel path, avoiding reverse driving, reducing the risk of collision between the robot and the vehicle, and improving the robot's safety.

[0045] Based on each cleaning path, the robot is planned to obtain the target path and then controlled to drive along the target path. By converting the planned cleaning path into the robot's actual driving route, the robot is able to execute its tasks in complex road networks by following a path that complies with vehicle driving regulations and avoids the risk of reverse driving and collisions.

[0046] In summary, the present application reduces the risk of the robot colliding with a vehicle due to going against traffic in a complex road network environment, and improves the robot's operational safety in a complex road network environment. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0048] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0049] Figure 1 A schematic diagram of a flow chart of the first embodiment of the robot control method of the present application;

[0050] Figure 2 A flowchart of the second embodiment of the robot control method of this application is provided;

[0051] Figure 3 A schematic diagram of determining path points based on the robot cleaning width provided in an embodiment of the robot control method of the present application;

[0052] Figure 4 A schematic diagram of a path planning method provided in accordance with an embodiment of the present invention;

[0053] Figure 5 Another path planning schematic diagram provided for an embodiment of the robot control method of this application;

[0054] Figure 6 A schematic diagram of a task area provided in an embodiment of the robot control method of the present application;

[0055] Figure 7 A schematic diagram of path point connections provided in an embodiment of the robot control method of this application;

[0056] Figure 8 A schematic diagram of a cleaning path provided in an embodiment of the robot control method of this application;

[0057] Figure 9 A schematic diagram of a target path provided in an embodiment of the robot control method of the present application;

[0058] Figure 10 This is a schematic diagram of the equipment structure of the robot in the embodiment of this application.

[0059] The purpose, features and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0060] It should be understood that the specific embodiments described herein are merely used to explain the technical solutions of the present application and are not intended to limit the present application.

[0061] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.

[0062] It should be noted that the execution subject of this embodiment can be a computing service device or a robot that is communicatively connected to the robot. The computing service device that is communicatively connected to the robot has data processing, network communication, and program execution functions, such as a tablet computer, personal computer, mobile phone, etc., or an electronic device capable of performing the above functions. The following uses a robot as an example to illustrate this embodiment and the following embodiments.

[0063] Based on this, the embodiment of the present application provides a robot control method, referring to Figure 1 , Figure 1 This is a flow chart of the first embodiment of the robot control method of the present application.

[0064] In this embodiment, the robot control method includes steps S10 to S40:

[0065] Step S10: determining a road network area corresponding to a road network in the external environment in an environment map of the external environment where the robot is located, and determining a maximum inscribed rectangle of the road network area as a task area of ​​the robot.

[0066] The environment map can be a digital map created by the robot using its sensors (such as lidar and image sensors) to scan its surroundings. It can also be a map pre-installed on the robot. The environment map contains various environmental information, such as the location of obstacles, traversable areas, and the attributes of different areas. The road network is the road area in the external environment where vehicles travel, such as the driving lanes of an underground garage or the lanes of a shopping mall parking lot. The road network area is the area in the environment map corresponding to the road network in the external environment.

[0067] In one feasible implementation, the robot can be provided with a laser radar and an image sensor. After the robot is started, the laser radar emits a laser beam and obtains the distance information of surrounding objects by measuring the time of reflected light, thereby obtaining point cloud data of the environment; the image sensor captures the environmental image and transmits the environmental image to the robot's control system. The robot's control system constructs an environmental map based on the point cloud data, and performs feature recognition based on the environmental image to obtain the road network on which the vehicle is traveling, and determines the road network area corresponding to the road network in the environmental map as the road network area.

[0068] It should be noted that the road network area may be an irregular area. In order to facilitate the robot to perform the task, a rectangle with the largest area and all four sides in contact with the road network area boundary can be determined within the road network area as the task area. It should be noted that there is no restriction on the method of determining the task area and it can be set according to actual needs. For example, in one feasible implementation, after determining the road network area, a simulated annealing algorithm is used to calculate the maximum inscribed rectangle to obtain the task area. Specifically, an initial rectangle is randomly determined within the road network area, and then the position, angle and size of the rectangle are randomly perturbed. The overlapping area between the rectangle and the road network area after each perturbation is calculated; if the overlapping area of ​​the new rectangle is larger and the four sides are in contact with the road network area boundary, the new rectangle is accepted; otherwise, the new rectangle is accepted with a certain probability. As the iteration proceeds, the probability of accepting a worse solution gradually decreases. Through continuous iteration, the inscribed rectangle with the largest area is finally found as the task area. It can be understood that by simplifying the complex road network area into a regular rectangular task area, subsequent path planning is facilitated.

[0069] Step S20: determine the path points on the first boundary line and the second boundary line based on the cleaning width of the robot, wherein the first boundary line and the second boundary line are the boundary lines of the task area in the vertical direction of the lanes of the road network, the distance between each path point on the first boundary line is less than or equal to the cleaning width, and the distance between each path point on the second boundary line is equal to the distance between each path point on the first boundary line.

[0070] The cleaning width is the horizontal width a robot can cover in a single cleaning operation, such as the width of the floor swept by a robot vacuum. The first and second boundary lines are the vertical boundaries of the task area relative to the lanes of the road network. Assuming the lanes are horizontal, these two lines represent the left and right boundaries of the task area. Waypoints are the points that the robot passes through when planning its path. These points determine the robot's trajectory, much like marking multiple destinations on a map; the robot will proceed to them sequentially.

[0071] Based on the robot's cleaning width, path points are determined on two boundary lines perpendicular to the lanes of the task area, where the distance between each path point on the first boundary line is less than or equal to the cleaning width, and the distance between each path point on the second boundary line is equal to the distance between each path point on the first boundary line. It can be understood that this embodiment ensures that the robot can fully cover the task area during the cleaning process, eliminating blind spots, providing a basis for subsequent determination of the cleaning path and travel direction, and ensuring that the robot's movement is orderly and efficient.

[0072] Step S30, determining a cleaning path based on each connecting line between each path point on the first boundary line and each path point on the second boundary line, and determining a driving direction of each cleaning path based on the lane direction of the road network, wherein each cleaning path is parallel to the boundary line of the task area in the lane direction.

[0073] The cleaning path is the actual route the robot travels while performing a cleaning task. It is formed by connecting the path points on the first boundary line and the second boundary line. The lane direction is the normal direction of vehicle travel in the road network, such as whether vehicles on the road have a specified one-way or two-way travel direction.

[0074] Each path point on the first boundary line is connected to the corresponding path point on the second boundary line to form a connecting line. These connecting lines are the preliminary cleaning paths. The driving direction of each cleaning path is determined according to the lane direction of the road network. This ensures that the robot's driving direction is consistent with the vehicle's driving direction and avoids reverse driving. It can be understood that by ensuring that the robot's driving path conforms to the lane direction, the risk of collision with the vehicle is reduced, ensuring the safety of the robot during operation.

[0075] Step S40 , performing path planning on the robot based on each cleaning path to obtain a target path, and controlling the robot to travel along the target path.

[0076] The target path is the final robot travel path planned based on a comprehensive consideration of the cleaning path, the robot's kinematic performance (such as turning radius and speed limits), and environmental factors such as obstacle distribution. Specifically, the established cleaning path is further optimized and integrated, taking into account the robot's turning radius to avoid sharp turns. The robot's speed limit is also considered to ensure that the path planning does not cause the robot to frequently accelerate or decelerate during travel. The optimized cleaning paths are then connected to form a coherent target path. The robot's control system converts the target path into specific control instructions, which are sent to the robot's drive unit to control the robot's motors and ensure the robot follows the target path.

[0077] In this embodiment, a road network region corresponding to the road network in the robot's environment is identified within an environmental map, and the robot's task area is determined by using the largest inscribed rectangle within the road network region. Compared to planning a path without boundaries throughout a complex road network, this embodiment reduces the planning scope, eliminates unnecessary path calculations, and improves planning efficiency. Furthermore, using the largest inscribed rectangle as the task area maximizes coverage of the portion of the road network suitable for robot operation, ensuring the completeness of the cleaning task, avoiding omissions of important areas, and providing a foundation for subsequent path planning.

[0078] Based on the robot's cleaning width, path points on a first boundary line and a second boundary line are determined, wherein the first boundary line and the second boundary line are the boundary lines of the task area in a direction perpendicular to the lanes of the road network, the distance between each path point on the first boundary line is less than or equal to the cleaning width, and the distance between each path point on the second boundary line is equal to the distance between each path point on the first boundary line. The cleaning width is the maximum width over which the robot can perform a cleaning operation. By setting the path point spacing based on the cleaning width, it is possible to ensure that the robot can fully cover and clean the task area during movement, avoiding blind spots in the cleaning process.

[0079] The cleaning paths are determined based on the connecting lines between each path point on the first boundary line and each path point on the second boundary line. The direction of each cleaning path is determined based on the lane orientation of the road network, and each cleaning path is parallel to the lane orientation of the task area. By determining the direction of the cleaning paths based on the lane orientation of the road network, the robot's direction of travel is aligned with that of the vehicle, standardizing the robot's travel path, avoiding reverse driving, reducing the risk of collision between the robot and the vehicle, and improving the robot's safety.

[0080] Based on each cleaning path, the robot is planned to obtain the target path and then controlled to drive along the target path. By converting the planned cleaning path into the robot's actual driving route, the robot is able to execute its tasks in complex road networks by following a path that complies with vehicle driving regulations and avoids the risk of reverse driving and collisions.

[0081] In summary, this embodiment reduces the risk of the robot colliding with a vehicle due to going against traffic in a complex road network environment, and improves the operating safety of the robot in a complex road network environment.

[0082] Based on the first embodiment of the present application, in the second embodiment of the present application, the same or similar contents as those in the above embodiment 1 can be referred to the above introduction and will not be described in detail later. Figure 2 The step S20 of determining the path points on the first boundary line and the second boundary line based on the cleaning width of the robot includes:

[0083] Step S201 : dividing the task area into a first area and a second area in the lane direction according to the lane direction, wherein the lane directions of the first area and the second area are opposite to each other.

[0084] The first and second regions are two sub-areas created by dividing the task area based on lane directions. Vehicles travel in opposite directions in these two regions. For example, in a two-way lane task area, the two regions are divided by the lane centerline. Based on the task area's location in the environment map and the lane direction information of the road network, a line is drawn along the lane direction within the task area, dividing the task area into two parts, labeled as the first and second regions. By subdividing the task area, it is easier to determine more appropriate waypoints and cleaning paths based on the characteristics of each area, improving the accuracy and adaptability of path planning and enabling the robot to better adapt to complex road network environments.

[0085] Step S202: If the width of the first area is equal to the width of the second area, and the vertical boundary width of the task area is an even multiple of the cleaning width of the robot, the cleaning width is determined as the interval width between the path points, and the path points on the first boundary line are determined based on the interval width, and the path points on the second boundary line are determined based on the interval width, wherein the first area width is the width of the first area in the vertical direction of the lane, the second area width is the width of the second area in the vertical direction of the lane, and the vertical boundary width is the width of the task area in the vertical direction of the lane.

[0086] The first region width is the length of the first region perpendicular to the lane, that is, the length of the side perpendicular to the lane. The second region width is the length of the second region perpendicular to the lane. The vertical boundary width is the total length of the task area perpendicular to the lane, that is, the distance between the left and right boundaries of the task area. The interval width is the distance between adjacent waypoints.

[0087] When the conditions that the width of the first area is equal to the width of the second area and the width of the vertical boundary is an even multiple of the cleaning width are met, path point planning based on the cleaning width can enable the robot to completely clean the entire area without repeated cleaning areas. At this time, the cleaning width of the robot is directly used as the interval width between the path points. On the first boundary line and the second boundary line, starting from one end of the boundary line, a path point is determined every cleaning width.

[0088] Step S203: If the first area width and the second area width are not equal, and / or the vertical boundary width is not an even multiple of the cleaning width, the interval width is determined based on the first area width, the second area width and the cleaning width, and the path points on the first boundary line and the second boundary line are determined based on the interval width.

[0089] If the first and second region widths are unequal, and / or the vertical boundary width is not an even multiple of the cleaning width, path planning based on the cleaning width may result in areas that cannot be cleaned. In this case, planning based on the first and second region widths is necessary to ensure that the robot can clean the entire task area without omission. It can be understood that by calculating the interval widths for complex situations with varying region widths and vertical boundary widths, the robot can ensure that it fully covers the task area in all situations, thereby improving the versatility of path planning.

[0090] In a shopping mall parking lot scenario, the layout of the parking lot may result in the first and second areas of the task area having different widths, and the vertical boundary width is not necessarily an even multiple of the cleaning width. When performing a cleaning task in this parking lot, the cleaning robot cannot just clean the entire task area without repeating the cleaning path. In this case, the area is first divided, and then the interval width is determined based on the relationship between the area width and the cleaning width, and then the path points are determined to prepare for the subsequent planning of the cleaning path. This embodiment improves the accuracy and versatility of path planning by reasonably dividing the task area and flexibly determining the interval width and path points based on the different area widths and vertical boundary widths. This enables the robot to adapt to task areas of different sizes, better complete cleaning tasks in complex road network environments, and ensure that the cleaning coverage rate is not affected by the area shape.

[0091] In one feasible embodiment, the step S202, the step of determining the path points on the first boundary line based on the interval width, includes:

[0092] Step S2021, determine the intersection of the area dividing line between the first area and the second area and the dividing line of the first boundary line, add the first initial point whose distance between the first area boundary line and the intersection of the dividing line is half of the interval width to the first area path point list, and add the second initial point whose distance between the second area boundary line and the intersection of the dividing line is half of the cleaning width to the second area path point list; wherein, the first area boundary line is the boundary line of the first area in the first boundary line, and the second area boundary line is the boundary line of the second area in the first boundary line.

[0093] The area dividing line is the dividing line that divides the first area and the second area. For example, in a rectangular task area, if it is divided into two according to the lane direction, the middle line is the area dividing line. The dividing line intersection is the point where the area dividing line intersects with the first boundary line, and is the reference position for determining the initial point. The first area boundary line is the part of the first boundary line that belongs to the first area, and the second area boundary line is the part of the first boundary line that belongs to the second area. The first initial point is a point on the first area boundary line that is half the interval width away from the intersection of the dividing line. It is the starting point for the subsequent determination of other path points in the first area. The second initial point is a point on the second area boundary line that is half the cleaning width away from the intersection of the dividing line. It is the starting point for the subsequent determination of other path points in the second area. The first area path point list is a collection that stores all path points in the first area, and the second area path point list is a collection that stores all path points in the second area.

[0094] The robot first obtains map information of the task area through sensors, clarifies the division between the first area and the second area and the position of the first boundary line, then finds the intersection of the area dividing line and the first boundary line, and based on the intersection, measures half of the interval width on the boundary line of the first area to determine the first initial point, and measures half of the cleaning width on the boundary line of the second area to determine the second initial point, and adds them to the corresponding path point list respectively.

[0095] Step S2022: determine the first initial point as the first current point, and add the first target point on the first area boundary line whose distance from the first current point is the cleaning width to the first area path point list, update the first target point to the first current point, and update the first area path point list based on the first current point until the distance between the first initial point and the vertex of the first area boundary line is less than the cleaning width, thereby obtaining the first area path point list.

[0096] The first current point is the pathpoint currently being processed during the determination of the first area's pathpoints, and is continuously updated as the pathpoints are determined. The first target point is the point on the first area's boundary line that is a distance of the cleaning width from the first current point and is the next point to be added to the first area's pathpoint list. The first area boundary vertex is the endpoint of the first area's boundary line and serves as the basis for determining the termination condition of the pathpoint.

[0097] Set the first initial point as the first current point. Starting from the first current point, measure the cleaning width along the boundary line along the first area to determine the first target point and add it to the first area path point list. Then, update the first target point to the first current point and repeat the above process until the distance between the first initial point and the vertex of the first area boundary line is less than the cleaning width. At this point, stop determining path points and obtain a complete first area path point list. It can be understood that evenly determining path points within the first area according to the cleaning width ensures that the robot's cleaning work in the first area is fully covered, preventing any areas from being missed, thereby improving cleaning efficiency and quality.

[0098] Step S2023: determine the second initial point as the second current point, and add the second target point on the second area boundary line whose distance from the second current point is the cleaning width to the second area path point list, update the second target point to the second current point, and update the second area path point list based on the two current points until the distance between the first initial point and the vertex of the first area boundary line is less than the cleaning width, thereby obtaining the second area path point list.

[0099] The second current point is the path point currently being processed in the process of determining the path points of the second area. The second target point is a point on the boundary line of the second area that is a distance of the cleaning width from the second current point and is to be added to the second area path point list.

[0100] The second initial point is set as the second current point. Starting from the second current point, the cleaning width is measured along the boundary line to determine the second target point. This target point is added to the second area path point list. The second target point is then updated to the second current point. Repeat this process until the distance between the first initial point and the vertex of the first area boundary line is less than the cleaning width, resulting in a complete second area path point list. It can be understood that by ensuring that the path points within the second area are also evenly distributed, together with the path points of the first area, they constitute the path points on the first boundary line, providing a comprehensive and accurate foundation for subsequent cleaning path planning.

[0101] Step S2024: Determine the path points in the first area path point list and the second area path point list as path points on the first boundary line.

[0102] The path points in the first area path point list and the second area path point list are merged to obtain all the path points on the first boundary line. By obtaining the complete path points on the first boundary line, the necessary basic data is provided for the subsequent determination of the cleaning path based on these path points.

[0103] In one feasible embodiment, the step S203 of determining the interval width based on the first area width, the second area width, and the cleaning width includes:

[0104] Step S2031: Subtract the cleaning width from the first area width to obtain a first calculated width, input the result of dividing the first calculated width by the cleaning width into a rounding-up function to obtain a first division number, and divide the first calculated width by the first division number to obtain a first area path spacing width.

[0105] The first calculated width is the value obtained by subtracting the cleaning width from the first region width, and is used to subsequently calculate the number of divisions. The ceiling function is a mathematical function that rounds a value up to the nearest integer. For example, the result of the ceiling function for rounding 3.2 is 4.

[0106] The robot first obtains the width of the first area, then subtracts the cleaning width from this width to obtain a first calculated width. The result of dividing the first calculated width by the cleaning width is input into a rounding function to obtain a first number of divisions. Finally, the first calculated width is divided by the first number of divisions to obtain the path interval width of the first area. By rationally calculating the interval width of path points within the first area based on the actual width of the first area and the cleaning width, the distribution of path points within the first area is more consistent with actual conditions, allowing the robot's path planning to adapt to the characteristics of the first area and improve path planning accuracy.

[0107] Step S2032: Subtract the cleaning width from the second area width to obtain a second calculated width, divide the second calculated width by the cleaning width into the rounding-up function to obtain a second number of divisions, and divide the second calculated width by the second number of divisions to obtain a second area path spacing width.

[0108] The second calculated width is the value obtained by subtracting the clean width from the second area width. First, obtain the width of the second area, subtract the clean width from it to obtain the second calculated width. Then, input the rounding function to obtain the second number of divisions. Finally, divide the second calculated width by the second number of divisions to obtain the path interval width for the second area. It is understood that the path point interval width should be reasonably determined based on the actual situation of the second area, so that the path point distribution is more closely aligned with the characteristics of the second area, improving the adaptability and accuracy of path planning for the entire mission area.

[0109] Step S2033: Determine the first area path interval width and the second area path interval width as the interval width.

[0110] The calculated first area path interval width and second area path interval width are determined as the interval widths used when determining path points in the entire task area.

[0111] For example, please refer to Figure 3 , Figure 3 When the width of the first area is equal to the width of the second area, and the vertical boundary width of the task area is an even multiple of the cleaning width of the robot, the result of path point segmentation and path point connection is shown as follows: Figure 3 As shown, the width between each cleaning path is the cleaning width S, the cleaning width between the cleaning path close to the area boundary line and the area boundary line is 1 / 2S, and the cleaning width between the cleaning path close to the area dividing line and the area dividing line is 1 / 2S.

[0112] For example, please refer to Figure 4 , Figure 4 When the width of the first area is equal to the width of the second area, but the vertical boundary width of the task area is not an even multiple of the cleaning width of the robot, the result of path point segmentation and path point connection is shown in FIG. Figure 4 As shown, the width between each cleaning path is the interval width D determined and calculated based on the first area width, the second area width and the cleaning width. The cleaning width between the cleaning path close to the area boundary line and the area boundary line is 1 / 2S, and the cleaning width between the cleaning path close to the area dividing line and the area dividing line is 1 / 2S, so as to ensure that the robot can just cover the boundary when cleaning on the cleaning path close to the area boundary, avoiding collision in the out-of-area task area, and at the same time ensure that the robot can just cover the dividing line when cleaning on the cleaning path close to the area dividing line, avoiding the robot from cleaning in reverse.

[0113] In this embodiment, a method for rationally determining the interval width based on the width of different areas and the cleaning width is used. By calculating and comprehensively considering the two areas separately, the determined interval width is more consistent with the actual situation, providing an accurate interval standard for the subsequent determination of path points, helping to improve the accuracy and adaptability of the robot's path planning and better complete cleaning tasks.

[0114] Based on the first and / or second embodiments of the present application, in the third embodiment of the present application, the same or similar contents as those in the first and / or second embodiments can be referred to above and will not be described in detail. Figure 5The step S30 of determining the cleaning path based on the connecting lines between each path point on the first boundary line and each path point on the second boundary line includes:

[0115] Step S301: Determine each connecting line between each path point on the first boundary line and each path point on the second boundary line as an initial path, wherein each of the initial paths is parallel to the boundary line of the task area in the lane direction.

[0116] The initial path is formed by connecting each path point on the first boundary line with the corresponding path points on the second boundary line. It is the initial form of the cleaning path. The lane boundary lines of the task area are the two boundaries of the task area in the direction of the lane extension. The initial path should be parallel to these two boundary lines.

[0117] The robot has determined the path points on the first boundary line and the second boundary line, and connects each path point on the first boundary line with the corresponding path point on the second boundary line with a straight line to obtain an initial path, and ensures that these initial paths are parallel to the boundary line of the task area in the lane direction.

[0118] Step S302, traverse each of the initial paths, offset the starting endpoint of the initial path toward the inside of the path by the cleaning width to obtain a path starting point, offset the ending endpoint of the initial path toward the inside of the path by the cleaning width to obtain a path ending point, and determine the path between the path ending point and the path starting point as a cleaning path.

[0119] The path start point is the point obtained by offsetting the initial path's starting endpoint inward by the cleaning width. This is the actual starting point of the cleaning path. The path end point is the point obtained by offsetting the initial path's ending endpoint inward by the cleaning width. This is the actual ending point of the cleaning path. The cleaning path is the path between the path end point and the path start point, and is the actual cleaning route that the robot will travel.

[0120] Traverse all initial paths. For each initial path, shift its starting endpoint inward by the cleaning width along the path direction to obtain the path starting point. Also shift its ending endpoint inward by the cleaning width along the path direction to obtain the path ending point. The portion between the path starting point and the path ending point is the cleaning path. As can be understood, by offsetting the endpoint of the initial path inward by the cleaning width, the robot avoids incomplete cleaning at the boundary or collisions with the boundary, ensuring cleaning effectiveness and robot safety, while also making the cleaning path more reasonable and effective.

[0121] In one feasible embodiment, the step S40, performing path planning on the robot based on each of the cleaning paths to obtain a target path, includes:

[0122] Step 401 : determining a path traversal order of each cleaning path based on the number of the cleaning paths and the travel direction of each cleaning path.

[0123] The path traversal order is the sequence in which the robot visits each cleaning path. A reasonable traversal order can improve the robot's work efficiency. Based on the number of cleaning paths and their travel directions, and taking into account various factors such as avoiding frequent robot turns and reducing travel distance, an optimal path traversal order is determined. The specific algorithm is not limited here; for example, a greedy algorithm or dynamic programming algorithm can be used to determine the order. By determining a reasonable path traversal order, the robot can perform cleaning tasks more efficiently, reducing unnecessary travel distance and time consumption, and improving overall work efficiency.

[0124] Step S402 : determining a plurality of path pairs adjacent in path traversal order from the cleaning paths, traversing each group of the path pairs, and generating a curved connecting path based on the same-side endpoints of two cleaning paths in the path pair.

[0125] A path pair is a pair of paths consisting of two adjacent cleaning paths selected from the cleaning path traversal sequence. A curve connecting path is a curve used to connect the endpoints of the two cleaning paths in a path pair, allowing the robot to smoothly transition from one cleaning path to the other.

[0126] Multiple pairs of paths with adjacent path traversal sequences are identified from the cleaning path. For each path pair, a specific curve generation algorithm, such as a Bezier curve algorithm, is used to generate a curved connecting path based on the position and orientation of the endpoints on the same side of the two cleaning paths, enabling the robot to smoothly turn. As can be seen, curved connecting paths can make the robot's transitions between different cleaning paths smoother, reducing wear and energy consumption on the robot, while also improving the robot's stability and safety.

[0127] Step S403 : Connecting each of the cleaning paths and each of the curve connection paths according to the path traversal order to obtain a target path for the robot.

[0128] According to the determined path traversal order, each cleaning path and the corresponding curve connection path are connected in sequence to form a continuous and complete target path.

[0129] In one feasible embodiment, the step S401, determining the path traversal order of each cleaning path based on the number of the cleaning paths and the driving direction of each cleaning path, includes:

[0130] Step S4011 : determining an area to be supplemented and a target area in the first area and the second area of ​​the task area, wherein the number of cleaning paths in the area to be supplemented is smaller than that in the target area.

[0131] The "to-be-added area" is the area with fewer cleaning paths between the first and second areas of the task area. Additional cleaning paths are needed to achieve a better balance with the other area. The "target area" is the area with more cleaning paths between the first and second areas of the task area. It serves as a reference for additional paths in the "to-be-added area."

[0132] Determine the number of cleaning paths in the first and second areas, compare the number of cleaning paths in the two areas, and identify the area with the fewer cleaning paths as the area to be supplemented, while the area with the larger number of cleaning paths is the target area. By clearly defining the areas requiring additional cleaning paths and the reference standards, this provides direction for subsequent additional cleaning paths, helping to achieve a more balanced distribution of cleaning paths in the two areas and improve overall cleaning results.

[0133] Step S4012 : determining a new path interval width based on the area width of the area to be replenished and the number of cleaning paths in the target area.

[0134] The new path spacing width is determined by taking the area width of the to-be-replenished area and the number of cleaning paths in the target area. This new path spacing width is used to generate the spacing distance of new cleaning paths in the to-be-replenished area. By rationally determining the new path spacing width based on the actual conditions of the to-be-replenished area and the target area, the new cleaning paths generated in the to-be-replenished area can better match the cleaning paths in the target area, improving the rationality and uniformity of the cleaning paths across the entire task area.

[0135] Step S4013: Generate new path points based on the new path interval width, and determine a new cleaning path based on the new path points and the width of the area to be replenished in the vertical direction of the lane, and determine the new cleaning path as the cleaning path of the area to be replenished.

[0136] New path points are generated on the boundary line of the area to be replenished based on the new path spacing width and are used to determine the new cleaning path. Based on the new path spacing width, new path points are generated on the boundary line of the area to be replenished that is perpendicular to the lane direction. Then, based on these new path points and the width of the area to be replenished in the direction perpendicular to the lane, new cleaning paths are determined, and these new cleaning paths are determined as the cleaning paths for the area to be replenished. By adding new cleaning paths to the area to be replenished, the number of cleaning paths in the two areas is more balanced, allowing the robot to drive in the lane direction in areas with different lane directions, avoiding the situation where the vehicle needs to go back due to a lack of cleaning paths, thereby improving the cleaning coverage and efficiency of the entire task area.

[0137] Step S4014 : determining a path traversal order of each cleaning path based on the driving direction of the cleaning path in the to-be-replenished area and the driving direction of the cleaning path in the target area.

[0138] The path traversal order of each cleaning path is determined according to the driving direction of the cleaning path in the area to be replenished and the driving direction of the cleaning path in the target area.

[0139] In one feasible embodiment, the step S402, determining the curve connecting paths and the turn connecting paths between the paths, includes:

[0140] Step S4021 : determining an area to be supplemented and a target area in the first area and the second area of ​​the task area, wherein the number of cleaning paths in the area to be supplemented is smaller than that in the target area.

[0141] The end point of the first cleaning path is the end point of the first cleaning path in the path pair, and the start point of the second cleaning path is the starting point of the second cleaning path in the path pair.

[0142] Select a pair of paths with adjacent path traversal order from the cleaning path, determine the positions of the end point of the first cleaning path and the starting point of the second cleaning path in the path pair, and provide a basis for the generation of subsequent curves by clarifying the starting and ending positions of the generated curve connection path.

[0143] Step S4022 : determining a new path interval width based on the area width of the area to be replenished and the number of cleaning paths in the target area.

[0144] The preset first offset is a fixed distance set in advance and used to determine the position of the first control point at the end point of the first cleaning path. The first control point is the point at the end point of the first cleaning path, extended in the opposite direction of the travel direction of the first cleaning path by the preset first offset, and is one of the intermediate control points in generating the cubic Bezier curve. The preset second offset is a fixed distance set in advance and used to determine the position of the second control point at the starting point of the second cleaning path. The second control point is the point at the starting point of the second cleaning path, extended in the positive direction of the travel direction by the preset second offset, and is another intermediate control point in generating the cubic Bezier curve.

[0145] A first control point is defined at the end of the first cleaning path, extending in the opposite direction of the first cleaning path, according to a preset first offset. A second control point is defined at the starting point of the second cleaning path, extending in the positive direction of travel, according to a preset second offset. By setting control points to control the shape of the cubic Bezier curve, the resulting curve path better meets the robot's driving requirements and enables smooth turns.

[0146] Step S4023 generates new path points based on the new path interval width, and determines a new cleaning path based on the new path points and the width of the area to be replenished in the vertical direction of the lane, and determines the new cleaning path as the cleaning path of the area to be replenished.

[0147] A curved path is generated using a cubic Bezier curve generation algorithm, with the endpoint of the first cleaning path as the starting point, the starting point of the second cleaning path as the ending point, and the first and second control points as intermediate control points. As can be seen, cubic Bezier curves provide smooth curve shapes, making the robot's transitions between different cleaning paths more natural and fluid, reducing wear and energy consumption, and improving driving stability.

[0148] Step S4024 : determining a path traversal order of each cleaning path based on the driving direction of the cleaning path in the to-be-replenished area and the driving direction of the cleaning path in the target area.

[0149] The maximum curvature is the maximum degree of curvature of a curve at a specific point, reflecting the severity of the curve. The maximum allowable curvature is the maximum degree of curvature that a robot can safely and stably navigate. Exceeding this value may cause the robot to lose control and other problems.

[0150] In this embodiment, the maximum curvature of the generated curve connection path is calculated. If the maximum curvature is greater than the maximum allowable curvature of the robot, the preset first offset and / or the preset second offset are adjusted, and the cubic Bezier curve is regenerated until the maximum curvature of the curve connection path is less than or equal to the maximum allowable curvature.

[0151] It can be understood that in this embodiment, curvature control can ensure that the curvature of the generated curve connection path is within the tolerable range of the robot, ensuring the safety and stability of the robot during driving, and avoiding damage or loss of control of the robot due to excessive curve bending.

[0152] For example, in order to help understand the implementation process of path planning in robot control obtained by combining this embodiment with the above embodiments, specifically:

[0153] 1. Obtain a grid map. The gray areas in the map are unknown areas, corresponding to grids with a grid map weight of 255; the white areas are traversable areas outside the road network, corresponding to grids with a grid map weight of 254; the black areas are obstacle areas, corresponding to grids with a grid map weight of 253; and the red areas are road network areas, corresponding to grids with a grid map weight of 1 (that is, in the environmental map of the robot's external environment, determine the road network area corresponding to the road network in the external environment, and determine the maximum inscribed rectangle of the road network area as the robot's task area).

[0154] 2. In this embodiment, Figure 6 As shown, the full coverage task area ABCD within the road network area, EF is the area dividing line corresponding to the center line of the road network, and the lane directions of the areas on both sides of the EF dividing line are opposite (that is, according to the lane direction, the task area is divided into a first area and a second area in the lane direction, wherein the lane directions of the first area and the second area are opposite).

[0155] 3. Get the coordinates of points ABCDEF on the grid map. Using the cleaning width S of the mobile cleaning robot, on line AD, point E first moves to points A1 and D1, which are 1 / 2S apart, in the AD directions. Then, point A1 moves to point A2, which is S apart, in the A direction. Stop when An exceeds point A. The same process is repeated for point E1 in the E direction. The processing method for FBC is similar, and finally a series of points with intervals of S are generated. Then, A1 and F1 are connected, and the same process is repeated for other points, to obtain the following: Figure 7 The path connection diagram shown (i.e., determining the path points on the first boundary line and the second boundary line based on the cleaning width of the robot, and determining the connection lines between each path point on the first boundary line and each path point on the second boundary line as the initial path).

[0156] 4. Using the cleaning width S, remove the length of S from the beginning and end of each connecting line to obtain Figure 8The multiple cleaning paths shown (traversing each of the initial paths, offsetting the starting endpoint of the initial path toward the inside of the path by the cleaning width to obtain a path starting point, offsetting the ending endpoint of the initial path toward the inside of the path by the cleaning width to obtain a path ending point, and determining the path between the path ending point and the path starting point as the cleaning path).

[0157] 5. Generate a curve connection path based on the endpoints on the same side of the two cleaning paths in the path pair, and connect each of the cleaning paths and each of the curve connection paths in the path traversal order to obtain the following: Figure 9 The target path of the robot shown (that is, determining the path traversal order of each cleaning path based on the number of cleaning paths and the driving direction of each cleaning path; determining multiple groups of path pairs with adjacent path traversal orders from the cleaning paths, traversing each group of the path pairs, and generating a curved connection path based on the same-side endpoints of the two cleaning paths in the path pairs; connecting each cleaning path and each curved connection path according to the path traversal order to obtain the target path of the robot).

[0158] It should be noted that the above examples are only used to understand the present application and do not constitute a limitation on the robot control method of the present application. More simple transformations based on this technical concept are all within the scope of protection of the present application.

[0159] The present application provides a robot, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the robot control method in the above-mentioned embodiment one.

[0160] Reference below Figure 10 , which shows a schematic structural diagram of a robot suitable for implementing the embodiments of the present application. Figure 10 The robot structure shown is merely an example and should not limit the functions and scope of use of the embodiments of the present application.

[0161] like Figure 10As shown, the robot may include a processing device 1001 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to programs stored in a read-only memory 1002 or programs loaded from a storage device 1003 into a random access memory 1004. The random access memory 1004 also stores various programs and data required for robot operation. The processing device 1001, the read-only memory 1002, and the random access memory 1004 are connected to each other via a bus 1005. An input / output interface 1006 is also connected to the bus. Typically, the following systems may be connected to the input / output interface 1006: an input device 1007 including, for example, a touch screen, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape or a hard disk; and a communication device 1009. The communication device 1009 may allow the robot to communicate with other devices wirelessly or wired to exchange data. Although the figures show a robot with various systems, it should be understood that it is not required to implement or have all of the systems shown. More or fewer systems may be implemented or have instead.

[0162] In particular, according to the embodiments disclosed in the present application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, the embodiments disclosed in the present application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program comprising program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network via a communication device, or installed from a storage device 1003, or installed from a read-only memory 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are performed.

[0163] The robot provided in this application, utilizing the robot control method described in the aforementioned embodiment, can resolve the technical issue of low safety when operating robots in road network areas. Compared to the prior art, the robot provided in this application achieves the same beneficial effects as the robot control method described in the aforementioned embodiment. Other technical features of this robot are the same as those disclosed in the aforementioned embodiment and are not further elaborated here.

[0164] It should be understood that the various parts disclosed in this application can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in any one or more embodiments or examples in a suitable manner.

[0165] The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.

[0166] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, computer program) stored thereon, and the computer-readable program instructions are used to execute the robot control method in the above-mentioned embodiment.

[0167] The computer-readable storage medium provided in this application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems or devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination thereof.

[0168] The computer-readable storage medium may be included in the robot, or may exist independently without being assembled into the robot.

[0169] The computer-readable storage medium carries one or more programs. When the one or more programs are executed by the robot, the robot implements the various embodiments of the robot control method.

[0170] Computer program code for performing the operations of the present application may be written in one or more programming languages, or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0171] The flow charts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present application. In this regard, each box in the flow chart or block diagram can represent a module, program segment or a part of code, and the module, program segment or a part of code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order than that marked in the accompanying drawings. For example, two boxes represented in succession 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 block diagram and / or flow chart, and the combination of the boxes in the block diagram and / or flow chart can be implemented by a dedicated hardware-based system that performs the specified function or operation, or can be implemented by a combination of dedicated hardware and computer instructions.

[0172] The modules described in the embodiments of the present application may be implemented in software or hardware, wherein the name of a module does not necessarily limit the unit itself.

[0173] The computer-readable storage medium provided in this application stores computer-readable program instructions (i.e., a computer program) for executing the aforementioned robot control method. This computer-readable storage medium can address the technical issue of low safety when operating robots in road network areas. Compared to the prior art, the beneficial effects of the computer-readable storage medium provided in this application are similar to those of the robot control method provided in the aforementioned embodiments and are not further elaborated here.

[0174] The present application also provides a computer program product, comprising a computer program, which implements the steps of the robot control method as described above when executed by a processor.

[0175] The computer program product provided in this application can solve the technical problem of low safety when robots operate in road network areas. Compared with the prior art, the beneficial effects of the computer program product provided in this application are the same as those of the robot control method provided in the above embodiment, and will not be repeated here.

[0176] The above description is only part of the embodiments of the present application and does not limit the patent scope of the present application. All equivalent structural transformations made by using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect application in other related technical fields are included in the patent protection scope of the present application.

Claims

1. A robot control method, characterized in that: The robot control method comprises: Determining a road network area corresponding to a road network in the external environment in an environment map of the robot, and determining a maximum inscribed rectangle of the road network area as a task area of ​​the robot; Determining path points on a first boundary line and a second boundary line based on a cleaning width of the robot, wherein the first boundary line and the second boundary line are boundary lines of the task area in a direction perpendicular to the lanes of the road network, a distance between each path point on the first boundary line is less than or equal to the cleaning width, and a distance between each path point on the second boundary line is equal to a distance between each path point on the first boundary line; Determining a cleaning path based on each connecting line between each path point on the first boundary line and each path point on the second boundary line, and determining a driving direction of each cleaning path based on a lane direction of the road network, wherein each cleaning path is parallel to a boundary line of the task area in the lane direction; Path planning is performed on the robot based on each of the cleaning paths to obtain a target path, and the robot is controlled to travel along the target path.

2. The robot control method according to claim 1, wherein: The step of determining the path points on the first boundary line and the second boundary line based on the cleaning width of the robot comprises: According to the lane direction, the task area is divided into a first area and a second area in the lane direction, wherein the lane directions of the first area and the second area are opposite; If the first area width and the second area width are equal, and the vertical boundary width of the task area is an even multiple of the cleaning width of the robot, the cleaning width is determined as the interval width between the path points, and the path points on the first boundary line are determined based on the interval width, and the path points on the second boundary line are determined based on the interval width, wherein the first area width is the width of the first area in the vertical direction of the lane, the second area width is the width of the second area in the vertical direction of the lane, and the vertical boundary width is the width of the task area in the vertical direction of the lane; If the first area width and the second area width are not equal, and / or the vertical boundary width is not an even multiple of the cleaning width, the interval width is determined based on the first area width, the second area width and the cleaning width, and the path points on the first boundary line and the second boundary line are determined based on the interval width.

3. The robot control method according to claim 2, wherein: The step of determining a path point on the first boundary line based on the interval width includes: Determine an intersection point of a region dividing line between the first region and the second region and a dividing line of the first boundary line, add a first initial point whose distance between the first region boundary line and the intersection point of the dividing line is half of the interval width to a first region path point list, and add a second initial point whose distance between the second region boundary line and the intersection point of the dividing line is half of the cleaning width to a second region path point list; wherein the first region boundary line is a boundary line of the first region in the first boundary line, and the second region boundary line is a boundary line of the second region in the first boundary line; Determine the first initial point as the first current point, add a first target point on the first area boundary line whose distance from the first current point is the cleaning width to the first area path point list, update the first target point to the first current point, and update the first area path point list based on the first current point until the distance between the first initial point and the vertex of the first area boundary line is less than the cleaning width, thereby obtaining the first area path point list; Determine the second initial point as the second current point, add a second target point on the second area boundary line that is at a distance of the cleaning width from the second current point to the second area path point list, update the second target point to the second current point, and update the second area path point list based on the two current points until the distance between the first initial point and the vertex of the first area boundary line is less than the cleaning width, thereby obtaining the second area path point list; The waypoints in the first area waypoint list and the second area waypoint list are determined as waypoints on the first boundary line.

4. The robot control method according to claim 2, wherein: The step of determining the interval width based on the first area width, the second area width, and the cleaning width comprises: subtracting the cleaning width from the first area width to obtain a first calculated width, inputting the result of dividing the first calculated width by the cleaning width into a rounding function to obtain a first number of divisions, and dividing the first calculated width by the first number of divisions to obtain a first area path spacing width; subtracting the cleaning width from the second area width to obtain a second calculated width, inputting the result of dividing the second calculated width by the cleaning width into the ceiling function to obtain a second number of divisions, and dividing the second calculated width by the second number of divisions to obtain a second area path spacing width; The first area path interval width and the second area path interval width are determined as the interval width.

5. The robot control method according to claim 1, wherein: The step of determining the cleaning path based on the connecting lines between each path point on the first boundary line and each path point on the second boundary line comprises: Determining each connecting line between each path point on the first boundary line and each path point on the second boundary line as an initial path, wherein each of the initial paths is parallel to the boundary line of the task area in the lane direction; Traversing each of the initial paths, offsetting the starting endpoint of the initial path into the path by the cleaning width to obtain a path starting point, offsetting the ending endpoint of the initial path into the path by the cleaning width to obtain a path ending point, and determining the path between the path ending point and the path starting point as a cleaning path.

6. The robot control method according to any one of claims 1 to 5, characterized in that: The step of performing path planning on the robot based on each of the cleaning paths to obtain a target path includes: determining a path traversal order of each cleaning path based on the number of the cleaning paths and the travel direction of each cleaning path; Determining a plurality of path pairs adjacent in path traversal order from the cleaning paths, traversing each of the path pairs, and generating a curved connecting path based on the same-side endpoints of two cleaning paths in the path pairs; Each of the cleaning paths and each of the curve connection paths are connected in accordance with the path traversal order to obtain the target path of the robot.

7. The robot control method according to claim 6, wherein: The step of determining the path traversal order of each cleaning path based on the number of the cleaning paths and the travel direction of each cleaning path includes: Determining a to-be-supplemented area and a target area in the first area and the second area of ​​the task area, wherein the number of cleaning paths in the to-be-supplemented area is smaller than that in the target area; determining a new path interval width based on the area width of the area to be replenished and the number of cleaning paths in the target area; generating new path points based on the new path interval width, determining a new cleaning path based on the new path points and the width of the area to be replenished in the vertical direction of the lane, and determining the new cleaning path as the cleaning path for the area to be replenished; A path traversal order of each cleaning path is determined based on the driving direction of the cleaning path in the to-be-replenished area and the driving direction of the cleaning path in the target area.

8. The robot control method according to claim 7, wherein: The step of determining the curve connecting paths and the turn connecting paths between the paths includes: determining an end point of a first cleaning path and a starting point of a second cleaning path in the path pair; Extending a first control point at the end point of the first cleaning path in a direction opposite to the travel direction of the first cleaning path according to a preset first offset, and extending a second control point at the starting point of the second cleaning path in a positive direction of the travel direction according to a preset second offset; Taking the end point of the first cleaning path as the starting point, the starting point of the second cleaning path as the ending point, and the first control point and the second control point as the intermediate control points, a cubic Bezier curve is generated as the curve connection path; If the maximum curvature of the curve connection path is greater than the maximum allowable curvature of the robot, the first offset and / or the second offset are adjusted until the maximum curvature of the curve connection path is less than or equal to the maximum allowable curvature.

9. A robot, characterized in that: The robot comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the robot control method according to any one of claims 1 to 8.

10. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the robot control method according to any one of claims 1 to 8 are implemented.