Path planning method, device, storage medium and equipment for cleaning robot
By determining the local optimal state in the cleaning robot's path planning and adjusting the linear speed to zero, the problem of high path deviation rate of the cleaning robot is solved, and the smoothness and length of the path are optimized.
Patent Information
- Application Number
- CN202210905029.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-29
- Publication Date
- 2025-09-30
- Estimated Expiration
- 2042-07-29
AI Technical Summary
In the prior art, cleaning robots are prone to falling into a local optimal state during path planning, resulting in a high path deviation rate and an inability to effectively escape from the local optimal state.
During the path planning process, the speed combinations within the speed limit window are obtained, and the predetermined speed evaluation function is used to screen the candidate speed combinations. The positional relationship between the angular velocity and the target point is used to determine whether it falls into the local optimum. If it does, the linear velocity is adjusted to zero to keep the angular velocity unchanged in order to perform the rotation motion.
Effectively reduce path deviation rate, shorten path length, and improve path smoothness and efficiency.
Smart Images

Figure CN115309154B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of cleaning robots, and in particular, relates to a path planning method, a path planning device, a computer-readable storage medium, and a computer device for a cleaning robot. Background Art
[0002] The Dynamic Window Approach (DWA) is a local path algorithm commonly used in cleaning robot motion path planning. The principle of the Dynamic Window Approach (DWA) is to sample multiple speed groups within a restricted speed window and simulate the motion trajectories of these speeds over a certain period of time. These motion trajectories are then scored using an evaluation function. The optimal speed is selected based on the evaluation function's scoring and sent to the cleaning robot's actuator. A disadvantage of this algorithm is that when the cleaning robot's window faces the opposite direction of the target point, it will fall into a local optimum, resulting in a high path deviation rate for the cleaning robot's actual trajectory. Summary of the Invention
[0003] The technical problem solved by the present invention is: how to timely get the cleaning robot out of a local optimal state during the path planning process, so as to improve the smoothness of the path and shorten the path length.
[0004] The present application discloses a path planning method for a cleaning robot, the path planning method comprising:
[0005] Acquire a speed limit window, and determine a plurality of speed combinations within the speed limit window, wherein the speed combinations include linear speed and angular speed;
[0006] evaluating each of the speed combinations using a predetermined speed evaluation function to screen out candidate speed combinations;
[0007] Determining whether the cleaning robot is trapped in a local optimum according to the angular velocity in the candidate velocity combination and the positional relationship between the cleaning robot and the target point;
[0008] If so, the linear velocity in the candidate velocity combination is adjusted to zero and the angular velocity in the candidate velocity combination is kept unchanged to serve as the optimal velocity combination; otherwise, the candidate velocity combination is directly used as the optimal velocity combination.
[0009] Preferably, the method for obtaining the speed limit window is:
[0010] The speed limit window is determined according to the maximum movement speed limit, the maximum movement acceleration limit and the safety speed limit of the cleaning robot.
[0011] Preferably, the method of evaluating each of the speed combinations using a predetermined speed evaluation function includes:
[0012] Predicting a motion trajectory based on the speed combination;
[0013] Determine a direction angle evaluation value and an obstacle distance evaluation value according to the motion trajectory, and determine an angular velocity evaluation value according to the angular velocity in the velocity combination;
[0014] A speed evaluation function value corresponding to the speed combination is determined according to the direction angle evaluation value, the obstacle distance evaluation value, and the angular velocity evaluation value.
[0015] Preferably, the candidate speed combination is a speed combination having the largest speed evaluation function value among the several speed combinations.
[0016] Preferably, the method for determining whether the cleaning robot is trapped in a local optimum according to the angular velocity in the candidate velocity combination and the positional relationship between the cleaning robot and the target point includes:
[0017] Determining whether the absolute value of the angular velocity in the candidate velocity combination is greater than a threshold and determining whether the target point is in the opposite direction of the movement direction of the cleaning robot;
[0018] If the absolute value of the angular velocity is greater than a threshold and the target point is in the opposite direction of the movement direction of the cleaning robot, it is determined that the cleaning robot is trapped in a local optimum; otherwise, it is determined that the cleaning robot is not trapped in a local optimum.
[0019] Preferably, the method for determining whether the target point is in the opposite direction of the movement direction of the cleaning robot is:
[0020] Determine the angle between the moving direction of the prediction point and the target direction according to the moving trajectory;
[0021] It is determined whether the target point is in the opposite direction of the moving direction of the cleaning robot according to the size of the angle.
[0022] Preferably, the calculation formula of the angular velocity evaluation value is:
[0023]
[0024] Here, angular_velocity(ω) represents the angular velocity evaluation value, and |ω| represents the absolute value of the angular velocity.
[0025] The present application also discloses a path planning device for a cleaning robot, the path planning device comprising:
[0026] A speed window acquisition module is used to acquire a speed limit window and determine a plurality of speed combinations within the speed limit window, wherein the speed combinations include linear speed and angular speed;
[0027] A speed evaluation function module, configured to evaluate each of the speed combinations using a predetermined speed evaluation function to screen out candidate speed combinations;
[0028] a local optimum determination module, configured to determine whether the cleaning robot is trapped in a local optimum based on the angular velocity in the candidate speed combination and the positional relationship between the cleaning robot and the target point;
[0029] The optimal speed determination module is used to adjust the linear speed in the candidate speed combination to zero and keep the angular speed in the candidate speed combination unchanged as the optimal speed combination when the cleaning robot falls into a local optimum; and to directly use the candidate speed combination as the optimal speed combination when the cleaning robot does not fall into a local optimum.
[0030] The present application also discloses a computer-readable storage medium, which stores a path planning program for a cleaning robot. When the path planning program for the cleaning robot is executed by a processor, the path planning method for the cleaning robot described above is implemented.
[0031] The present application also discloses a computer device, which includes a computer-readable storage medium, a processor, and a path planning program for a cleaning robot stored in the computer-readable storage medium. When the path planning program for the cleaning robot is executed by the processor, the above-mentioned path planning method for the cleaning robot is implemented.
[0032] The present invention discloses a path planning method and a path planning device for a cleaning robot, which have the following technical effects:
[0033] After the candidate speed combinations are calculated using the dynamic window method, a judgment step is added to determine whether the cleaning robot has fallen into a local optimal state. When it falls into a local optimal state, the linear velocity in the candidate speed combination is set to zero and the angular velocity is kept unchanged. At this time, the cleaning robot will rotate to get rid of the local optimal state as soon as possible and reduce the path deviation rate. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] Figure 1 This is a flow chart of a path planning method for a cleaning robot according to embodiment 1 of the present invention;
[0035] Figure 2 Schematic diagram of predicted motion path in embodiment 1 of the present invention;
[0036] Figure 3This is a schematic diagram of direction angle calculation according to the first embodiment of the present invention;
[0037] Figure 4 Schematic diagram of the positional relationship between the cleaning robot and the target point according to the first embodiment of the present invention;
[0038] Figure 5 This is a test environment diagram of the first embodiment of the present invention;
[0039] Figure 6 Test path diagram for cleaning robot using traditional dynamic window method for path planning;
[0040] Figure 7 A test path diagram of the path planning method for the cleaning robot in the first embodiment of the present invention;
[0041] Figure 8 This is a principle block diagram of a path planning device for a cleaning robot according to a second embodiment of the present invention;
[0042] Figure 9 Schematic diagram of a computer device according to a fourth embodiment of the present invention. DETAILED DESCRIPTION
[0043] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0044] Before describing the various embodiments of the present application in detail, the technical concept of the present application is briefly described first: In the prior art, when using the dynamic window approach (DWA) to plan the path of a cleaning robot, the predicted motion direction is often not considered to be significantly different from the target direction or even opposite to the target point. That is, the cleaning robot will fall into a local optimum. When the speed determined by the dynamic window approach is directly executed, the path deviation rate of the actual running trajectory is high. To this end, the present application provides a path planning method for a cleaning robot. After calculating a candidate speed combination using the dynamic window approach, it is determined whether the cleaning robot has fallen into a local optimum state. If not, the candidate speed combination is directly used as the optimal speed combination and executed according to the optimal speed combination. If it has fallen into a local optimum state, the linear velocity in the candidate speed combination is set to zero and the angular velocity is kept unchanged. At this time, the cleaning robot will rotate. Since in the local optimum state, the direction of movement of the cleaning robot is away from the target point. At this time, if the cleaning robot continues to move in this direction, it will deviate further from the target point. By setting the linear velocity to zero and performing a rotation motion, a U-turn is achieved to get out of the local optimum state as soon as possible.
[0045] Specifically, if Figure 1 As shown, the path planning method of the cleaning robot of the first embodiment includes the following steps:
[0046] Step S10: obtaining a speed limit window, and determining a plurality of speed combinations within the speed limit window, wherein the speed combinations include linear speed and angular speed;
[0047] Step S20: using a predetermined speed evaluation function to evaluate each speed combination to screen out candidate speed combinations;
[0048] Step S30: determining whether the cleaning robot is trapped in a local optimum based on the angular velocity in the candidate velocity combination and the positional relationship between the cleaning robot and the target point;
[0049] Step S41: If yes, adjust the linear velocity in the candidate velocity combination to zero and keep the angular velocity in the candidate velocity combination unchanged, as the optimal velocity combination;
[0050] Step S42: If not, directly take the candidate speed combination as the optimal speed combination.
[0051] Specifically, the speed limit window V in step S10 r Refers to a speed range obtained after considering the actual motion limitations of the cleaning robot:
[0052] V r ={(ν r ,ω r )|ν1≤ν r ≤ν2,ω1≤ω r ≤ω2}
[0053] This speed range is determined by many factors, such as the speed limit of the cleaning robot, the acceleration limit of the cleaning robot's drive motor, the minimum rotation angle of the cleaning robot, etc.
[0054] Furthermore, the specific method of obtaining the speed limit window in step S10 is as follows:
[0055] In order to be closer to the actual application scenarios of the cleaning robot, the following three motion limitations are mainly considered: the maximum speed limit of the cleaning robot, the maximum acceleration limit of the cleaning robot's drive motor, and whether the cleaning robot can stop moving in time before encountering an obstacle.
[0056] First, the maximum speed limit V of the cleaning robot s =(ν s ,ω s ), since the speed of the cleaning robot cannot be increased infinitely, the maximum speed limit should be considered and expressed by the following formula:
[0057] V s ={(ν s ,ω s )|ν s ∈[ν min ,ν max ],ω s ∈[ω min ,ω min ]}
[0058] Among them, the general minimum linear velocity ν min Take zero, minimum angular velocity ω min and the maximum angular velocity ω min are opposite to each other. But considering that the linear velocity ν s When it is zero, the evaluation function will not work, and the minimum linear velocity ν can also be min Set to a non-zero positive minimum value.
[0059] Secondly, since the torque of the driving motor of the cleaning robot is limited, there is a maximum acceleration limit, so it can be assumed that the current speed of the cleaning robot is (ν c ,ω c ), within a limited time period Δt, the maximum acceleration limit range of the cleaning robot is V d for:
[0060]
[0061] Among them, ν a 、ν b 、ω a 、ω b They are respectively expressed as the maximum deceleration of linear velocity, the maximum acceleration of linear velocity, the maximum deceleration of angular velocity, and the maximum acceleration of angular velocity.
[0062] Finally, when the cleaning robot detects an obstacle, it should have a braking distance to slow down. If the distance between the cleaning robot and the nearest obstacle is less than the braking distance, the robot will collide with the obstacle. Therefore, a safe stopping speed should be designed, that is, a speed that allows the cleaning robot to stop in time before encountering an obstacle.
[0063] Obviously, the safe stopping speed should be proportional to the distance between the cleaning robot and the nearest obstacle. When the distance is smaller, the safe stopping speed should also be reduced accordingly. Safe speed limit range V a The following inequality should be satisfied:
[0064]
[0065] Among them, dist represents the distance between the cleaning robot and the nearest obstacle, va Indicates the linear velocity portion of the safety stop speed, ω a Indicates the angular velocity portion of the safe stopping speed.
[0066] After calculating the above three speed limits, three speed limit ranges are obtained. Their intersection is the speed limit window V that can be obtained in the current state. r :
[0067] V r =V s ∩V d ∩V a .
[0068] Furthermore, the specific method for determining the speed combinations within the speed limit window in step S10 is as follows:
[0069] According to the preset speed increment, a linear speed sequence and an angular speed sequence are obtained, and then the linear speed sequence and the angular speed sequence are combined. The speed increment is determined according to the motion accuracy requirements of the cleaning robot.
[0070] For example, it is assumed that the calculated speed limit window is: r ∈[0,3],ω r ∈[-20,20]
[0071] The preset velocity increment is Δv = 0.01m / s, Δω = 1° / s, then the following linear velocity sequence and angular velocity sequence can be obtained:
[0072] v:[0,0.01,...,3.00],n=101,ω:[-20°,-19°,...,20°],n=41
[0073] By combining the above linear velocity sequences and angular velocity sequences, 101×41 groups of velocity combinations can be obtained.
[0074] Therefore, after the speed combination is determined, the motion trajectory can be predicted for each speed combination, so that step S20 can be performed.
[0075] Furthermore, the method of evaluating each speed combination using a predetermined speed evaluation function in step S20 includes:
[0076] A motion trajectory is predicted based on the speed combination; a direction angle evaluation value and an obstacle distance evaluation value are determined based on the motion trajectory, and an angular velocity evaluation value is determined based on the angular velocity in the speed combination; and a speed evaluation function value corresponding to the speed combination is determined based on the direction angle evaluation value, the obstacle distance evaluation value, and the angular velocity evaluation value.
[0077] Specifically, if Figure 2 As shown, the specific method of obtaining the motion trajectory according to the speed combination prediction in step S20 can be performed as follows:
[0078] Assume that the velocity combination is (ν i ,ω i ), the current position of the cleaning robot is (x0,y0,θ0,), and the prediction time period is t.
[0079] First, a time increment Δt is set to obtain the time series [0, Δt, 2Δt, 3Δt, ..., t].
[0080] Then, the predicted trajectory point (x, y, θ) can be obtained according to the following trajectory prediction formula:
[0081] x=x0+v i cosθ·Δt,y=y0+v i sinθ·Δt,θ=θ0+ω i ·Δt
[0082] It's important to note that the trajectory prediction formula here is based on an approximate motion model. Specifically, when the movement distance is very small, the motion model is obtained by approximating an arc with a straight line. Furthermore, the cleaning robot's speed is assumed to remain constant throughout the entire prediction period t.
[0083] By calculating each value in the time series [0,Δt,2Δt,3Δt,...,t], we can get a series of motion trajectory points.
[0084] Finally, each trajectory point is judged. If a trajectory point collides with an obstacle, this trajectory point and all subsequent trajectory points should be discarded, and the previous trajectory point should be selected as the final predicted trajectory point. In this way, the trajectory can be predicted based on the speed combination.
[0085] Specifically, the method for determining the direction angle evaluation value according to the motion trajectory in step S20 is as follows:
[0086] like Figure 3 As shown, the direction angle evaluation value includes the difference between the angle used to evaluate the robot's movement at a given angular velocity and the target angle, and the calculation formula is as follows.
[0087] heading(v i ,ω i )=180°-|target-curθ|
[0088] Among them, target represents the target angle and curθ represents the predicted motion angle.
[0089] According to the calculation formula, the smaller the difference is, the higher the direction angle evaluation value is.
[0090] Specifically, the method for determining the obstacle distance evaluation value according to the motion trajectory in step S20 is as follows:
[0091] dist(v i ,ω i ) represents the distance between the robot's current position and the nearest obstacle. If there are no obstacles on the trajectory, a constant is set as the obstacle distance evaluation value. The greater the distance between the robot and the obstacle, the higher the obstacle distance evaluation value should be. Therefore, the obstacle distance evaluation value can be directly determined by the distance. It is also worth noting that the robot's radius should also be considered when calculating the distance.
[0092] When the angular velocity is not zero, the distance to be calculated is the arc length, not the length. The calculation of this arc length is also relatively simple. According to the motion model, when the angular velocity and linear velocity remain unchanged, the robot's motion trajectory is a standard circle. The radius of this circle (angular velocity in radians per second) is: r = |v / ω| (ω≠0)
[0093] Assume that the current posture of the robot is (x1, y1, θ1,) (this is not the posture of the predicted point), then the coordinates of the center of the circle are: x c =x-ωvsinθ,y c =y+ωvcosθ. Then the angle can be calculated using the cosine formula Finally, applying the arc length formula we can get the arc length
[0094] Specifically, the method for determining the angular velocity evaluation value according to the angular velocity in the velocity combination in step S20 is as follows:
[0095] The calculation formula of the angular velocity evaluation value is:
[0096]
[0097] Here, angular_velocity(ω) represents the angular velocity evaluation value, and |ω| represents the absolute value of the angular velocity. For path planning, the smaller the absolute value of the angular velocity, the better.
[0098] Specifically, the method of determining the speed evaluation function value corresponding to the speed combination according to the direction angle evaluation value, the obstacle distance evaluation value, and the angular velocity evaluation value in step S20 includes:
[0099] First, after the direction angle evaluation value, the obstacle distance evaluation value, and the angular velocity evaluation value are calculated, they are normalized respectively.
[0100] Then, the speed evaluation function value corresponding to the speed combination is calculated according to the following speed evaluation function formula:
[0101] G(v i ,ω i )=σ(α·heading(v i ,ω i )+β·dist(v i ,ω i )+γ·angular_velocity(ω i ))
[0102] In the above formula, G(v i ,ω i ) represents the speed evaluation function value, and α, β, and γ represent normalization coefficients. Substituting the direction angle evaluation value, obstacle distance evaluation value, and angular velocity evaluation value calculated above into the speed evaluation function formula, the current speed combination can be evaluated. Each speed combination within the speed limit window is traversed, and the speed combination with the largest speed evaluation function value is selected as the candidate speed combination.
[0103] Furthermore, the method for screening out the candidate speed combinations in step S20 is to use the speed combination with the largest speed evaluation function value among the several speed combinations as the candidate speed combination.
[0104] In step S30, the method for determining whether the cleaning robot is trapped in a local optimum based on the angular velocity in the candidate speed combination and the positional relationship between the cleaning robot and the target point includes: determining whether the absolute value of the angular velocity in the candidate speed combination is greater than a threshold and determining whether the target point is in the opposite direction of the movement direction of the cleaning robot; if the absolute value of the angular velocity is greater than the threshold and the target point is in the opposite direction of the movement direction of the cleaning robot, it is determined that the cleaning robot is trapped in a local optimum, otherwise the cleaning robot is not trapped in a local optimum.
[0105] For example, the threshold is set to 45 degrees. When the absolute value of the angular velocity is greater than 45 degrees, it can be considered that the cleaning robot is likely to fall into a local optimum.
[0106] For example, the method for determining whether the target point is in the opposite direction of the movement direction of the cleaning robot is as follows: determining the angle between the movement direction of the prediction point and the target direction according to the movement trajectory; and determining whether the target point is in the opposite direction of the movement direction of the cleaning robot according to the size of the angle. Figure 4 As shown in A, when the angle between the moving direction of the predicted point and the target direction is an acute angle, it means that the target point is in the same direction as the moving direction of the cleaning robot; Figure 4As shown in B, when the angle between the moving direction of the predicted point and the target direction is an obtuse angle, it means that the target point is in the opposite direction of the moving direction of the cleaning robot.
[0107] In order to verify the beneficial effect of the path planning method of the first embodiment, a comparative test was conducted. The test environment is as follows: Figure 5 As shown, Figure 6 The test path diagram for the cleaning robot using the traditional dynamic window method for path planning. Figure 7 This is a test path diagram of the planning method of the first embodiment of this invention. The distances traveled and the turning arcs under the two planning methods are shown in the following table.
[0108] Distance traveled (m) Turning radian (rad) Traditional DWA planning 4.028032 89.904602 This embodiment 1 planning method 3.641824 72.624977
[0109] As shown in the table above, by improving the algorithm's evaluation function and introducing the angular velocity evaluation function, the turning arc was reduced by 23.79% and the path length was reduced by 10.6%. This shows that the planning method of Example 1 not only improves the algorithm's efficiency, but also reduces the path length and improves smoothness.
[0110] like Figure 8 As shown, this embodiment 2 discloses a path planning device for a cleaning robot, which includes a speed window acquisition module 100, a speed evaluation function module 200, a local optimum judgment module 300, and an optimal speed determination module 400. Among them, the speed window acquisition module 100 is used to obtain a speed limit window and determine several speed combinations within the speed limit window, where the speed combinations include linear speed and angular speed. The speed evaluation function module 200 is used to evaluate each speed combination using a predetermined speed evaluation function to screen out candidate speed combinations. The local optimum judgment module 300 is used to determine whether the cleaning robot is trapped in a local optimum based on the angular velocity in the candidate speed combination and the positional relationship between the cleaning robot and the target point. The optimal speed determination module 400 is used to adjust the linear velocity in the candidate speed combination to zero and keep the angular velocity in the candidate speed combination unchanged when the cleaning robot is trapped in a local optimum; and to directly use the candidate speed combination as the optimal speed combination when the cleaning robot is not trapped in a local optimum.
[0111] Specifically, the speed window acquisition module 100 is further configured to determine a speed limit window according to the maximum movement speed limit, the maximum movement acceleration limit, and the safety speed limit of the cleaning robot.
[0112] Furthermore, the speed evaluation function module 200 is also used to: predict a motion trajectory based on the speed combination; determine a direction angle evaluation value and an obstacle distance evaluation value based on the motion trajectory, determine an angular velocity evaluation value based on the angular velocity in the speed combination, and determine a speed evaluation function value corresponding to the speed combination based on the direction angle evaluation value, the obstacle distance evaluation value, and the angular velocity evaluation value.
[0113] Furthermore, the local optimal judgment module 300 is also used to: judge whether the absolute value of the angular velocity in the candidate speed combination is greater than a threshold and judge whether the target point is in the opposite direction of the movement direction of the cleaning robot; if the absolute value of the angular velocity is greater than the threshold and the target point is in the opposite direction of the movement direction of the cleaning robot, it is judged that the cleaning robot is trapped in the local optimal state, otherwise it is judged that the cleaning robot is not trapped in the local optimal state.
[0114] Exemplarily, the local optimal judgment module 300 is also used to: determine the angle between the movement direction of the predicted point and the target direction according to the movement trajectory; and determine whether the target point is in the opposite direction of the movement direction of the cleaning robot according to the size of the angle.
[0115] Among them, the more detailed working processes of the speed window acquisition module 100, the speed evaluation function module 200, the local optimal judgment module 300 and the optimal speed determination module 400 can be referred to the description of the relevant steps of the first embodiment, which will not be repeated here.
[0116] The third embodiment further discloses a computer-readable storage medium, which stores a path planning program for the cleaning robot. When the path planning program for the cleaning robot is executed by a processor, the path planning method for the cleaning robot described above is implemented.
[0117] This fourth embodiment also discloses a computer device, at the hardware level, such as Figure 9 As shown, the computer device includes a processor 12, an internal bus 13, a network interface 14, and a computer-readable storage medium 11. The processor 12 reads the corresponding computer program from the computer-readable storage medium and then runs it, forming a request processing device at the logical level. Of course, in addition to software implementation, one or more embodiments of this specification do not exclude other implementation methods, such as logic devices or a combination of software and hardware, etc., that is to say, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices. The computer-readable storage medium 11 stores a path planning program for the cleaning robot, and when the path planning program for the cleaning robot is executed by the processor, the above-mentioned path planning method for the cleaning robot is implemented.
[0118] Computer-readable storage media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. The information can be computer-readable instructions, data structures, program modules or other data. Examples of computer-readable storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic disk storage, quantum memory, graphene-based storage media or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device.
[0119] The above describes in detail the specific implementation methods of the present invention. Although some embodiments have been shown and described, those skilled in the art should understand that these embodiments can be modified and improved without departing from the principles and spirit of the present invention, the scope of which is defined by the claims and their equivalents. These modifications and improvements should also be within the scope of protection of the present invention.
Claims
1. A path planning method for a cleaning robot, characterized in that: The path planning method comprises: Acquire a speed limit window, and determine a plurality of speed combinations within the speed limit window, wherein the speed combinations include linear speed and angular speed; evaluating each of the speed combinations using a predetermined speed evaluation function to screen out candidate speed combinations; Determining whether the cleaning robot is trapped in a local optimum according to the angular velocity in the candidate velocity combination and the positional relationship between the cleaning robot and the target point; If yes, the linear velocity in the candidate velocity combination is adjusted to zero and the angular velocity in the candidate velocity combination is kept unchanged, and the optimal velocity combination is used; if no, the candidate velocity combination is directly used as the optimal velocity combination; The method of evaluating each of the speed combinations using a predetermined speed evaluation function includes: Predicting a motion trajectory based on the speed combination; Determine a direction angle evaluation value and an obstacle distance evaluation value according to the motion trajectory, and determine an angular velocity evaluation value according to the angular velocity in the velocity combination; Determine a speed evaluation function value corresponding to the speed combination according to the direction angle evaluation value, the obstacle distance evaluation value, and the angular velocity evaluation value; The method for determining whether the cleaning robot is trapped in a local optimum according to the angular velocity in the candidate velocity combination and the positional relationship between the cleaning robot and the target point includes: Determining whether the absolute value of the angular velocity in the candidate velocity combination is greater than a threshold and determining whether the target point is in the opposite direction of the movement direction of the cleaning robot; If the absolute value of the angular velocity is greater than a threshold and the target point is in the opposite direction of the movement direction of the cleaning robot, it is determined that the cleaning robot is trapped in a local optimum; otherwise, it is determined that the cleaning robot is not trapped in a local optimum; Wherein, the method for determining whether the target point is in the opposite direction of the movement direction of the cleaning robot is: Determine the angle between the moving direction of the prediction point and the target direction according to the moving trajectory; It is determined whether the target point is in the opposite direction of the moving direction of the cleaning robot according to the size of the angle.
2. The path planning method for a cleaning robot according to claim 1, characterized in that: The method for obtaining the speed limit window is: The speed limit window is determined according to the maximum movement speed limit, the maximum movement acceleration limit and the safety speed limit of the cleaning robot.
3. The path planning method for a cleaning robot according to claim 1, characterized in that: The candidate speed combination is a speed combination with the largest speed evaluation function value among the several speed combinations.
4. The path planning method for a cleaning robot according to claim 1, characterized in that: The calculation formula of the angular velocity evaluation value is: Here, angular_velocity(ω) represents the angular velocity evaluation value, |ω| represents the absolute value of the angular velocity, and π represents the maximum angular velocity.
5. A path planning device for a cleaning robot, used to implement the path planning method for a cleaning robot according to any one of claims 1 to 4, characterized in that: The path planning device comprises: A speed window acquisition module is used to acquire a speed limit window and determine a plurality of speed combinations within the speed limit window, wherein the speed combinations include linear speed and angular speed; A speed evaluation function module is configured to evaluate each of the speed combinations using a predetermined speed evaluation function to screen out candidate speed combinations; wherein the method of evaluating each of the speed combinations using the predetermined speed evaluation function includes: predicting a motion trajectory based on the speed combination; determining a direction angle evaluation value and an obstacle distance evaluation value based on the motion trajectory, and determining an angular velocity evaluation value based on the angular velocity in the speed combination; and determining a speed evaluation function value corresponding to the speed combination based on the direction angle evaluation value, the obstacle distance evaluation value, and the angular velocity evaluation value. A local optimum judgment module is used to judge whether the cleaning robot is trapped in a local optimum based on the angular velocity in the candidate speed combination and the positional relationship between the cleaning robot and the target point; wherein, the method for judging whether the cleaning robot is trapped in a local optimum based on the angular velocity in the candidate speed combination and the positional relationship between the cleaning robot and the target point comprises: judging whether the absolute value of the angular velocity in the candidate speed combination is greater than a threshold value and judging whether the target point is in the opposite direction of the movement direction of the cleaning robot; if the absolute value of the angular velocity is greater than the threshold value and the target point is in the opposite direction of the movement direction of the cleaning robot, it is judged that the cleaning robot is trapped in a local optimum, otherwise it is judged that the cleaning robot is not trapped in a local optimum; wherein, the method for judging whether the target point is in the opposite direction of the movement direction of the cleaning robot is: determining the angle between the movement direction of the predicted point and the target direction according to the movement trajectory; and determining whether the target point is in the opposite direction of the movement direction of the cleaning robot according to the size of the angle; The optimal speed determination module is used to adjust the linear speed in the candidate speed combination to zero and keep the angular speed in the candidate speed combination unchanged as the optimal speed combination when the cleaning robot falls into a local optimum; and to directly use the candidate speed combination as the optimal speed combination when the cleaning robot does not fall into a local optimum.
6. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a path planning program for the cleaning robot, and when the path planning program for the cleaning robot is executed by a processor, the path planning method for the cleaning robot according to any one of claims 1 to 4 is implemented.
7. A computer device, characterized in that: The computer device includes a computer-readable storage medium, a processor, and a path planning program for a cleaning robot stored in the computer-readable storage medium. When the path planning program for the cleaning robot is executed by the processor, the path planning method for the cleaning robot according to any one of claims 1 to 4 is implemented.
Citation Information
Patent Citations
Multi-curve local route planning method based on dynamic window
CN109062227A
Dynamic window tracking optimization method and device, terminal and storage medium
CN113341962A