Robot heading adjustment method, robot, device and computer storage medium

By obtaining the distance information of the robot at different locations, using photoelectric sensors and infrared sensors to detect offsets and adjust the heading, the problem of cumulative heading angle error of the swimming pool robot is solved and the robot's working efficiency is improved.

CN115990880BActive Publication Date: 2025-08-26YITUO ELECTRIC CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202310007661.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-01-04
Publication Date
2025-08-26
Estimated Expiration
2043-01-04

AI Technical Summary

Technical Problem

The existing swimming pool robots cannot effectively correct the heading information due to the 6-axis gyroscope and acceleration sensor, resulting in cumulative errors in heading angles, resulting in yaw problems.

Method used

By obtaining the distance information of the robot at different positions, calculating the offset information and adjusting the heading, detecting the offset using photoelectric sensors and infrared sensors, correcting the azimuth angle to adjust the heading.

Benefits of technology

The robot heading information is effectively corrected, the work efficiency is improved, and the work efficiency is avoided due to staggering.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115990880B_ABST
    Figure CN115990880B_ABST
Patent Text Reader

Abstract

The present application provides a robot heading adjustment method, a robot, a device and a computer storage medium. By determining the offset information of the robot based on the first distance information and the second distance information of the robot at a second position, and then adjusting the robot heading based on the offset information, the problem of the robot yaw caused by the accumulated errors caused by the gyroscope's inability to correct the robot's heading information is solved. The heading adjustment method of the present application can effectively correct the robot's heading information, thereby improving the robot's working efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of robotics technology, and more specifically, to a robot heading adjustment method, a robot, a device, and a computer storage medium. Background Art

[0002] With the rapid development of science and technology, the application of robots is becoming more and more extensive, and their functions are becoming more and more numerous. For example, swimming pool robots are used to clean swimming pool garbage, bacteria and other pollutants.

[0003] Currently, swimming pool robots use 6-axis gyroscopes and accelerometers to calculate the robot's heading angle or azimuth, and then perform path planning or trajectory planning based on the heading angle or azimuth. However, due to the physical properties of the 6-axis gyroscope and accelerometer, the accelerometer cannot be used to compensate for and correct the heading information. When the swimming pool robot runs for a long time, errors will accumulate, causing the swimming pool robot's heading angle to shift. Therefore, how to effectively adjust the robot's heading angle has become an urgent problem to be solved. Summary of the Invention

[0004] The embodiments of the present application provide a robot heading adjustment method, a robot, a device, and a computer storage medium, aiming to solve the problem of how to effectively adjust the robot's heading angle signal.

[0005] In a first aspect, the present application provides a robot heading adjustment method, comprising:

[0006] Obtaining first heading information of the robot at the first position;

[0007] Acquire first distance information and second distance information of the robot at the second position;

[0008] determining offset information of the robot according to the first distance information and the second distance information;

[0009] Adjust the robot heading according to the offset information and the first heading information.

[0010] Furthermore, determining the offset information of the robot according to the first distance information and the second distance information includes:

[0011] Calculating a difference between the first distance information and the second distance information;

[0012] Comparing the difference with a preset threshold to obtain a comparison result;

[0013] If the comparison result is that the difference is less than the preset threshold, it is determined that the robot has not yawed;

[0014] If the comparison result is that the difference is greater than or equal to the preset threshold, it is determined that the robot is yawed.

[0015] Furthermore, the offset information includes an offset angle, and determining the offset information of the robot according to the first distance information and the second distance information further includes:

[0016] Get the robot's body width;

[0017] The offset angle of the robot is calculated using a first preset formula according to the body width, the first distance information, and the second distance information.

[0018] Furthermore, the first preset formula is:

[0019]

[0020] Wherein, θ is the offset angle, d1 is the first distance information, d2 is the second distance information, and X is the fuselage width.

[0021] Furthermore, the first heading information is obtained by a gyroscope, and adjusting the heading of the robot according to the offset information and the first heading information includes:

[0022] The azimuth angle of the gyroscope is corrected according to the offset angle and the first heading information to adjust the heading of the robot.

[0023] Furthermore, the first distance information and the second distance information are obtained according to a photoelectric sensor, the first distance information is first travel information of the robot, and the second distance information is second travel information of the robot; and obtaining the first distance information and the second distance information of the robot at the second position includes:

[0024] obtaining deflection information of the robot at the second position by the photoelectric sensor;

[0025] Get the robot's own wheel diameter information;

[0026] The first stroke information and the second stroke information are calculated according to the deflection information and the wheel diameter information.

[0027] Furthermore, the first distance information and the second distance information are obtained according to the infrared sensor, the first distance information is a first spacing distance between the infrared sensor and the first wall, and the second distance information is a second spacing distance between the infrared sensor and the second wall.

[0028] Furthermore, the preset threshold is obtained by a second preset formula, and the second preset formula is:

[0029] P=2Xsinθ'

[0030] Wherein, P is the preset threshold, θ' is the preset offset angle, and X is the width of the robot body.

[0031] Furthermore, the first heading information is obtained by a gyroscope; and adjusting the heading of the robot according to the offset information and the first heading information includes:

[0032] If the robot yaws, the robot is controlled to perform the wall-hitting action;

[0033] According to the first heading information, the gyroscope is controlled to perform a reset operation to generate new second heading information to adjust the heading of the robot.

[0034] In a second aspect, the present application provides a robot that applies the robot heading adjustment method of the first aspect.

[0035] In a third aspect, the present application provides a computer storage medium comprising a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute the robot heading adjustment method of the first aspect.

[0036] In a fourth aspect, the present application provides a robot heading adjustment device, comprising a memory and a processor, wherein the memory stores a computer program, and when the computer program is read and executed by the processor, the robot heading adjustment method of the first aspect is implemented.

[0037] The robot heading adjustment method provided in this embodiment of the present application determines the offset information of the robot based on the first distance information and the second distance information of the robot at the second position, and then adjusts the robot heading based on the offset information, thereby solving the problem of the robot yaw caused by the accumulated errors caused by the gyroscope's inability to correct the robot's heading information. The heading adjustment method of the present application can effectively correct the robot's heading information, thereby improving the robot's working efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] Figure 1 A schematic diagram of a flow chart of a robot heading adjustment method provided in one embodiment of the present application;

[0039] Figure 2 A schematic diagram of a flow chart of a robot heading adjustment method provided in one embodiment of the present application;

[0040] Figure 3 A schematic diagram of a flow chart of a robot heading adjustment method provided in one embodiment of the present application;

[0041] Figure 4 A schematic diagram of a flow chart of a robot heading adjustment method provided in one embodiment of the present application;

[0042] Figure 5 A schematic diagram of a scenario of a robot heading adjustment method provided in one embodiment of the present application;

[0043] Figure 6 A schematic diagram of a scenario of a robot heading adjustment method provided in one embodiment of the present application. DETAILED DESCRIPTION

[0044] It should be noted that although the system diagrams illustrate unit module divisions and the flow diagrams illustrate a logical sequence, in certain circumstances, the steps shown or described may be performed in a sequence that differs from the module divisions within the device or the sequence in the flow diagrams. The terms "first," "second," and so on, in the specification, claims, and drawings, are used to distinguish similar items and are not necessarily used to describe a specific sequence or precedence.

[0045] In the description of the embodiments of the present application, unless otherwise clearly defined, words such as setting, installing, and connecting should be understood in a broad sense, and those skilled in the art can reasonably determine the specific meanings of the above words in the embodiments of the present application in combination with the specific content of the technical solution. In the embodiments of the present application, words such as "further", "exemplarily" or "optionally" are used to indicate examples, illustrations or descriptions, and should not be interpreted as being more preferred or more advantageous than other embodiments or design solutions. The use of words such as "further", "exemplarily" or "optionally" is intended to present related concepts in a specific way.

[0046] Swimming pools are places where people swim. During use, they inevitably accumulate contaminants such as garbage and bacteria. The cleanliness and hygiene of a pool are directly related to the swimmer's performance and health. Therefore, pools must be cleaned regularly to remove sediment from the bottom and prevent the growth of bacteria and algae. Pool cleaning robots can be used for this purpose. Pool robots include both surface and underwater robots. A pool cleaning robot is a type of underwater vacuum cleaner, primarily designed to remove dirt, dust, moss, hair, and other debris from the pool walls, bottom, and waterline.

[0047] Currently, swimming pool robots use 6-axis gyroscopes and accelerometers to calculate the robot's heading angle or azimuth, and then perform path planning or trajectory planning based on the heading angle or azimuth. However, due to the physical characteristics of the 6-axis gyroscope and accelerometer, the accelerometer cannot be used to compensate for and correct the heading information. The heading information can only be obtained by integrating the Z-axis angular velocity of the gyroscope to obtain the heading angle. When the swimming pool robot runs for a long time, errors will accumulate, causing the swimming pool robot's heading to deviate.

[0048] The present application determines the offset information of the robot based on the first distance information and the second distance information of the robot at the second position, and then adjusts the heading of the robot based on the offset information, thereby solving the problem of the robot yaw caused by the accumulated errors caused by the gyroscope's inability to correct the heading information of the robot. The heading adjustment method of the present application can effectively correct the heading information of the robot, thereby improving the working efficiency of the robot.

[0049] Figure 1 A flow chart of a robot heading adjustment method provided in one embodiment of the present application is shown as follows: Figure 1 As shown, the robot heading adjustment method at least includes step S10, step S20, step S30, and step S40.

[0050] Step S10: Acquire first heading information of the robot at the first position;

[0051] It should be noted that the first position may be the initial position of the robot when it starts working, or a position during navigation, and the first heading information includes the heading angle and the forward direction of the robot. The first heading information may be obtained by a gyroscope.

[0052] Step S20: Acquire first distance information and second distance information of the robot at the second position;

[0053] It should be noted that the second position can be the position of the robot for a period of time after it begins operation or after the robot adjusts its heading. The first distance information includes the first distance traveled by the robot from the first position to the second position and the first distance between the robot and the first wall. The second distance information includes the second distance traveled by the robot from the first position to the second position and the second distance between the robot and the second wall. The first and second distance information can be obtained based on the two photoelectric sensors on the left and right wheels of the robot, and the first and second distances can be obtained based on the two infrared sensors on the robot.

[0054] In some embodiments, the first distance information and the second distance information are obtained according to the photoelectric sensor, the first distance information is the first travel information of the robot, and the second distance information is the second travel information of the robot. Figure 2 , Figure 2 This is a detailed flow chart of step S20, which includes at least steps S21, S22, and S23:

[0055] S21: Obtaining deflection information of the robot at the second position through a photoelectric sensor;

[0056] S22: Obtain the robot's own wheel diameter information;

[0057] S23: Calculating first stroke information and second stroke information respectively according to the deflection information and the wheel diameter information.

[0058] It should be noted that photoelectric sensors can be set on the left and right wheels of the robot. The deflection information can be the angular displacement of the robot, and the wheel diameter information includes the diameter or radius of the left and right wheels of the robot. Among them, the "wheel" in this embodiment refers to a moving object assembled on the robot for rolling, moving, crawling, etc., and does not only refer to annular or circular tires, but can also be tracks, sliding paddles, etc.

[0059] The robot's angular displacement is acquired through a photoelectric sensor. Based on the angular displacement and the diameters or radii of the robot's left and right wheels, first and second travel information for the robot's left and right wheels can be calculated. The photoelectric sensor can be a code disk, a digital encoder that measures angular displacement. It offers advantages such as high resolution, high measurement accuracy, and reliable operation. It is a type of displacement sensor that measures shaft angular position. The code disk includes a photoelectric encoder code disk and a contact code disk. The photoelectric code disk converts displacement into an electrical signal in the form of a "digital code" through photoelectric conversion, thereby enabling the measurement of angular displacement.

[0060] The first travel information may be a first travel distance of the left wheel when the robot travels from the first position to the second position, and the second travel information may be a second travel distance of the right wheel when the robot travels from the first position to the second position.

[0061] In some embodiments, the first distance information and the second distance information are obtained based on infrared sensors, the first distance information being the first distance between the infrared sensor and the first wall, and the second distance information being the second distance between the infrared sensor and the second wall. The infrared sensor may be one, two, or more, and the infrared sensor may be located on the left or right wheel, or on the vehicle body, etc. The first wall and the second wall may be two opposite walls of a swimming pool. This embodiment is illustrated using two infrared sensors, namely a first infrared sensor and a second infrared sensor. The first distance between the robot and the first wall is obtained by the first infrared sensor, and the second distance between the robot and the second wall is obtained by the second infrared sensor. By calculating the difference between the first distance and the second distance, it can be determined whether the robot is yawed.

[0062] Of course, in order to improve the accuracy of detecting the distance between the robot and the wall, multiple infrared sensors can be set up, and the average of multiple distance values ​​detected by the multiple infrared sensors can be calculated, and the average value can be used as the distance between the robot and the wall. For example, two sensors are set in the first direction of the robot body, and two corresponding sensors are set in the second direction corresponding to the first direction of the robot body. The average value of the distances to the corresponding walls detected by the two sensors in the first direction is calculated, and the average value is used as the above-mentioned first distance; the average value of the distances to the corresponding walls detected by the two sensors in the second direction is calculated, and the average value is used as the above-mentioned second distance.

[0063] Step S30: determining the offset information of the robot according to the first distance information and the second distance information;

[0064] It should be noted that the offset information includes information such as whether the robot is offset and the offset angle. This offset information can be used to determine whether the robot is yawed and / or the robot's offset angle. Ideally, when the robot is operating according to the first heading information and no heading offset occurs, when the robot travels from a first position to a second position, the first stroke information and the second stroke information of the left and right wheels are the same, or the first spacing distance between the robot and the first wall and the second spacing distance between the robot and the second wall are the same. However, due to a heading offset, the first stroke information and the second stroke information are different, or the first spacing distance and the second spacing distance are different. Therefore, the first stroke information and the second stroke information, or the first spacing distance and the second spacing distance, can be used to determine whether the robot is offset, thereby adjusting the robot's heading.

[0065] In some embodiments, reference Figure 3 , Figure 3 This is a detailed flow chart of step S30, including steps S31, S32, S33, and S34:

[0066] Step S31: Calculating the difference between the first distance information and the second distance information;

[0067] Step S32: Compare the difference with a preset threshold to obtain a comparison result;

[0068] Step S33: If the comparison result shows that the difference is less than the preset threshold, it is determined that the robot has not yawed;

[0069] Step S34: If the comparison result shows that the difference is greater than or equal to the preset threshold, it is determined that the robot is yawed.

[0070] It should be noted that when the robot reaches the second position, it obtains the first and second distance information via a photoelectric sensor or infrared sensor, calculates the difference between the first and second distance information, and compares the difference with a preset threshold. If the difference is less than the preset threshold, the robot is determined to have not yawed; if the difference is greater than or equal to the preset threshold, the robot is determined to have yawed. The first distance information may be the first distance traveled by the left wheel, and the second distance information may be the second distance traveled by the right wheel. Of course, if the difference between the first and second distances is negative, the absolute value of the difference is taken and compared with the preset threshold.

[0071] Of course, the preset threshold value can be a positive value or a negative value.

[0072] In some embodiments, the preset threshold is set by a technician and can be 0.5 cm, 1 cm, 1.5, 2 cm, 3 cm, 4 cm, 5 cm, 6 cm, 7 cm, 8 cm, etc.

[0073] In some embodiments, the preset threshold can be obtained by a second preset formula, which is:

[0074] P=2Xsinθ'

[0075] Where P is the preset threshold, θ' is the preset offset angle, and X is the width of the robot body.

[0076] In some embodiments, the offset information also includes an offset angle, referring to Figure 4 , Figure 4 This is a detailed flow chart of step S30, which also includes at least steps S35 and S36:

[0077] S35: Get the body width of the robot;

[0078] S36: Calculate the offset angle of the robot using a first preset formula according to the body width, the first distance information, and the second distance information.

[0079] It should be noted that the body width can be the distance from the left wheel to the right wheel of the robot, or can be the actual width of the robot body, or can be set by technicians. The body width of different robots can be different. Based on the body width of the robot and the first distance information and the second distance information, the offset angle of the robot can be calculated using a first preset formula. The first preset formula can be the following formula:

[0080]

[0081] Wherein, θ is the offset angle, d1 is the first distance information, d2 is the second distance information, and X is the fuselage width.

[0082] Reference Figure 5 The following example illustrates the derivation process of the formula by giving an example:

[0083] θ+θ2=90°, θ1+θ2=90°, then θ=θ1; and Where X is the width of the robot body, then

[0084] Step S40: adjusting the heading of the robot according to the offset information and the first heading information.

[0085] In some embodiments, the first heading information is obtained by a gyroscope, and the offset information can be information about the robot's yaw and offset angle. The azimuth angle of the gyroscope is corrected using the offset angle and the first heading information. For example, the offset angle is sent to a control system, which adjusts the azimuth angle of the gyroscope based on the offset angle to allow the robot to maintain the forward angle and heading angle of the first heading information, or generates new heading information based on the first heading information and controls the robot to continue traveling according to the new heading information. In this embodiment, adjusting the robot's heading using the offset angle allows the robot to adjust its heading in a timely manner during operation, thereby avoiding the problem of low robot work efficiency caused by robot yaw and improving the robot's work efficiency.

[0086] In some embodiments, the first heading information is obtained by a gyroscope, and the offset information is information about whether the robot has yawed. If the robot yaws, the robot is controlled to perform a wall-hitting action to keep the robot parallel to the wall, and the gyroscope is controlled to perform a reset operation according to the first heading information. At this time, the gyroscope data is reset to zero, and a new second heading information is generated. The robot is controlled to continue driving according to the second heading information. The second heading information can be perpendicular to the target wall during the wall-hitting action. For example, when the gyroscope data is reset, the robot rotates 90 degrees and performs cleaning work along an arched route. When the robot performs a wall-hitting action, the robot will move to the first wall or the second wall, and the robot body will collide with the first wall or the second wall to keep the body parallel to the first wall or the second wall, thereby completing the wall-hitting action.

[0087] In some embodiments, the angular displacement of the robot is obtained through a photoelectric sensor, and the first stroke information and the second stroke information of the left and right wheels of the robot are calculated through the angular displacement and the diameter or radius of the left and right wheels of the robot. When the robot yaw is determined through the first stroke information and the second stroke information, the robot heading can be adjusted by calculating the offset angle, or by controlling the robot to perform a wall-hitting action and controlling the gyroscope to perform a reset operation.

[0088] In some embodiments, a first distance between the robot and a first wall is obtained by a first infrared sensor, and a second distance between the robot and a second wall is obtained by a second infrared sensor. When the robot is judged to be yawed based on the first distance and the second distance, the robot heading can be adjusted by calculating the offset angle, or by controlling the robot to perform a wall-hitting action and controlling the gyroscope to perform a reset operation.

[0089] The following examples can further illustrate in detail the robot heading adjustment method provided in the embodiments of the present application.

[0090] Example 1:

[0091] Reference Figure 5 As shown in the figure, when robot 1 is in its first position (initial position), its forward angle is 0 degrees and its forward direction is positive. At this time, robot 1's forward angle is determined by integrating the angular velocity detected by the Z-axis gyroscope of robot 1's 6-axis inertial measurement unit (IMU) module. When robot 1 reaches its second position, the gyroscope's angular velocity integration generates an accumulated error, resulting in an angular deviation. However, robot 1 cannot perceive this angular deviation, and the offset angle at this time is θ.

[0092] When the robot 1 is in the second position, the angular displacement of the robot 1 is obtained through the encoder, and the wheel diameters of the left and right wheels of the robot 1 and the body width of the robot 1 are obtained at the same time. The first driving distance of the left wheel and the second driving distance of the right wheel when the robot 1 moves from the first position to the second position are calculated through the angular displacement and the wheel diameter. The difference between the first driving distance of the left wheel and the second driving distance of the right wheel is calculated to determine whether the difference is greater than 5 cm. If the difference is greater than 5 cm, it is determined that the robot 1 is yawed.

[0093] Substitute the first travel distance of the left wheel, the second travel distance of the right wheel, and the body width of the robot 1 into a first preset formula, calculate the offset angle of the robot 1 using the first preset formula, substitute the offset angle into the control system, and the control system corrects the azimuth angle of the gyroscope using the offset angle, thereby readjusting the walking direction of the robot 1 to adjust the heading of the robot 1. The first preset formula is as follows:

[0094]

[0095] The robot heading adjustment method in this embodiment uses a photoelectric sensor to detect the angular displacement of the robot's left and right wheels. This is combined with wheel diameter information to calculate the distance traveled by the robot's left and right wheels, thereby determining whether the robot is yawed. The robot then calculates the offset angle based on the distance traveled by the left and right wheels and the robot's body width. The gyroscope's azimuth angle is then corrected based on the offset angle to adjust the robot's heading. This embodiment accurately calculates the offset angle and promptly adjusts the robot's heading based on the offset angle, significantly improving the accuracy of the robot's heading and enhancing its operational efficiency.

[0096] Example 2:

[0097] Reference Figure 6 As shown in the figure, robot 1's forward angle at its first position (initial position) is 0 degrees, and its forward direction is positive. This angle is derived from the integral of the angular velocity of the Z-axis gyroscope of robot 1's 6-axis IMU module. When robot 1 reaches its second position, angular deviation occurs due to error accumulation caused by the integral of the gyroscope's angular velocity. However, robot 1 cannot perceive this angular deviation, resulting in an offset angle of θ. The dashed box represents the ideal position reached by robot 1 without yaw.

[0098] When robot 1 is in the second position, the robot 1 uses its left and right infrared sensors (the first infrared sensor and the second infrared sensor) to detect a first distance between the first infrared sensor and first wall 2 and a second distance between the second infrared sensor and second wall 3. The robot 1 calculates the difference between the first and second distances and determines whether the absolute value of the difference is greater than a preset threshold value P. If the absolute value of the difference is greater than the preset threshold value P, the robot 1 is determined to have yawed. The preset threshold value P is obtained from the following formula.

[0099] P=2Xsinθ'

[0100] Wherein, P is the preset threshold, θ' is the preset offset angle, and X is the body width of robot 1.

[0101] If it is determined that the robot 1 is yawed, the robot 1 is controlled to perform a wall-hitting action to keep the body of the robot 1 parallel to the wall, and the IMU sensor is controlled to reset. After the IMU sensor is reset, the accumulated error of the gyroscope angular velocity integral is eliminated, and the body of the robot 1 is controlled to rotate 90 degrees to continue the bow path cleaning work.

[0102] The robot heading adjustment method provided in this embodiment primarily uses infrared sensors to detect first and second distances between the robot and a first wall and a second wall. Based on the first and second distances, the robot is determined to be yawed. If yaw occurs, the robot is controlled to perform a wall collision and the gyroscope is controlled to perform a reset operation, thereby adjusting the robot's heading. This embodiment eliminates the need to calculate the offset angle, reducing data processing overhead. The robot is directly controlled to perform the wall collision, resulting in a simple and quick control method.

[0103] An embodiment of the present application further provides a robot, to which the above-mentioned robot heading adjustment method is applied.

[0104] An embodiment of the present application further provides a computer storage medium, comprising a stored computer program, wherein when the computer program is executed, the device where the computer-readable storage medium is located is controlled to execute the above-mentioned robot heading adjustment method.

[0105] An embodiment of the present application further provides a robot heading adjustment device, comprising a memory and a processor, wherein the memory stores a computer program, and when the computer program is read and executed by the processor, the above-mentioned robot heading adjustment method is implemented.

[0106] The memory, as a non-transient computer-readable storage medium, can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory may include a high-speed random access memory and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a memory remotely arranged relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0107] The non-transient software program and instructions required to implement the robot heading adjustment method of the above embodiment are stored in the memory, and when executed by the processor, the robot heading adjustment method of the above embodiment is executed.

[0108] Those skilled in the art will appreciate that all or some of the steps and systems in the method disclosed above can be implemented as software, firmware, hardware, and appropriate combinations thereof. Some physical components or all physical components can be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or implemented as hardware, or implemented as an integrated circuit, such as an application-specific integrated circuit. Such software can be distributed on a computer-readable medium, and the computer-readable medium can include computer storage media (or non-transitory media) and communication media (or temporary media). As known to those skilled in the art, the term computer storage media is included in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data) and is volatile and non-volatile, removable, and non-removable. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory, or other memory technology, CD-ROM, digital versatile disks (DVD), or other optical disk storage, magnetic cassettes, magnetic tapes, disk storage, or other magnetic storage devices, or any other medium that can be used to store desired information and can be accessed by a computer. Furthermore, as is well known to those skilled in the art, communication media typically embodies computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.

[0109] In addition, an embodiment of the present application also provides a computer program product, including a computer program or computer instructions, which are stored in a computer-readable storage medium. The processor of the computer device reads the computer program or computer instructions from the computer-readable storage medium, and the processor executes the computer program or computer instructions, so that the computer device executes the robot heading adjustment method as described above.

[0110] The above is a specific description of the preferred implementation of the present application, but the present application is not limited to the above implementation mode. Technical personnel familiar with the field can also make various equivalent modifications or substitutions without violating the spirit of the present application. These equivalent modifications or substitutions are all included in the scope defined by the claims of the present application.

Claims

1. A robot heading adjustment method, characterized in that: The robot heading adjustment method comprises: Obtaining first heading information of the robot at the first position; Acquire first distance information and second distance information of the robot at a second position, wherein the first distance information includes first distance information of the robot traveling from the first position to the second position, and the second distance information includes second distance information of the robot traveling from the first position to the second position; Calculating a difference between the first distance information and the second distance information; Comparing the difference with a preset threshold to obtain a comparison result; If the comparison result is that the difference is less than the preset threshold, it is determined that the robot has not yawed; If the comparison result is that the difference is greater than or equal to the preset threshold, it is determined that the robot is yawed; Get the robot's body width; Calculating the offset information of the robot using a first preset formula according to the body width, the first stroke information, and the second stroke information; The first preset formula is: , in, is the offset angle, d1 is the first travel information, d2 is the second travel information, and X is the fuselage width; Adjust the robot heading according to the offset information and the first heading information.

2. The robot heading adjustment method according to claim 1, wherein: The first heading information is obtained by a gyroscope, and adjusting the heading of the robot according to the offset information and the first heading information includes: The azimuth angle of the gyroscope is corrected according to the offset angle and the first heading information to adjust the heading of the robot.

3. The robot heading adjustment method according to any one of claims 1 to 2, characterized in that: The first travel information and the second travel information are obtained according to a photoelectric sensor; and the obtaining of the first distance information and the second distance information of the robot at the second position includes: obtaining deflection information of the robot at the second position by the photoelectric sensor; Get the robot's own wheel diameter information; The first stroke information and the second stroke information are calculated according to the deflection information and the wheel diameter information.

4. The robot heading adjustment method according to any one of claims 1 to 2, characterized in that: The first distance information further includes a first distance between the robot and a first wall, and the second distance information further includes a second distance between the robot and a second wall; the first distance and the second distance are obtained according to an infrared sensor; and calculating the difference between the first distance information and the second distance information includes: A difference between the first travel information and the second travel information is calculated, or a difference between the first interval distance and the second interval distance is calculated.

5. The robot heading adjustment method according to claim 1, wherein: The preset threshold is obtained by a second preset formula, which is: Wherein, P is the preset threshold, is the preset offset angle, and X is the width of the robot body.

6. A robot, characterized in that: Apply the robot heading adjustment method described in any one of claims 1 to 5.

7. A computer storage medium, characterized in that The computer storage medium includes a stored computer program, wherein when the computer program is executed, the device where the computer storage medium is located is controlled to execute the robot heading adjustment method according to any one of claims 1 to 5.

8. A robot heading adjustment device, characterized in that: The method comprises a memory and a processor, wherein the memory stores a computer program, and when the computer program is read and executed by the processor, the method for adjusting the heading of the robot according to any one of claims 1 to 5 is implemented.

Citation Information

Patent Citations

  • Unmanned vehicle autonomous navigation deviation correction method

    CN114115275A

  • Unmanned vehicle navigation deviation correction method based on ultrasonic-assisted fusion positioning

    CN114137975A

  • Intelligent obstacle avoidance control system and method for wheeled robot

    CN114217620A