Method of controlling a robot to turn, electronic device and storage medium

By adjusting the acceleration of the left and right wheels of the dual-wheel differential drive robot in real time, the problem of low turning efficiency was solved, and efficient and safe turning operations were achieved.

CN115593513BActive Publication Date: 2026-01-16SHENZHEN PUDU TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210146967.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-02-17
Publication Date
2026-01-16
Estimated Expiration
2042-02-17

AI Technical Summary

Technical Problem

Existing dual-wheel differential drive robots are inefficient when turning, unable to pass through narrow paths continuously in one go, requiring them to reduce speed or adjust their posture multiple times, resulting in a poor user experience.

Method used

By acquiring the current and target speeds of the robot's left and right wheels in real time, calculating the speed change, and adjusting the acceleration of the left and right wheels, the robot can reach the target turning speed in a short time, avoiding long-distance straight travel and attitude adjustments.

Benefits of technology

It improves the robot's turning efficiency and flexibility, reduces the risk of collisions with the edge of curves, and lowers power consumption.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115593513B_ABST
    Figure CN115593513B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of mobile robots, and provides a method for controlling robot turning, which comprises the following steps: acquiring a current speed of a left wheel of a robot, a target speed of the left wheel, a current speed of a right wheel of the robot and a target speed of the right wheel; obtaining a left wheel speed change amount according to the current speed of the left wheel and the target speed of the left wheel; obtaining a right wheel speed change amount according to the current speed of the right wheel and the target speed of the right wheel; determining a left wheel acceleration and a right wheel acceleration according to the left wheel speed change amount and the right wheel speed change amount; and controlling the robot to turn according to the left wheel acceleration and the right wheel acceleration. The above method can improve the turning efficiency of the robot.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of mobile robots, and particularly relates to a method for controlling a robot to turn and an electronic device. BACKGROUND

[0002] It is known that a two-wheel differential drive robot (hereinafter referred to as a robot) is widely used in manufacturing, military, medical and other fields. The robot moves freely by driving itself through left and right wheels. For example, when the speeds of the left and right wheels of the robot are the same, the robot moves straight; when the speeds of the left and right wheels of the robot are different (i.e. a speed difference occurs between the left and right wheels), the robot turns left or right. At present, the robot has certain limitations on the minimum turning radius and the width of the passing path when turning. For example, when the turning radius is too small or the path is too narrow, the robot cannot pass through continuously at one time, but needs to reduce the turning speed to a very low speed to pass through or needs to stop and adjust the posture multiple times to pass through. Obviously, this turning mode of the robot is not only inefficient but also poor in user experience.

[0003] Therefore, how to improve the turning efficiency of the robot is a problem to be solved at present. SUMMARY

[0004] The present application provides a method for controlling a robot to turn, an electronic device and a storage medium, which can improve the turning efficiency of the robot.

[0005] In a first aspect, a method for controlling a robot to turn is provided, comprising: obtaining a current speed of a left wheel of the robot, a target speed of the left wheel, a current speed of a right wheel of the robot and a target speed of the right wheel; obtaining a left wheel speed change amount according to the current speed of the left wheel and the target speed of the left wheel; obtaining a right wheel speed change amount according to the current speed of the right wheel and the target speed of the right wheel; determining a left wheel acceleration and a right wheel acceleration according to the left wheel speed change amount and the right wheel speed change amount; and controlling the robot to turn according to the left wheel acceleration and the right wheel acceleration.

[0006] The method can be executed by an electronic device or a chip in the electronic device. Compared with the existing robot which uses the same acceleration to adjust the target speeds of the left and right wheels when turning, the robot of the present application timely adjusts the left wheel acceleration and the right wheel acceleration according to the left wheel speed change amount and the right wheel speed change amount, so that the speeds of the left and right wheels of the robot have a speed difference in a short time (i.e. the left and right wheels respectively reach the target speeds required for turning in the same time period), and then the turning action is performed, without the need to straighten for a long distance in the curve or to reduce the turning speed to a very low speed, or to stop repeatedly to adjust the turning posture. This way not only improves the turning efficiency of the robot, but also improves the flexibility of the robot turning.

[0007] Optionally, the determining the left wheel acceleration and the right wheel acceleration according to the left wheel speed change and the right wheel speed change comprises: increasing the right wheel initial acceleration when the right wheel speed change is greater than the left wheel speed change; and increasing the left wheel initial acceleration when the right wheel speed change is less than the left wheel speed change, wherein the right wheel initial acceleration is equal to the left wheel initial acceleration.

[0008] In the embodiment, the electronic device increases the initial acceleration of the wheel on the side with the greater speed change, so that the speeds of the left and right wheels of the robot reach the required speed difference in a short time, thereby reducing the distance of straight driving in the curve, preventing the robot from colliding with the edge of the curve, or reducing the number of times the robot adjusts the turning posture, and further improving the efficiency and safety of the robot turning.

[0009] Optionally, the increasing the right wheel initial acceleration when the right wheel speed change is greater than the left wheel speed change comprises: increasing the left wheel initial acceleration and the right wheel initial acceleration, wherein the increase in the left wheel initial acceleration is less than the increase in the right wheel initial acceleration, so as to increase the right wheel initial acceleration.

[0010] In the embodiment, when the right wheel speed change is greater than the left wheel speed change, the left wheel initial acceleration can be increased while the right wheel initial acceleration is increased, so that the speeds of the left and right wheels of the robot reach the target speed of turning in the shortest possible time and perform the turning action, thereby further reducing the distance of straight driving in the curve, preventing the robot from colliding with the edge of the curve, or further reducing the number of times the robot adjusts the turning posture, and further improving the efficiency and safety of the robot turning.

[0011] Optionally, the increasing the right wheel initial acceleration when the right wheel speed change is greater than the left wheel speed change comprises: when the right wheel initial acceleration is equal to the left wheel initial acceleration and is not zero, decreasing the left wheel initial acceleration or keeping the left wheel initial acceleration unchanged, so as to increase the right wheel initial acceleration.

[0012] In the embodiment, by increasing the initial acceleration of the wheels on one side of the robot and decreasing the initial acceleration of the wheels on the other side, or only increasing the initial acceleration of the wheels on one side of the robot and keeping the initial acceleration of the wheels on the other side unchanged, the left and right wheels can quickly reach the target speed of the turn in the same short period of time and perform the turning action to reduce the distance of the robot straight in the curve, so as to avoid the situation that the robot collides with the edge of the curve during the turning. In addition, the way of adjusting the acceleration of the left and right wheels by only increasing the initial acceleration of the wheels on one side of the robot and keeping the initial acceleration of the wheels on the other side unchanged can also reduce the power consumption of the robot.

[0013] Optionally, when the right wheel speed change amount is less than the left wheel speed change amount, the left wheel initial acceleration is increased, comprising: increasing the right wheel initial acceleration and the left wheel initial acceleration, wherein the increase amount of the right wheel initial acceleration is less than the increase amount of the left wheel initial acceleration, so as to increase the left wheel initial acceleration.

[0014] In the embodiment, when the right wheel speed change amount is less than the left wheel speed change amount, the left wheel initial acceleration can be increased while the right wheel initial acceleration is increased, so that the speeds of the left and right wheels reach the target speed of the respective turns in the same short period of time and perform the turning action to reduce the distance of the robot straight in the curve and the number of times of adjusting the posture, thereby improving the efficiency of the robot turning.

[0015] Optionally, when the right wheel speed change amount is less than the left wheel speed change amount, the left wheel initial acceleration is increased, comprising: when the right wheel initial acceleration is equal to the left wheel initial acceleration and is not zero, the right wheel initial acceleration is decreased or kept unchanged to increase the left wheel initial acceleration.

[0016] In the embodiment, by increasing the initial acceleration of the wheels on one side of the robot and decreasing the initial acceleration of the wheels on the other side, or only increasing the initial acceleration of the wheels on one side of the robot and keeping the initial acceleration of the wheels on the other side unchanged, the left and right wheels can quickly reach the target speed of the turn in the same short period of time and perform the turning action to reduce the distance of the robot straight in the curve, so as to avoid the situation that the robot collides with the edge of the curve during the turning. In addition, the way of adjusting the acceleration of the left and right wheels by only increasing the initial acceleration of the wheels on one side of the robot and keeping the initial acceleration of the wheels on the other side unchanged can also reduce the power consumption of the robot.

[0017] Optionally, the determining the left wheel acceleration and the right wheel acceleration according to the left wheel speed change and the right wheel speed change comprises: when the right wheel speed change is greater than the left wheel speed change, keeping the right wheel initial acceleration unchanged and reducing the left wheel initial acceleration to determine the left wheel acceleration and the right wheel acceleration; and when the right wheel speed change is less than the left wheel speed change, keeping the left wheel initial acceleration unchanged and reducing the right wheel initial acceleration to determine the left wheel acceleration and the right wheel acceleration, wherein the right wheel initial acceleration is equal to the left wheel initial acceleration and is not zero.

[0018] In the embodiment, the target speeds of the left and right wheels in the turning are reached in a short time period by adjusting (reducing) the initial acceleration of one side wheel while keeping the initial acceleration of the other side wheel unchanged, so as to reduce the distance of the robot in the straight line in the curve, thereby avoiding the collision between the robot and the edge of the curve. In addition, the way of adjusting the accelerations of the left and right wheels by adjusting (reducing) the initial acceleration of one side wheel while keeping the initial acceleration of the other side wheel unchanged can also reduce the power consumption of the robot.

[0019] In a second aspect, an electronic device is provided, comprising a processor and a memory, the memory being configured to store a computer program, and the processor being configured to invoke and run the computer program from the memory, so that the electronic device performs the method according to any one of the first aspect.

[0020] Optionally, the electronic device is a robot.

[0021] In a third aspect, a computer readable storage medium is provided, the computer readable storage medium storing a computer program, when the computer program is executed by a processor, the processor executes the method according to any one of the first aspect.

[0022] The beneficial effects in the second and third aspects of the present application are the same as those in the first aspect. BRIEF DESCRIPTION OF DRAWINGS

[0023] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed in the embodiments or prior art description will be briefly introduced as follows. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.

[0024] Figure 1 The method flow diagram for controlling the robot to turn in the embodiments of the present application;

[0025] Figure 2Fig. 1 is a schematic diagram of a computer for calculating a left wheel target speed and a right wheel target speed of a robot in an embodiment of the present application;

[0026] Figure 3 Fig. 2 is a schematic diagram of a robot for calculating a linear speed and an angular speed when the robot turns in an embodiment of the present application;

[0027] Figure 4 Fig. 3 is a schematic diagram of an electronic device in an embodiment of the present application. DETAILED DESCRIPTION

[0028] In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular sequences of steps, techniques, etc., in order to provide a thorough understanding of the present embodiments. However, it will be apparent to those skilled in the art that the present application can be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known methods, devices, and apparatus are omitted so as not to obscure the description of the present application with unnecessary detail.

[0029] It is to be understood that the terminology "includes", "has", "holds", "contains" and / or "comprising", when used in this specification and in the following claims, indicates the presence of the described features, integers, steps, operations, elements, and / or components, but does not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof.

[0030] It is also to be understood that the terminology "and / or" when used in this specification and in the following claims, refers to at least one of the items, or any combination of one or more of the items, associated with the "and / or" term.

[0031] In addition, the terms "first", "second", "third", etc. are used herein only to describe different instances, and are not to be construed as indicating or implying relative importance.

[0032] The terms "in one embodiment" or "in some embodiments" or "in other embodiments" or "in still other embodiments" appearing herein describe different embodiments except that the embodiments are not necessarily mutually exclusive, unless otherwise explicitly stated. The terms "including", "containing", "having" and "comprising" are meant to be interpreted in a non-limiting manner, unless otherwise explicitly stated. The term "consisting essentially of is meant to be interpreted in a non-limiting manner, unless otherwise explicitly stated.

[0033] Since the double-wheel differential driving robot only turns when there is a speed difference between the left and right wheels, otherwise it moves straight. However, the existing robot adjusts the target speed of the left and right wheels at the starting point of the curve by using the same acceleration and deceleration method, which causes the robot to move straight for a long distance before the speed difference between the left and right wheels appears and the robot turns. When the robot moves straight for a distance in the curve, it may reach the edge of the curve, at which time the robot needs to stop completely, turn the body, and then accelerate forward. When the robot has many curves in the path, the robot's efficiency is extremely low due to the multiple stops to adjust the posture, which leads to a poor user experience. Therefore, how to improve the turning efficiency of the robot is a problem that needs to be solved urgently.

[0034] The application will be described in further detail below with reference to the drawings and specific embodiments.

[0035] Figure 1 is a flowchart of a method for controlling a robot to turn in an embodiment of the application. The method for controlling a robot to turn provided in the embodiment is applied to an electronic device or a chip in an electronic device, which is used to control the robot to perform various actions. When the electronic device is a robot, the robot is used to implement each step of the method for controlling a robot to turn. The above method comprises:

[0036] S101, obtaining a current speed of a left wheel of the robot, a target speed of the left wheel, a current speed of a right wheel of the robot, and a target speed of the right wheel.

[0037] Exemplarily, the current speed of the left wheel refers to the speed at which the left wheel on the left side of the robot in the forward direction is currently traveling, the current speed of the right wheel refers to the speed at which the right wheel on the right side of the robot in the forward direction is currently traveling, the target speed of the left wheel is a target linear speed of the left wheel planned by the electronic device for the robot to pass through the current curve in real time according to overcurve information, a turning radius, and a turning angle detected by a detection unit inside the robot, and the target speed of the right wheel is a target linear speed of the right wheel planned by the electronic device for the robot to pass through the current curve in real time according to overcurve information, a turning radius, and a turning angle detected by a detection unit inside the robot. The overcurve information includes a curve width, a position of the robot itself, a size of the robot itself, an overcurve angle, and a current movement speed of the robot, etc. The detection unit includes a laser radar, a depth camera, etc. Alternatively, the target speed of the left wheel and the target speed of the right wheel can also be the corresponding movement speeds of the robot at different positions in the curve, which are planned by the user in advance according to the specific application scenario of the robot.

[0038] For example, as shown in Figure 2 , the target speed of the left wheel is adjusted to a first target speed, and the target speed of the right wheel is adjusted to a second target speed. Figure 2The left wheel of the robot is denoted by 201, the right wheel of the robot is denoted by 202, the robot moving track is denoted by 203, d is the double-wheel axle spacing, r is the left wheel turning radius, and θ is the turning angle. The electronic device models the target linear velocity u and the target angular velocity w of the robot in the current curve according to the turning information of the robot in the current curve, the turning radius r, and the turning angle θ, and in combination with the kinematics of the double-wheel differential driving robot.

[0039]

[0040]

[0041]

[0042]

[0043] In the formula, ur' is the right wheel target speed, and ul' is the left wheel target speed. The electronic device controls the straight running, left turning, and right turning of the robot according to the right wheel target speed ur' and the left wheel target speed ul'. When w = 0, the robot runs straight; when w > 0 and ur' > ul', the robot turns left; and when w < 0 and ur' < ul', the robot turns right.

[0044] For example, the robot is about to pass through the curve A and turn left. When the robot reaches the starting point of the curve A, the electronic device immediately obtains the current speed of the left wheel of the robot (for example, 1.5 m / s), the current speed of the right wheel of the robot (for example, 1.5 m / s), the left wheel target speed (for example, 0.5 m / s) of the robot passing through the curve A, and the right wheel target speed (for example, 0.8 m / s) of the robot passing through the curve A. For another example, when the robot reaches the middle of the curve A, the electronic device obtains the current linear speed of the left wheel of the robot (i.e., the current speed of the left wheel) (for example, 0.5 m / s), the current linear speed of the right wheel of the robot (i.e., the current speed of the right wheel) (for example, 0.8 m / s), the left wheel target linear speed (i.e., the left wheel target speed) (for example, 0.4 m / s) of the robot passing through the curve A, and the right wheel target linear speed (i.e., the right wheel target speed) (for example, 0.7 m / s) of the robot passing through the curve A.

[0045] S102, obtaining the left wheel speed change amount according to the current speed of the left wheel and the left wheel target speed.

[0046] Exemplarily, the left wheel speed variation amount refers to the absolute value of the speed difference between the current speed of the left wheel of the robot and the target speed of the left wheel. For example, the robot is about to pass through the curve A and make a left turn, when the robot reaches the starting point of the curve A, the electronic device obtains that the current speed of the left wheel of the robot is 1.5 m / s and the target speed of the left wheel of the robot passing through the curve A is 0.5 m / s; at this time, the left wheel speed variation amount is 1.0 m / s (i.e. |1.5 m / s-0.5 m / s|); for another example, when the robot reaches X1 of the curve A (X1 is a non-curve starting point), the electronic device obtains that the current linear speed of the left wheel of the robot (i.e. the current speed of the left wheel) is 0.5 m / s and the target linear speed of the left wheel of the robot passing through the curve A is 0.4 m / s; at this time, the left wheel linear speed variation amount (i.e. the left wheel speed variation amount) is 0.1 m / s (i.e. |0.5 m / s-0.4 m / s|).

[0047] In S103, the right wheel speed variation amount is obtained according to the current speed of the right wheel and the target speed of the right wheel.

[0048] Exemplarily, the right wheel speed variation amount refers to the absolute value of the speed difference between the current speed of the right wheel of the robot and the target speed of the right wheel. For example, the robot is about to pass through the curve A and make a left turn, when the robot reaches the starting point of the curve A, the electronic device obtains that the current speed of the right wheel of the robot is 1.5 m / s and the target speed of the right wheel of the robot passing through the curve A is 0.8 m / s; at this time, the right wheel speed variation amount is 0.7 m / s (i.e. |1.5 m / s-0.8 m / s|); for another example, when the robot reaches X1 of the curve A (X1 is a non-curve starting point), the electronic device obtains that the current linear speed of the right wheel of the robot (i.e. the current speed of the right wheel) is 0.8 m / s and the target linear speed of the right wheel of the robot passing through the curve A is 0.6 m / s; at this time, the right wheel linear speed variation amount (i.e. the right wheel speed variation amount) is 0.2 m / s (i.e. |0.8 m / s-0.6 m / s|).

[0049] In S104, the left wheel acceleration and the right wheel acceleration are determined according to the left wheel speed variation amount and the right wheel speed variation amount.

[0050] Exemplarily, the left wheel acceleration refers to the linear acceleration required for the left wheel of the robot to change from the current speed of the left wheel to the target speed of the left wheel when turning; and the right wheel acceleration refers to the linear acceleration required for the right wheel of the robot to change from the current speed of the right wheel to the target speed of the right wheel when turning.

[0051] Determining the left wheel acceleration and the right wheel acceleration according to the left wheel speed variation amount and the right wheel speed variation amount includes: determining the left wheel acceleration and the right wheel acceleration according to the absolute value of the ratio of the left wheel speed variation amount to the right wheel speed variation amount, and determining the left wheel acceleration and the right wheel acceleration according to the difference between the left wheel speed variation amount and the right wheel speed variation amount.

[0052] For example, the left wheel acceleration and the right wheel acceleration are determined according to the absolute value of the ratio of the left wheel speed change amount to the right wheel speed change amount, optionally, a proportionality coefficient k = |left wheel speed change amount / right wheel speed change amount| is introduced, or k = |right wheel speed change amount / left wheel speed change amount|, and the present application only takes k = |left wheel speed change amount / right wheel speed change amount| as an example, the processing mode of k = |right wheel speed change amount / left wheel speed change amount| is similar to that of k = |left wheel speed change amount / right wheel speed change amount|, and details are not repeated here. The " / " in the text is the division sign.

[0053] Taking k = |left wheel speed change amount / right wheel speed change amount| as an example, when k is greater than 1, that is, the left wheel speed change amount is greater than the right wheel speed change amount, the electronic device adjusts the left wheel acceleration to be greater than the right wheel acceleration, and optionally, the electronic device can increase the left wheel initial acceleration and decrease the right wheel initial acceleration, or increase the left wheel initial acceleration and keep the right wheel initial acceleration unchanged, so that the adjusted left wheel acceleration is greater than the adjusted right wheel acceleration; when k is less than 1, that is, the left wheel speed change amount is less than the right wheel speed change amount, the electronic device adjusts the left wheel acceleration to be less than the right wheel acceleration, and optionally, the electronic device can increase the right wheel initial acceleration and decrease the left wheel initial acceleration, or increase the right wheel initial acceleration and keep the left wheel initial acceleration unchanged, so that the adjusted right wheel acceleration is greater than the adjusted left wheel acceleration; when k is equal to 1, that is, the left wheel speed change amount is equal to the right wheel speed change amount, the electronic device does not need to adjust the left wheel initial acceleration and the right wheel initial acceleration. The above left wheel initial acceleration and right wheel initial acceleration are the original accelerations set by the electronic device for the robot to turn, and the right wheel initial acceleration is the same as the right wheel initial acceleration.

[0054] For example, taking the proportionality coefficient k = |left wheel speed change amount / right wheel speed change amount| as an example, when the robot reaches X2 of the curve A, the electronic device obtains the current (linear) speed of the left wheel of the robot as V l1 , the current (linear) speed of the right wheel of the robot as V r1 , the target (linear) speed of the left wheel of the robot passing through X3 as V l2 , and the target (linear) speed of the right wheel of the robot as V r2 . When the robot turns left, the left wheel initial acceleration a l0 and the right wheel initial acceleration a r0 are both a0, the left wheel speed change amount is V l , and the right wheel speed change amount is V r ; if the proportionality coefficient k = |V l / V r| Less than 1, indicating that the left wheel speed change is less than the right wheel speed change, the electronic device will adjust the left wheel acceleration a l to a l = a l0 *(1-k1), and the right wheel acceleration a r to a r = a r0 *(1+k1), so that the left wheel acceleration is less than the right wheel acceleration; or, the electronic device will adjust the left wheel acceleration a l to a l = a l0 , and the right wheel acceleration a r to a r = a r0 *(1+k1), so that the left wheel acceleration is less than the right wheel acceleration. If the proportion coefficient k = |V l / V r | is greater than 1, indicating that the left wheel speed change is greater than the right wheel speed change, the electronic device will adjust the left wheel acceleration a l to a l = a l0 *(1+k1), and the right wheel acceleration a r to a r = a r0 *(1-k1), so that the left wheel acceleration is greater than the right wheel acceleration; or, the electronic device will adjust the left wheel acceleration a l to a l = a l0 *(1+k1), and the right wheel acceleration a r to a r = a r0 , so that the left wheel acceleration is greater than the right wheel acceleration. The above k is a real number greater than 0, k1 is a real number satisfying 0

[0055] For example, the acceleration of the left and right wheels can be determined based on the difference between the changes in the speed of the left and right wheels. Optionally, the change z = change in left wheel speed - change in right wheel speed can be introduced (where "-" represents a minus sign). When z is greater than 0, the change in left wheel speed is greater than the change in right wheel speed, and the electronic device will adjust the left wheel acceleration to be greater than the right wheel acceleration. For example, the electronic device can increase the initial acceleration of the left wheel while decreasing the initial acceleration of the right wheel, or increase the initial acceleration of the left wheel while keeping the initial acceleration of the right wheel unchanged, etc., so that the adjusted left wheel acceleration is greater than the right wheel acceleration. The adjusted right wheel acceleration: When z is less than 0, meaning the change in left wheel speed is less than the change in right wheel speed, the electronic device will adjust the left wheel acceleration to be less than the right wheel acceleration. Optionally, the electronic device can increase the initial acceleration of the right wheel while decreasing the initial acceleration of the left wheel, or increase the initial acceleration of the right wheel while keeping the initial acceleration of the left wheel unchanged, so that the adjusted right wheel acceleration is greater than the adjusted left wheel acceleration. When z equals 0, the change in left wheel speed is equal to the change in right wheel speed, and the electronic device does not need to adjust the initial acceleration of the left and right wheels. The aforementioned initial accelerations of the left and right wheels are the original accelerations set by the electronic device for the robot to turn, and the initial acceleration of the right wheel is the same as the initial acceleration of the left wheel.

[0056] For example, when the robot makes a left turn, the initial acceleration 'a' of the left wheel... l0 and the initial acceleration a of the right wheel r0 Both are a0, and the change in speed of the left wheel is V. l The change in speed of the right wheel is V. r If the change z (=V) l -V r If the value is less than 0, it means the change in speed of the left wheel is less than the change in speed of the right wheel, and the electronic device will adjust the acceleration 'a' of the left wheel accordingly. l Adjust to a l =a l0 *(1-k1), right wheel acceleration a r Adjust to a r =a r0 *(1+k1) to make the left wheel acceleration less than the right wheel acceleration; or, the electronic device will adjust the left wheel acceleration a l Adjust to a l =a l0 Right wheel acceleration a r Adjust to a r =a r0 *(1+k1), so that the acceleration of the left wheel is less than the acceleration of the right wheel. If the change z(=V l -V r If the value is greater than 0, it means that the change in speed of the left wheel is greater than the change in speed of the right wheel, and the electronic device will adjust the acceleration 'a' of the left wheel. l Adjust to al = a l0 *(1+k1), the right wheel acceleration a r is adjusted to a r = a r0 *(1-k1), so that the left wheel acceleration is greater than the right wheel acceleration; or, the electronic device adjusts the left wheel acceleration a l to a l = a l0 *(1+k1), the right wheel acceleration a r is adjusted to a r = a r0 , so that the left wheel acceleration is greater than the right wheel acceleration. The above z is a real number, k1 is a real number satisfying 0 < k1 < 1, and the specific value of k1 can be set by the user in combination with the specific application scenario, which is not limited in the present application.

[0057] As an optional embodiment, the left wheel acceleration and the right wheel acceleration are determined according to the left wheel speed change and the right wheel speed change, comprising: when the right wheel speed change is greater than the left wheel speed change, increasing the right wheel initial acceleration; when the right wheel speed change is less than the left wheel speed change, increasing the left wheel initial acceleration, wherein the right wheel initial acceleration is equal to the left wheel initial acceleration.

[0058] Exemplarily, taking k = |left wheel speed change / right wheel speed change| as an example, the size relationship of the left wheel speed change and the right wheel speed change is explained, when k is less than 1, i.e. the left wheel speed change is less than the right wheel speed change, the electronic device can increase the right wheel initial acceleration and decrease the left wheel initial acceleration, or the electronic device can increase the right wheel initial acceleration and keep the left wheel initial acceleration unchanged, so that the adjusted right wheel acceleration is greater than the adjusted left wheel acceleration; when k is greater than 1, the left wheel speed change is greater than the right wheel speed change, the electronic device can increase the left wheel initial acceleration and decrease the right wheel initial acceleration, or increase the left wheel initial acceleration and keep the right wheel initial acceleration unchanged, so that the adjusted left wheel acceleration is greater than the adjusted right wheel acceleration.

[0059] For example, when the robot turns right, the left wheel initial acceleration a l0 and the right wheel initial acceleration a r0 are both a0, the left wheel speed change is V l , and the right wheel speed change is V r ; if the proportion coefficient k = |V l / V r | is less than 1, it indicates that the left wheel speed change is less than the right wheel speed change, and the electronic device adjusts the left wheel acceleration a l to a l = a l0(1-k1), the right wheel acceleration a r is adjusted to a r = a r0 (1+k1), so that the left wheel acceleration is less than the right wheel acceleration; or the electronic device adjusts the left wheel acceleration a l to a l = a l0 , the right wheel acceleration a r is adjusted to a r = a r0 (1+k1), so that the left wheel acceleration is less than the right wheel acceleration. If the proportional coefficient k = |V l / V r | is greater than 1, it indicates that the left wheel speed change amount is greater than the right wheel speed change amount, and the electronic device adjusts the left wheel acceleration a l to a l = a l0 (1+k1), the right wheel acceleration a r is adjusted to a r = a r0 (1-k1), so that the left wheel acceleration is greater than the right wheel acceleration; or the electronic device adjusts the left wheel acceleration a l to a l = a l0 (1+k1), the right wheel acceleration a r is adjusted to a r = a r0 , so that the left wheel acceleration is greater than the right wheel acceleration. The above k is a real number greater than 0, k1 is a real number satisfying 0

[0060] In the embodiment, the electronic device increases the initial acceleration of the wheel on the side with the greater speed change amount, so that the speed difference of the left and right wheels of the robot appears in a short time period to reduce the distance of straight driving in the curve, to prevent the robot from colliding with the edge of the curve or to reduce the number of times of adjusting the turning posture of the robot, thereby improving the efficiency and safety of the robot turning.

[0061] As another optional embodiment, when the right wheel speed change amount is greater than the left wheel speed change amount, the initial acceleration of the right wheel is increased, including: increasing the initial acceleration of the left wheel and the initial acceleration of the right wheel, wherein the increase amount of the initial acceleration of the left wheel is less than the increase amount of the initial acceleration of the right wheel, to increase the initial acceleration of the right wheel.

[0062] Exemplarily, when the right wheel speed change amount is greater than the left wheel speed change amount, it indicates that the speed difference between the current speed of the right wheel and the target speed of the right wheel is greater than the speed difference between the current speed of the left wheel and the target speed of the left wheel; at this time, the electronic device increases the initial acceleration of the right wheel, and also increases the initial acceleration of the left wheel, so as to increase the initial acceleration of the right wheel. However, only when the increasing amount of the initial acceleration of the left wheel is less than the increasing amount of the initial acceleration of the right wheel, the speeds of the left wheel and the right wheel can reach the respective target speeds in the same time period.

[0063] For example, when the robot is turning, the initial acceleration a l0 of the left wheel and the initial acceleration a r0 of the right wheel are both a0, the left wheel speed change amount V l and the right wheel speed change amount V r ; if the right wheel speed change amount is greater than the left wheel speed change amount, the electronic device adjusts the right wheel acceleration a r to a r =a r0 *(1+a1), and adjusts the left wheel acceleration a l to a l =a l0 *(1+a2), where a1 and a2 are both real numbers greater than 0, and a1 is greater than a2. The electronic device adjusts the current speed of the left wheel and the current speed of the right wheel according to a l and a r respectively, so that the speed of the left wheel changes from the current speed of the left wheel to the target speed of the left wheel, and the speed of the right wheel changes from the current speed of the right wheel to the target speed of the right wheel after the same time period. It is hereby pointed out that the user can set the specific values of a1 and a2 according to the specific turning scene, and the present application does not limit this.

[0064] In the embodiment, when the right wheel speed change amount is greater than the left wheel speed change amount, the initial acceleration of the left wheel can be increased while the initial acceleration of the right wheel is increased, so that the speeds of the left wheel and the right wheel of the robot reach the respective target speeds in the shortest possible time and perform the turning action, so as to further reduce the distance of straight running in the curve, to avoid the robot colliding with the edge of the curve or further reduce the number of times of adjusting the turning posture of the robot, thereby improving the efficiency and safety of the robot turning.

[0065] As another optional embodiment, when the right wheel speed change amount is greater than the left wheel speed change amount, increasing the initial acceleration of the right wheel comprises: when the initial acceleration of the right wheel is equal to the initial acceleration of the left wheel and is not zero, decreasing the initial acceleration of the left wheel or keeping the initial acceleration of the left wheel unchanged, so as to increase the initial acceleration of the right wheel.

[0066] Exemplarily, when the right wheel speed change amount is greater than the left wheel speed change amount, it indicates that the speed difference between the current speed of the right wheel and the target speed of the right wheel is greater than the speed difference between the current speed of the left wheel and the target speed of the left wheel; at this time, the electronic device can increase the initial acceleration of the right wheel. Since the electronic device sets the initial acceleration of the right wheel to be equal to the initial acceleration of the left wheel and not to be zero, in order to make the speeds of the left and right wheels of the robot reach the target speeds of the respective turns as soon as possible in a short time (i.e., the speed difference between the left and right wheels appears to require a turn), at this time, the electronic device can increase the initial acceleration of the right wheel in a manner of decreasing the initial acceleration of the left wheel on the basis of increasing the initial acceleration of the right wheel, or the electronic device can also increase the initial acceleration of the right wheel in a manner of keeping the initial acceleration of the left wheel unchanged on the basis of increasing the initial acceleration of the right wheel, so as to finally make the speeds of the left and right wheels of the robot reach the target speeds of the respective turns.

[0067] For example, when the robot is turning, the initial acceleration a l0 of the left wheel and the initial acceleration a r0 of the right wheel are both real numbers greater than 0, the left wheel speed change amount V l and the right wheel speed change amount V r ; if the right wheel speed change amount is greater than the left wheel speed change amount, the electronic device will adjust the left wheel acceleration a l to a l = a l0 *(1-k1), and adjust the right wheel acceleration a r to a r = a r0 *(1+k1); or the electronic device will adjust the left wheel acceleration a l to a l = a l0 , and adjust the right wheel acceleration a r to a r = a r0 *(1+k1), so that the speeds of the left and right wheels of the robot reach the target speeds of the respective turns in the same time period. The above k1 is a real number satisfying 0

[0068] In this embodiment, by increasing the initial acceleration of one side wheel of the robot and decreasing the initial acceleration of the other side wheel, or only increasing the initial acceleration of one side wheel of the robot and keeping the initial acceleration of the other side wheel unchanged, the left and right wheels can quickly reach the target speeds of the respective turns in the same short time period and perform the turning action to reduce the distance of the robot straight running in the curve, so as to avoid the situation that the robot collides with the edge of the curve in the process of turning. In addition, this way of adjusting the accelerations of the left and right wheels by only increasing the initial acceleration of one side wheel of the robot and keeping the initial acceleration of the other side wheel unchanged can also reduce the power consumption of the robot.

[0069] As a further alternative embodiment, when the right wheel speed change amount is less than the left wheel speed change amount, increasing the left wheel initial acceleration includes increasing the right wheel initial acceleration and the left wheel initial acceleration, wherein the increase amount of the right wheel initial acceleration is less than the increase amount of the left wheel initial acceleration, so as to increase the left wheel initial acceleration.

[0070] Exemplarily, when the right wheel speed change amount is less than the left wheel speed change amount, it indicates that the speed difference between the right wheel current speed and the right wheel target speed is less than the speed difference between the left wheel current speed and the left wheel target speed; at this time, the electronic device increases the left wheel initial acceleration, and also increases the right wheel initial acceleration, so as to increase the left wheel initial acceleration, but only when the increase amount of the left wheel initial acceleration is greater than the increase amount of the right wheel initial acceleration, the speeds of the left and right wheels can reach the respective target speeds in the same time period.

[0071] For example, when the robot is turning, the left wheel initial acceleration a l0 and the right wheel initial acceleration a r0 are both a0, the left wheel speed change amount is V l , and the right wheel speed change amount is V r ; if the right wheel speed change amount is less than the left wheel speed change amount, the electronic device adjusts the right wheel acceleration a r to a r =a r0 *(1+a1), and adjusts the left wheel acceleration a l to a l =a l0 *(1+a2), wherein a1 and a2 are both real numbers greater than 0, and a1 is less than a2. The electronic device adjusts the left wheel current speed and the right wheel current speed according to a l and a r respectively, so that the speed of the left wheel changes from the left wheel current speed to the left wheel target speed and the speed of the right wheel changes from the right wheel current speed to the right wheel target speed after the same time period. It is hereby stated that the user can set the specific values of a1 and a2 according to the specific turning scene, which is not limited in the present application.

[0072] In the present embodiment, when the right wheel speed change amount is less than the left wheel speed change amount, the left wheel initial acceleration can be increased while the right wheel initial acceleration is also increased, so that the speeds of the left and right wheels reach the respective target speeds in the same short time period and perform the turning action, so as to reduce the distance of the robot straight running in the curve and the number of times of adjusting the posture, thereby improving the efficiency of the robot turning.

[0073] As another optional embodiment, when the right wheel speed variation is less than the left wheel speed variation, the left wheel initial acceleration is increased, including: when the right wheel initial acceleration and the left wheel initial acceleration are equal and not zero, the right wheel initial acceleration is decreased or kept unchanged to increase the left wheel initial acceleration.

[0074] Exemplarily, when the right wheel speed variation is less than the left wheel speed variation, it indicates that the speed difference between the right wheel current speed and the right wheel target speed is less than the speed difference between the left wheel current speed and the left wheel target speed; at this time, the electronic device increases the left wheel initial acceleration. Since the electronic device sets the right wheel initial acceleration and the left wheel initial acceleration to be equal and not zero, in order to make the speeds of the left and right wheels of the robot reach the target speeds of the respective turns (i.e., the speed difference of the left and right wheels appears the turn requirement) as soon as possible in a short time, at this time, the electronic device can increase the left wheel initial acceleration in the manner of decreasing the right wheel initial acceleration on the basis of increasing the left wheel initial acceleration, or the electronic device can also increase the left wheel initial acceleration in the manner of keeping the right wheel initial acceleration unchanged on the basis of increasing the left wheel initial acceleration, so as to finally make the speeds of the left and right wheels of the robot reach the target speeds of the respective turns.

[0075] For example, when the robot is turning, the left wheel initial acceleration a l0 and the right wheel initial acceleration a r0 are both real numbers greater than 0, the left wheel speed variation V l and the right wheel speed variation V r ; if the right wheel speed variation is less than the left wheel speed variation, the electronic device adjusts the left wheel acceleration a l to a l = a l0 *(1+k1), and adjusts the right wheel acceleration a r to a r = a r0 *(1-k1); or the electronic device adjusts the left wheel acceleration a l to a l = a l0 *(1+k1), and adjusts the right wheel acceleration a r to a r = a r0 , so that the speeds of the left and right wheels of the robot reach the target speeds of the respective turns in the same time period. The above k1 is a real number satisfying 0

[0076] In the embodiment, the initial acceleration of the wheels on one side of the robot is increased and the initial acceleration of the wheels on the other side is decreased, or only the initial acceleration of the wheels on one side of the robot is increased and the initial acceleration of the wheels on the other side is kept unchanged, so that the left and right wheels quickly reach the target speed of the turn in the same short period of time and perform the turning action to reduce the distance of the robot straight in the curve, so as to avoid the situation that the robot collides with the edge of the curve during the turning. In addition, the way of adjusting the acceleration of the left and right wheels by only increasing the initial acceleration of the wheels on one side of the robot and keeping the initial acceleration of the wheels on the other side unchanged can also reduce the power consumption of the robot.

[0077] As another optional embodiment, the left wheel acceleration and the right wheel acceleration are determined according to the left wheel speed change amount and the right wheel speed change amount, including: when the right wheel speed change amount is greater than the left wheel speed change amount, keeping the right wheel initial acceleration unchanged and reducing the left wheel initial acceleration to determine the left wheel acceleration and the right wheel acceleration; when the right wheel speed change amount is less than the left wheel speed change amount, keeping the left wheel initial acceleration unchanged and reducing the right wheel initial acceleration to determine the left wheel acceleration and the right wheel acceleration, wherein the right wheel initial acceleration is equal to the left wheel initial acceleration and is not zero.

[0078] For example, when the right wheel speed change amount is greater than the left wheel speed change amount, it means that the speed difference between the current speed of the right wheel and the target speed of the right wheel is greater than the speed difference between the current speed of the left wheel and the target speed of the left wheel. Since the electronic device sets the right wheel initial acceleration equal to the left wheel initial acceleration and not zero, in order to make the speed of the left and right wheels of the robot reach the target speed of the respective turn as soon as possible in a short period of time (i.e. the speed difference required for the left and right wheels to turn), at this time, the electronic device can determine the left wheel acceleration and the right wheel acceleration by keeping the right wheel initial acceleration unchanged and reducing the left wheel initial acceleration, so that the speed of the left and right wheels of the robot reaches the target speed of the respective turn. When the right wheel speed change amount is less than the left wheel speed change amount, it means that the speed difference between the current speed of the right wheel and the target speed of the right wheel is less than the speed difference between the current speed of the left wheel and the target speed of the left wheel. Since the electronic device sets the right wheel initial acceleration equal to the left wheel initial acceleration and not zero, in order to make the speed of the left and right wheels of the robot reach the target speed of the respective turn as soon as possible in a short period of time (i.e. the speed difference required for the left and right wheels to turn), at this time, the electronic device can determine the left wheel acceleration and the right wheel acceleration by keeping the left wheel initial acceleration unchanged and reducing the right wheel initial acceleration, so that the speed of the left and right wheels of the robot reaches the target speed of the respective turn.

[0079] For example, when the robot is turning, the left wheel initial acceleration a l0 and the right wheel initial acceleration a r0 are both real numbers greater than 0, the left wheel speed change amount is V l, the right wheel speed change amount is V r ; if the right wheel speed change amount is greater than the left wheel speed change amount, the electronic device adjusts the left wheel acceleration a l to a l = a l0 *(1-k1), and adjusts the right wheel acceleration a r to a r = a r0 , so that the speeds of the left and right wheels of the robot reach the respective target speeds in the same time period. If the right wheel speed change amount is less than the left wheel speed change amount, the electronic device adjusts the left wheel acceleration a l to a l = a l0 , and adjusts the right wheel acceleration a r to a r = a r0 *(1-k1), so that the speeds of the left and right wheels of the robot reach the respective target speeds in the same time period. The above k1 is a real number satisfying 0

[0080] In the embodiment, the speeds of the left and right wheels reach the respective target speeds in a short time period by adjusting (reducing) the initial acceleration of one side wheel while keeping the initial acceleration of the other side wheel unchanged, so as to reduce the distance of the robot straight running in the curve, thereby avoiding the collision between the robot and the edge of the curve. In addition, the above way of adjusting the accelerations of the left and right wheels by adjusting (reducing) the initial acceleration of one side wheel while keeping the initial acceleration of the other side wheel unchanged can also reduce the power consumption of the robot.

[0081] S105, controlling the robot to turn according to the left wheel acceleration and the right wheel acceleration.

[0082] For example, after the electronic device calculates the required left wheel acceleration and deceleration according to the current speed of the left wheel and the target speed of the left wheel, the electronic device performs acceleration or deceleration operation on the current speed of the left wheel according to the speed calculation formula, to obtain the real-time speed of the left wheel at the next moment; similarly, after the electronic device calculates the required right wheel acceleration and deceleration according to the current speed of the right wheel and the target speed of the right wheel, the electronic device performs acceleration or deceleration operation on the current speed of the right wheel according to the speed calculation formula, to obtain the real-time speed of the right wheel at the next moment. When the left and right wheels of the robot reach the respective target speeds, the robot performs the turning action at the respective target speeds of the left and right wheels. The real-time speed calculation formulas of the left and right wheels of the robot during the turning are shown in (5) and (6):

[0083]

[0084]

[0085] ul = ul1 + a l ul = ul1 + a r ur = ur1 + a c f is the number of times of acceleration or deceleration of the left wheel or the right wheel in the preset time period, and "+" and "-" are addition and subtraction signs. For example, the electronic device calculates the left wheel acceleration a l , the right wheel acceleration a r , the preset time period is 1s, and f c = 2. The electronic device changes the current speed of the left wheel to the target speed of the left wheel by using the left wheel acceleration a l twice in 1s. For example, the speed of the left wheel at T0 is ul0, the speed of the left wheel at T1 (= T0 + 500ms) is , the speed of the left wheel at T2 (= T1 + 500ms) is , that is, the speed ul0 of the left wheel is accelerated twice or decelerated twice in 1s from T0 to obtain the target speed ul2 of the left wheel. Similarly, the speed of the right wheel at T0 is ur0, the speed of the right wheel at T1 (= T0 + 500ms) is , the speed of the right wheel at T2 (= T1 + 500ms) is , that is, the speed ur0 of the right wheel is accelerated twice or decelerated twice in 1s from T0 to obtain the target speed ur2 of the right wheel. The electronic device controls the robot to turn according to the target speed ul2 of the left wheel and the target speed ur2 of the right wheel.

[0086] Compared with the existing robot that adjusts the target speeds of the left wheel and the right wheel by using the same acceleration, the robot of the present application adjusts the left wheel acceleration and the right wheel acceleration in time according to the speed change amount of the left wheel and the speed change amount of the right wheel, so that the speeds of the left wheel and the right wheel of the robot differ in a short time (that is, the left wheel and the right wheel each reach the target speed required for turning in the same time period), and then the turning action is performed, without the need to straighten for a long distance in the curve or to reduce the turning speed to a very low level, or to stop repeatedly to adjust the over-turning posture. This way not only improves the turning efficiency of the robot, but also improves the flexibility of the robot in turning.

[0087] It is hereby specified that the adjustment of the acceleration in the present application only discusses the size of the acceleration, and does not discuss the direction of the acceleration. The direction of the acceleration can be set by the user according to the specific application scenario, and the present application does not limit this. When the direction of the acceleration is consistent with the direction of the movement of the robot, the acceleration is used to accelerate the robot; when the direction of the acceleration is not consistent with the direction of the movement of the robot, the acceleration (also known as deceleration) is used to decelerate the robot.

[0088] For ease of understanding, the method for controlling the robot to turn proposed in the present application will be described below in conjunction with Figure 3 .

[0089] Figure 3 A schematic diagram of the electronic device calculating the current speeds of the left and right wheels of the robot at different positions of the curve when the robot turns left is shown. When the robot enters the starting point A of the curve, the current speed of the left wheel is V l0 , the current speed of the right wheel is V r0 , the electronic device plans the target speed of the left wheel for the robot to travel from the curve A to the curve B as V l , and the target speed of the right wheel as V r ; the electronic device calculates the speed change amount of the left wheel l = |V l -V l0 | and the speed change amount of the right wheel r = |V r -V r0 |; the electronic device sets the initial acceleration of the left wheel as a l0 and the initial acceleration of the right wheel as a r0 ; if l > r, the electronic device can adjust the acceleration of the left wheel a l = a l0 *(1+k) and the acceleration of the right wheel a l = a l0 *(1-k), where k is a real number and 0 < k < 1. Figure 3 In FIG. 3, 301 represents the edge of the curve, r1 is the turning radius at the curve A, r2 is the turning radius at the curve B, d is the distance between the two wheel shafts, θ is the turning angle of the robot moving from the curve A to the curve B, and the black arrow represents the direction of the movement of the robot; the electronic device can calculate the linear speed and angular speed of the robot at the curve A and the curve B according to r1, r2, d and θ.

[0090] Figure 4 A structural schematic diagram of an electronic device provided in the present application is shown. Figure 4 The dashed line in FIG. 4 represents that the unit or the module is optional. The electronic device 400 can be used to implement the method described in the above method embodiments. The electronic device 400 can be a server or a chip or a robot.

[0091] The electronic device 400 comprises one or more processors 401, which can support the electronic device 400 to implement the method described in the method embodiments Figure 1 The processor 401 can be a general-purpose processor or a special-purpose processor. For example, the processor 401 can be a central processing unit (CPU). The CPU can be used to control the electronic device 400, execute software programs, and process data of the software programs. The electronic device 400 can further comprise a communication unit 405 to realize input (reception) and output (transmission) of signals.

[0092] For example, the electronic device 400 can be a chip, the communication unit 405 can be an input and / or output circuit of the chip, or the communication unit 405 can be a communication interface of the chip, and the chip can be a component of the electronic device.

[0093] For another example, the communication unit 405 can be a transceiver of the electronic device 400, or the communication unit 405 can be a transceiver circuit of the electronic device 400.

[0094] The electronic device 400 can comprise one or more memories 402, which store programs 404 that can be run by the processor 401 to generate instructions 403, so that the processor 401 executes the method described in the method embodiments according to the instructions 403. Optionally, the memory 402 can also store data. Optionally, the processor 401 can also read the data stored in the memory 402, which can be stored in the same storage address as the program 404, or can be stored in a different storage address from the program 404.

[0095] The processor 401 and the memory 402 can be separately arranged or integrated together, for example, integrated on a system on chip (SOC) of the electronic device.

[0096] The specific manner in which the processor 401 executes the display method of the fault code can be referred to the related description in the method embodiments.

[0097] It should be understood that each step of the above method embodiments can be completed by a logic circuit in the form of hardware or instructions in the form of software in the processor 401. The processor 401 can be a CPU, a digital signal processor (DSP), a field programmable gate array (FPGA), or other programmable logic devices, such as discrete gates, transistor logic devices, or discrete hardware components.

[0098] The application further provides a computer program product, which, when executed by the processor 401, implements the method described in any of the method embodiments of the application.

[0099] The computer program product can be stored in the memory 402, for example, as a program 404, which is finally converted into an executable object file capable of being executed by the processor 401 through preprocessing, compiling, assembling and linking and the like.

[0100] The application further provides a computer readable storage medium, which stores a computer program, and the computer program, when executed by a computer, implements the method described in any of the method embodiments of the application. The computer program can be a high-level language program or an executable object program.

[0101] The computer readable storage medium is, for example, the memory 402. The memory 402 can be a volatile memory or a non-volatile memory, or the memory 402 can include both volatile memory and non-volatile memory. The non-volatile memory can be a Read-Only Memory (ROM), a Programmable ROM (PROM), an Erasable PROM (EPROM), an Electrically EPROM (EEPROM) or a flash memory. The volatile memory can be a Random Access Memory (RAM) used as an external cache. By way of example and not limitation, many forms of RAM can be used, such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDR SDRAM), Enhanced SDRAM (ESDRAM), SynchLink DRAM (SLDRAM) and Direct Rambus RAM (DRRAM).

[0102] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described apparatus and device and the resulting technical effects can refer to the corresponding processes and technical effects in the foregoing method embodiments, which will not be described here.

[0103] In several embodiments provided in the present application, the disclosed system, device and method can be implemented in other ways. For example, some features of the above-described method embodiments can be omitted or not performed. The above-described device embodiments are merely illustrative, and the division of units is merely a logical function division. In actual implementation, another division manner can be used, and multiple units or components can be combined or integrated into another system. In addition, the coupling between units or the coupling between components can be direct coupling or indirect coupling, and the above coupling includes electrical, mechanical or other forms of connection.

[0104] The above-described embodiments are merely used to illustrate the technical solutions of the present application, rather than limit the same. Although the present application is described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that the technical solutions recorded in the foregoing embodiments can be modified, or some technical features can be replaced by equivalent replacements, and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and should be included in the protection scope of the present application.

Claims

1. A method of controlling a robot to turn, characterized by, The method comprises: obtaining a left wheel current speed, a left wheel target speed, a right wheel current speed and a right wheel target speed of a robot; obtaining a left wheel speed change amount according to the left wheel current speed and the left wheel target speed; obtaining a right wheel speed change amount according to the right wheel current speed and the right wheel target speed; determining left wheel acceleration and right wheel acceleration according to an absolute value k of a ratio of the left wheel speed change amount and the right wheel speed change amount, or determining left wheel acceleration and right wheel acceleration according to a difference z of the left wheel speed change amount and the right wheel speed change amount, the k being a positive real number not equal to 1, and the z being a real number not equal to 0; controlling the robot to turn according to the left wheel acceleration and the right wheel acceleration.

2. The method of claim 1, wherein, The determining of the left wheel acceleration and the right wheel acceleration according to the left wheel speed change amount and the right wheel speed change amount comprises: when the right wheel speed change amount is greater than the left wheel speed change amount, increasing a right wheel initial acceleration; when the right wheel speed change amount is less than the left wheel speed change amount, increasing a left wheel initial acceleration, wherein the right wheel initial acceleration is equal to the left wheel initial acceleration.

3. The method of claim 2, wherein, The increasing of the right wheel initial acceleration when the right wheel speed change amount is greater than the left wheel speed change amount comprises: increasing the left wheel initial acceleration and the right wheel initial acceleration, wherein an increasing amount of the left wheel initial acceleration is less than an increasing amount of the right wheel initial acceleration, so as to increase the right wheel initial acceleration.

4. The method of claim 2, wherein, The increasing of the right wheel initial acceleration when the right wheel speed change amount is greater than the left wheel speed change amount comprises: when the right wheel initial acceleration is equal to the left wheel initial acceleration and is not zero, decreasing the left wheel initial acceleration or keeping the left wheel initial acceleration unchanged, so as to increase the right wheel initial acceleration.

5. The method of claim 2, wherein, The increasing of the left wheel initial acceleration when the right wheel speed change amount is less than the left wheel speed change amount comprises: increasing the right wheel initial acceleration and the left wheel initial acceleration, wherein an increasing amount of the right wheel initial acceleration is less than an increasing amount of the left wheel initial acceleration, so as to increase the left wheel initial acceleration.

6. The method of claim 2, wherein, The increasing of the left wheel initial acceleration when the right wheel speed change amount is less than the left wheel speed change amount comprises: when the right wheel initial acceleration is equal to the left wheel initial acceleration and is not zero, decreasing the right wheel initial acceleration or keeping the right wheel initial acceleration unchanged, so as to increase the left wheel initial acceleration.

7. The method of claim 1, wherein, The determining of the left wheel acceleration and the right wheel acceleration according to the left wheel speed change amount and the right wheel speed change amount comprises: when the right wheel speed change amount is greater than the left wheel speed change amount, keeping the right wheel initial acceleration unchanged and decreasing the left wheel initial acceleration, so as to determine the left wheel acceleration and the right wheel acceleration; when the right wheel speed change amount is less than the left wheel speed change amount, keeping the left wheel initial acceleration unchanged and decreasing the right wheel initial acceleration, so as to determine the left wheel acceleration and the right wheel acceleration, wherein the right wheel initial acceleration is equal to the left wheel initial acceleration and is not zero.

8. An electronic device, comprising: The electronic device comprises a processor and a memory, the memory is used for storing a computer program, the processor is used for calling and running the computer program from the memory, so that the electronic device executes the method in any one of claims 1 to 7.

9. The electronic device of claim 8, wherein, The electronic device is a robot.

10. A computer-readable storage medium, characterized in that, The computer readable storage medium stores a computer program, when the computer program is executed by the processor, the processor executes the method in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Device for controlling torque distribution to left and right wheels on a vehicle

    CN102971173A

  • Steering control method, device thereof and two-wheeled robot

    CN106926900A