Robot slope control method and device, robot and storage medium
By acquiring the robot's tilt angle and adjusting its speed compensation, the problem of inconsistent robot speeds on slopes was solved, resulting in more efficient and safer operation.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHENZHEN HANYANG TECHNOLOGY CO LTD
- Filing Date
- 2026-01-19
- Publication Date
- 2026-05-05
AI Technical Summary
When robots operate on slopes, the actual speed may differ from the expected speed due to the acceleration caused by their own gravity, resulting in problems such as slipping, sliding, and going out of bounds, thus causing a loss of efficiency.
By obtaining the robot's tilt angle, if the slope compensation condition is met, the desired speed is adjusted according to the tilt angle to obtain the target desired speed. The robot is then controlled to operate based on the target desired speed to compensate for the deviation between the actual speed and the desired speed.
This effectively avoids problems such as landslides, slope collapses, and going out of bounds on slopes, improving operational efficiency and safety.
Smart Images

Figure CN121979211A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of robotics technology, and in particular to a robot ramp control method, device, robot, and storage medium. Background Technology
[0002] When a robot is working on a slope, its actual speed may not match the downward speed due to its own gravity acceleration. This can lead to various problems such as the robot slipping, running uphill, or going out of bounds, resulting in a loss of efficiency. Summary of the Invention
[0003] The main objective of this application is to provide a robot ramp control method, device, robot, and storage medium, aiming to solve the technical problems of machine slippage, ramp rushing, and going out of bounds, which cause performance loss.
[0004] To achieve the above objectives, this application proposes a robot ramp control method, which includes: Obtain the robot's body tilt angle; If the tilt angle of the robot body meets the slope compensation condition, then the current desired speed of the robot is adjusted according to the tilt angle of the robot body to obtain the target desired speed; The robot is controlled to operate based on the target desired speed.
[0005] In one embodiment, the body tilt angle includes a roll angle and a pitch angle, and the ramp compensation condition includes the roll angle being greater than a preset roll angle or the pitch angle being greater than a preset pitch angle. The step of adjusting the robot's current desired speed based on the body tilt angle to obtain the target desired speed if the body tilt angle meets the ramp compensation condition includes: If the roll angle is greater than the preset roll angle, then the desired angular velocity in the robot's current desired speed is adjusted according to the roll angle and the pitch angle to obtain the target desired angular velocity in the target desired speed. If the pitch angle is greater than the preset pitch angle, then the desired linear velocity in the current desired velocity is adjusted according to the pitch angle to obtain the target desired linear velocity in the target desired velocity.
[0006] In one embodiment, the step of adjusting the desired angular velocity of the robot's current desired velocity based on the roll angle and the pitch angle to obtain the target desired angular velocity of the target desired velocity includes: The initial compensation factor is determined based on the roll angle and the first preset relationship; When the pitch angle is greater than the preset pitch angle, the initial compensation factor is increased to obtain the first compensation factor; Based on the first compensation factor, the desired angular velocity in the robot's current desired velocity is adjusted to obtain the target desired angular velocity in the target desired velocity.
[0007] In one embodiment, the step of adjusting the desired linear velocity in the current desired velocity according to the pitch angle to obtain the target desired linear velocity in the target desired velocity includes: The initial linear velocity compensation value is determined based on the pitch angle and the second preset relationship; Determine whether the robot is currently turning in place; If the robot is currently turning in place, the desired linear velocity in the current desired velocity is adjusted based on the initial linear velocity compensation value, the robot's angular velocity factor, and the preset adjustment coefficient to obtain the target desired linear velocity in the target desired velocity. The angular velocity factor is calculated based on the actual desired angular velocity of the currently controlled robot. If the robot is not currently turning in place, then the current vehicle front type of the robot is obtained, and the expected linear velocity in the current expected speed is adjusted according to the vehicle front type and the initial linear velocity compensation value to obtain the target expected linear velocity in the target expected speed.
[0008] In one embodiment, the step of obtaining the current front-end type of the robot, adjusting the desired linear velocity in the current desired velocity according to the front-end type and the initial linear velocity compensation value, and obtaining the target desired linear velocity in the target desired velocity includes: If the robot's turning radius is greater than the preset turning radius, and the product of the desired linear velocity in the current desired speed and the pitch angle is greater than a preset value, the robot's current front-end type is obtained. Based on the front-end type and the initial linear velocity compensation value, the desired linear velocity in the current desired speed is adjusted to obtain the target desired linear velocity in the target desired speed.
[0009] In one embodiment, the step of adjusting the desired linear velocity in the current desired speed according to the vehicle type and the initial linear velocity compensation value to obtain the target desired linear velocity in the target desired speed includes: The initial linear velocity compensation value is increased according to the type of vehicle head; Calculate the linear velocity factor based on the desired linear velocity and the robot's preset maximum linear velocity; Based on the linear velocity factor and the angular velocity factor, the linear velocity compensation value after gain is limited. Based on the limited linear velocity compensation value, the desired linear velocity in the current desired velocity is adjusted to obtain the target desired linear velocity in the target desired velocity.
[0010] In one embodiment, the step of determining whether the robot is currently turning in place includes: If the desired linear velocity at the current desired speed is greater than the preset linear velocity, it is determined that the robot is not currently turning in place; If the desired linear velocity at the current desired speed is less than the preset linear velocity, it is determined that the robot is currently turning in place.
[0011] Furthermore, to achieve the above objectives, this application also proposes a robot control device, which includes: The acquisition module is used to acquire the robot's body tilt angle; An adjustment module is used to adjust the current desired speed of the robot according to the tilt angle of the robot body if the tilt angle of the robot body meets the slope compensation condition, so as to obtain the target desired speed. A control module is used to control the robot's operation based on the target desired speed.
[0012] In addition, to achieve the above objectives, this application also proposes a robot, the device comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the robot ramp control method described above.
[0013] In addition, to achieve the above objectives, this application also proposes a storage medium, which is a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, it implements the steps of the robot ramp control method described above.
[0014] One or more technical solutions proposed in this application have at least the following technical effects: In contrast to related technologies, when robots operate on slopes, the actual speed may differ from the target speed due to gravity, leading to problems such as slippage, rampage, and going out of bounds, resulting in performance loss. This application addresses this by acquiring the robot's tilt angle. If the tilt angle meets the slope compensation conditions, the robot's current desired speed is adjusted based on the tilt angle to obtain a target desired speed. The robot's operation is then controlled based on this target desired speed. This application acquires the robot's tilt angle; if the tilt angle meets the slope compensation conditions, the robot's desired speed is compensated and adjusted based on the tilt angle. The robot's operation is then controlled based on the compensated target desired speed to compensate for the deviation between the robot's actual speed and desired speed when a slope occurs, avoiding problems such as slippage, rampage, and going out of bounds, thus reducing performance loss. Attached Figure Description
[0015] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0016] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0017] Figure 1 This is a flowchart illustrating an embodiment of the robot ramp control method of this application. Figure 2 This is an overall flowchart of the robot ramp control method of this application; Figure 3 This is a flowchart illustrating Embodiment 2 of the robot ramp control method of this application; Figure 4 This is a schematic diagram of the module structure of the robot control device according to an embodiment of this application; Figure 5 This is a schematic diagram of the equipment structure of the hardware operating environment involved in the robot ramp control method in this application embodiment.
[0018] The purpose, features, and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0019] It should be understood that the specific embodiments described herein are merely illustrative of the technical solutions of this application and are not intended to limit this application.
[0020] To better understand the technical solution of this application, a detailed description will be provided below in conjunction with the accompanying drawings and specific implementation methods.
[0021] The main solution of this application embodiment is: to obtain the tilt angle of the robot body; if the tilt angle of the body meets the slope compensation condition, then adjust the current expected speed of the robot according to the tilt angle of the body to obtain the target expected speed; and control the operation of the robot based on the target expected speed.
[0022] In related technologies, when robots operate on slopes, their actual speed may differ from the downward speed due to their own gravitational acceleration, leading to various problems such as the robot slipping, running up the slope, and going out of bounds, resulting in performance loss.
[0023] This application acquires the robot's body tilt angle; if the body tilt angle meets the slope compensation condition, the robot's current desired speed is adjusted according to the body tilt angle to obtain a target desired speed; and the robot's operation is controlled based on the target desired speed. This application acquires the robot's body tilt angle, and if the body tilt angle meets the slope compensation condition, it compensates for and adjusts the robot's desired speed based on the body tilt angle, and controls the robot's operation based on the compensated target desired speed. This compensates for the deviation between the robot's actual speed and the desired speed when a slope occurs, avoiding problems such as landslides, slope surges, and going out of bounds, and reducing efficiency loss.
[0024] It should be noted that the executing entity in this embodiment can be a computing service device with data processing, network communication, and program execution functions, such as a tablet computer, personal computer, or mobile phone, or an electronic device or robot control device capable of performing the above functions. The following description uses a robot control device as an example to illustrate this embodiment and the subsequent embodiments.
[0025] Based on this, embodiments of this application provide a robot ramp control method, referring to... Figure 1 , Figure 1 This is a flowchart illustrating the first embodiment of the robot ramp control method of this application.
[0026] In this embodiment, refer to Figure 2 , Figure 2 An overall flowchart is provided, and the robot ramp control method includes steps S10 to S30: Step S10: Obtain the robot's body tilt angle; It should be noted that the execution entity in this embodiment is a robot control device. A robot is a self-moving device that, based on user settings or work modes, can operate within a work area according to planned parameters. During operation, the desired speed of the robot can be output in real time according to the planned parameters to control its movement. Ideally, the robot can move along the planned path at the desired speed. However, in real-world scenarios, especially outdoors, robots encounter slopes. On slopes, gravity can cause the robot's actual speed to deviate from the desired speed, leading to slippage, rampage, or going out of bounds.
[0027] In this embodiment, the robot can be a yard robot, whose main unit can provide power and can be equipped with a vehicle front with functions such as snow sweeping, lawn mowing, and leaf blowing. It can have different yard management functions such as snow sweeping, lawn mowing, or leaf blowing to solve the pain points of yard maintenance. In outdoor scenarios such as yards, the robot is very likely to encounter sloping scenarios.
[0028] A ramp relative to a robot can be a longitudinal or lateral ramp. The longitudinal direction refers to the direction in which the robot moves, and the lateral direction refers to the direction perpendicular to the direction in which the robot moves.
[0029] The robot's tilt angle refers to the degree of tilt of the robot body relative to the horizontal plane, measured by attitude detection devices such as gyroscopes. The pitch angle is the angle of rotation around the robot's horizontal axis (Y-axis), reflecting the robot's longitudinal tilt. The roll angle is the angle of rotation around the robot's longitudinal axis (X-axis), reflecting the robot's lateral tilt. Pitch and roll angles can also indicate the tilt direction of the slope the robot is currently on. The robot control unit automatically obtains the robot's tilt angle relative to the horizontal plane by measuring attitude detection devices such as gyroscopes.
[0030] In this embodiment, the device acquires the tilt angle of the robot in real time, enabling it to directly quantify the slope state of the robot's current location and thus achieve slope compensation.
[0031] Step S20: If the tilt angle of the robot body meets the slope compensation condition, then adjust the current desired speed of the robot according to the tilt angle of the robot body to obtain the target desired speed; It is understandable that the current expected speed refers to the theoretical control speed when walking along the planned path, which is uncompensated for slope. It includes the expected linear velocity and the expected angular velocity. The target expected speed is the expected speed corresponding to the planned path, which is the final output after compensation calculation. The robot's tilt angle reflects the tilt angle of the slope it is on, and thus reflects the deviation between the robot's actual speed when traversing the slope and the expected speed set according to the planned path. The slope compensation condition indicates that the robot is on a slope with a certain tilt angle. Therefore, under the condition of slope compensation, the robot control device will compensate and adjust the robot's current expected speed according to the tilt angle to obtain the target expected speed.
[0032] Furthermore, if the tilt angle of the machine body does not meet the slope compensation conditions, the robot will still operate according to the desired linear velocity and desired angular velocity.
[0033] Step S30: Control the robot to run based on the target desired speed.
[0034] It should be noted that the robot control device compensates for and adjusts the robot's desired speed by adjusting the robot's tilt angle. The robot is then controlled to operate according to the compensated target desired speed. This compensates for the deviation between the robot's actual speed and the desired speed when there is a slope, enabling the robot to move according to the plan and avoiding problems such as rampage, landslides, and going out of bounds, thereby improving the robot's operating efficiency and safety.
[0035] In one feasible implementation, the aircraft tilt angle includes a roll angle and a pitch angle, and the slope compensation condition includes the roll angle being greater than a preset roll angle, or the pitch angle being greater than a preset pitch angle. Step S20 includes: If the roll angle is greater than the preset roll angle, then the desired angular velocity in the robot's current desired speed is adjusted according to the roll angle and the pitch angle to obtain the target desired angular velocity in the target desired speed. It should be noted that the preset roll angle is the slope compensation threshold. When the roll angle in the robot's tilt angle exceeds this threshold, the acceleration caused by the robot's own gravity will have a significant impact in the lateral direction, requiring slope compensation for the desired angular velocity. When the robot control device detects that the roll angle (characterizing the lateral slope in a sloped scenario) exceeds the slope compensation threshold, i.e., when the lateral slope is large, it comprehensively considers the roll angle and pitch angle to calculate a more accurate angular velocity adjustment, adjusts the desired angular velocity, and adjusts the desired angular velocity within the desired velocity based on this adjustment, thus obtaining the target desired angular velocity within the target desired velocity. This more closely resembles the real physical environment, can more accurately predict and counteract the influence of gravity on motion, and improves the overall trajectory tracking accuracy.
[0036] When the roll angle is less than or equal to the preset roll angle, there is no need to perform ramp compensation for the desired angular velocity. The desired angular velocity can be directly used as the target desired angular velocity to control the robot's operation.
[0037] If the pitch angle is greater than the preset pitch angle, then the desired linear velocity in the current desired velocity is adjusted according to the pitch angle to obtain the target desired linear velocity in the target desired velocity.
[0038] Understandably, the preset pitch angle is the slope compensation threshold. When the robot control device detects that the robot's pitch angle (representing the longitudinal slope in a slope scenario) exceeds the set slope compensation threshold, the device will dynamically adjust the desired linear velocity in the desired velocity based on the current pitch angle, thereby obtaining the target desired linear velocity in the target desired velocity. This achieves active feedforward compensation in slope environments and improves the real-time performance of line correction.
[0039] When the pitch angle is less than or equal to the preset pitch angle, there is no need to perform slope compensation for the desired linear velocity. The desired linear velocity can be directly used as the target desired angular velocity to control the robot's operation.
[0040] In one feasible implementation, the step of adjusting the desired angular velocity in the robot's current desired velocity according to the roll angle and the pitch angle to obtain the target desired angular velocity in the target desired velocity includes: The initial compensation factor is determined based on the roll angle and the first preset relationship; It should be noted that the first preset relationship refers to the correspondence between the pre-set roll angle and the initial compensation factor. Generally, the larger the initial compensation factor, the larger the corresponding roll angle. The first preset relationship can be represented by a function, mapping table, or curve. It can be a step-like (gradient division) relationship, for example, dividing the roll angle into multiple intervals, each interval corresponding to a specific compensation factor. Specifically, the larger the value within a roll angle interval, the larger the compensation factor. The initial compensation factor is the initial proportional coefficient used to calculate the angular velocity compensation value. The robot control device determines the initial compensation factor corresponding to the roll angle based on the first preset relationship.
[0041] Furthermore, there is a preset correspondence between the initial compensation factor and the current roll angle of the robot. Specifically, the greater the slope, the larger the compensation factor. The preset correspondence can be step compensation, that is, the roll angle is divided into gradients to determine the initial compensation factor corresponding to the current roll angle.
[0042] When the pitch angle is greater than the preset pitch angle, the initial compensation factor is increased to obtain the first compensation factor; Understandably, the preset pitch angle is used to determine the threshold for whether lateral slope compensation needs to be enhanced, and can be set to 6 degrees. Since the influence of gravity on the robot's steering motion is more complex and significant in the case of compound slopes (longitudinal downhill superimposed with lateral slope), a preset pitch angle is set. When the robot's pitch angle (representing the longitudinal slope in a slope scenario) is greater than the preset pitch angle, it indicates that the robot is currently in a significant longitudinal downhill scenario. The robot control device increases the initial compensation factor to obtain the first compensation factor. When the robot's pitch angle (representing the longitudinal slope in a slope scenario) is less than or equal to the preset pitch angle, there is no need to increase the initial compensation factor; the initial compensation factor is used as the first compensation factor. The first compensation factor is the final proportional coefficient used to calculate the angular velocity compensation value. It can overcome the influence of gravity on the robot's steering motion, ensuring that even in slope conditions where downhill and lateral slopes coexist, angular velocity compensation can provide sufficient corrective force, thereby effectively preventing severe sideslip or loss of steering control due to the superposition effect of gravity.
[0043] Specifically, when determining the first compensation factor, the robot control device needs to use the pitch angle. For example, if the pitch angle is greater than 6 degrees, that is, the longitudinal slope is greater than 6 degrees, it will make an additional compensation of a certain value on the basis of obtaining the initial compensation factor by gradient division of roll. This value can be set to 0.0015 to obtain a more accurate first compensation factor.
[0044] Based on the first compensation factor, the desired angular velocity in the robot's current desired velocity is adjusted to obtain the target desired angular velocity in the target desired velocity.
[0045] It should be noted that the robot control device will use the first compensation factor enhanced by the longitudinal slope (pitch angle), multiply it by the roll angle which reflects the magnitude of the lateral slope, calculate the angular velocity compensation amount that accurately matches the current complex slope conditions, and add this compensation amount to the expected angular velocity in the expected speed to obtain the target expected angular velocity in the target expected speed. This can more comprehensively offset the combined effect of gravity on the robot's turning motion on the complex slope.
[0046] In this embodiment, the desired angular velocity of the robot is compensated and adjusted by the roll angle and pitch angle in the robot's body tilt angle. The robot is controlled to operate according to the compensated target desired velocity to compensate for the deviation between the robot's actual angular velocity and the desired angular velocity when there is a slope, so as to avoid problems such as slippage and improve the robot's operating efficiency and safety.
[0047] Based on the first embodiment of this application, in the second embodiment of this application, the content that is the same as or similar to that in the first embodiment described above can be referred to the above description, and will not be repeated hereafter. Based on this, please refer to... Figure 2 The step of adjusting the desired linear velocity in the current desired velocity according to the pitch angle to obtain the target desired linear velocity in the target desired velocity includes steps S01~S05: Step S01: Determine the initial linear velocity compensation value based on the pitch angle and the second preset relationship; It should be noted that the second preset relationship refers to the correspondence between the pre-set pitch angle and the second compensation factor. Generally, the larger the second compensation factor, the larger the corresponding pitch angle. The second preset relationship can be represented by a function, mapping table, or curve. It can be a step-like (gradient division) relationship, for example, dividing the pitch angle into multiple intervals, each interval corresponding to a specific compensation factor. Specifically, the larger the value within the pitch angle interval, the larger the compensation factor. The robot control device directly maps the pitch angle to the second compensation factor used for linear velocity compensation through the second preset relationship, and then multiplies the second compensation factor by the pitch angle to obtain the initial linear velocity compensation value.
[0048] Step S02: Determine whether the robot is currently turning in place; It should be noted that since the robot may turn in place on a slope, excessive linear velocity compensation may cause the robot to not turn as expected, instead traversing an arc, leading to the robot going out of bounds or missing the work area. Therefore, the robot control device needs to determine whether the robot is currently turning in place, and then use different methods to increase the gain based on the determination result to ensure that the robot can turn in place smoothly.
[0049] Step S03: If the robot is currently turning in place, then based on the initial linear velocity compensation value, the robot's angular velocity factor, and the preset adjustment coefficient, adjust the desired linear velocity in the current desired velocity to obtain the target desired linear velocity in the target desired velocity. The angular velocity factor is calculated based on the actual desired angular velocity of the currently controlled robot. Understandably, the preset adjustment coefficient is a fixed multiplier, which can be set to 1.4, used to amplify the initial linear velocity compensation value by a specific ratio in stationary turning scenarios. After determining that the robot is turning in place, the robot control device obtains the initial linear velocity compensation value and reads the angular velocity factor calculated based on the actual expected angular velocity of the currently controlled robot. Subsequently, the device uses the preset adjustment coefficient to amplify the product of the basic linear velocity compensation value and the angular velocity factor by a specific ratio to obtain the final compensation value. Finally, this compensation value is added to the expected linear velocity to obtain the target expected linear velocity, in order to prevent unexpected longitudinal displacement from causing an increase in the turning radius.
[0050] Specifically, when the robot is making a turn in place, the gain method of the robot control device can be: initial linear velocity compensation value * angular velocity factor * 1.4. The result is the linear velocity compensation value after longitudinal ramp compensation. The angular velocity factor is determined based on the currently issued actual desired angular velocity of the robot, and can be obtained by multiplying the actual desired angular velocity by 0.3. If lateral compensation based on roll angle has been performed, the actual desired angular velocity of the robot is the target desired angular velocity. If lateral compensation based on roll angle has not been performed, the actual desired angular velocity of the robot is the original desired angular velocity.
[0051] It should be noted that, because the device needs to adjust the angular velocity factor determined based on the actual desired angular velocity of the controlled robot when performing linear velocity compensation, when both lateral and longitudinal slope compensation are required simultaneously, lateral slope compensation must be performed first, followed by longitudinal slope compensation. Specifically, when both the roll angle and pitch angle are greater than the preset roll angle and pitch angle are greater than the preset pitch angle, the device needs to first adjust the desired angular velocity in the desired velocity based on the roll and pitch angles to obtain the target desired angular velocity. Then, when adjusting the desired linear velocity based on the pitch angle, the angular velocity factor is determined based on the adjusted target desired angular velocity and used for adjusting the desired linear velocity to optimize the system flow.
[0052] Step S04: If the robot is not currently turning in place, obtain the current vehicle front type of the robot, and adjust the expected linear velocity in the current expected speed according to the vehicle front type and the initial linear velocity compensation value to obtain the target expected linear velocity in the target expected speed.
[0053] It should be noted that "robot type" refers to the type of robot head currently installed on the main unit, including lawnmowers, snow blowers, leaf blowers, mowers, and headless robots. Different robot heads have different operational functions, and mounting different robot heads on the main unit can achieve different operational functions. Because the robot can carry different robot heads, the robot will experience differences in center of gravity distribution, overall weight, and ground adhesion due to the structure and weight of the robot heads. When the robot is operating, the robot control device needs to differentiate the initial linear velocity compensation value according to the type of robot head currently mounted on the robot, and add the compensated velocity compensation value to the desired linear velocity to obtain the target desired linear velocity. This ensures that the robot can obtain the most suitable linear velocity compensation for its current physical state on the slope when mounting any type of robot head, thereby improving operational adaptability while ensuring consistent safety and stability during operation.
[0054] In one feasible implementation, the steps of obtaining the robot's current front-end type, adjusting the desired linear velocity in the current desired velocity based on the front-end type and the initial linear velocity compensation value, and obtaining the target desired linear velocity in the target desired velocity include: If the robot's turning radius is greater than the preset turning radius, and the product of the desired linear velocity in the current desired speed and the pitch angle is greater than the preset value, the robot's current front-end type is obtained. Based on the front-end type and the initial linear velocity compensation value, the desired linear velocity in the current desired speed is adjusted to obtain the target desired linear velocity in the target desired speed. Understandably, the turning radius refers to the radius of curvature of the robot's current trajectory, which can be calculated based on the robot's current desired linear velocity and target desired angular velocity. The preset turning radius is a threshold used to judge the smoothness of the turn, and can be set to 1.5. The preset value is a threshold that the parameter product must satisfy, and can be set to 2. The robot control device only adjusts the gain of the initial linear velocity compensation value based on the vehicle's front-end type when the robot's turning radius is greater than the preset turning radius and the product of the desired linear velocity and pitch angle is greater than the preset value. This dual-condition judgment effectively avoids introducing compensation changes due to differences in vehicle front-end type in unnecessary scenarios (such as making small-radius sharp turns on gentle slopes or traveling at high speeds on gentle inclines), thus preventing excessive intervention or false triggering of compensation strategies.
[0055] In one feasible implementation, the steps of obtaining the robot's current front-end type, adjusting the desired linear velocity in the current desired velocity based on the front-end type and the initial linear velocity compensation value, and obtaining the target desired linear velocity in the target desired velocity include: The initial linear velocity compensation value is increased according to the type of vehicle head; Understandably, since different types of vehicle heads have different ramp gains, the robot control device increases the initial linear velocity compensation value according to the ramp gain corresponding to the current vehicle head type in order to cope with the risk of slipping due to the different center of gravity distribution and weight caused by the robot being paired with different vehicle head types.
[0056] Furthermore, the ramp gain corresponding to the type of vehicle head can be divided according to the structure and weight of the vehicle head. Specifically, for headless state and SAM module machines, no compensation is made, that is, the ramp gain can be 0.0 times; for snow sweeping head and blower head, normal compensation is given, that is, the ramp gain can be 1 times; and for grass mowing head, the ramp gain can be set to 1.4 times.
[0057] Calculate the linear velocity factor based on the desired linear velocity and the robot's preset maximum linear velocity; It should be noted that the preset maximum linear velocity refers to the maximum safe forward speed that the robot can execute, set according to the performance and safety specifications of the robot drive system or by the user. The robot control device divides the desired linear velocity by the preset maximum linear velocity to obtain a linear velocity factor. This factor, as a dynamic modulation parameter, can limit the target desired linear velocity for longitudinal slope compensation, preventing the compensated target desired linear velocity from being too large and causing robot safety issues.
[0058] Based on the linear velocity factor and the angular velocity factor, the linear velocity compensation value after gain is limited. Based on the limited linear velocity compensation value, the desired linear velocity in the current desired velocity is adjusted to obtain the target desired linear velocity in the target desired velocity.
[0059] Understandably, the robot control device multiplies the initial linear velocity compensation value after gain by a sum consisting of a linear velocity factor and an angular velocity factor, in order to dynamically constrain the initial linear velocity compensation value after gain. Then, it adds the constrained initial linear velocity compensation value to the desired linear velocity to obtain the target desired linear velocity, in order to prevent excessive linear velocity compensation from causing overshoot, oscillation, or out-of-bounds risks.
[0060] In one feasible implementation, the step of determining whether the robot is currently turning in place includes: If the desired linear velocity at the current desired speed is greater than the preset linear velocity, it is determined that the robot is not currently turning in place; Understandably, the preset linear velocity is used to define the critical value for extremely low forward speed. Turning in place refers to the robot rotating around its own center (or close to the center) with minimal translation of its overall center of mass. In this mode, the robot's linear velocity approaches zero, while its angular velocity is not zero (and is usually relatively large), thus enabling a rapid change of orientation without moving its position. Therefore, if the robot control device determines that the desired linear velocity is greater than the preset linear velocity, it proves that the desired linear velocity is large, and the robot is not turning in place.
[0061] If the desired linear velocity at the current desired speed is less than the preset linear velocity, it is determined that the robot is currently turning in place.
[0062] It should be noted that if the robot control device determines that the desired linear velocity is less than the preset linear velocity, it means that the desired linear velocity is small (approaching 0). At this time, the robot is turning in place. The above judgment can effectively avoid the robot from accidentally sliding forward / downward instead of rotating in place, forming an arc trajectory instead of rotating around a point.
[0063] For example, after receiving the desired speed set for the robot, the robot control device will collect the robot's pitch and roll angles in real time through the attitude detection device, and sequentially determine whether the robot has reached the ramp compensation starting point corresponding to the roll angle and the pitch compensation starting point. If the robot control device determines that the current body tilt angle meets any of the above compensation starting points, it is determined that the robot needs to compensate for the desired speed. If the current body tilt angle only meets the ramp compensation starting point corresponding to roll, only angular velocity compensation is performed. If the current body tilt angle only meets the pitch compensation starting point, only linear velocity compensation is performed.
[0064] Specifically, refer to Figure 3 , Figure 3 The overall flowchart is provided. When the robot control device receives the current desired velocity, it first determines whether the roll angle has reached the corresponding ramp compensation starting point using gyroscope data. If not, no adjustment is made to the current desired angular velocity. If it does, in the angular velocity compensation scenario, the robot control device calculates the first compensation factor r_factor using the roll angle and pitch angle. Subsequently, based on the roll angle and r_factor, angular velocity compensation is calculated. Finally, based on this compensation value, the target desired angular velocity sent to the robot is determined, and then the pitch angle is checked to see if it meets the corresponding ramp compensation starting point. If the condition is not met, the current expected linear velocity is not adjusted. If the condition is met, the second compensation factor p_factor is calculated based on the pitch angle. Then, the initial linear velocity compensation value is calculated based on the pitch and p_factor. Subsequently, the linear velocity compensation value is increased based on the turning radius and the vehicle's front-end judgment results to obtain the final normalized compensation value. Finally, based on this compensation value, the target expected linear velocity is determined and sent to the robot. The target expected angular velocity and the target expected linear velocity are used as the actual expected velocities to control the robot's operation and ensure the robot's efficiency and safety on the ramp.
[0065] In this embodiment, since the robot may turn in place on a slope, it may not turn as expected due to excessive linear velocity compensation, instead walking in an arc, causing the robot to go out of bounds or miss the work area. Therefore, different gain methods are used depending on whether the robot is turning in place to ensure that the robot can turn in place smoothly.
[0066] This application also provides a robot control device, please refer to... Figure 4 The robot control device includes: The acquisition module 10 is used to acquire the robot's body tilt angle; The adjustment module 20 is used to adjust the current desired speed of the robot according to the tilt angle of the robot body if the tilt angle of the robot body meets the slope compensation condition, so as to obtain the target desired speed. The control module 30 is used to control the operation of the robot based on the target desired speed.
[0067] Optionally, the adjustment module includes: The adjustment submodule is used to adjust the desired angular velocity of the robot's current desired speed according to the roll angle and the pitch angle when the roll angle is greater than the preset roll angle, so as to obtain the target desired angular velocity of the target desired speed; and to adjust the desired linear velocity of the current desired speed according to the pitch angle when the pitch angle is greater than the preset pitch angle, so as to obtain the target desired linear velocity of the target desired speed.
[0068] Optionally, the adjustment submodule includes: The first adjustment unit is used to determine an initial compensation factor based on the roll angle and a first preset relationship; when the pitch angle is greater than a preset pitch angle, the initial compensation factor is increased to obtain a first compensation factor; based on the first compensation factor, the desired angular velocity in the robot's current desired speed is adjusted to obtain the target desired angular velocity in the target desired speed.
[0069] The second adjustment unit is used to determine an initial linear velocity compensation value based on the pitch angle and a second preset relationship; determine whether the robot is currently turning in place; if the robot is currently turning in place, adjust the desired linear velocity in the current desired velocity based on the initial linear velocity compensation value, the robot's angular velocity factor, and a preset adjustment coefficient to obtain the target desired linear velocity in the target desired velocity, wherein the angular velocity factor is calculated based on the actual desired angular velocity of the currently controlled robot; if the robot is not currently turning in place, obtain the robot's current vehicle front type, and adjust the desired linear velocity in the current desired velocity based on the vehicle front type and the initial linear velocity compensation value to obtain the target desired linear velocity in the target desired velocity.
[0070] Optionally, the second adjustment unit includes: The effective subunit is used to obtain the current front-end type of the robot when the robot's turning radius is greater than a preset turning radius and the product of the desired linear velocity in the current desired speed and the pitch angle is greater than a preset value. Based on the front-end type and the initial linear velocity compensation value, the desired linear velocity in the current desired speed is adjusted to obtain the target desired linear velocity in the target desired speed.
[0071] The limiting subunit is used to increase the initial linear velocity compensation value according to the vehicle head type; calculate the linear velocity factor based on the desired linear velocity and the robot's preset maximum linear velocity; limit the increased linear velocity compensation value based on the linear velocity factor and the angular velocity factor; and adjust the desired linear velocity in the current desired velocity based on the limited linear velocity compensation value to obtain the target desired linear velocity in the target desired velocity.
[0072] The determination subunit is used to determine that the robot is not currently turning in place if the expected linear velocity in the current expected speed is greater than the preset linear velocity; and to determine that the robot is currently turning in place if the expected linear velocity in the current expected speed is less than the preset linear velocity.
[0073] The robot control device provided in this application, employing the robot ramp control method in the above embodiments, can solve the technical problem of robot ramp control. Compared with the prior art, the beneficial effects of the robot control device provided in this application are the same as those of the robot ramp control method provided in the above embodiments, and other technical features in the robot control device are the same as those disclosed in the methods of the above embodiments, and will not be repeated here.
[0074] This application provides a robot, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, which are executed by the at least one processor to enable the at least one processor to perform the robot ramp control method in Embodiment 1 above.
[0075] The following is for reference. Figure 5 It shows a structural schematic diagram suitable for implementing the robot of the embodiments of this application. Figure 5 As shown, the robot may include a processing unit 1001 (e.g., a central processing unit, a graphics processing unit, etc.) that can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1002 or a program loaded from a storage device 1003 into a random access memory (RAM) 1004. The RAM 1004 also stores various programs and data required for robot operation. The processing unit 1001, ROM 1002, and RAM 1004 are interconnected via a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems can be connected to the I / O interface 1006: input devices 1007 including, for example, a touchscreen, touchpad, keyboard, mouse, image sensor, microphone, accelerometer, gyroscope, etc.; output devices 1008 including, for example, a liquid crystal display (LCD), speaker, vibrator, etc.; storage devices 1003 including, for example, magnetic tape, hard disk, etc.; and communication devices 1009. The communication device 1009 allows the robot to communicate wirelessly or wiredly with other devices to exchange data. While the figure shows a robot with various systems, it should be understood that implementation or possession of all the systems shown is not required. More or fewer systems may be implemented alternatively.
[0076] Specifically, according to the embodiments disclosed in this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed in this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device, or installed from storage device 1003, or installed from ROM 1002. When the computer program is executed by processing device 1001, it performs the functions defined in the methods of the embodiments disclosed in this application.
[0077] The robot provided in this application, employing the robot ramp control method in the above embodiments, can solve the technical problem of robot ramp control. Compared with the prior art, the beneficial effects of the robot provided in this application are the same as those of the robot ramp control method provided in the above embodiments, and other technical features of the robot are the same as those disclosed in the previous embodiment method, and will not be repeated here.
[0078] It should be understood that the various parts disclosed in this application can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in any suitable manner in one or more embodiments or examples.
[0079] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
[0080] This application provides a computer-readable storage medium having computer-readable program instructions (i.e., a computer program) stored thereon, the computer-readable program instructions being used to execute the robot ramp control method in the above embodiments.
[0081] The computer-readable storage medium provided in this application may be, for example, a USB flash drive, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, system, or device. The program code contained on the computer-readable storage medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination thereof.
[0082] The aforementioned computer-readable storage medium may be included in the robot; or it may exist independently and not be assembled into the robot.
[0083] The aforementioned computer-readable storage medium carries one or more programs that, when executed by the robot, cause the robot to: acquire the robot's body tilt angle; if the body tilt angle satisfies the slope compensation condition, adjust the robot's current desired speed according to the body tilt angle to obtain a target desired speed; and control the robot's operation based on the target desired speed.
[0084] Computer program code for performing the operations of this application can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, and C++, and conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a Local Area Network (LAN) or a Wide Area Network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0085] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0086] The modules described in the embodiments of this application can be implemented in software or hardware. The names of the modules do not necessarily limit the functionality of the unit itself.
[0087] The readable storage medium provided in this application is a computer-readable storage medium that stores computer-readable program instructions (i.e., a computer program) for executing the above-described robot ramp control method, thereby solving the technical problem of robot ramp control. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as those of the robot ramp control method provided in the above embodiments, and will not be repeated here.
[0088] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the robot ramp control method described above.
[0089] The computer program product provided in this application can solve the technical problem of robot ramp control. Compared with the prior art, the beneficial effects of the computer program product provided in this application are the same as the beneficial effects of the robot ramp control method provided in the above embodiments, and will not be repeated here.
[0090] The above description is only a part of the embodiments of this application and does not limit the scope of protection of this application. All equivalent structural transformations made under the technical concept of this application and using the content of this application specification and drawings, or direct / indirect applications in other related technical fields, are included in the scope of protection of this application.
Claims
1. A method for controlling a robot's ramp, characterized in that, The robot ramp control method includes: Obtain the robot's body tilt angle; If the tilt angle of the robot body meets the slope compensation condition, then the current desired speed of the robot is adjusted according to the tilt angle of the robot body to obtain the target desired speed; The robot is controlled to operate based on the target desired speed.
2. The robot ramp control method as described in claim 1, characterized in that, The body tilt angle includes roll angle and pitch angle. The slope compensation condition includes the roll angle being greater than a preset roll angle, or the pitch angle being greater than a preset pitch angle. The step of adjusting the robot's current desired speed according to the body tilt angle to obtain the target desired speed if the body tilt angle meets the slope compensation condition includes: If the roll angle is greater than the preset roll angle, then the desired angular velocity in the robot's current desired speed is adjusted according to the roll angle and the pitch angle to obtain the target desired angular velocity in the target desired speed. If the pitch angle is greater than the preset pitch angle, then the desired linear velocity in the current desired velocity is adjusted according to the pitch angle to obtain the target desired linear velocity in the target desired velocity.
3. The robot ramp control method as described in claim 2, characterized in that, The step of adjusting the desired angular velocity in the robot's current desired speed based on the roll angle and the pitch angle to obtain the target desired angular velocity in the target desired speed includes: The initial compensation factor is determined based on the roll angle and the first preset relationship; When the pitch angle is greater than the preset pitch angle, the initial compensation factor is increased to obtain the first compensation factor; Based on the first compensation factor, the desired angular velocity in the robot's current desired velocity is adjusted to obtain the target desired angular velocity in the target desired velocity.
4. The robot ramp control method as described in claim 2, characterized in that, The step of adjusting the desired linear velocity in the current desired velocity according to the pitch angle to obtain the target desired linear velocity in the target desired velocity includes: The initial linear velocity compensation value is determined based on the pitch angle and the second preset relationship; Determine whether the robot is currently turning in place; If the robot is currently turning in place, the desired linear velocity in the current desired velocity is adjusted based on the initial linear velocity compensation value, the robot's angular velocity factor, and the preset adjustment coefficient to obtain the target desired linear velocity in the target desired velocity. The angular velocity factor is calculated based on the actual desired angular velocity of the currently controlled robot. If the robot is not currently turning in place, then the current vehicle front type of the robot is obtained, and the expected linear velocity in the current expected speed is adjusted according to the vehicle front type and the initial linear velocity compensation value to obtain the target expected linear velocity in the target expected speed.
5. The robot ramp control method as described in claim 4, characterized in that, The step of obtaining the current front-end type of the robot, adjusting the desired linear velocity in the current desired velocity according to the front-end type and the initial linear velocity compensation value, and obtaining the target desired linear velocity in the target desired velocity includes: If the robot's turning radius is greater than the preset turning radius, and the product of the desired linear velocity in the current desired speed and the pitch angle is greater than a preset value, the robot's current front-end type is obtained. Based on the front-end type and the initial linear velocity compensation value, the desired linear velocity in the current desired speed is adjusted to obtain the target desired linear velocity in the target desired speed.
6. The robot ramp control method as described in claim 4, characterized in that, The step of adjusting the desired linear velocity in the current desired speed according to the vehicle type and the initial linear velocity compensation value to obtain the target desired linear velocity in the target desired speed includes: The initial linear velocity compensation value is increased according to the type of vehicle head; Calculate the linear velocity factor based on the desired linear velocity and the robot's preset maximum linear velocity; Based on the linear velocity factor and the angular velocity factor, the linear velocity compensation value after gain is limited. Based on the limited linear velocity compensation value, the desired linear velocity in the current desired velocity is adjusted to obtain the target desired linear velocity in the target desired velocity.
7. The robot ramp control method as described in claim 4, characterized in that, The step of determining whether the robot is currently turning in place includes: If the desired linear velocity at the current desired speed is greater than the preset linear velocity, it is determined that the robot is not currently turning in place; If the desired linear velocity at the current desired speed is less than the preset linear velocity, it is determined that the robot is currently turning in place.
8. A robot control device, characterized in that, The device includes: The acquisition module is used to acquire the robot's body tilt angle; An adjustment module is used to adjust the robot's current desired speed according to the tilt angle of the robot body if the tilt angle of the robot body meets the slope compensation condition, so as to obtain the target desired speed. A control module is used to control the robot's operation based on the target desired speed.
9. A robot, characterized in that, The robot includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the robot ramp control method as described in any one of claims 1 to 7.
10. A storage medium, characterized in that, The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, it implements the steps of the robot ramp control method as described in any one of claims 1 to 7.