Robot control method, robot control device, robot, and storage medium
By adjusting the acceleration and target speed of the revolver and right wheel of the robot, combined with the planning of the rotation radius, the path deviation problem caused by the change of the rotation radius of the differential robot is solved, ensuring safe and efficient operation.
Patent Information
- Application Number
- CN202311867287.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-29
- Publication Date
- 2025-07-01
AI Technical Summary
When the differential robot is controlled differentially, the acceleration of the left and right wheels is fixed, causing the rotation radius to change, resulting in deviation from the actual running path and the planned path, and may collide with obstacles.
By obtaining the planned speed and current speed of the robot's left and right wheels, and adjusting the acceleration and target speed in combination with the planned rotation radius, we ensure that the deviation between the actual rotation radius of the robot and the planned rotation radius is small.
The path tracking capability of the robot is improved, avoiding collisions with obstacles outside the planned path, reducing the impact of path tracking effects on changes in system characteristics, and improving operational efficiency.
Smart Images

Figure CN120228710A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of robot control, and more specifically, to a robot control method, a robot control device, a robot, and a non-volatile computer-readable storage medium. Background Art
[0002] Currently, differential robots perform differential control on the left and right wheels. When performing differential control, the robot mainly combines the linear velocity / angular velocity with the existing robot model to calculate the left wheel speed and the right wheel speed. However, controlling the left wheel speed and the right wheel speed separately will cause a deviation between the motion trajectory and the planned trajectory. The accelerations of the left and right wheels are both fixed values during the motion control process. When rotating, the speeds of the left and right wheels are different. Then, if rotating during the acceleration or deceleration process, the rotation radius of the robot will change with the speeds of the left and right wheels, resulting in an offset between the actual running path of the robot and the planned path, and further causing the robot to possibly collide with obstacles outside the planned path. Summary of the Invention
[0003] Embodiments of the present application provide a robot control method, a robot control device, a robot, and a non-volatile computer-readable storage medium, which can correspondingly adjust the accelerations of the left and right wheels in combination with the planned rotation radius, so that after the robot runs according to the target speeds corresponding to the left and right wheels, the deviation between the actual rotation radius of the robot and the planned rotation radius is small, thereby ensuring that the robot will not collide with obstacles outside the planned path during walking.
[0004] The robot control method according to the embodiments of the present application includes obtaining the planned speed of the left wheel of the robot, the planned speed of the right wheel, the current speed of the left wheel, and the current speed of the right wheel; determining the planned rotation radius of the planned path of the robot according to the planned speed of the left wheel and the planned speed of the right wheel; determining the acceleration of the robot according to the planned speed of the left wheel, the planned speed of the right wheel, the current speed of the left wheel, and the current speed of the right wheel; determining the target speed of the left wheel and the target speed of the right wheel according to the planned speed of the left wheel, the planned speed of the right wheel, the current speed of the left wheel, the current speed of the right wheel, the planned rotation radius, and the acceleration; controlling the left wheel to run according to the target speed of the left wheel, and controlling the right wheel to run according to the target speed of the right wheel.
[0005] In some embodiments, determining the acceleration of the robot according to the planned left-wheel speed, the planned right-wheel speed, the current left-wheel speed, and the current right-wheel speed includes: determining the current linear speed according to the current left-wheel speed and the current right-wheel speed; determining the planned linear speed according to the planned left-wheel speed and the planned right-wheel speed; when the current linear speed is less than the planned linear speed, determining that the acceleration and deceleration motion condition of the robot is an acceleration condition, and determining the acceleration of the robot as a first preset acceleration corresponding to the acceleration condition; when the current linear speed is greater than the planned linear speed, determining that the acceleration and deceleration motion condition is a deceleration condition, and determining the acceleration of the robot as a second preset acceleration corresponding to the deceleration condition.
[0006] In some embodiments, determining the target left-wheel speed and the target right-wheel speed according to the planned left-wheel speed, the planned right-wheel speed, the current left-wheel speed, the current right-wheel speed, the planned turning radius, and the acceleration includes: determining the planned linear speed according to the planned left-wheel speed and the planned right-wheel speed; determining the current linear speed according to the current left-wheel speed and the current right-wheel speed; determining the target linear speed according to the current linear speed, the acceleration, and the planned linear speed; and determining the target left-wheel speed and the target right-wheel speed according to the target linear speed and the planned turning radius.
[0007] In some embodiments, determining the target linear speed according to the current linear speed, the acceleration, and the planned linear speed includes: when the difference between the current linear speed and the planned linear speed is greater than the product of the acceleration and a preset operation period, confirming that the target linear speed is the sum of the current linear speed and the product of the acceleration and the preset operation period; when the difference between the current linear speed and the planned linear speed is less than or equal to the product of the acceleration and the preset operation period, determining that the target linear speed is the planned linear speed.
[0008] In some embodiments, determining the target left-wheel speed and the target right-wheel speed according to the target linear speed and the planned turning radius includes: determining the current turning radius according to the current left-wheel speed and the current right-wheel speed; when the absolute value of the difference between the current turning radius and the planned turning radius is greater than a preset difference threshold, determining the target turning radius according to the following formula:
[0009] r next =r now +r g
[0010] where r next is the target turning radius, r nowis the current rotation radius, r g is the preset rotation radius gradient value;
[0011] Determine the target speed of the left wheel and the target speed of the right wheel according to the following formula:
[0012]
[0013] where, v l,next is the target speed of the left wheel, v r,next is the target speed of the right wheel, v c,next is the target linear speed, l is the distance between the left and right wheels of the robot, r next is the target rotation radius, and r next being a positive number indicates that the robot rotates to the right, r next being a negative number indicates that the robot rotates to the left.
[0014] In some embodiments, the determining the target speed of the left wheel and the target speed of the right wheel according to the target linear speed and the planned rotation radius further includes:
[0015] Determine the current rotation radius according to the current speed of the left wheel and the current speed of the right wheel;
[0016] When the absolute value of the difference between the current rotation radius and the planned rotation radius is less than the preset difference threshold and the planned linear speed is not zero, determine the target speed of the left wheel and the target speed of the right wheel according to the following formula:
[0017]
[0018] where, v l,next is the target speed of the left wheel, v r,next is the target speed of the right wheel, v c,next is the target linear speed, v l,goal is the planned speed of the left wheel, v r,goal is the planned speed of the right wheel, v c,goal is the planned linear speed;
[0019] When the absolute value of the difference between the current rotation radius and the planned rotation radius is less than the preset difference threshold and the planned linear speed is zero, determine the target speed of the left wheel and the target speed of the right wheel according to the following formula:
[0020]
[0021] where, v l,next is the target speed of the left wheel, v r,next is the target speed of the right wheel, v c,next is the target linear speed, vl,now is the current speed of the left wheel, v r,now is the current speed of the right wheel, v c,now is the current linear speed.
[0022] In some embodiments, the robot control method further includes: when the target speed of the left wheel reaches the planned speed of the left wheel and the target speed of the right wheel reaches the planned speed of the right wheel, controlling the left wheel to run at the target speed of the left wheel and controlling the right wheel to run at the target speed of the right wheel; when the target speed of the left wheel does not reach the planned speed of the left wheel or the target speed of the right wheel does not reach the planned speed of the right wheel, re-entering the step of obtaining the planned speed of the left wheel, the planned speed of the right wheel, the current speed of the left wheel and the current speed of the right wheel of the robot.
[0023] The robot control device according to the embodiment of the present application includes an acquisition module, a radius determination module, an acceleration determination module, a speed determination module and a control module. The acquisition module is used to acquire the planned speed of the left wheel, the planned speed of the right wheel, the current speed of the left wheel and the current speed of the right wheel of the robot. The radius determination module is used to determine the planned rotation radius of the planned path of the robot according to the planned speed of the left wheel and the planned speed of the right wheel. The acceleration determination module is used to determine the acceleration of the robot according to the planned speed of the left wheel, the planned speed of the right wheel, the current speed of the left wheel and the current speed of the right wheel. The speed determination module is used to determine the target speed of the left wheel and the target speed of the right wheel according to the planned speed of the left wheel, the planned speed of the right wheel, the current speed of the left wheel, the current speed of the right wheel, the planned rotation radius and the acceleration. The control module is used to control the left wheel to run according to the target speed of the left wheel and control the right wheel to run according to the target speed of the right wheel.
[0024] The robot according to the embodiment of the present application includes a processor, a memory and a computer program, wherein the computer program is stored in the memory and is executed by the processor, and the computer program includes instructions for executing the robot control method according to any one of the above embodiments.
[0025] The non-volatile computer-readable storage medium according to the embodiment of the present application includes a computer program, and when the computer program is executed by a processor, the processor is caused to execute the robot control method according to any one of the above embodiments.
[0026] The robot control method, robot control device, robot, and computer-readable storage medium according to the embodiments of the present application first obtain the planned speed of the left wheel, the planned speed of the right wheel, the current speed of the left wheel, and the current speed of the right wheel of the robot, and then determine the planned rotation radius of the planned path of the robot according to the planned speed of the left wheel and the planned speed of the right wheel, so as to subsequently determine the target speed of the left wheel and the target speed of the right wheel according to the planned rotation radius. Next, the acceleration of the robot is determined according to the planned speed of the left wheel, the planned speed of the right wheel, the current speed of the left wheel, and the current speed of the right wheel. Then, according to the planned speed of the left wheel, the planned speed of the right wheel, the current speed of the left wheel, the current speed of the right wheel, the planned rotation radius, and the acceleration, the acceleration of the left wheel and the acceleration of the right wheel are respectively determined, so as to determine the target speed of the left wheel and the target speed of the right wheel with a relatively small deviation between the corresponding rotation radius and the planned rotation radius. It can be understood that since the acceleration of the left wheel and the acceleration of the right wheel are correspondingly adjusted in combination with the planned rotation radius at this time, after the robot runs according to the target speed of the left wheel and the target speed of the right wheel, the deviation between the actual rotation radius of the robot and the planned rotation radius of the planned path is relatively small, so that the deviation between the actual walking trajectory of the robot and the planned path is relatively small, thereby improving the path tracking ability of the robot and ensuring that the robot does not collide with obstacles outside the planned path during walking, thus ensuring the safety of the robot during walking.
[0027] Additional aspects and advantages of the embodiments of the present application will be given in part in the following description, become apparent in part from the following description, or be understood through the practice of the embodiments of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] The above and / or additional aspects and advantages of the present application will become apparent and be readily understood from the description of the embodiments in conjunction with the following drawings, in which:
[0029] Figure 1 is a schematic flowchart of the robot control method according to some embodiments of the present application;
[0030] Figure 2 is a brake condition data diagram of a commonly used robot control method at present;
[0031] Figure 3 is a brake condition data diagram of the robot control method according to some embodiments of the present application;
[0032] Figure 4 is a schematic flowchart of the robot control method according to some embodiments of the present application;
[0033] Figure 5 is a schematic flowchart of the robot control method according to some embodiments of the present application;
[0034] Figure 6It is a schematic flow chart of a robot control method according to some embodiments of the present application;
[0035] Figure 7 It is a schematic flow chart of a robot control method according to some embodiments of the present application;
[0036] Figure 8 It is a schematic module diagram of a robot control device according to some embodiments of the present application;
[0037] Figure 9 It is a schematic structural diagram of a robot according to some embodiments of the present application;
[0038] Figure 10 It is a schematic connection state diagram of a non - volatile computer - readable storage medium and a processor according to some embodiments of the present application. Detailed Embodiments
[0039] The following details the embodiments of the present application. The examples of the embodiments are shown in the drawings, where the same or similar reference numerals denote the same or similar elements or elements with the same or similar functions throughout. The embodiments described below with reference to the drawings are exemplary and are only used to explain the embodiments of the present application and should not be construed as a limitation of the embodiments of the present application.
[0040] In the prior art, when performing motion control on a differential robot, a path is first planned based on an existing navigation task, and then a linear velocity and an angular velocity (v c , w) are output based on the planned path. Since v c = w·r, the turning radius of the robot can be calculated by the formula and obtained.
[0041] Currently, differential robots perform differential control on the left and right wheels. Therefore, the mainstream algorithm of the current algorithm module is to combine the linear velocity / angular velocity (v, w) with the existing robot model to calculate the planned speeds of the left and right wheels, that is, (v l,goal , v r,goal ).
[0042] However, controlling the speeds of the left and right wheels separately will result in deviations in the motion trajectory. Because the accelerations of the left and right wheels are both fixed values during the motion control process, if acceleration or deceleration occurs during rotation, it will cause the actual running path of the robot to deviate from the navigation task planned path, and thus may collide with obstacles outside the planned path.
[0043] Taking deceleration operation as an example, assume that the speed of the left wheel is v l , and the speed of the right wheel is v r . When the robot is at During operation, when the speed of the left wheel is greater than that of the right wheel, the robot will turn right in a circular motion. If the distance between the left and right wheels of the robot at this time is l = 0.5 [m], the linear velocity of the robot's operation is v c =(v l +v r ) / 2 = 1.5 [m / s], and the angular velocity is w = (v l -v r ) / l = 2 [rad / s]. The rotation radius of the robot at this time When decelerating, if the acceleration a dec = 1 [m / s 2 , then during the deceleration process, v l = 2 - a×t, The calculation formula for the rotation radius of the robot is as follows:
[0044]
[0045] In the above deceleration motion example, when t ≤ 1 [s], the real-time rotation radius of the robot is as follows:
[0046]
[0047] In the above deceleration motion example, when t > 1 [s], the real-time rotation radius of the robot is as follows:
[0048]
[0049] In summary, during the deceleration braking process, the rotation radius of the planned path is 0.75 [m], and the real-time rotation radius of the robot is At this time, there is a large deviation between the actual operation path of the robot and the planned path, which may cause the robot to collide with obstacles outside the planned path.
[0050] To solve the above technical problems, an embodiment of the present application provides a robot control method.
[0051] The robot control method of the present application will be elaborated in detail below:
[0052] Please refer to Figure 1 , an embodiment of the present application provides a robot control method, which includes:
[0053] Step 011: Obtain the planned speed of the left wheel, the planned speed of the right wheel, the current speed of the left wheel, and the current speed of the right wheel of the robot;
[0054] Specifically, after the robot obtains a navigation task, it will plan a path according to the navigation task, and then can obtain the planned speed of the left wheel and the planned speed of the right wheel based on the planned path. At the same time, it can also obtain the current speed of the left wheel and the current speed of the right wheel according to the current operating conditions of the left and right wheels.
[0055] Step 012: Determine the planned turning radius of the planned path of the robot according to the planned speed of the left wheel and the planned speed of the right wheel;
[0056] Specifically, after obtaining the planned speed of the left wheel and the planned speed of the right wheel, the planned turning radius of the planned path of the robot can be determined based on the model of the robot, that is, the distance between the left wheel and the right wheel, so as to subsequently determine the target speed of the left wheel and the target speed of the right wheel of the robot according to the planned turning radius. When determining the planned turning radius of the robot, the following formula can be used:
[0057]
[0058] Where v l,goal is the planned speed of the left wheel, v r,goal is the target speed of the right wheel, l is the distance between the left and right wheels, and r goal is the planned turning radius.
[0059] Optionally, the robot can judge the movement trend of the robot according to the planned turning radius, that is, judge whether the robot needs to turn right, turn left, go straight or spin next. It can be understood that the planned turning radius calculated according to the above formula has positive and negative values. In formula (1), since the denominator includes v l,goal - v r,goal , then when the planned turning radius is positive, it can be confirmed that the planned speed of the left wheel is greater than the planned speed of the right wheel, and at this time the robot needs to turn right. When the planned turning radius is negative, it can be confirmed that the planned speed of the left wheel is less than the planned speed of the right wheel, and at this time the robot needs to turn left. It can be understood that when the denominator includes v r,goal - v l,goal , the relationship between the positive and negative of the planned turning radius and the left and right turns of the robot is opposite, and for the sake of simplicity, it will not be elaborated here. When the planned turning radius is infinite, it can be confirmed that the planned speed of the left wheel is equal to the planned speed of the right wheel, and at this time the robot needs to go straight. When the planned turning radius is 0, it can be confirmed that the planned speed of the left wheel and the planned speed of the right wheel are opposite numbers (that is, v l,goal = - v r,goal) At this time, the robot needs to spin in place. Among them, when the planned rotation radius is 0 and the planned speed of the left wheel is greater than 0, the robot spins to the right in place; when the planned rotation radius is 0 and the planned speed of the right wheel is greater than 0, the robot spins to the left in place. In particular, when the planned speeds of the left and right wheels are 0, the robot is performing emergency braking and cannot calculate the planned rotation radius according to formula (1). At this time, the planned rotation radius still takes the value of the planned rotation radius at the previous moment.
[0060] Step 013: Determine the acceleration of the robot according to the planned speed of the left wheel, the planned speed of the right wheel, the current speed of the left wheel, and the current speed of the right wheel;
[0061] Specifically, by combining the planned speed of the left wheel, the planned speed of the right wheel, the current speed of the left wheel, and the current speed of the right wheel, the acceleration of the robot can be determined to determine whether the robot needs to accelerate or decelerate next, and to determine the value of the acceleration during the acceleration and deceleration process.
[0062] In one embodiment, the current linear speed can be determined according to the current speed of the left wheel and the current speed of the right wheel. For example, the current linear speed can be determined according to the formula v c,now =(v l,now +v r,now ) / 2, where v c,now is the current linear speed, v l,now is the current speed of the left wheel, and v r,now is the current speed of the right wheel. Then, the planned linear speed is determined according to the planned speed of the left wheel and the planned speed of the right wheel. For example, the planned linear speed can be determined according to the formula v c,goal =(v l,goal +v r,goal ) / 2, where v c,goal is the planned linear speed, v l,goal is the current speed of the left wheel, and v r,goal is the current speed of the right wheel. When the current linear speed is less than the planned linear speed, it can be confirmed that the robot needs to accelerate. Therefore, the acceleration and deceleration motion condition of the robot is determined to be the acceleration condition. At this time, the acceleration of the robot can be determined to be the first preset acceleration corresponding to the acceleration condition, and the first preset acceleration is a positive number. When the current linear speed is greater than the planned linear speed, it can be confirmed that the robot needs to decelerate. Therefore, the acceleration and deceleration motion condition is determined to be the deceleration condition. At this time, the acceleration of the robot can be determined to be the second preset acceleration corresponding to the deceleration condition, and the second preset acceleration is a negative number.
[0063] In another embodiment, the current speed of the left wheel can be compared with the planned speed of the left wheel, and the current speed of the right wheel can be compared with the planned speed of the right wheel. When the absolute value of the current speed of the left wheel is less than the planned speed of the left wheel and the absolute value of the current speed of the right wheel is less than the planned speed of the right wheel, it can be confirmed that the robot is in an acceleration condition, and at this time, the acceleration is the first preset acceleration corresponding to the acceleration condition. When the absolute value of the current speed of the left wheel is less than the planned speed of the left wheel or the absolute value of the current speed of the right wheel is less than the planned speed of the right wheel, it can be confirmed that the robot is in a deceleration condition, and at this time, the acceleration is the second preset acceleration corresponding to the deceleration condition.
[0064] Among them, the absolute values of the first preset acceleration corresponding to the acceleration condition and the second preset acceleration corresponding to the deceleration condition can be the same to facilitate the confirmation of the target speed of the left wheel and the target speed of the right wheel. Alternatively, the first preset acceleration corresponding to the acceleration condition and the second preset acceleration corresponding to the deceleration condition can be different, and the acceleration can be set according to the needs of the condition. For example, in order to achieve a smooth start of the robot, the first preset acceleration corresponding to the acceleration condition can be set to be relatively small, such as 1 m / s 2 ; in order to achieve an emergency brake, the second preset acceleration corresponding to the deceleration condition can be set to be relatively large, such as -4 m / s 2 or -5 m / s 2 .
[0065] Step 014: Determine the target speed of the left wheel and the target speed of the right wheel according to the planned speed of the left wheel, the planned speed of the right wheel, the current speed of the left wheel, the current speed of the right wheel, the planned turning radius, and the acceleration;
[0066] Specifically, after determining the planned turning radius and the acceleration, it can be confirmed the acceleration and deceleration conditions, the turning direction, and the turning radius that the robot needs to execute at the next moment. At the same time, combining the planned speed of the left wheel, the planned speed of the right wheel, the planned turning radius, the current speed of the left wheel, and the current speed of the right wheel, the acceleration of the left wheel and the acceleration of the right wheel can be correspondingly determined, so that the acceleration of the left wheel and the acceleration of the right wheel can be adjusted specifically according to the planned turning radius to determine the target speed of the left wheel and the target speed of the right wheel, so that after the left wheel moves according to the target speed of the left wheel and the right wheel moves according to the target speed of the right wheel, the deviation between the turning radius of the robot and the planned turning radius is relatively small.
[0067] For example, the target linear speed of the robot can be determined according to the acceleration and the current linear speed, and then the target speed of the left wheel and the target speed of the right wheel can be determined in combination with the planned turning radius. For another example, the target speed of one of the left and right wheels can be determined according to the acceleration, and then the target speed of the other wheel among the left and right wheels can be determined according to the determined target speed and the planned turning radius.
[0068] In this way, the planned turning radius is incorporated into the factors for determining the target speeds of the left and right wheels, so that the accelerations of the left and right wheels can be adjusted correspondingly according to the planned turning radius, rather than being a fixed value. It can be understood that compared with the solution where the accelerations of the left and right wheels are both a fixed value, the target speeds of the left and right wheels in this application can be adjusted flexibly, enabling the turning radius of the robot to be closer to the planned turning radius.
[0069] Step 015: Control the left wheel to run according to the target speed of the left wheel, and control the right wheel to run according to the target speed of the right wheel.
[0070] Specifically, after determining the target speeds of the left and right wheels, the target speeds of the left and right wheels can be input into the left and right wheel motor controllers to control the left wheel to run according to the target speed of the left wheel and the right wheel to run according to the target speed of the right wheel. It can be understood that compared with the solution of directly controlling the left and right wheels to run according to the planned speeds of the left and right wheels and having the same acceleration for the left and right wheels, this application adds the factor of the planned turning radius in the process of determining the target speeds of the left and right wheels. The accelerations of the left and right wheels can be adjusted flexibly according to the planned turning radius, and the robot is controlled to run according to the adjusted target speeds of the left and right wheels, so that the difference between the turning radius of the robot after running according to the target speeds of the left and right wheels and the planned turning radius is small, thereby reducing the difference between the actual running path and the planned path of the robot and improving the path tracking effect of the robot.
[0071] For example, taking decelerated operation as an example, assume that the distance between the left and right wheels \(l = 0.518[m]\), the speed of the left wheel is \(v\) l , and the speed of the right wheel is \(v\) r , and the turning radius is \(r\). When the robot runs at , the turning radius is as follows:
[0072]
[0073] When receiving a deceleration command, the current common practice is to give a fixed acceleration, and both the left and right wheels decelerate according to this fixed acceleration. Assume that the acceleration at this time is \(1[m / s 2 ^2]\), then in the first deceleration stage (\(t\leq0.5[s]\)), there is:
[0074]
[0075]
[0076] In the second deceleration stage (\(t > 0.5[s]\)), there is:
[0077]
[0078]
[0079] The overall braking time of the robot is 1.5 [s]. It takes 1.5 [s] for the left wheel to stop and 0.5 [s] for the right wheel to stop.
[0080] Please combine with Figure 2 , Figure 2 For the braking condition data graph of the overall machine during the braking stage before improvement, that is, the braking condition data graph of the currently commonly used scheme during the braking stage. The graph includes the left wheel speed, the right wheel speed, and the turning radius. It can be seen that before braking, the left and right wheel speeds are stable, and the turning radius fluctuates around 0.518 [m]. During the first braking stage, neither the left wheel speed nor the right wheel speed is 0. At this time, the turning radius decreases from 0.518 [m] with the change of speed. During the second braking stage, the left wheel speed drops to 0, and the right wheel speed continues to decrease. At this time, the turning radius fluctuates around 0.259 [m]. The test results are consistent with the theoretical calculation results. It can be seen that in this case, the actual walking path of the robot during braking will deviate from the planned path, and thus it may collide with obstacles outside the planned path during braking.
[0081] Please combine with Figure 3 , Figure 3 For the braking condition data graph of the overall machine during the braking stage after improvement, that is, the braking condition data graph of the braking stage improved by applying the robot control method of this application. The graph includes the statistical graph of the left wheel speed, the right wheel speed, and the turning radius. It can be seen that the overall braking time is 1 [s], and both the left wheel and the right wheel can stop 1 [s] after receiving the deceleration command. Before braking, the left and right wheel speeds are stable, and the turning radius fluctuates around 0.518 [m]. During braking, the left wheel speed and the right wheel speed decrease synchronously, and the turning radius still fluctuates around 0.518 [m]; the test results are consistent with the theoretical calculation results. It can be seen that in this case, during braking, the driving trajectory of the robot is still within the planned path range. Therefore, during braking, the robot will not collide with obstacles outside the planned path.
[0082] The robot control method according to the embodiments of the present application first obtains the planned speed of the left wheel, the planned speed of the right wheel, the current speed of the left wheel, and the current speed of the right wheel of the robot, and then determines the planned turning radius of the planned path of the robot according to the planned speed of the left wheel and the planned speed of the right wheel, so as to subsequently determine the target speed of the left wheel and the target speed of the right wheel according to the planned turning radius. Then, according to the planned speed of the left wheel, the planned speed of the right wheel, the current speed of the left wheel, and the current speed of the right wheel, the acceleration of the robot is determined. Then, according to the planned speed of the left wheel, the planned speed of the right wheel, the current speed of the left wheel, the current speed of the right wheel, the planned turning radius, and the acceleration, the acceleration of the left wheel and the acceleration of the right wheel are respectively determined, so as to determine the target speed of the left wheel and the target speed of the right wheel with a smaller deviation between the corresponding turning radius and the planned turning radius. It can be understood that since the acceleration of the left wheel and the acceleration of the right wheel are correspondingly adjusted in combination with the planned turning radius at this time, after the robot runs according to the target speed of the left wheel and the target speed of the right wheel, the deviation between the actual turning radius of the robot and the planned turning radius of the planned path is smaller, so that the deviation between the actual walking trajectory of the robot and the planned path is smaller, thereby improving the path tracking ability of the robot and ensuring that the robot will not collide with obstacles outside the planned path during the walking process, thus ensuring the safety of the robot during the walking process.
[0083] In addition, it can be found from the above deceleration motion example that the current solution will cause a large deviation between the actual running path of the robot and the planned path. Currently, when a path deviation occurs, the robot needs to sample the deviation through multiple sensors and perform real-time iteration based on the deviation and the target path, and then re-plan the path. Therefore, the algorithm module of the robot needs to be extensively debugged to determine the control parameters. At the same time, these control parameters are related to the system characteristics of the robot. When the system characteristics of the robot cause errors due to load, road conditions, or production inconsistency, the path tracking effect often deteriorates. For example, the corresponding parameters for a robot with a load of 100 kg and a load of one ton are different. In the case where the load of the robot is 100 kg, the algorithm module can determine the control parameters according to the current load, so that the path tracking effect of the robot is better. However, in the case where the load of the robot is one ton, if the algorithm module still uses the control parameters corresponding to 100 kg to control the robot, the path tracking effect will deteriorate.
[0084] In order to avoid the robot from colliding with obstacles outside the planned path, a commonly used solution currently is to limit the maximum running speed of the robot and at the same time leave enough braking distance, but this will lead to a decrease in the running efficiency of the robot.
[0085] To avoid the deterioration of path tracking caused by changes in the motion characteristics of the robot, a commonly used solution at present is to apply different algorithm parameters based on different motion characteristics. However, this will increase the complexity of human-robot interaction and the complexity of the robot software system. For example, the robot needs to obtain the current load. Another commonly used solution is for the algorithm to make a compromise and select a comprehensive solution by synthesizing various working conditions. However, this will result in a set of parameters not being the optimal solution under a single working condition, which will in turn lead to a decrease in the operating efficiency of the robot.
[0086] The robot control method of the present application adjusts the acceleration of the left wheel and the acceleration of the right wheel correspondingly according to the planned rotation radius to ensure that after the robot runs according to the target speed of the left wheel and the target speed of the right wheel, the deviation between the actual rotation radius of the robot and the planned rotation radius of the planned path is small. Therefore, even when the system characteristics of the robot change, the present application can accurately determine the target speed of the left wheel and the target speed of the right wheel according to the planned rotation radius, without the need to adjust the speeds of the left and right wheels according to the system characteristics. Compared with the solution of applying different algorithm parameters based on different motion characteristics, the complexity of the software system of the robot of the present application is smaller. At the same time, the target speed of the left wheel and the target speed of the right wheel of the present application are determined according to the current planned path. The target speed of the left wheel and the target speed of the right wheel can be understood as the optimal solution or a better solution for the current working condition. Therefore, the operating efficiency of the robot is relatively high at this time. Moreover, the present application can ensure that the deviation between the actual walking path of the robot and the current planned path is small. Therefore, the possibility of the robot colliding with obstacles outside the planned path is also small. Then, at this time, the limitations of the maximum running speed and braking distance of the robot can be set smaller, thereby further improving the operating efficiency of the robot. In this way, the present application can improve the path tracking ability of the robot while retaining the different topological structures of the differential drive robot.
[0087] Please refer to Figure 4 , in some embodiments, step 014: determining the target speed of the left wheel and the target speed of the right wheel according to the planned speed of the left wheel, the planned speed of the right wheel, the current speed of the left wheel, the current speed of the right wheel, the planned rotation radius, and the acceleration, includes:
[0088] Step 0141: determining the planned linear speed according to the planned speed of the left wheel and the planned speed of the right wheel;
[0089] Step 0142: determining the current linear speed according to the current speed of the left wheel and the current speed of the right wheel;
[0090] Step 0143: determining the target linear speed according to the current linear speed, the acceleration, and the planned linear speed;
[0091] Step 0144: Determine the target speed of the left wheel and the target speed of the right wheel according to the target linear speed and the planned turning radius.
[0092] Specifically, the planned linear speed can be determined according to the planned speed of the left wheel and the planned speed of the right wheel, and the current linear speed can be determined according to the current speed of the left wheel and the current speed of the right wheel. Then, the target linear speed can be calculated according to the current linear speed, the acceleration, the planned linear speed, and the preset operation period for calculating the target speeds of the left and right wheels in each iteration. At this time, it is necessary to calculate the difference between the current linear speed and the planned linear speed, and then compare the difference with the product of the acceleration and the preset operation period.
[0093] In the case where the difference between the current linear speed and the planned linear speed is greater than the product of the acceleration and the preset operation period, it can be confirmed that the corresponding current linear speed in the next iteration cannot reach the planned linear speed. At this time, the target linear speed can be determined according to the current linear speed and the product of the acceleration and the preset operation period, that is, it is confirmed that the target linear speed is the sum of the current linear speed and the product of the acceleration and the preset operation period.
[0094] In the case where the difference between the current linear speed and the planned linear speed is less than or equal to the product of the acceleration and the preset operation period, it can be confirmed that the corresponding current linear speed in the next iteration can reach the planned linear speed, and the linear speed obtained after the current linear speed continues to change according to the product of the acceleration and the preset operation period may exceed the target linear speed. Therefore, at this time, the target linear speed will be determined according to the planned linear speed, that is, the target linear speed is confirmed as the planned linear speed. When determining the target linear speed, the following formula can be used:
[0095]
[0096] where, v c,next is the target linear speed, v c,now is the current linear speed, v c,goal is the preset linear speed, a is the acceleration, and t is the preset operation period.
[0097] After determining the target linear speed, the target speed of the left wheel and the target speed of the right wheel can be calculated according to the following formula:
[0098]
[0099] where, v l,next is the target speed of the left wheel, v r,next is the target speed of the right wheel, r goal is the planned turning radius.
[0100] It should be noted that the planned rotation radius in formula (3) is determined by formula (1), and the plus and minus signs in formula (3) need to be determined according to formula (1). In one embodiment, the denominator of formula (1) includes v l,goal -v r,goal , when the planned rotation radius obtained according to formula (1) is positive, the robot rotates to the right. At this time, the target speed of the left wheel is larger. Therefore, the formula corresponding to the target speed of the left wheel in formula (3) uses the plus sign, and the formula corresponding to the target speed of the right wheel in formula (3) uses the minus sign. In another embodiment, the denominator of formula (1) includes v r,goal -v l,goal , when the planned rotation radius obtained according to formula (1) is positive, the robot rotates to the left. At this time, the target speed of the right wheel is larger. Therefore, the formula corresponding to the target speed of the left wheel in formula (3) uses the minus sign, and the formula corresponding to the target speed of the right wheel in formula (3) uses the plus sign.
[0101] In this way, after substituting the target linear velocity, the planned rotation radius, and the left and right wheel spacing into formula (3), the target speeds of the left and right wheels can be obtained. It can be understood that since the factor of the planned rotation radius is added in the determination process of the target speeds of the left and right wheels, the deviation between the rotation radius of the robot and the planned rotation radius is relatively small after controlling the robot to run according to the target speeds of the left and right wheels.
[0102] Please refer to Figure 5 , in some embodiments, step 0144: determining the target speeds of the left and right wheels according to the target linear velocity and the planned rotation radius includes:
[0103] Step 01441: determining the current rotation radius according to the current speeds of the left and right wheels;
[0104] Step 01442: when the absolute value of the difference between the current rotation radius and the planned rotation radius is greater than a preset difference threshold, determining the target rotation radius according to the following formula:
[0105] r next =r now +r g (4)
[0106] where r next is the target rotation radius, r now is the current rotation radius, and r g is the preset rotation radius gradient value;
[0107] Step 01443: determining the target speeds of the left and right wheels according to the following formula:
[0108]
[0109] Among them, v l,next is the target speed of the left wheel, v r,next is the target speed of the right wheel, v c,next is the target linear speed, l is the distance between the left and right wheels of the robot, r next is the target rotation radius, and r next being a positive number indicates that the robot rotates clockwise, r next being a negative number indicates that the robot rotates counterclockwise.
[0110] Specifically, every time the robot iteratively calculates the target speeds of the left and right wheels, the rotation radius can be adjusted once. The robot can adjust the rotation radius to the target rotation radius after one iteration. Or, the robot can also adjust the rotation radius to the target rotation radius only after multiple iterations, that is, adjust the rotation radius multiple times until the target rotation radius is reached. Therefore, a corresponding rotation radius gradient value is also set for the rotation radius. For example, when the gap between the current rotation radius and the target rotation radius of the robot is relatively large and the current rotation radius is less than the target rotation radius, it is difficult for the robot to adjust the rotation radius to the target rotation radius in one adjustment. At this time, multiple iterations are needed to gradually increase the rotation radius, that is, increase the rotation radius through multiple adjustments so that the rotation radius of the robot can gradually increase to the target rotation radius.
[0111] The preset difference threshold is the upper limit of the change amount of the rotation radius in one adjustment. Once the difference between the current rotation radius and the planned rotation radius is greater than the preset difference threshold, it is necessary to use the rotation radius gradient value to determine the target rotation radius in order to use multiple iterations to gradually adjust the current rotation radius to the target rotation radius.
[0112] First, refer to the above formula (1) to determine the current rotation radius according to the current speeds of the left and right wheels. Then, judge whether the difference between the current rotation radius and the planned rotation radius is greater than the preset difference threshold, that is, judge whether the rotation radius of the robot can be adjusted to the planned rotation radius in one adjustment. When the difference between the current rotation radius and the planned rotation radius is greater than the preset difference threshold, the target rotation radius is determined using the above formula (4).
[0113] Specifically, the rotation radius gradient values corresponding to different rotation radii may be different. For example, when the current rotation radius is 9 m and the target rotation radius is 10 m, the current rotation radius can be adjusted to the target rotation radius in one iteration, and the rotation radius gradient value at this time can be 1 m. When the current rotation radius is 2 m and the target rotation radius is 1 m, multiple iterations are required, such as 5 iterations, to adjust the current rotation radius to the target rotation radius, and the rotation radius gradient value at this time can be 0.2 m. Of course, the rotation radius gradient values corresponding to different rotation radii may also be the same to increase the speed of determining the target rotation radius, thereby improving the speed of determining the target speeds of the left and right wheels.
[0114] Next, formula (3) can be referred to determine the target speeds of the left and right wheels. However, at this time, formula (3) needs to be adaptively adjusted to convert the planned rotation radius in formula (3) into the target rotation radius, resulting in formula (5). After substituting the distance between the left and right wheels, the target rotation radius, and the target linear velocity into formula (5), the target speeds of the left and right wheels can be determined.
[0115] In this way, multiple adjustments of the rotation radius can be achieved according to the rotation radius gradient value, enabling the current rotation radius of the robot to be gradually adjusted to the planned rotation radius. Even when the gap between the current rotation radius and the planned rotation radius is large, the current rotation radius of the robot can reach the planned rotation radius by gradually adjusting the rotation radius, thereby improving the path tracking ability of the robot and ensuring the path tracking effect.
[0116] Please refer to Figure 6 In some embodiments, step 0144: determining the target speeds of the left and right wheels according to the target linear velocity and the planned rotation radius further includes:
[0117] Step 01441: determining the current rotation radius according to the current speeds of the left and right wheels;
[0118] Step 01444: when the absolute value of the difference between the current rotation radius and the planned rotation radius is less than the preset difference threshold and the planned linear velocity is not zero, determining the target speeds of the left and right wheels according to the following formula:
[0119]
[0120] where v l,next is the target speed of the left wheel, v r,next is the target speed of the right wheel, v c,next is the target linear velocity, v l,goal is the planned speed of the left wheel, v r,goal is the planned speed of the right wheel, v c,goal is the planned linear velocity;
[0121] Step 01445: When the absolute value of the difference between the current rotation radius and the planned rotation radius is less than the preset difference threshold and the planned linear velocity is zero, determine the target speed of the left wheel and the target speed of the right wheel according to the following formula:
[0122]
[0123] where, v l,next is the target speed of the left wheel, v r,next is the target speed of the right wheel, v c,next is the target linear velocity, v l,now is the current speed of the left wheel, v r,now is the current speed of the right wheel, v c,now is the current linear velocity.
[0124] Specifically, when the difference between the current rotation radius and the planned rotation radius is less than the preset difference threshold, formula (3) can be further simplified to obtain the above formula (6):
[0125]
[0126] In formula (6), the denominator is the planned linear velocity. When the planned linear velocity is 0, the robot cannot calculate an accurate result according to formula (6). Therefore, before determining the target speed of the left wheel and the target speed of the right wheel, it is also necessary to determine whether the planned linear velocity is 0.
[0127] When the planned linear velocity is not 0, formula (6) can be used to determine the target speed of the left wheel and the target speed of the right wheel. That is, when the difference between the current rotation radius and the planned rotation radius is less than the preset difference threshold and the planned linear velocity is not zero, the target speed of the left wheel can be determined according to the planned linear velocity, the target linear velocity, and the planned speed of the left wheel, and the target speed of the right wheel can be determined according to the planned linear velocity, the target linear velocity, and the planned speed of the right wheel.
[0128] When the planned linear velocity is 0, formula (6) needs to be further adjusted. When the planned linear velocity is 0, the robot is making an emergency brake. At this time, the rotation radius of the robot can be kept as the rotation radius corresponding to the previous iterative adjustment. Therefore, the planned speed of the left wheel in formula (6) can be replaced with the current speed of the left wheel, and the planned speed of the right wheel can be replaced with the current speed of the right wheel, thus obtaining the above formula (7).
[0129] Then, when the planned linear velocity is 0, formula (7) can be used to determine the target velocity of the left wheel and the target velocity of the right wheel. That is, when the difference between the current rotation radius and the planned rotation radius is less than the preset difference threshold and the planned linear velocity is zero, the target velocity of the left wheel can be determined based on the current linear velocity, the target linear velocity, and the current velocity of the left wheel, and the target velocity of the right wheel can be determined based on the current linear velocity, the target linear velocity, and the current velocity of the right wheel.
[0130] In this way, when the difference between the current rotation radius and the planned rotation radius is less than the preset difference threshold, the simplified formula of the above formula (6) or formula (7) can be used to calculate the target velocity of the left wheel and the target velocity of the right wheel, so as to ensure the accuracy of the target velocity of the left wheel and the target velocity of the right wheel on the one hand, and reduce the calculation amount in the determination process on the other hand.
[0131] Please refer to Figure 7 , in some embodiments, the robot control method further includes:
[0132] Step 016: When the target velocity of the left wheel reaches the planned velocity of the left wheel and the target velocity of the right wheel reaches the planned velocity of the right wheel, control the left wheel to maintain the operation at the target velocity of the left wheel, and control the right wheel to maintain the operation at the target velocity of the right wheel;
[0133] When the target velocity of the left wheel does not reach the planned velocity of the left wheel, or the target velocity of the right wheel does not reach the planned velocity of the right wheel, re-enter the step of obtaining the planned velocity of the left wheel, the planned velocity of the right wheel, the current velocity of the left wheel, and the current velocity of the right wheel of the robot.
[0134] Specifically, after controlling the left wheel to operate according to the target velocity of the left wheel and the right wheel to operate according to the target velocity of the right wheel, the target velocity of the left wheel and the planned velocity of the left wheel can be compared, and the target velocity of the right wheel and the planned velocity of the right wheel can be compared. When the target velocity of the left wheel reaches the planned velocity of the left wheel and the target velocity of the right wheel reaches the planned velocity of the right wheel, it can be confirmed that the speed adjustment is completed at this time. Therefore, the left wheel can be controlled to maintain the operation at the target velocity of the left wheel, and the right wheel can be controlled to maintain the operation at the target velocity of the right wheel, so as to ensure that the robot can continue to operate according to the planned velocity and reduce the workload when repeatedly entering the step of determining the planned rotation radius of the planned path according to the planned velocity of the left wheel and the planned velocity of the right wheel of the robot. When the target velocity of the left wheel does not reach the planned velocity of the left wheel, or the target velocity of the right wheel does not reach the planned velocity of the right wheel, it can be confirmed that the speed of the robot still needs to be adjusted. At this time, the step of obtaining the planned velocity of the left wheel, the planned velocity of the right wheel, the current velocity of the left wheel, and the current velocity of the right wheel of the robot can be re-entered to adjust the speed of the robot again, so as to ensure that the left and right wheel speeds of the robot can finally reach the corresponding planned speeds.
[0135] Please refer to Figure 8, To facilitate the better implementation of the robot control method according to the embodiments of the present application, the embodiments of the present application further provide a robot control device 10. The robot control device 10 may include an acquisition module 11, a radius determination module 12, an acceleration determination module 13, a speed determination module 14, and a control module 15. The acquisition module 11 is configured to acquire the planned speed of the left wheel, the planned speed of the right wheel, the current speed of the left wheel, and the current speed of the right wheel of the robot. The radius determination module 12 is configured to determine the planned rotation radius of the planned path of the robot according to the planned speed of the left wheel and the planned speed of the right wheel. The acceleration determination module 13 is configured to determine the acceleration of the robot according to the planned speed of the left wheel, the planned speed of the right wheel, the current speed of the left wheel, and the current speed of the right wheel. The speed determination module 14 is configured to determine the target speed of the left wheel and the target speed of the right wheel according to the planned speed of the left wheel, the planned speed of the right wheel, the current speed of the left wheel, the current speed of the right wheel, the planned rotation radius, and the acceleration. The control module 15 is configured to control the operation of the left wheel according to the target speed of the left wheel and control the operation of the right wheel according to the target speed of the right wheel.
[0136] Specifically, the acceleration determination module 13 is configured to determine the current linear speed according to the current speed of the left wheel and the current speed of the right wheel; determine the planned linear speed according to the planned speed of the left wheel and the planned speed of the right wheel; in the case where the current linear speed is less than the planned linear speed, determine that the acceleration and deceleration motion condition of the robot is an acceleration condition, and determine the acceleration of the robot as the first preset acceleration corresponding to the acceleration condition; in the case where the current linear speed is greater than the planned linear speed, determine that the acceleration and deceleration motion condition is a deceleration condition, and determine the acceleration of the robot as the second preset acceleration corresponding to the deceleration condition.
[0137] Specifically, the speed determination module 14 is configured to determine the planned linear speed according to the planned speed of the left wheel and the planned speed of the right wheel; determine the current linear speed according to the current speed of the left wheel and the current speed of the right wheel; determine the target linear speed according to the current linear speed, the acceleration, and the planned linear speed; and determine the target speed of the left wheel and the target speed of the right wheel according to the target linear speed and the planned rotation radius.
[0138] Specifically, the speed determination module 14 is configured to confirm that the target linear speed is the sum of the current linear speed and the product of the acceleration and the preset operation period in the case where the difference between the current linear speed and the planned linear speed is greater than the product of the acceleration and the preset operation period; and determine that the target linear speed is the planned linear speed in the case where the difference between the current linear speed and the planned linear speed is less than or equal to the product of the acceleration and the preset operation period.
[0139] Specifically, the speed determination module 14 is configured to determine the current rotation radius according to the current speed of the left wheel and the current speed of the right wheel;
[0140] In the case where the absolute value of the difference between the current rotation radius and the planned rotation radius is greater than the preset difference threshold, determine the target rotation radius according to the following formula:
[0141] r next = r now + r g
[0142] where r next is the target rotation radius, r now is the current rotation radius, r g is the preset rotation radius gradient value;
[0143] Determine the target speed of the left wheel and the target speed of the right wheel according to the following formula:
[0144]
[0145] where v l,next is the target speed of the left wheel, v r,next is the target speed of the right wheel, v c,next is the target linear speed, l is the distance between the left and right wheels of the robot, r next is the target rotation radius, and r next being a positive number indicates that the robot rotates clockwise, r next being a negative number indicates that the robot rotates counterclockwise.
[0146] The speed determination module 14 is specifically configured to determine the current rotation radius according to the current speed of the left wheel and the current speed of the right wheel;
[0147] When the absolute value of the difference between the current rotation radius and the planned rotation radius is less than the preset difference threshold and the planned linear speed is not zero, determine the target speed of the left wheel and the target speed of the right wheel according to the following formula:
[0148]
[0149] where v l,next is the target speed of the left wheel, v r,next is the target speed of the right wheel, v c,next is the target linear speed, v l,goal is the planned speed of the left wheel, v r,goal is the planned speed of the right wheel, v c,goal is the planned linear speed;
[0150] When the absolute value of the difference between the current rotation radius and the planned rotation radius is less than the preset difference threshold and the planned linear speed is zero, determine the target speed of the left wheel and the target speed of the right wheel according to the following formula:
[0151]
[0152] where v l,next is the target speed of the left wheel, v r,next is the target speed of the right wheel, v c,next is the target linear speed, vl,now is the current speed of the left wheel, v r,now is the current speed of the right wheel, v c,now is the current linear speed.
[0153] The robot control device 10 further includes a judgment module 16. The judgment module 16 is configured to control the left wheel to maintain the operation at the left wheel target speed and control the right wheel to maintain the operation at the right wheel target speed when the left wheel target speed reaches the left wheel planned speed and the right wheel target speed reaches the right wheel planned speed; and to re-enter the steps of obtaining the left wheel planned speed, the right wheel planned speed, the current speed of the left wheel, and the current speed of the right wheel of the robot when the left wheel target speed does not reach the left wheel planned speed or the right wheel target speed does not reach the right wheel planned speed.
[0154] In the foregoing, the robot control device 10 has been described from the perspective of functional modules in combination with the accompanying drawings. These functional modules can be implemented in the form of hardware, can be implemented by instructions in the form of software, or can be implemented by a combination of hardware and software modules. Specifically, the steps of the method embodiments in the present application can be completed by the integrated logic circuit in the hardware in the processor and / or instructions in the form of software. The steps of the method disclosed in combination with the embodiments of the present application can be directly embodied as being executed and completed by a hardware-encoded processor, or can be executed and completed by a combination of the hardware and software modules in the encoded processor. Optionally, the software module can be located in a mature storage medium in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, an electrically erasable programmable memory, a register, etc. This storage medium is located in the memory, and the processor reads the information in the memory and combines its hardware to complete the steps in the above method embodiments.
[0155] Please refer to Figure 9 , the robot 100 in the embodiment of the present application includes a processor 20, a memory 30, and a computer program. Among them, the computer program is stored in the memory 30 and is executed by the processor 20. The computer program includes instructions for executing the robot control method in any of the above embodiments.
[0156] Please refer to Figure 10 , the embodiment of the present application also provides a non-volatile computer-readable storage medium 300, on which a computer program 310 is stored. When the computer program 310 is executed by a processor 30, the steps of the robot control method in any of the above embodiments are implemented. For the sake of brevity, it will not be described in detail here.
[0157] In the description of this specification, the descriptions referring to terms such as "certain embodiments", "in one example", "exemplarily", etc. mean that the specific features, structures, materials or characteristics described in connection with the embodiments or examples are included in at least one embodiment or example of the present application. In this specification, the schematic expressions of the above terms do not necessarily refer to the same embodiments or examples. Moreover, the specific features, structures, materials or characteristics described may be combined in a suitable manner in any one or more embodiments or examples. In addition, without contradiction, those skilled in the art can combine and combine the different embodiments or examples described in this specification and the features of different embodiments or examples.
[0158] Any process or method description shown in a flowchart or described in other ways herein can be understood to represent a module, segment, or portion of code including one or more executable instructions for implementing a specific logical function or process, and the scope of the preferred embodiments of the present application includes additional implementations, where the functions may be performed in a substantially simultaneous manner or in an order opposite to that shown or discussed, according to the functions involved, which should be understood by those skilled in the art to which the embodiments of the present application pertain.
[0159] Although the embodiments of the present application have been shown and described above, it can be understood that the above embodiments are exemplary and should not be construed as limiting the present application. Those of ordinary skill in the art can make changes, modifications, substitutions, and variations to the above embodiments within the scope of the present application.
Claims
1. A robot control method, characterized in that, The method includes: Obtaining the planned speed of the left wheel, the planned speed of the right wheel, the current speed of the left wheel, and the current speed of the right wheel of the robot; Determining the planned turning radius of the planned path of the robot according to the planned speed of the left wheel and the planned speed of the right wheel; Determining the acceleration of the robot according to the planned speed of the left wheel, the planned speed of the right wheel, the current speed of the left wheel, and the current speed of the right wheel; Determining the target speed of the left wheel and the target speed of the right wheel according to the planned speed of the left wheel, the planned speed of the right wheel, the current speed of the left wheel, the current speed of the right wheel, the planned turning radius, and the acceleration; Controlling the operation of the left wheel according to the target speed of the left wheel, and controlling the operation of the right wheel according to the target speed of the right wheel.
2. The robot control method according to claim 1, wherein, The determining the acceleration of the robot according to the planned speed of the left wheel, the planned speed of the right wheel, the current speed of the left wheel, and the current speed of the right wheel includes: Determining the current linear speed according to the current speed of the left wheel and the current speed of the right wheel; Determining the planned linear speed according to the planned speed of the left wheel and the planned speed of the right wheel; When the current linear speed is less than the planned linear speed, determining that the acceleration and deceleration motion condition of the robot is an acceleration condition, and determining that the acceleration of the robot is the first preset acceleration corresponding to the acceleration condition; When the current linear speed is greater than the planned linear speed, determining that the acceleration and deceleration motion condition is a deceleration condition, and determining that the acceleration of the robot is the second preset acceleration corresponding to the deceleration condition.
3. The robot control method according to claim 1, wherein, The determining the target speed of the left wheel and the target speed of the right wheel according to the planned speed of the left wheel, the planned speed of the right wheel, the current speed of the left wheel, the current speed of the right wheel, the planned turning radius, and the acceleration includes: Determining the planned linear speed according to the planned speed of the left wheel and the planned speed of the right wheel; Determining the current linear speed according to the current speed of the left wheel and the current speed of the right wheel; Determining the target linear speed according to the current linear speed, the acceleration, and the planned linear speed; Determining the target speed of the left wheel and the target speed of the right wheel according to the target linear speed and the planned turning radius.
4. The robot control method according to claim 3, wherein, The determining the target linear speed according to the current linear speed, the acceleration, and the planned linear speed includes: When the difference between the current linear speed and the planned linear speed is greater than the product of the acceleration and the preset operation period, confirming that the target linear speed is the sum of the current linear speed and the product of the acceleration and the preset operation period; When the difference between the current linear speed and the planned linear speed is less than or equal to the product of the acceleration and the preset operation period, determining that the target linear speed is the planned linear speed.
5. The robot control method according to claim 3, characterized in that The determining the target speed of the left wheel and the target speed of the right wheel according to the target linear speed and the planned turning radius includes: Determining the current turning radius according to the current speed of the left wheel and the current speed of the right wheel; When the absolute value of the difference between the current turning radius and the planned turning radius is greater than the preset difference threshold, determining the target turning radius according to the following formula: r next =r now +r g where r next is the target rotation radius, r now is the current rotation radius, and r g is a preset rotation radius gradient value; Determine the target speed of the left wheel and the target speed of the right wheel according to the following formula: Among them, v l,next is the target speed of the left wheel, v r,next is the target speed of the right wheel, v c,next is the target linear speed, l is the distance between the left and right wheels of the robot, r next is the target turning radius, and r next being a positive number indicates that the robot turns right, r next being a negative number indicates that the robot turns left.
6. The robot control method according to claim 3, wherein Determining the target speed of the left wheel and the target speed of the right wheel according to the target linear speed and the planned turning radius further includes: Determine the current turning radius according to the current speed of the left wheel and the current speed of the right wheel; When the absolute value of the difference between the current turning radius and the planned turning radius is less than a preset difference threshold and the planned linear speed is not zero, determine the target speed of the left wheel and the target speed of the right wheel according to the following formula: Among them, v l,next is the target speed of the left wheel, v r,next is the target speed of the right wheel, v c,next is the target linear speed, v l,goal is the planned speed of the left wheel, v r,goal is the planned speed of the right wheel, v c,goal is the planned linear speed; When the absolute value of the difference between the current turning radius and the planned turning radius is less than a preset difference threshold and the planned linear speed is zero, determine the target speed of the left wheel and the target speed of the right wheel according to the following formula: where, v l,next is the target speed of the left wheel, v r,next is the target speed of the right wheel, v c,next is the target linear speed, v l,now is the current speed of the left wheel, v r,now is the current speed of the right wheel, v c,now is the current linear speed.
7. The robot control method according to claim 1, wherein The method further includes: When the target speed of the left wheel reaches the planned speed of the left wheel and the target speed of the right wheel reaches the planned speed of the right wheel, control the left wheel to maintain operation at the target speed of the left wheel and control the right wheel to maintain operation at the target speed of the right wheel; When the target speed of the left wheel does not reach the planned speed of the left wheel or the target speed of the right wheel does not reach the planned speed of the right wheel, re-enter the step of obtaining the planned speed of the left wheel, the planned speed of the right wheel, the current speed of the left wheel and the current speed of the right wheel of the robot.
8. A robot control device, characterized in that, Includes: An acquisition module for acquiring the planned speed of the left wheel, the planned speed of the right wheel, the current speed of the left wheel and the current speed of the right wheel of the robot; A radius determination module for determining the planned turning radius of the planned path of the robot according to the planned speed of the left wheel and the planned speed of the right wheel; An acceleration determination module for determining the acceleration of the robot according to the planned speed of the left wheel, the planned speed of the right wheel, the current speed of the left wheel and the current speed of the right wheel; A speed determination module for determining the target speed of the left wheel and the target speed of the right wheel according to the planned speed of the left wheel, the planned speed of the right wheel, the current speed of the left wheel, the current speed of the right wheel, the planned turning radius and the acceleration; And A control module for controlling the operation of the left wheel according to the target speed of the left wheel and controlling the operation of the right wheel according to the target speed of the right wheel.
9. A robot, characterized in that, Includes: A processor, a memory; And A computer program, wherein the computer program is stored in the memory and executed by the processor, and the computer program includes instructions for executing the robot control method according to any one of claims 1 to 7.
10. A non-volatile computer-readable storage medium for a computer program, characterized in that, When the computer program is executed by one or more processors, the robot control method according to any one of claims 1-7 is implemented.
Citation Information
Patent Citations
Industrial robot path tracking method based on pure pursuit model
CN108673496A
Automated guided vehicle and curve path tracking method and control device thereof
CN112947487A
Differential steering vehicle unmanned driving control method and device, storage medium and terminal
CN115113617A
Method for controlling robot to turn, electronic equipment and storage medium
CN115593513A
Path following method and system for two-wheeled differential mobile robot
CN115639814A