Walking control method of robot on carpet, chip and robot

By rotating the carpet lateral offset vector and calculating the reverse compensation vector on the surface of the carpet, combined with dynamic adjustment of the motion control coefficient, the problem of path deviation of the robot on the carpet is solved, and the effect of high-precision docking charging base is achieved.

CN120295306APending Publication Date: 2025-07-11AMICRO SEMICONDUCTOR CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202510389389.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-31
Publication Date
2025-07-11

AI Technical Summary

Technical Problem

When a robot is driving on a carpet, due to uneven friction force or fluff in the carpet, the path deviates from the theoretical trajectory and makes it difficult to accurately connect to the charging base. The existing technology fusion integral calculation method triggers violent adjustment during the recharge process, affecting the charging success rate.

Method used

By rotating the carpet surface to calculate the carpet lateral offset vector, calculate the reverse compensation vector, adjust the robot position and dynamically adjust the motion control coefficient, reduce the violent correction actions caused by carpet interference, and ensure that the robot is connected to the charging base with high precision under the influence of fluff.

Benefits of technology

The robot can connect the charging base with high-precision on the carpet, reduce violent adjustments, improve recharge accuracy and success rate, adapt to different carpet materials, and is universal.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120295306A_ABST
    Figure CN120295306A_ABST
Patent Text Reader

Abstract

The invention discloses a walking control method of a robot on a carpet, a chip and the robot, and the walking control method comprises the following steps: A, the robot calculates a transverse deviation vector of the carpet through rotation on the surface of the carpet, and then calculates a reverse compensation vector according to the transverse deviation vector of the carpet; then, the current position of the robot is shifted through the reverse compensation vector, and a corrected starting point position is obtained; b, the robot moves to the charging base from the corrected starting point position, the distance between the current position of the robot and the center of the charging base is measured in real time, the distance measured in real time is marked as the remaining distance, and the motion control coefficient is dynamically adjusted according to the ratio of the remaining distance to the walking distance; and C, when the remaining distance is smaller than or equal to a preset distance threshold value, the walking direction of the robot is adjusted to be parallel to the recharging butt joint direction, and then the robot moves downwards to the charging base under the condition that the walking direction of the robot is kept parallel to the recharging butt joint direction till the robot is in butt joint with a charging contact in the charging base.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of robot recharging, in particular to a method for controlling a robot to walk on a carpet, a chip, and a robot. Background Art

[0002] When a two-wheeled robot travels on a carpet of certain materials, it may be disturbed and unable to travel normally along a predetermined route. For example, when the robot rotates or moves on the carpet, due to uneven carpet friction or fluff, its actual path will deviate from the theoretical trajectory; if the charging dock is placed on the surface of the carpet, it will have a great impact on the robot's alignment for recharging, because recharging requires extremely high position and angle accuracy of the robot, and a slight deviation may prevent normal charging.

[0003] The Chinese invention patent with the patent application number 201811240370.7 discloses a control method for carpet deviation of robot movement. Although this control method determines the situation where the robot deviates from the preset direction according to the average deviation value and sets corresponding PID proportional coefficients to synchronously adjust the speeds of the left and right drive wheels of the robot, the core algorithm logic for solving the carpet deviation problem is to perform fusion integration calculation on the encoder sensing data and the optical flow sensor sensing data through coordinate system conversion, and to complete the recognition process of carpet deviation by accumulating the deviation amount within a predetermined time interval to obtain an average value. However, when these algorithm processes are directly applied to the robot to return to the charging dock on the carpet surface for docking charging, due to the lack of setting of the recharging starting point and the adaptive compensation mechanism for carpet deviation in different walking stages, the fusion integration calculation method provided by the aforementioned Chinese invention patent will trigger the robot to generate violent adjustment actions when applied to the limited carpet surface recharging route, such as the walking speed oscillation caused by overcorrection, so that it is difficult to successfully dock with the charging dock. Summary of the Invention

[0004] This application discloses a method for controlling a robot to walk on a carpet, a chip, and a robot. The specific technical solutions are as follows: Walking control method for a robot on a carpet. The walking control method includes: Step A: The robot rotates on the carpet surface to calculate the lateral offset vector of the carpet, and then calculates the reverse compensation vector based on the lateral offset vector of the carpet; then uses the reverse compensation vector to offset the current position of the robot to obtain the corrected starting position; then execute Step B; wherein, the lateral offset vector of the carpet is perpendicular to the charging docking direction of the charging base; Step B: The robot starts walking from the corrected starting position towards the charging base, measures the distance from the current position of the robot to the center of the charging base in real time and marks the measured distance as the remaining distance, and at the same time dynamically adjusts the motion control coefficient according to the ratio between the remaining distance and the walking distance, and then the robot walks towards the charging base according to the dynamically adjusted motion control coefficient to offset the offset applied by the carpet to the robot; then execute Step C; Step C: When the remaining distance is less than or equal to the preset distance threshold, adjust the walking direction of the robot to be parallel to the charging docking direction of the charging base, and then the robot walks towards the charging base while keeping its walking direction parallel to the charging docking direction of the charging base until the robot docks with the charging contacts in the charging base.

[0005] In summary, by executing Step A, it is possible to calculate the reverse compensation vector based on the lateral offset vector of the carpet generated by rotation, and then use the reverse compensation vector to compensate the current position of the robot, so that the robot is in front of the charging base before rotating enough angles and preparing to start walking from the compensated position (corrected starting position) towards the charging base, thereby completing the compensation offset amount of the charging starting point before docking charging, reducing the burden of dynamic adjustment, avoiding drastic correction actions (such as frequent sudden stops or turns) caused by continuous interference of the carpet during the process of walking towards the charging base, and improving the charging accuracy and the success rate of docking charging: By executing Step B and Step C, starting from the compensation result of the reverse compensation vector of the current position of the robot in Step A, the motion control coefficient is dynamically adjusted in real time, gradually suppressing the offset error of the robot on the carpet surface, avoiding oscillation caused by over-adjustment, meeting the constraints of the fuselage offset amount and the nose pointing, and being adaptable to various different blankets, having universality; furthermore, the posture adjustment of the robot starting from the corrected starting position towards the charging base is smooth, and the robot can still reach the charging base with high precision on the carpet affected by fluff.

[0006] Further, in the step A, the method for the robot to calculate the lateral offset vector of the carpet by rotating on the carpet surface and then calculate the reverse compensation vector according to the lateral offset vector of the carpet includes: when the robot is located at the preset recharge starting position, the robot records its real-time position coordinates as the initial position coordinates through the sensor, and then the robot rotates in place for one week with a fixed wheelbase on the carpet surface; meanwhile, the actual walking distance of the wheels during the one-week rotation in place is measured through the sensor, and the measured actual walking distance is configured as the walking distance in the step B; after the robot rotates in place for one week, the robot records its real-time position coordinates as the position coordinates after the rotation in place through the sensor, and then calculates the carpet offset vector by combining the position coordinates after the rotation in place and the initial position coordinates; then calculates the component of the carpet offset vector in the vertical direction of the recharge docking direction of the charging base to obtain the carpet influence offset vector; then takes the inverse of the carpet influence offset vector to obtain the reverse compensation vector; the rotation in place of the robot on the carpet surface is that the robot rotates with its body center as the rotation center and allows the body center to deviate. Thus, the lateral (referring to the vertical direction of the recharge docking direction) offset vector caused by uneven carpet friction is calculated by rotating one week.

[0007] Further, in step A, the method for the robot to calculate the lateral offset vector of the carpet by rotating on the carpet surface and then calculate the reverse compensation vector based on the lateral offset vector of the carpet includes: First, the robot records its real-time position coordinates as the first initial position coordinates through the sensor. The robot rotates 90 degrees in place in the first direction on the carpet surface. After the robot rotates 90 degrees in place in the first direction, it records its real-time position coordinates as the first current position coordinates through the sensor, and then calculates the first carpet offset vector by combining the first current position coordinates and the first initial position coordinates; then calculates the component of the first carpet offset vector in the vertical direction of the recharge docking direction of the charging dock to obtain the first carpet lateral offset vector; then, the robot rotates 90 degrees in place in the second direction on the carpet surface. After the robot rotates 90 degrees in place in the second direction, it records its real-time position coordinates as the second current position coordinates through the sensor, and then calculates the second carpet offset vector by combining the second current position coordinates and the first current position coordinates; then calculates the component of the second carpet offset vector in the vertical direction of the recharge docking direction of the charging dock to obtain the second carpet lateral offset vector; then, calculates the average offset vector of the first carpet lateral offset vector and the second carpet lateral offset vector, and then takes the negative of half of the calculated average offset vector to obtain the reverse compensation vector; where the first direction and the second direction are opposite directions; the carpet lateral offset vector includes the first carpet lateral offset vector and the second carpet lateral offset vector. In summary, in this application, the lateral offset vector of the carpet generated by carpet interference is measured and calculated through two 90-degree rotations in opposite directions, and then the reverse compensation vector is calculated by taking the average, so that the reverse compensation vector is used to reverse-compensate half of the average offset vector; and the two 90-degree rotations in opposite directions are used as symmetric rotation operations, which can separate the systematic component and random noise of the carpet interference and cancel the systematic error; therefore, by compensating half of the average offset vector subsequently, it is ensured that the robot reduces the cumulative error caused by carpet interference during the process of walking towards the charging dock, and improves the recharge accuracy and stability of the robot in a complex carpet environment.

[0008] Further, in step A, the method for the robot to calculate the lateral offset vector of the carpet by rotating on the carpet surface and then calculate the reverse compensation vector based on the lateral offset vector of the carpet includes: First, the robot records its real-time position coordinates as the first initial position coordinates through sensors. The robot rotates 90 degrees in place on the carpet surface in the preset clockwise direction. After the robot rotates 90 degrees in place in the preset clockwise direction, it records its real-time position coordinates as the first current position coordinates through sensors, and then calculates the first carpet offset vector by combining the first current position coordinates and the first initial position coordinates; then calculates the component of the first carpet offset vector in the perpendicular direction of the recharge docking direction of the charging dock to obtain the first lateral offset vector of the carpet; then, the robot rotates 90 degrees in place on the carpet surface in the preset clockwise direction. After the robot rotates 90 degrees in place in the preset clockwise direction, it records its real-time position coordinates as the second current position coordinates, and makes the robot turn 180 degrees at the second current position coordinates relative to its position at the first initial position coordinates; then calculates the second carpet offset vector by combining the second current position coordinates and the first current position coordinates; then calculates the component of the second carpet offset vector in the perpendicular direction of the recharge docking direction of the charging dock to obtain the second lateral offset vector of the carpet; then, calculates the average offset vector of the first lateral offset vector of the carpet and the second lateral offset vector of the carpet, and then takes the negative half of the calculated average offset vector to obtain the reverse compensation vector; wherein, the preset clockwise direction is the clockwise direction or the counterclockwise direction; the lateral offset vector of the carpet includes the first lateral offset vector of the carpet and the second lateral offset vector of the carpet. In summary, the present application measures and calculates the lateral offset vector of the carpet generated by carpet interference through two 90-degree rotations in the same direction, and then calculates the reverse compensation vector by taking the average value, so that the scalar of the reverse compensation vector calculated in this embodiment (related to the compensation amount) is greater than the scalar of the reverse compensation vector calculated under two 90-degree rotations in opposite directions disclosed in the foregoing embodiment. It can not only eliminate the accidental error of a single rotation, but also be used to offset the starting position of the recharge with a relatively large reverse compensation amount later, compensating for most of the accumulated errors in advance and improving the accuracy of the robot's recharge docking with the charging dock.

[0009] Further, in step A, the method of offsetting the current position of the robot by the reverse compensation vector to obtain the corrected starting position, so that the corrected starting position is in the recharging docking direction relative to the center of the charging dock includes: controlling the current position of the robot to offset by the scalar of the reverse compensation vector along the direction of the reverse compensation vector to obtain the corrected starting position; then, the robot walks from the current position according to the reverse compensation vector until the robot reaches the corrected starting position, where the corrected starting position is the starting point of a preset recharging trajectory, the center of the charging dock is the end point of the preset recharging trajectory, and the recharging docking direction is parallel to the direction of the preset recharging trajectory; where the current position includes the position where the robot is located after rotation. In summary, in the present application, the position of the robot after rotation is offset by the reverse compensation vector, and the robot is controlled to actively walk to the new recharging starting position (a position approaching the corrected starting position due to the continuous presence of carpet interference) according to the reverse compensation vector instead of being forced to offset by the carpet at the current position of the robot, at least reducing the cumulative error caused by carpet interference, thereby improving the recharging accuracy and stability in complex environments (such as carpets).

[0010] Further, in the step B, the method of dynamically adjusting the motion control coefficient according to the ratio between the remaining distance and the walking distance, and then the robot walking towards the charging dock according to the dynamically adjusted motion control coefficient includes: when the remaining distance is greater than the preset distance threshold, detecting in real time the distance ratio range in which the ratio between the remaining distance and the walking distance is located; wherein, the walking distance is greater than the preset distance threshold; the walking distance is equal to the length of the preset recharge trajectory or the actual walking distance of the robot's wheels measured in real time by the sensor; when the ratio between the remaining distance and the walking distance is greater than or equal to the first preset distance ratio, maintaining the speed proportionality factor at the maximum value so that the robot walks towards the charging dock at the maximum walking speed allowed, and reducing the proportionality coefficient to reduce the sensitivity, and increasing the differential coefficient to enhance the oscillation suppression; then, the robot controls the driving motor inside it to operate according to the currently maintained speed proportionality factor, the reduced proportionality coefficient, and the increased differential coefficient; when the ratio between the remaining distance and the walking distance is greater than the second preset distance ratio and less than the first preset distance ratio, controlling the speed proportionality factor to decay linearly, and controlling the proportionality coefficient to return to its initial value, and reducing the integral coefficient to weaken the integral effect; then, the robot controls the driving motor inside it to operate according to the linearly decayed speed proportionality factor, the restored proportionality coefficient, and the reduced integral coefficient; when the ratio between the remaining distance and the walking distance is less than or equal to the second preset distance ratio, controlling the speed proportionality factor to decay exponentially, and configuring the integral coefficient to zero to stop applying the integral effect, and reducing the differential coefficient to avoid jitter; then, the robot controls the driving motor inside it to operate according to the exponentially decayed speed proportionality factor and the reduced differential coefficient; wherein, the motion control coefficient includes the speed proportionality factor and the PID control coefficients; the PID control coefficients include the proportionality coefficient, the integral coefficient, and the differential coefficient; wherein, the first preset distance ratio is greater than the second preset distance ratio. In summary, the present application adjusts the motion control parameters in proportion in real time according to the distance ratio between the remaining distance and the walking distance, forming a robot lateral adjustment mechanism for the carpet lateral offset vector, so that in the process of the robot walking from the corrected starting position towards the charging dock, the smaller the ratio of the remaining distance to the walking distance is detected each time, the smaller the speed proportionality factor exponent is adjusted to reduce the speed, and the PID control coefficients are adaptively adjusted to avoid overcorrection resulting in the oscillation and jitter of the wheel operation. Therefore, this embodiment realizes the progressive carpet offset correction through the real-time feedback of the remaining distance, avoids drastic adjustment, ensures that the robot accurately cancels the carpet interference, and improves the robot recharge accuracy.

[0011] Further, in the step C, there are: the angle measured by the gyroscope and the distance measured by the encoder disk are used to adjust the walking direction of the robot to be parallel to the charging docking direction of the charging dock, and the nose of the robot is guided to face the connection line of a pair of charging contacts installed perpendicular to the surface of the charging dock; then, the robot walks to the charging dock along the preset charging trajectory by maintaining its walking direction parallel to the charging docking direction of the charging dock until the robot is perpendicularly docked with the charging contacts in the charging dock; wherein, the center of the charging dock is represented by the center of the connection line of a pair of charging contacts installed on the surface of the charging dock. Thus, the motion control coefficients disclosed in the above technical solution are not dynamically adjusted, preventing excessive lateral offset.

[0012] Further, the motion control coefficient further includes a steering angle compensation coefficient; when the remaining distance is less than or equal to a preset distance threshold, the adjustment of the motion control coefficients other than the steering angle compensation coefficient is stopped, and the walking direction of the robot is controlled to remain parallel to the charging docking direction of the charging dock by increasing the steering angle compensation coefficient, so that the robot maintains a straight walk along the preset charging trajectory during the process of walking to the charging dock at different speeds, forming the adaptability of the robot to carpets of different materials.

[0013] A chip is used to store a program, which is the code corresponding to the walking control method, to control the robot to walk on the carpet surface and return to the charging dock for docking and charging. The chip executes steps A to C, calculates the reverse compensation vector according to the carpet lateral offset vector generated by the rotation of the robot, and then uses the reverse compensation vector to compensate the current position of the robot, so that the robot rotates by a sufficient angle and is in front of the charging dock before starting to walk towards the charging dock from the compensated position (corrected starting position), thus completing the compensation of the offset amount at the charging starting point before docking and charging and reducing the burden of dynamic adjustment; starting from the compensation result of the reverse compensation vector for the current position of the robot, the motion control coefficients are dynamically adjusted in real time, gradually suppressing the offset error of the robot on the carpet surface, meeting the constraints of the fuselage offset amount and the nose pointing, and being adaptable to various different carpets, with universality; avoiding violent correction actions (such as frequent sudden stops or turns) caused by continuous interference of the carpet during the process of walking towards the charging dock, and thus realizing smooth pose adjustment of the robot from the corrected starting position to the charging dock, and the robot can still reach the charging dock with high precision on the carpet affected by fluff.

[0014] A robot, which is a robot that walks on the surface of a carpet. The robot is built-in with the chip to walk on the carpet surface to a charging dock for docking and charging by executing the walking control method. By executing step A, the robot calculates a reverse compensation vector based on the lateral offset vector of the carpet generated by its rotation, and then uses the reverse compensation vector to compensate the current position of the robot, so that the robot rotates by a sufficient angle and is in the position directly in front of the charging dock before starting to walk towards the charging dock from the compensated position (corrected starting position). Thus, before docking and charging, the charging starting point is compensated for the offset amount, reducing the burden of dynamic adjustment, avoiding violent correction actions (such as frequent sudden stops or turns) caused by continuous interference of the carpet during the process of walking towards the charging dock, and improving the charging accuracy and the success rate of docking and charging. Then, by executing step B and step C, starting from the compensation result of the reverse compensation vector for the current position of the robot in step A, the motion control coefficient is dynamically adjusted in real time, gradually suppressing the offset error of the robot on the carpet surface, meeting the constraints of the fuselage offset amount and the nose pointing, and being adaptable to various different blankets to form multi-terrain adaptive control; furthermore, the posture adjustment of the robot from the corrected starting position to the charging dock is smooth, and the robot can still reach the charging dock with high precision on the carpet affected by fluff. Description of the Drawings

[0015] Figure 1 It is a flowchart showing a method for controlling the walking of a robot on a carpet disclosed in an embodiment of the present application. Detailed Embodiments

[0016] Next, the technical solutions in the embodiments of the present application will be described in detail with reference to the drawings in the embodiments of the present application. Combining the drawings and the description of the specific embodiments of the present application can better understand the details of the present application. However, the specific embodiments of the present application described herein are only for the purpose of explaining the present application and cannot be understood in any way as a limitation of the present application. Under the teaching of the present application, those skilled in the art can conceive any possible variations based on the present application, and these should be regarded as belonging to the scope of the present application. For those of ordinary skill in the art, the specific meanings of the above terms can be understood according to the specific circumstances. The terms "vertical", "horizontal", "up", "down", "left", "right" and similar expressions used herein are only for the purpose of illustration and do not represent the only implementation.

[0017] When the robot moves on the carpet, uneven carpet friction or fluff may cause the actual walking trajectory of the robot to deviate from the pre-planned trajectory. If no compensation measures are taken, when the robot rotates or moves on the carpet, due to uneven carpet friction or fluff, the rotation center may shift, exacerbating the misjudgment of positioning caused by carpet friction. In order to address the unexpected position deviation caused by external interference during the process of the robot returning to the charging dock for charging on the carpet surface, this application discloses a walking control method for the robot. The walking control method is applicable to the robot rotating and retreating from a starting position for returning to the charging dock on the carpet surface and docking with the charging dock for charging. By executing the walking control method, the starting position for returning to the charging dock and the walking poses on the return path are corrected in real time to systematically offset the carpet interference. As Figure 1 shown, the walking control method includes the following steps: Step A: The robot calculates the carpet lateral offset vector by rotating on the carpet surface, and then calculates the reverse compensation vector based on the carpet lateral offset vector; then the current position of the robot is offset using the reverse compensation vector to obtain the corrected starting position; then step B is executed; wherein, the carpet lateral offset vector is perpendicular to the return docking direction of the charging dock. It can be understood that after the robot starts the return charging mode, step A is executed at a starting position for returning to the charging dock. When the robot starts the return charging mode, it may be located in the return docking direction of the charging dock relative to the charging dock, but in order to offset the interference of the carpet offset, it is necessary to calculate the reverse compensation vector and compensate for the corrected starting position.

[0018] For carpets with three different fluff densities (short fluff, medium fluff, long fluff), the carpet lateral offset vector is calculated. Then, the robot is controlled to rotate multiple times on the carpet surface. The higher the fluff density, the more times the robot needs to be controlled to rotate on the corresponding carpet surface to collect more positioning data (including measuring multiple sets of pose information such as the walking distance and rotation angle of the wheels); based on this, the carpet lateral offset vector generated by each rotation is calculated, and the reverse compensation vector for the corresponding carpet surface is calculated according to the average value information of the carpet lateral offset vector generated by each rotation.

[0019] When actually applied to the recharging operation, after the robot starts the recharging process, it is exactly located at an initial recharging starting point, facing the charging dock. However, it needs to return to the charging dock for charging while being affected by the carpet on the carpet surface. To counteract the carpet interference, step A is first executed. The robot rotates by the same angle successively on the carpet at a fixed wheelbase (for example, 200 mm), that is, rotates twice by the same angle. Each rotation records the walking distances of the left and right wheels through the encoder and the rotation angle measured by the gyroscope. Combining with the wheelbase, the real-time position coordinates of the robot are calculated, and then the offset vector caused by the uneven carpet friction is calculated. Combining with the coordinates of the charging dock, the influence component of the carpet on the path direction of the robot walking back to the charging dock in the vertical direction is calculated, that is, the carpet lateral offset vector. Among them, the path direction of the robot walking back to the charging dock is parallel to the recharging docking direction of the charging dock. Schematically, if the robot as a whole moves 30 mm to the left after one rotation, the carpet lateral offset vector indicates: lateral offset -30 mm and longitudinal offset 0 mm. The carpet lateral offset vector is used as the influence component of the carpet on the path direction of the robot walking back to the charging dock in the vertical direction, and the overall offset vector of the carpet on the robot walking can be fed back to the controller in real time through positioning sensors (such as laser sensors, cameras, encoders, gyroscopes, etc.). Then the robot calculates the reverse compensation vector according to the carpet lateral offset vector generated by each rotation. Here, the reverse compensation vector is obtained by averaging the carpet lateral offset vectors generated by each rotation, eliminating the accidental error of a single rotation and improving the accuracy of the offset calculation.

[0020] Preferably, the operation logic of the two rotations: the first rotation (right turn 90 degrees), record the lateral offset amount generated by the carpet interference (the scalar of the carpet lateral offset vector); the second rotation (left turn 90 degrees), also record the lateral offset amount generated by the carpet interference (the scalar of the carpet lateral offset vector). At this time, the two rotation directions are opposite, forming a symmetric rotation operation; further calculate half of the average lateral offset amount as the scalar of the reverse compensation vector. Since a single rotation may introduce errors due to the initial pose of the robot or the local characteristics of the carpet, the two symmetric rotations can separate the systematic component and random noise of the carpet interference and improve the robustness.

[0021] Or, the first rotation (right turn 90 degrees), record the lateral offset amount generated by the carpet interference (the scalar of the carpet lateral offset vector); the second rotation (right turn 90 degrees), also record the lateral offset amount generated by the carpet interference (the scalar of the carpet lateral offset vector). At this time, the two rotation directions are the same. Further calculate half of the average lateral offset amount as the scalar of the reverse compensation vector to eliminate the accidental error of a single rotation.

[0022] Since carpet interference persists during the process of the robot returning to the charging dock, compensating for all offset amounts (average lateral offset) may result in overcorrection. After compensating for half of the average lateral offset, the remaining deviation can be gradually eliminated through the dynamic adjustment in step B, ensuring that the robot's charging return path gradually converges.

[0023] Based on this, the current position of the robot is offset using a reverse compensation vector to obtain a corrected starting position. Here, the current position of the robot can be the position after the robot rotates, which is near a pre-set charging return starting position (a position point in the charging return docking direction relative to the charging dock), to complete the correction of the charging return starting position; among them, the corrected starting position is in the charging return docking direction relative to the charging dock, adjusting the robot's charging return starting position to directly in front of the charging dock, which is equivalent to adjusting the robot's initial pose in step A based on the reverse compensation vector, and then triggering the robot to walk half of the aforementioned average lateral offset in the direction indicated by the reverse compensation vector from the current position to approach the corrected starting position. Of course, the current position may also be the corrected starting position, such that after the robot rotates, it is directly in front of the charging dock. If the robot can walk to the corrected starting position, it will be directly opposite the center of the charging dock, thereby making the path for the robot to return to the charging dock from the corrected starting position closer to the theoretical trajectory and reducing the subsequent correction requirements.

[0024] Schematically, if the component in the direction perpendicular to the charging return docking direction (i.e., the average lateral offset) calculated by the robot is -30 mm, then before the robot starts walking towards the charging dock from the current position, half of the average lateral offset (equal to 15 mm) is compensated in the reverse direction of this component. Without this step, the robot will generate drastic adjustment actions due to the need to correct the offset of the charging return starting point, and the carpet space for walking towards the charging dock is limited and there is carpet interference, making it difficult to succeed in the correction.

[0025] Step B: The robot starts walking towards the charging dock from the corrected starting position, measures the distance from the current position of the robot to the center of the charging dock in real time and marks the measured distance as the remaining distance. At the same time, the motion control coefficient is dynamically adjusted according to the ratio between the remaining distance and the walking distance, and then the robot walks towards the charging dock according to the dynamically adjusted motion control coefficient to offset the offset applied to the robot by the carpet; then step C is executed. For the convenience of calculation, the distance from the current position of the robot to the center of the charging dock is regarded as the straight-line distance between the center of the robot's body and the center position between the charging contacts of the charging dock.

[0026] If there is continuous carpet interference during the process of the robot walking from the corrected starting position towards the charging dock, even when the corrected starting position has been compensated for and the robot has walked near the corrected starting position, the motion control coefficient is dynamically adjusted in real-time according to the ratio between the remaining distance and the walking distance, gradually eliminating the offset error imposed by the carpet, ensuring that the actual walking path converges to the preset recharging trajectory, and offsetting the influence of carpet friction interference on the motion trajectory.

[0027] The process of the robot walking from the corrected starting position towards the charging dock can be a process of the robot moving backward. The reason is that the charging electrodes of the robot are installed at the end of the body, and when the end of the body walks towards the direction close to the charging dock, it is actually the robot moving backward. Only when the head of the robot walks towards the direction close to the charging dock is it understood as the robot moving forward.

[0028] During the process of the robot starting to walk towards the charging dock, the remaining distance and the determined walking distance are monitored in real-time. Schematically, if the currently detected remaining distance is 300 mm and the walking distance is 500 mm, then the ratio between the remaining distance and the walking distance is 60%. The controller of the robot adjusts the motion control coefficient according to this ratio (for example, adjusts the relevant PID control coefficient from 1.0 to 0.6) to gradually offset the carpet interference. The motion control coefficient includes a speed proportionality factor, an acceleration attenuation factor, a steering angle compensation coefficient, a proportional coefficient, an integral coefficient, a differential coefficient, etc. Among them, the speed proportionality factor is used to represent the mapping coefficient between the speed of the robot walking towards the charging dock and the remaining distance; the acceleration attenuation factor is used to reduce the acceleration when the robot approaches the charging dock to avoid overshoot (for example: when the remaining distance is less than 100 mm, the acceleration is limited to 0.1 m / s²); the steering angle compensation coefficient is used to dynamically correct the deflection angle of the robot's head (for example: the shorter the remaining distance, the higher the steering compensation sensitivity); the proportional coefficient is used to represent the linear response weight of the error of the remaining distance, and the proportional coefficient is lowered as the ratio between the remaining distance and the walking distance increases; the integral coefficient is reset to zero when the robot approaches the charging dock (for example, when the aforementioned ratio is less than 20%) to prevent integral saturation from causing overshoot; the differential coefficient is used to enhance the differential effect (suppress sudden speed changes) when the ratio is greater than 50% and weaken it when the ratio is less than 30% (to avoid high-frequency jitter). Thus, the speed or gain is adjusted according to the difference in the remaining distance to improve accuracy and reduce overshoot.

[0029] When implementing the above walking control method on an actual carpet surface, the robot dynamically adjusts the motion control coefficient according to the carpet material parameters and the real-time walking speed. Specifically, when walking on carpets with different pile densities (short pile, medium pile, long pile), for example, when performing step A on a short-pile carpet surface, the robot can walk to the correction starting position and directly walk towards the charging dock along a straight trajectory, achieving a successful recharge in one attempt; when performing step B on a medium-pile carpet surface, the range for dynamically adjusting the motion control coefficient is expanded to 0.3 - 1.2 to improve the recharge success rate of the robot; when walking on a long-pile carpet surface, it is necessary to calculate the average offset vector of the carpet lateral offset vector by increasing the number of rotations to obtain a more appropriate reverse compensation vector, and then dynamically adjust more motion control coefficients to make the actual walking path of the robot closer to the preset recharge trajectory (theoretical trajectory), reducing subsequent correction requirements and significantly improving the recharge success rate.

[0030] Step C: When the remaining distance is less than or equal to the preset distance threshold, adjust the walking direction of the robot to be parallel to the recharge docking direction of the charging dock, and then the robot walks towards the charging dock while keeping its walking direction parallel to the recharge docking direction of the charging dock until the robot docks with the charging contacts in the charging dock; in the charging dock, the recharge docking direction of the charging dock is perpendicular to the installation surface where the charging contacts of the charging dock are located.

[0031] When the remaining distance is less than or equal to the preset distance threshold, stop dynamically adjusting the motion control coefficient according to the ratio between the remaining distance and the walking distance, and do not adjust the carpet lateral offset. Only correct the head pointing through gyroscope and encoder data to ensure that the robot body is perpendicular to the charging dock (for example, the error is less than ±1 degree). The preset distance threshold is preferably 15 mm. In step C, when the robot is relatively close to the charging dock, adjusting the walking direction of the robot to correct the head pointing angle can be understood as finely adjusting the yaw angle of the robot to align with the charging receiving end of the charging dock, enabling the robot to walk to the preset recharge trajectory according to the corrected head pointing angle, that is, the robot walking trajectory gradually converges to the preset recharge trajectory, and then completes the last section of backward movement at a low speed (such as 10 mm / s) to avoid deviation caused by continuous interference, and finally realizes straight walking to the charging dock for docking and charging of the charging contacts, ensuring the robot accurately seats on the dock.

[0032] In summary, by performing Step A, it is possible to calculate the reverse compensation vector based on the lateral offset vector of the carpet generated by rotation, and then use the reverse compensation vector to compensate the current position of the robot, so that the robot rotates by a sufficient angle and is in front of the charging dock before starting to walk towards the charging dock from the compensated position (corrected starting position), thereby completing the compensation for the offset amount at the recharge starting point before docking charging, reducing the burden of dynamic adjustment, avoiding drastic correction actions (such as frequent sudden stops or turns) caused by continuous interference of the carpet during the process of walking towards the charging dock, and improving the recharge accuracy and the success rate of docking charging: By performing Step B and Step C, starting from the compensation result of the reverse compensation vector of the robot's current position in Step A, the motion control coefficient is dynamically adjusted in real time to gradually suppress the offset error of the robot on the carpet surface, avoid oscillations caused by over-adjustment, meet the constraints of the fuselage offset and the nose pointing, and can be adapted to various different carpets, having universality; furthermore, the pose adjustment of the robot from the corrected starting position to walking towards the charging dock is smooth, and the robot can still reach the charging dock with high precision on the carpet affected by fluff.

[0033] As an embodiment, in the above Step A, the method for the robot to calculate the lateral offset vector of the carpet by rotation on the carpet surface and then calculate the reverse compensation vector based on the lateral offset vector of the carpet includes: the robot is configured to start walking towards the charging dock. The initial position of the robot is in the recharge docking direction of the charging dock relative to the charging dock, but it needs to walk on the carpet surface towards the charging dock. When the robot enters the carpet surface, the offset components caused by the relative movement of the carpet are detected by a gyroscope, an odometer, and a vision sensor to generate a carpet offset vector. Therefore, it is necessary to compensate the walking position of the robot in real time. First, the robot records its real-time position coordinates as the initial position coordinates through sensors (such as encoders and laser sensors). Then, the robot rotates in place for one week with a fixed wheelbase on the carpet surface. At the same time, the actual walking distances of the wheels during the one-week rotation in place are measured by sensors (such as encoders and laser sensors), and the measured actual walking distances are configured as the walking distances described in Step B; the theoretical walking distances of the wheels during the one-week rotation in place can also be calculated according to the wheelbase. The theoretical walking distance of the wheel is equal to the average of the circumferences of the left-wheel trajectory and the right-wheel trajectory. The circumferences of the left-wheel trajectory and the right-wheel trajectory are both equal to the product of half of the wheelbase and pi; then, the difference between the actual walking distance and the theoretical walking distance is configured as the carpet reference offset.

[0034] After the robot rotates in place for a full circle, its real-time position coordinates are recorded by sensors as the position coordinates after rotation in place. Then, the carpet offset vector is calculated by combining the position coordinates after rotation in place and the initial position coordinates, that is, the vector pointing from the initial position coordinates to the position coordinates after rotation in place is calculated as the carpet offset vector. Then, the component of the carpet offset vector in the direction perpendicular to the charging dock's recharging docking direction is calculated to obtain the carpet influence offset vector. Then, the carpet influence offset vector is negated to obtain the reverse compensation vector, so as to calculate the lateral (referring to the direction perpendicular to the charging dock's recharging docking direction) offset vector caused by uneven carpet friction through a full rotation.

[0035] In this embodiment, the scalar of the carpet influence offset vector is equal to the projection length of the carpet reference offset amount in the direction perpendicular to the charging dock's recharging docking direction. The rotation of the robot in place on the carpet surface is that the robot rotates around its body center, and the body center is allowed to shift. After the robot rotates in place for a full circle, the body center of the robot has shifted from the initial position coordinates to the position coordinates after rotation in place. At the same time, the total offset direction exerted by the carpet on the body center is determined according to the direction of the carpet influence offset vector.

[0036] It should be noted that the rotation in place is usually achieved by the reverse rotation of the two wheels on both sides of the robot, which can be regarded as a fixed-point steering of the body center point through the speed difference between the left and right wheels. Due to the uneven friction of the carpet on the robot during the rotation process, the position of the robot will shift due to the rotation in place, not just the adjustment of the direction. Therefore, it is necessary to compensate the recharging starting position by calculating the reverse compensation vector to correct it near the recharging docking direction. Compared with the behavior of the robot rotating around a single wheel, the rotation in place disclosed in this application will not introduce additional position offsets. Most of the rotation process is mainly beneficial for precise direction adjustment. The rotation in place also relies more on the real-time adjustment of sensors, while rotating around a single wheel may require more compensation calculations for specific path adjustments. Regardless of the rotation method, the robot will give priority to adjusting the recharging starting position to ensure that the robot can start from the correct position after rotation and still be able to return to the charging dock along the recharging docking direction even when walking on a carpet affected by fluff.

[0037] Schematically, the robot rotates in place for one full circle (which can be measured in real time by a gyroscope to be 360 degrees). Due to uneven carpet friction, after the robot rotates around its body center for one full circle, it will deviate from the original position occupied by the body center. The body center after rotating in place for one full circle may shift 30 mm to the left. Then, in the direction perpendicular to the recharging docking direction of the charging dock (the direction perpendicular to the ideal recharging trajectory of the robot), the calculated carpet influence offset vector is expressed as (lateral: -30 mm, longitudinal: 0 mm). Among them, the positioning coordinates of the charging dock affect the setting of the recharging docking direction. For example, if the positioning coordinates of the charging dock are the origin of the world coordinate system, the recharging docking direction can be configured as the positive direction of the longitudinal axis of the world coordinate system. This carpet influence offset vector can be fed back to the controller in real time through a positioning sensor (such as a laser sensor, an inertial sensor, or a vision camera) for subsequent correction of the current position of the robot so that the central axis of the robot's body points to the recharging docking direction.

[0038] As an embodiment, in step A, the method for the robot to calculate the carpet lateral offset vector by rotating on the carpet surface and then calculate the reverse compensation vector based on the carpet lateral offset vector includes: First, the robot records its real-time position coordinates as the first initial position coordinates through a sensor. The robot rotates in place by 90 degrees on the carpet surface in the first direction. After the robot rotates in place by 90 degrees in the first direction, it records its real-time position coordinates as the first current position coordinates through the sensor. At this time, the robot completes the first 90-degree rotation on the carpet surface. Then, in combination with the first current position coordinates and the first initial position coordinates, the first carpet offset vector is calculated. Specifically, the offset vector pointing from the first initial position coordinates to the first current position coordinates is calculated, including calculating the square root of the coordinate difference between the first current position coordinates and the first initial position coordinates and the direction of the first carpet offset vector. Then, the component of the first carpet offset vector in the direction perpendicular to the recharging docking direction of the charging dock is calculated to obtain the first carpet lateral offset vector. Then, the offset vector generated in the direction perpendicular to the recharging docking direction due to the carpet influence is recorded, specifically including the projection distance of the first carpet offset vector in the direction perpendicular to the recharging docking direction of the charging dock and the lateral offset direction of the first carpet lateral offset vector relative to the charging dock.

[0039] Then, the robot rotates 90 degrees in place in the second direction on the carpet surface. After the robot rotates 90 degrees in place in the second direction, it records its real-time position coordinates as the second current position coordinates through the sensor. At this time, the robot completes the second 90-degree rotation on the carpet surface. Then, the second carpet offset vector is calculated by combining the second current position coordinates and the first current position coordinates. Specifically, the offset vector pointing from the second current position coordinates to the first current position coordinates is calculated, including calculating the square root of the coordinate difference between the second current position coordinates and the first current position coordinates and the direction of the second carpet offset vector. Then, the component of the second carpet offset vector in the perpendicular direction to the charging docking direction of the charging dock is calculated to obtain the second carpet lateral offset vector, which specifically includes the projection distance of the second carpet offset vector in the perpendicular direction to the charging docking direction of the charging dock and the lateral offset direction of the second carpet lateral offset vector relative to the charging dock. Thus, part of the carpet offset amount is offset by two reverse rotations.

[0040] Then, the average offset vector is calculated for the first carpet lateral offset vector and the second carpet lateral offset vector, and then half of the calculated average offset vector is inverted to obtain the reverse compensation vector. It should be noted that the reverse compensation vector, as the offset compensation amount, only compensates for half of the average offset vector of the two carpet lateral offset vectors, and the remaining offset amount can be gradually eliminated by dynamically adjusting the motion control coefficient in subsequent step B, ensuring that the actual walking path of the guided robot converges to the charging docking direction and reducing the continuous interference of the carpet.

[0041] It should be noted that the first direction and the second direction are opposite directions; the carpet lateral offset vector includes the first carpet lateral offset vector and the second carpet lateral offset vector; therefore, the robot rotating 90 degrees in place in the first direction and the robot rotating 90 degrees in place in the second direction successively constitute two symmetric rotation operations. Compared with a single rotation, the present application can extract the systematic component and random noise of the carpet interference and improve the robustness.

[0042] Schematically, the robot first rotates 90 degrees clockwise in place on the carpet surface, and then rotates 90 degrees counterclockwise in place, continuously rotating in alternating directions twice in this way. Or, first, the robot turns left 90 degrees in place and deviates 10 mm to the right due to uneven carpet friction (representing the scalar of the first carpet lateral offset vector, where the first carpet lateral offset vector is positive when horizontally to the right and negative when horizontally to the left); then, the robot turns right 90 degrees in place and deviates 6 mm to the left due to uneven carpet friction (representing the scalar of the second carpet lateral offset vector); then calculate the average value of the scalar of the first carpet lateral offset vector and the scalar of the second carpet lateral offset vector, and the scalar of the average offset vector is equal to (10 - 6) / 2 = 2. Then, take the negative of half of the calculated average offset vector, and correspondingly, the scalar of the calculated reverse compensation vector is equal to 1. The direction of the reverse compensation vector is horizontally to the left. Subsequently, this reverse compensation vector can be used to offset the robot's current recharge starting position by 1 mm to the left.

[0043] In summary, in this embodiment, the carpet lateral offset vector generated by carpet interference is measured and calculated through two 90-degree rotations in opposite directions, and then the reverse compensation vector is calculated by taking the average value, so that the reverse compensation vector is used to reverse-compensate half of the average offset vector; moreover, the two 90-degree rotations in opposite directions, as symmetric rotation operations, can separate the systematic component and random noise of the carpet interference and cancel the systematic error; therefore, by compensating half of the average offset vector subsequently, it is ensured that the robot reduces the cumulative error caused by carpet interference during the process of walking towards the charging dock, improving the recharge accuracy and stability of the robot in a complex carpet environment.

[0044] As an embodiment, in step A, the method for the robot to calculate the carpet lateral offset vector by rotating on the carpet surface and then calculate the reverse compensation vector according to the carpet lateral offset vector includes: First, the robot records its real-time position coordinates as the first initial position coordinates through sensors. The robot rotates 90 degrees in place in the preset clockwise direction on the carpet surface. After the robot rotates 90 degrees in place in the preset clockwise direction, it records its real-time position coordinates as the first current position coordinates through sensors. At this time, the robot completes the first 90-degree rotation on the carpet surface. Then, by combining the first current position coordinates with the first initial position coordinates, the first carpet offset vector is calculated. Specifically, the offset vector pointing from the first initial position coordinates to the first current position coordinates is calculated, including calculating the square root of the coordinate difference between the first current position coordinates and the first initial position coordinates and the direction of the first carpet offset vector. Then, the component of the first carpet offset vector in the direction perpendicular to the recharge docking direction of the charging dock is calculated to obtain the first carpet lateral offset vector, thereby recording the offset vector generated in the direction perpendicular to the recharge docking direction due to the influence of the carpet. Specifically, it includes the projection distance of the first carpet offset vector in the direction perpendicular to the recharge docking direction of the charging dock and the lateral offset direction of the first carpet lateral offset vector relative to the charging dock.

[0045] Then, the robot rotates 90 degrees in place in the preset clockwise direction on the carpet surface. After the robot rotates 90 degrees in place in the preset clockwise direction, it records its real-time position coordinates as the second current position coordinates through sensors. At this time, the robot continuously completes two 90-degree rotations in the same direction on the carpet surface, causing the robot to turn 180 degrees at the second current position coordinates relative to its position at the first initial position coordinates. Then, by combining the second current position coordinates with the first current position coordinates, the second carpet offset vector is calculated. Specifically, the offset vector pointing from the second current position coordinates to the first current position coordinates is calculated, including calculating the square root of the coordinate difference between the second current position coordinates and the first current position coordinates and the direction of the second carpet offset vector (such as the included angle formed by the second carpet offset vector relative to the recharge docking direction). Then, the component of the second carpet offset vector in the direction perpendicular to the recharge docking direction of the charging dock is calculated to obtain the second carpet lateral offset vector, specifically including the projection distance of the second carpet offset vector in the direction perpendicular to the recharge docking direction of the charging dock and the lateral offset direction of the second carpet lateral offset vector relative to the charging dock. Thus, two carpet lateral offset vectors are calculated through two same-direction rotations, each rotating 90 degrees in place, with a total rotation of 180 degrees, adjusting the nose direction of the robot so that it can start walking backward to the charging dock.

[0046] Then, calculate the average offset vector from the first carpet lateral offset vector and the second carpet lateral offset vector, and then take the negative of half of the calculated average offset vector to obtain the reverse compensation vector. At the same time, record the reverse compensation vector obtained this time for correcting the starting point (the recharge starting position) of the preset recharge trajectory. It should be noted that the reverse compensation vector, as the offset compensation amount, only compensates for half of the average offset vector of the two carpet lateral offset vectors, and the remaining offset can be gradually eliminated by dynamically adjusting the motion control coefficient in subsequent step B. Whether the robot moves forward or backward relative to the charging dock, it ensures that the actual walking path of the robot converges to the recharge docking direction, reducing the continuous interference of the carpet.

[0047] It should be noted that the preset clockwise direction is either the clockwise direction or the counterclockwise direction; the carpet lateral offset vector includes the first carpet lateral offset vector and the second carpet lateral offset vector. Therefore, the robot makes two consecutive 90-degree rotations in place in the clockwise direction or the counterclockwise direction, constituting two rotation operations in the same direction and with the same angle, canceling out the accidental errors caused by a single rotation.

[0048] Schematically, the robot first rotates 90 degrees clockwise in place on the carpet surface, and then rotates 90 degrees clockwise in place. In this way, it rotates continuously twice in the preset clockwise direction. Among them, when the robot rotates 90 degrees clockwise in place for the first time, it is offset 10 mm to the left due to uneven carpet friction (representing the scalar of the first carpet lateral offset vector, with the first carpet lateral offset vector being positive when it is horizontally to the right and negative when it is horizontally to the left); when the robot rotates 90 degrees clockwise in place for the first time, it is offset 6 mm to the left due to uneven carpet friction (representing the scalar of the second carpet lateral offset vector); then calculate the average of the scalar of the first carpet lateral offset vector and the scalar of the second carpet lateral offset vector, and the scalar of the average offset vector is equal to (-10 - 6) / 2 = -8. Then take the negative of half of the calculated average offset vector, and correspondingly, the scalar of the calculated reverse compensation vector is equal to 4, and the direction of the reverse compensation vector is horizontally to the left. Subsequently, this reverse compensation vector can be used to offset the recharge starting position where the robot is currently located 4 mm to the left.

[0049] In summary, in this embodiment, two 90-degree rotations in the same direction are used to measure and calculate the carpet lateral offset vector generated by carpet interference, and then the reverse compensation vector is calculated by taking the average value. The scalar of the reverse compensation vector calculated in this embodiment (related to the compensation amount) is greater than the scalar of the reverse compensation vector calculated under two 90-degree rotations in opposite directions disclosed in the previous embodiment. It can not only eliminate the accidental errors of a single rotation, but also be used to offset the recharge starting position with a relatively large reverse compensation amount in the subsequent process, compensating for most of the accumulated errors in advance and improving the accuracy of the robot's recharge docking with the charging dock.

[0050] Based on any of the foregoing embodiments, in step A, the method of offsetting the current position of the robot by using the reverse compensation vector to obtain a corrected starting position such that the corrected starting position is in the recharge docking direction relative to the center of the charging dock includes: controlling the current position of the robot to offset by the reverse compensation amount along the compensation direction to obtain the corrected starting position. Among them, the position of the robot before rotation is also in the recharge docking direction. After rotation, the current position of the robot is not in the recharge docking direction. Then, the reverse compensation vector is used for offset compensation to obtain the corrected starting position, which becomes the compensated position in the ideal state. However, due to the continuous offset caused by carpet interference, the robot needs to perform more pose adjustments to reach the corrected starting position; the corrected starting position is in the recharge docking direction relative to the center of the charging dock, which is equivalent to being on the central axis of the charging dock. The adjusted corrected starting position is actively achieved through an algorithm, rather than the passively offset position of the robot.

[0051] Then, the robot starts walking from the current position according to the reverse compensation vector, so that the robot walks to the corrected starting position. The robot faces the charging dock at the corrected starting position, and the robot walks into the preset recharge trajectory. Among them, the corrected starting position is the starting point of the preset recharge trajectory, the center of the charging dock is the end point of the preset recharge trajectory, and the recharge docking direction is parallel to the trend of the preset recharge trajectory; if the robot can walk to the corrected starting position and face the center of the charging dock, and then walks straight along the recharge docking direction from the corrected starting position, the path for the robot to return to the charging dock from the corrected starting position will be closer to this theoretical trajectory of the preset recharge trajectory, reducing subsequent correction requirements and accelerating docking with the charging dock for charging. Of course, this is the ideal recharge state, and subsequent steps B and C still need to be executed to adjust the pose of the robot to overcome the interference caused by the carpet.

[0052] It should be noted that the current position includes the position where the robot is located after rotation; the current position can be the position where the robot is located after rotation, which can represent the uncompensated recharge starting position that the robot walks to after rotation in step A. Therefore, the current position can also represent the recharge starting position that the robot can walk to before using the reverse compensation vector for offset, which is equivalent to the recharge starting position set without introducing carpet interference.

[0053] Different from the corrected starting position, the current position is the actual position after rotation, and the current position includes the original offset caused by carpet interference. The corrected starting position is the ideal starting position corrected based on the reverse compensation vector, which is the key position applicable to different carpet types (short hair, medium hair, long hair) to improve the recharge accuracy of the robot.

[0054] In summary, in the present application, the reverse compensation vector is used to offset the position of the robot after rotation, and the robot is controlled to actively walk to the new recharge starting position according to the reverse compensation vector (due to the continuous existence of carpet interference, it is a position approaching the corrected starting position) instead of being forced to offset by the carpet at the current position of the robot, at least reducing the cumulative error caused by carpet interference, thereby improving the recharge accuracy and stability in complex environments (such as carpets).

[0055] As an embodiment, in the step B, the method of dynamically adjusting the motion control coefficient according to the ratio between the remaining distance and the walking distance, and then the robot walks towards the charging base according to the dynamically adjusted motion control coefficient includes: When performing step B, the robot starts to walk towards the charging base from the corrected starting position or within its error range, and the ratio between the remaining distance and the walking distance is detected in real time. Among them, the remaining distance disclosed in this embodiment is the core dynamic parameter in the robot recharge control, which is directly related to the response intensity and path accuracy of the robot recharge control.

[0056] In the case where the remaining distance is greater than the preset distance threshold, the distance ratio range in which the ratio between the remaining distance and the walking distance is located is detected in real time; among them, the walking distance is greater than the preset distance threshold; the walking distance is equal to the length of the preset recharge trajectory or the actual walking distance of the robot's wheels measured by the sensor in real time. During the process of the robot walking from the corrected starting position towards the charging base, if the walking distance is equal to the length of the preset recharge trajectory, the walking distance remains unchanged, while the remaining distance decreases; if the walking distance is the actual walking distance of the robot's wheels measured by the sensor in real time, the walking distance increases, while the remaining distance decreases. So that the ratio between the remaining distance and the walking distance decreases during the process of the robot walking towards the charging base. In this embodiment, dynamically adjusting the motion control coefficient in real time according to the distance ratio range in which the ratio between the remaining distance and the walking distance is located is equivalent to adjusting the lateral motion of the robot caused by carpet interference in real time.

[0057] When the ratio between the remaining distance and the walking distance (e.g., 80%) is greater than or equal to the first preset distance ratio (e.g., 70%), keep the speed proportionality factor at the maximum value (e.g., keep it as 1) so that the robot walks towards the charging dock at the maximum allowable walking speed, and lower the proportionality coefficient to reduce the sensitivity. When dynamically adjusting the proportionality coefficient, it usually decreases as the ratio of the remaining distance increases to avoid severe initial oscillations; and increase the differential coefficient to enhance oscillation suppression, that is, suppress speed mutations by enhancing the differential effect. Then, the robot controls the drive motors inside it (motors for controlling the rotation of the left and right wheels) to operate according to the currently maintained speed proportionality factor, the lowered proportionality coefficient, and the increased differential coefficient. Currently, it is regarded as entering the rough adjustment stage (allowable error is less than or equal to 5% of the walking distance), then adjust the wheel speed to offset the offset applied by the carpet in real time. Especially when the remaining distance is large, let the robot quickly correct the lateral offset vector of the carpet and adopt a higher speed or a larger gain to quickly approach the charging dock, which also forms the adaptability of the robot to carpets of different materials.

[0058] When the ratio between the remaining distance and the walking distance (e.g., 40%) is greater than the second preset distance ratio (e.g., 30%) and less than the first preset distance ratio (e.g., 70%), control the speed proportionality factor to decay linearly. The proportionality coefficient can be controlled to decay by 50% according to a linear rule; and control the proportionality coefficient to recover to its initial value; and lower the integral coefficient. The integral coefficient begins to take effect on the motor regulation, only accumulating small errors to weaken the integral effect and reduce the cumulative deviation caused by the carpet resistance. Then, the robot controls the drive motors inside it to operate according to the linearly decayed speed proportionality factor, the recovered proportionality coefficient, and the lowered integral coefficient. Currently, it is regarded as entering the transition stage (allowable error is less than or equal to 3% of the walking distance), then adjust the wheel speed to offset the offset applied by the carpet in real time, forming the adaptability of the robot to carpets of different materials.

[0059] When the ratio between the remaining distance and the traveling distance (e.g., 20%) is less than or equal to the second preset distance ratio (e.g., 30%), control the speed proportionality factor to decay exponentially, and configure the integral coefficient to zero to stop applying the integral effect. Adjust the integral coefficient to gradually become zero when approaching the charging dock (the stage where the ratio between the remaining distance and the traveling distance is less than or equal to 20%) to prevent integral saturation from causing overshoot, and reduce the differential coefficient to avoid jitter. Then, the robot controls the drive motor inside it to operate according to the exponentially decayed speed proportionality factor and the reduced differential coefficient. Currently, it is regarded as entering the fine-tuning stage (the allowable error is less than or equal to 1% of the traveling distance), and then adjust the rotational speed of the wheels to offset the offset applied by the carpet in real time. Especially when the remaining distance is small, let the robot decelerate to correct the lateral offset vector of the carpet and use a smaller motion control coefficient to adjust to avoid over-adjustment causing oscillation. Finally, adjust the rotational speed of the wheels to offset the offset applied by the carpet in real time, which also forms the adaptability of the robot to carpets of different materials.

[0060] It should be noted that the aforementioned motion control coefficient includes the speed proportionality factor and the PID control coefficient; the PID control coefficient includes the proportional coefficient, the integral coefficient, and the differential coefficient; among them, the first preset distance ratio is greater than the second preset distance ratio.

[0061] The speed proportionality factor is used to represent the mapping coefficient between the traveling speed of the robot and the remaining distance. The proportional coefficient is used to represent the linear response weight of the remaining distance error, which usually decreases as the remaining distance ratio increases (to avoid severe oscillation in the initial stage). The integral coefficient is used to gradually become zero when the robot approaches the charging dock (the aforementioned ratio is less than 20%) to prevent integral saturation from causing overshoot. The differential coefficient is used to enhance the differential effect (suppress speed mutation) when the aforementioned ratio is greater than 50%, and weaken it (avoid high-frequency jitter) when the aforementioned ratio is less than 30%. Therefore, the aforementioned motion control coefficient covers speed and PID parameters, and its dynamic adjustment follows a piecewise non-linear rule to balance efficiency and accuracy.

[0062] When the robot needs to adjust the speed of a drive wheel, it needs to input different duty cycle adjustment signals to the motor of that drive wheel. Therefore, based on the PID control algorithm, in order to achieve a better adjustment effect, it is necessary to pre-acquire the control speed and sampling speed of the drive wheels of the robot at the current moment and the two previous moments adjacent to the current moment. For example, obtain the control speed and sampling speed at the current moment, 1 second before the current moment, and 2 seconds before the current moment; among them, the control speed is the system output data, and the sampling speed is the data detected by the encoder disk.

[0063] Due to the uneven frictional force in the carpet environment, there is a deviation between the actual sampling speed and the control speed output by the system. Therefore, after determining the error data of the two at different times and combining the motion control coefficient, the voltage value output to the drive wheel to adjust the speed of the drive wheel can be accurately obtained. The dynamic adjustment method described in this embodiment can accurately obtain the voltage value of the motor output to the drive wheel through the PID control algorithm, with high control accuracy and good control effect.

[0064] In summary, in this embodiment, the motion control parameters are adjusted proportionally in real time according to the ratio of the remaining distance to the walking distance, forming a lateral adjustment of the robot. Thus, during the process of the robot walking from the corrected starting position towards the charging dock, the smaller the ratio of the detected remaining distance to the walking distance, the smaller the speed proportionality factor exponent is adjusted to reduce the speed, and the PID control coefficient is adaptively adjusted to avoid overcorrection resulting in wheel oscillation and jitter. Therefore, this embodiment realizes progressive carpet offset correction through real-time feedback of the remaining distance, avoids drastic adjustment, ensures that the robot accurately cancels carpet interference, and improves the robot's recharging accuracy.

[0065] Based on the above embodiment, the motion control coefficient further includes an acceleration attenuation factor to introduce the acceleration attenuation factor to participate in dynamic adjustment, forming its dynamic range, and optimizing the speed and acceleration of the robot's wheels. When the ratio of the remaining distance to the walking distance (for example, 90%) is greater than or equal to the first preset distance ratio (for example, 70%), the acceleration attenuation factor is reduced according to the first attenuation coefficient (for example, 95%) to limit the robot's rapid acceleration; when the ratio of the remaining distance to the walking distance (for example, 20%) is less than or equal to the second preset distance ratio (for example, 30%), the acceleration attenuation factor is reduced according to the second attenuation coefficient (for example, 45%) to allow gentle deceleration and avoid excessive speed adjustment; where the first attenuation coefficient is greater than the second attenuation coefficient. Thus, by setting the acceleration attenuation factor, the speeds of the left and right drive wheels of the robot are synchronously adjusted, reducing the adjustment amplitude, so that the robot gradually corrects from the current motion direction back to the recharging docking direction and continues to move in a straight line.

[0066] As an embodiment, in the step C, there are: the angle measured by the gyroscope and the distance measured by the encoder disk. The distance and the direction angle of the current position of the robot relative to the center of the charging dock can be calculated in a coordinate system with the center of the charging dock as the origin (with the recharge docking direction of the charging dock as the direction of one coordinate axis). Then, based on the direction angle of the current position of the robot relative to the center of the charging dock, the walking direction of the robot is adjusted to be parallel to the recharge docking direction of the charging dock, and the nose of the robot is guided to face the connection line of a pair of charging contacts mounted perpendicular to the surface of the charging dock. Then, the robot continues to walk towards the charging dock in the adjusted walking direction. The robot walks along the preset recharge trajectory by maintaining its walking direction parallel to the recharge docking direction of the charging dock, without dynamically adjusting the motion control coefficients disclosed in the above embodiments to prevent excessive lateral deviation. Moreover, when the remaining distance is less than or equal to the preset distance threshold, the robot will not waste too much time repeatedly adjusting its walking direction parallel to the recharge docking direction under the interference of the carpet. When necessary, the yaw angle of the robot is finely adjusted in combination with the feedback of the infrared sensor until it is aligned with the receiving end (charging contacts) of the charging dock. Until the robot is perpendicularly docked with the charging contacts in the charging dock, the robot completes the return to the dock and the docking charging. Then the robot can automatically cut off the drive power and start the charging program, and record the reverse compensation vector described in the step A and the adjusted motion control coefficients described in the step B for subsequent recharge path optimization.

[0067] It should be noted that the center of the charging dock is represented by the center of the connection line of a pair of charging contacts mounted on the surface of the charging dock, and the connection line of a pair of charging contacts mounted on the surface of the charging dock is perpendicular to the recharge docking direction. In this application, the process of the robot moving forward or backward to align with the charging contacts of the charging dock for charging is called recharge. Successful / accurate recharge requires the charging electrode of the robot to be aligned with the charging contacts (charging electrode plates) of the charging dock.

[0068] Preferably, the motion control coefficient further includes a steering angle compensation coefficient, which is used to dynamically correct the deflection angle of the robot's nose (corresponding to the walking direction of the robot) according to the carpet friction offset. For example, the shorter the remaining distance, the higher the configured steering compensation sensitivity. When the remaining distance is less than or equal to a preset distance threshold (for example, 15 mm), it is considered that the robot's motor enters the final correction stage, stops adjusting the motion control coefficients except the steering angle compensation coefficient, but triggers the steering compensation. By increasing the steering angle compensation coefficient, the walking direction of the robot is controlled to be parallel to the docking direction of the charging dock, improving the steering compensation sensitivity of the robot. However, stop the lateral adjustment by dynamically adjusting the speed ratio factor and the PID control coefficient, and only correct the nose pointing (parallel to the walking direction of the robot), so that the robot maintains a straight line walking according to the preset recharge trajectory during the process of walking to the charging dock at different speeds, ensuring that the robot is vertically docked with the charging dock subsequently, and improving the adaptability of the robot to carpets of different materials.

[0069] Based on the foregoing embodiments, the present application also discloses a chip for storing a program, where the program is the code corresponding to the walking control method disclosed in the foregoing embodiments, to control the robot to walk back to the charging dock on the carpet surface for docking and charging, that is, the program is used to control the robot to execute the walking control method. Among them, the chip prestores the initial values of the respective motion control coefficients that need to be dynamically adjusted in step B, and further stores a first preset distance ratio and a second preset distance ratio to successively divide the coarse adjustment stage, the transition stage, and the fine adjustment stage when dynamically adjusting the motion control coefficients in step B; and also defines the remaining distance and the preset distance threshold.

[0070] Therefore, by executing step A to step C, the chip calculates the reverse compensation vector according to the carpet lateral offset vector generated by the robot's rotation, and then uses the reverse compensation vector to compensate the current position of the robot, so that the robot rotates by a sufficient angle and is in front of the charging dock before starting to walk towards the charging dock from the compensated position (the corrected starting position), thereby completing the compensation of the offset amount at the recharge starting point before docking and charging, and reducing the burden of dynamic adjustment; starting from the compensation result of the reverse compensation vector for the current position of the robot, the motion control coefficients are dynamically adjusted in real time, gradually suppressing the offset error of the robot on the carpet surface, meeting the constraints of the fuselage offset amount and the nose pointing, and being adaptable to various different blankets, having universality; avoiding violent correction actions (such as frequent sudden stops or turns) caused by continuous interference of the carpet during the process of walking towards the charging dock, and thus realizing smooth pose adjustment of the robot from the corrected starting position to the charging dock, and the robot can still reach the charging dock with high precision on the carpet affected by fluff.

[0071] The present application also discloses a robot, which is a robot that walks on the surface of a carpet. The robot is built-in with the chip to walk on the carpet surface to a charging dock for docking charging by executing the walking control method. Specifically, the robot calculates a reverse compensation vector according to the carpet lateral offset vector generated by its rotation by executing step A, and then uses the reverse compensation vector to compensate the current position of the robot, so that the robot rotates by a sufficient angle and is in the position directly in front of the charging dock before starting to walk towards the charging dock from the compensated position (corrected starting position), so as to complete the compensation of the offset amount at the recharge starting point before docking charging, reduce the burden of dynamic adjustment, avoid drastic correction actions (such as frequent sudden stops or turns) caused by continuous interference of the carpet during the process of walking towards the charging dock, and improve the recharge accuracy and the success rate of docking charging.

[0072] The robot starts from the compensation result of the current position of the robot by the reverse compensation vector described in step A by executing step B and step C, and dynamically adjusts the motion control coefficient in real time, gradually suppressing the offset error of the robot on the carpet surface, satisfying the constraints of the fuselage offset amount and the nose pointing, and being adaptable to various different blankets to form multi-terrain adaptive control; furthermore, the robot can smoothly adjust its pose when walking from the corrected starting position towards the charging dock, and the robot can still reach the charging dock with high precision on the carpet affected by fluff.

[0073] Obviously, the above embodiments are merely examples given for clear illustration and are not limitations on the implementation manners. For those of ordinary skill in the art, other different forms of changes or variations can be made based on the above description. It is not necessary and impossible to list all the implementation manners here. And the obvious changes or variations derived therefrom are still within the protection scope of the present invention.

Claims

1. A method for controlling a robot's walking on a carpet, characterized in that, The walking control method includes: Step A: The robot rotates on the carpet surface to calculate the carpet lateral offset vector, and then calculates the reverse compensation vector based on the carpet lateral offset vector; then uses the reverse compensation vector to offset the current position of the robot to obtain the corrected starting position; then executes Step B; wherein, the carpet lateral offset vector is perpendicular to the charging docking direction of the charging dock; Step B: The robot starts walking from the corrected starting position towards the charging dock, measures the distance from the current position of the robot to the center of the charging dock in real time and marks the measured distance as the remaining distance, and at the same time dynamically adjusts the motion control coefficient according to the ratio between the remaining distance and the walking distance, and then the robot walks towards the charging dock according to the dynamically adjusted motion control coefficient; then executes Step C; Step C: When the remaining distance is less than or equal to the preset distance threshold, adjust the walking direction of the robot to be parallel to the charging docking direction of the charging dock, and then the robot walks towards the charging dock while keeping its walking direction parallel to the charging docking direction of the charging dock until the robot docks with the charging contacts in the charging dock.

2. The walking control method according to claim 1, wherein, In the said Step A, the method for the robot to calculate the carpet lateral offset vector by rotating on the carpet surface and then calculate the reverse compensation vector based on the carpet lateral offset vector includes: When the robot is located at the pre-set charging starting position, the robot records its real-time position coordinates as the initial position coordinates through the sensor, and then the robot rotates in place on the carpet surface for one week with a fixed wheelbase; at the same time, measures the actual walking distance of the wheels when rotating in place for one week through the sensor, and then configures the measured actual walking distance as the walking distance described in Step B; After the robot rotates in place for one week, records its real-time position coordinates as the position coordinates after rotating in place through the sensor, and then calculates the carpet offset vector by combining the position coordinates after rotating in place and the initial position coordinates; then calculates the component of the carpet offset vector in the vertical direction of the charging docking direction of the charging dock to obtain the carpet influence offset vector; then takes the opposite of the carpet influence offset vector to obtain the reverse compensation vector; the robot's rotation in place on the carpet surface is that the robot rotates around its body center and allows the body center to shift.

3. The walking control method according to claim 1, wherein In Step A, the method for the robot to calculate the carpet lateral offset vector by rotating on the carpet surface and then calculate the reverse compensation vector based on the carpet lateral offset vector includes: First, the robot records its real-time position coordinates as the first initial position coordinates through the sensor, the robot rotates 90 degrees in place on the carpet surface in the first direction, after the robot rotates 90 degrees in place in the first direction, records its real-time position coordinates as the first current position coordinates through the sensor, and then calculates the first carpet offset vector by combining the first current position coordinates and the first initial position coordinates; then calculates the component of the first carpet offset vector in the vertical direction of the charging docking direction of the charging dock to obtain the first carpet lateral offset vector; Then, the robot rotates 90 degrees in place on the carpet surface in the second direction. After the robot rotates 90 degrees in place in the second direction, it records its real-time position coordinates as the second current position coordinates through the sensor. Then, it calculates the second carpet offset vector by combining the second current position coordinates with the first current position coordinates. Next, it calculates the component of the second carpet offset vector in the direction perpendicular to the charging docking direction of the charging dock to obtain the second carpet lateral offset vector. Then, it calculates the average offset vector of the first carpet lateral offset vector and the second carpet lateral offset vector, and then takes the negative of half of the calculated average offset vector to obtain the reverse compensation vector. Wherein, the first direction and the second direction are opposite directions; the carpet lateral offset vector includes the first carpet lateral offset vector and the second carpet lateral offset vector.

4. The walking control method according to claim 1, wherein In step A, the method for the robot to calculate the carpet lateral offset vector by rotating on the carpet surface and then calculate the reverse compensation vector according to the carpet lateral offset vector includes: First, the robot records its real-time position coordinates as the first initial position coordinates through the sensor. The robot rotates 90 degrees in place on the carpet surface in the preset clockwise direction. After the robot rotates 90 degrees in place in the preset clockwise direction, it records its real-time position coordinates as the first current position coordinates through the sensor. Then, it calculates the first carpet offset vector by combining the first current position coordinates with the first initial position coordinates. Next, it calculates the component of the first carpet offset vector in the direction perpendicular to the charging docking direction of the charging dock to obtain the first carpet lateral offset vector. Then, the robot rotates 90 degrees in place on the carpet surface in the preset clockwise direction. After the robot rotates 90 degrees in place in the preset clockwise direction, it records its real-time position coordinates as the second current position coordinates, and makes the robot turn 180 degrees relative to its position at the first initial position coordinates at the second current position coordinates. Then, it calculates the second carpet offset vector by combining the second current position coordinates with the first current position coordinates. Next, it calculates the component of the second carpet offset vector in the direction perpendicular to the charging docking direction of the charging dock to obtain the second carpet lateral offset vector. Then, it calculates the average offset vector of the first carpet lateral offset vector and the second carpet lateral offset vector, and then takes the negative of half of the calculated average offset vector to obtain the reverse compensation vector. Wherein, the preset clockwise direction is the clockwise direction or the counterclockwise direction; the carpet lateral offset vector includes the first carpet lateral offset vector and the second carpet lateral offset vector.

5. The walking control method according to claim 1, wherein In step A, the method for offsetting the current position of the robot by using the reverse compensation vector to obtain the corrected starting position, so that the corrected starting position is located in the charging docking direction relative to the center of the charging dock includes: Controlling the current position of the robot to offset along the direction of the reverse compensation vector by the scalar of the reverse compensation vector to obtain the corrected starting position. Then, the robot walks from the current position according to the reverse compensation vector until it reaches the corrected starting position, where the corrected starting position is the starting point of a preset recharging trajectory, the center of the charging dock is the ending point of the preset recharging trajectory, and the recharging docking direction is parallel to the direction of the preset recharging trajectory; Wherein, the current position includes the position where the robot is located after rotation.

6. The walking control method according to claim 5, wherein In step B, the method of dynamically adjusting the motion control coefficient according to the ratio between the remaining distance and the walking distance and then making the robot walk towards the charging dock according to the dynamically adjusted motion control coefficient includes: When the remaining distance is greater than the preset distance threshold, the distance ratio range in which the ratio between the remaining distance and the walking distance is located is detected in real time; wherein, the walking distance is greater than the preset distance threshold; the walking distance is equal to the length of the preset recharging trajectory or the actual walking distance of the wheels of the robot measured by a sensor in real time; When the ratio between the remaining distance and the walking distance is greater than or equal to the first preset distance ratio, the speed proportionality factor is maintained at the maximum value so that the robot walks towards the charging dock at the maximum walking speed allowed, the proportionality coefficient is lowered to reduce the sensitivity, and the differential coefficient is raised to enhance the oscillation suppression; then, the robot controls the driving motor inside it to operate according to the currently maintained speed proportionality factor, the lowered proportionality coefficient, and the raised differential coefficient. When the ratio between the remaining distance and the walking distance is greater than the second preset distance ratio and less than the first preset distance ratio, the speed proportionality factor is controlled to decay linearly, the proportionality coefficient is controlled to return to its initial value, and the integral coefficient is lowered to weaken the integral effect; then, the robot controls the driving motor inside it to operate according to the linearly decayed speed proportionality factor, the restored proportionality coefficient, and the lowered integral coefficient. When the ratio between the remaining distance and the walking distance is less than or equal to the second preset distance ratio, the speed proportionality factor is controlled to decay exponentially, the integral coefficient is configured to zero to stop applying the integral effect, and the differential coefficient is lowered to avoid jitter; then, the robot controls the driving motor inside it to operate according to the exponentially decayed speed proportionality factor and the lowered differential coefficient. Wherein, the motion control coefficient includes a speed proportionality factor and PID control coefficients; the PID control coefficients include a proportionality coefficient, an integral coefficient, and a differential coefficient; Wherein, the first preset distance ratio is greater than the second preset distance ratio.

7. The walking control method according to claim 6, wherein In step C, there is: The angle measured by the gyroscope and the distance measured by the encoder are used to adjust the walking direction of the robot to be parallel to the recharging docking direction of the charging dock, and the nose of the robot is guided to face the line connecting a pair of charging contacts mounted perpendicular to the surface of the charging dock; Then, the robot walks along the preset recharging trajectory to the charging dock by maintaining its walking direction parallel to the recharging docking direction of the charging dock until the robot is perpendicularly docked with the charging contacts in the charging dock; Wherein, the center of the charging dock is represented by the center of the line connecting a pair of charging contacts mounted on the surface of the charging dock.

8. The walking control method according to claim 7, characterized in that The motion control coefficient further includes a steering angle compensation coefficient; When the remaining distance is less than or equal to a preset distance threshold, stop adjusting the motion control coefficients except for the steering angle compensation coefficient, and control the walking direction of the robot to be parallel to the docking direction of the charging dock by increasing the steering angle compensation coefficient, so that the robot maintains a straight line walking according to the preset charging trajectory during the process of walking to the charging dock at different speeds, forming the adaptability of the robot to carpets of different materials.

9. A chip for storing programs, characterized in that, The program is the code corresponding to the walking control method described in any one of claims 1 to 8, for controlling the robot to walk on the carpet surface to the charging dock for docking and charging.

10. A robot, which is a robot walking on the surface of a carpet, characterized in that, The robot is built-in with the chip described in claim 9, so as to walk on the carpet surface to the charging dock for docking and charging by executing the walking control method.

Citation Information

Patent Citations

  • Control method for carpet deviation during robot movement, chip and robot cleaner

    CN109394095A