CN114001751A - Calibration method and device of gyroscope of sweeper, storage medium and computer equipment - Google Patents

Calibration method and device of gyroscope of sweeper, storage medium and computer equipment Download PDF

Info

Publication number
CN114001751A
CN114001751A CN202111170804.2A CN202111170804A CN114001751A CN 114001751 A CN114001751 A CN 114001751A CN 202111170804 A CN202111170804 A CN 202111170804A CN 114001751 A CN114001751 A CN 114001751A
Authority
CN
China
Prior art keywords
gyroscope
value
sweeper
zero offset
offset value
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111170804.2A
Other languages
Chinese (zh)
Inventor
黄纯
贾盛泽
韩淑婷
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Water World Co Ltd
Original Assignee
Shenzhen Water World Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Water World Co Ltd filed Critical Shenzhen Water World Co Ltd
Priority to CN202111170804.2A priority Critical patent/CN114001751A/en
Publication of CN114001751A publication Critical patent/CN114001751A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01CMEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
    • G01C25/00Manufacturing, calibrating, cleaning, or repairing instruments or devices referred to in the other groups of this subclass
    • G01C25/005Manufacturing, calibrating, cleaning, or repairing instruments or devices referred to in the other groups of this subclass initial alignment, calibration or starting-up of inertial devices

Landscapes

  • Engineering & Computer Science (AREA)
  • Manufacturing & Machinery (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Radar, Positioning & Navigation (AREA)
  • Remote Sensing (AREA)
  • Gyroscopes (AREA)

Abstract

The invention discloses a method and a device for calibrating a gyroscope of a sweeper, and a storage medium of the device, wherein the method comprises the following steps: acquiring a zero offset value of a gyroscope of the sweeper, wherein the gyroscope is a single-axis gyroscope; when the sweeper is in an operating state, acquiring a plurality of original data acquired by a gyroscope within a set time length; and calculating an angle value of the gyroscope according to the plurality of original data and the zero offset value. The gyroscope is a single-axis gyroscope, the angle value of the gyroscope is not interfered by data among other axes when being calculated according to the zero offset value and the plurality of original data, and the calculated angle value is the angle value of a single axis of the gyroscope.

Description

Calibration method and device of gyroscope of sweeper, storage medium and computer equipment
Technical Field
The invention relates to the technical field of sweeper, in particular to a calibration method and device of a sweeper gyroscope, a storage medium and computer equipment.
Background
The gyroscope is an important component for determining the direction of the sweeper in the operation process, the identification angle of the gyroscope is necessarily calibrated in the production process of the sweeper, the gyroscope calibration mode existing at present is mostly six-axis gyroscopes based on an unmanned aerial vehicle platform, six-axis data are acquired, six-axis angles are calculated and calibrated, but the sweeper works on the ground, the sweeper is easy to collide when working, vibration influences caused by motors, side brushes, rolling brushes, fans and the like of the sweeper are large, the calculation and calibration requirements on the z-axis rotating angle in a long-time state are high, the sweeper mainly needs to use the z-axis data, but when calculation and correction data of the six-axis gyroscopes are acquired, the data among the axes interfere with each other, and the corrected correction angle of the z-axis rotating angle is difficult to acquire independently.
Disclosure of Invention
The invention mainly aims to provide a method and a device for calibrating a gyroscope of a sweeper, a storage medium and computer equipment, and aims to solve the technical problem that a correction angle of a rotation angle of a single-axis gyroscope is difficult to obtain independently.
In order to achieve the purpose, the invention adopts the following technical scheme:
a method of calibrating a sweeper gyroscope, the method comprising:
acquiring a zero offset value of a gyroscope of the sweeper, wherein the gyroscope is a single-axis gyroscope;
when the sweeper is in an operating state, acquiring a plurality of original data acquired by a gyroscope within a set time length;
and calculating to obtain the angle value of the gyroscope according to the zero offset value and the plurality of original data.
Further, the step of calculating an angle value of the gyroscope according to the zero offset value and the plurality of raw data includes:
calculating the average value of each group of the original data to obtain a plurality of original data average values;
calculating the average value of the average values of the plurality of original data to obtain an original average value;
and subtracting the zero offset value from the original average value to obtain the angle value of the gyroscope.
Further, the step of calculating an angle value of the gyroscope according to the zero offset value and the plurality of raw data includes:
sequentially calculating the difference value between each original data in each group of original data and the zero offset value to obtain a plurality of groups of original data difference values;
calculating the average value of the difference values of each group of the original data to obtain the average value of the difference values of the original data;
and calculating the average value of the difference mean values of the plurality of original data to obtain the angle value of the gyroscope.
Further, the step of obtaining the zero offset value of the gyroscope of the sweeper comprises:
acquiring first data of a gyroscope when the sweeper is in an initial power-on state;
and calculating to obtain an initial zero offset value according to the first data, and taking the initial zero offset value as the zero offset value.
Further, after the step of calculating the zero offset value according to the first data, the method includes:
detecting that an obstacle exists in front of the straight-going sweeper;
controlling the sweeper to stop moving;
when the movement stopping time of the sweeper exceeds the preset time, acquiring second data of a gyroscope, and calculating to obtain a corrected zero offset value according to the second data;
replacing the initial zero-bias value with the corrected zero-bias value to update the zero-bias value.
Further, the step of replacing the initial zero offset value with the corrected zero offset value to update the zero offset value includes:
calculating a zero offset value of the corrected zero offset value and the initial zero offset value;
judging whether the zero deviation value is less than or equal to a preset correction threshold value or not;
and if so, replacing the initial zero offset value with the corrected zero offset value to update the zero offset value.
Further, the step of calculating an average value of each group of the raw data to obtain a plurality of raw data average values includes:
obtaining a difference value of two adjacent original data;
if the difference value is larger than a preset original difference threshold value, modifying the data of the latter in the adjacent original data into the data of the former in the adjacent original data;
based on the modified raw data, a raw average of a plurality of the raw data is calculated.
The invention also discloses a calibration device of the gyroscope of the sweeper, which comprises the following components:
the first acquisition unit is used for acquiring a zero offset value of a gyroscope of the sweeper;
the second acquisition unit is used for acquiring a plurality of original data acquired by the gyroscope within a set time length when the sweeper is in an operating state;
and the calculating unit is used for calculating the angle value of the gyroscope according to the zero offset value and the plurality of original data.
The invention also discloses a storage medium which is readable by a computer, and a computer program is stored on the storage medium, and when the computer program is executed, the calibration method of the gyroscope of the sweeper is realized.
The invention also discloses computer equipment which comprises a processor, a memory and a computer program which is stored on the memory and can run on the processor, wherein the processor realizes the calibration method of the gyroscope of the sweeper when executing the computer program.
Has the advantages that:
in the calibration method of the gyroscope of the sweeper, a zero offset value of the gyroscope of the sweeper is obtained, when the sweeper works, the angle of the gyroscope changes, the zero offset value of the sweeper is used as a reference value, a plurality of original data in a motion state are obtained, and the angle value of the gyroscope is obtained through calculation based on the zero offset value and the original data in the motion states, so that the angle value of the gyroscope in the motion state is more accurate; the gyroscope is a single-axis gyroscope, the angle value of the gyroscope is not interfered by data among other axes when being calculated according to the zero offset value and the plurality of original data, and the calculated angle value is the angle value of a single axis of the gyroscope.
Drawings
Fig. 1 is a schematic flowchart of a calibration method of a gyroscope of a sweeper in an embodiment of the present application;
FIG. 2 is a schematic diagram illustrating an embodiment of the present application in which raw data collected by a gyroscope is buffered in a buffer;
fig. 3 is a block diagram of an overall structure of a calibration device of a gyroscope of a sweeper in an embodiment of the present application;
fig. 4 is a block diagram schematically illustrating a structure of a computer device according to an embodiment of the present application.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It is noted that the terms "one end," "another end," "first," "second," and the like are used herein for descriptive purposes only and are not to be construed as indicating or implying relative importance.
Technical solutions between the embodiments of the present invention may be combined with each other, but it is necessary to be able to be realized by a person skilled in the art, and when the technical solutions are contradictory or cannot be realized, such a combination of technical solutions should not be considered to exist, and is not within the protection scope of the present invention.
Referring to fig. 1 and 2, a method of calibrating a sweeper gyroscope, the method comprising:
s1, acquiring a zero offset value of a gyroscope of the sweeper, wherein the gyroscope is a single-axis gyroscope;
s2, when the sweeper is in a running state, acquiring a plurality of original data acquired by the gyroscope within a set time length;
and S3, calculating the angle value of the gyroscope according to the zero offset value and the plurality of original data.
In the embodiment, S1, acquiring a zero offset value of a gyroscope of the sweeper, wherein when the sweeper works, the angle of the gyroscope changes, the zero offset value of the sweeper is used as a reference value, and the angle value of the gyroscope is obtained through calculation, so that the angle value of the gyroscope is more accurate in a moving state; the gyroscope is a single-axis gyroscope, the angle value of the gyroscope is not interfered by data among other axes when being calculated according to the zero offset value and the plurality of original data, and the calculated angle value is the angle value of a single axis of the gyroscope, namely the angle value of the rotation angle of the z axis of the sweeper.
And S2, when the sweeper is in the running state, the state of the gyroscope can be changed by generating an acceleration value in the moving process of the sweeper, so that the state parameter of the gyroscope is changed continuously. A plurality of raw data of the gyroscope are collected within a set time length.
And S3, calculating to obtain an angle value of the gyroscope according to the plurality of original data and the zero offset value, calculating to obtain a final angle value of the gyroscope according to the plurality of original data and the zero offset value of the sweeper in the motion state, and taking the final angle value of the gyroscope as a value after the gyroscope is calibrated so as to judge the rotation angle of the sweeper more accurately.
In an embodiment, the step of calculating an angle value of the gyroscope according to the zero offset value and the raw data includes:
calculating the average value of each group of the original data to obtain a plurality of original data average values;
calculating the average value of the average values of the plurality of original data to obtain an original average value;
and subtracting the zero offset value from the original average value to obtain the angle value of the gyroscope.
In the above embodiment, the gyroscope is a single-axis gyroscope, the influence of data output by the remaining axes is avoided, the original average value is used to reduce the zero offset value, the average value of each group of original data is calculated to obtain the average value of multiple groups of original data, that is, the average value of multiple original data is obtained, the average value of multiple original data is calculated to obtain the original average value, and finally the angle value of the gyroscope is obtained by reducing the zero offset value from the original average value.
In the running state of the sweeper, the gyroscope acquires data once every 1ms (ms represents millisecond) to obtain one piece of original data, and acquires 10 pieces of original data after 10ms intervals to obtain a first group of original data. Removing the first original data from the first group of original data, forming a second group of original data by the remaining original data and the original data acquired in the 11 th ms, and so on, removing the first original data from each group of original data, forming the next group of original data by the original data acquired in the next 1ms of the last 1ms of the group of original data until 10 groups of original data are formed; the average value of each group of original data is calculated to obtain 10 average values of the original data (i.e. 10 average values are obtained), then the average value of the 10 average values of the original data is calculated again to obtain the original average value, and then the original average value is subtracted by a zero offset value to obtain an angle value.
For example, the zero offset value of the sweeper is 10, the gyroscope takes 19 pieces of raw data 13, 12, 15, 14, 12, 14, 15, 12, 10, 12, 11, 14, 13, 10, 14, 12, 13 in 19ms, ten pieces of raw data are taken as one group, the raw data collected in the first 10ms is taken as the first group of data, namely 13, 12, 15, 14, 12, 14, 15, 12 is taken as the first group of raw data, 12, 15, 14, 12, 14, 15, 12, 10 is taken as the second group of data, and so on, 12, 10, 12, 11, 14, 13, 10, 14, 12, 13 is taken as the tenth group of raw data, and there are 10 pieces of raw data in each group of data, and the 10 pieces of raw data in each group are respectively averaged to obtain an average value of 10 pieces of raw data: 13.1, 12.8, 12.4, 12.5, 12.3, 12.1; and calculating the average value of the 10 original data to obtain 12.52, namely 12.52 is the original average value, the original average value 12.52 minus the zero offset value 10 is equal to 2.52, and 2.52 is the angle value of the gyroscope.
In an embodiment, the step of calculating an angle value of the gyroscope according to the zero offset value and the plurality of raw data sums includes:
sequentially calculating the difference value between each original data in each group of original data and the zero offset value to obtain a plurality of groups of original data difference values;
calculating the average value of the difference values of each group of the original data to obtain the average value of the difference values of the original data;
and calculating the average value of the difference mean values of the plurality of original data to obtain the angle value of the gyroscope.
In this embodiment, in the operating state of the sweeper, the gyroscope collects data every 1ms to obtain an original data, and then the original data is subtracted by the zero offset value to obtain a difference value. After 10ms, 10 original data are collected by the gyroscope, and 10 difference values are sequentially calculated according to the mode just described, wherein the 10 difference values are the difference values of the first group of original data. Subtracting a zero offset value from each original data in the second group of original data to obtain a second group of original data difference values, repeating the steps to obtain 10 groups of original data difference values, then respectively calculating the average value of the 10 groups of original data difference values to obtain 10 original data difference average values, and finally calculating the average value of the 10 original data difference average values to obtain the angle value of the gyroscope.
For example, a gyroscope acquires 19 raw data taken within 19 ms: 13. 12, 15, 14, 12, 14, 15, 12, 10, 12, 11, 14, 13, 10, 14, 12, 13, a first raw data 13 collected by a gyroscope, a first difference value 3 obtained by subtracting a zero offset value 10 from a first average raw value; acquiring second original data 12 after the interval of 1ms, and subtracting a zero offset value 10 from the second average original value to obtain a second difference value 2; acquiring third original data 15 after the interval of 1ms, and subtracting a zero offset 10 from the third original data to obtain a third difference value 5; the original data acquired within 7ms thereafter are 14, 12, 14, 15, 12 in turn, and each original data is subtracted by a zero offset value to obtain 4, 2, 4, 5, 2, respectively, so as to obtain a first set of original data difference values: 3. 2, 5, 4, 2, 4, 5, 2, a second set of raw data difference values: 2.5, 4, 2, 4, 5, 2, 0, and so on for the tenth set of raw data differences: 2. 0, 2, 1, 4, 3, 0, 4, 2, 3; respectively calculating the average value of 10 groups of original data difference values to obtain 10 original data difference average values: 3.1, 2.8, 2.4, 2.5, 2.3, 2.1; the average value of the difference mean values of 10 original data is calculated to be 2.52, 2.52 is the angle value of the gyroscope, the number of calculation each time is small, the calculation is simple, and errors are avoided.
The formula for calculating the angle value of the gyroscope is:
Figure BDA0003293061180000071
therein, adGyroRepresenting angular values, x, of the gyroscopeoffsetRepresenting zero-bias value, x, of the gyroscopejRepresenting the raw data collected by the gyroscope, j representing the order of the raw data, i representing the order of the angle values, and N being 10.
In another embodiment, the raw data collected by the gyroscope is buffered in a buffer, wherein the buffer is a buffer, and the average value of the data in the buffer memory is calculated each time when the angle value is calculated. In the initial stage, the gyroscope collects original data, stores the original data in a buffer, calculates the average value of the original data, and then subtracts a zero offset value from the average value to obtain an angle value; after the sweeper continues to operate for 1ms, the gyroscope collects original data, stores the original data in the buffer, calculates the average value of the two original data, and subtracts the zero offset value from the average value to obtain an angle value; and calculating accordingly. When the original data stored in the buffer is full (for example, the upper limit of the original data stored in the buffer is 10), the gyroscope acquires one piece of original data again, deletes the earliest acquired original data from the buffer, puts the newly acquired original data into the buffer, and calculates the average value of all the original data in the buffer. The buffer is buffered as shown in FIG. 2.
In an embodiment, the step of obtaining the zero offset value of the gyroscope of the sweeper comprises:
acquiring first data of a gyroscope when the sweeper is in an initial power-on state;
and calculating to obtain an initial zero offset value according to the first data, and taking the initial zero offset value as the zero offset value.
In the above embodiment, when the sweeper is in the initial power-on state, all the motors are in the closed state, and the fan, the rolling brush, the side brush and the like are in the static state, and the first data acquired by the gyroscope is not affected by the vibration of the motors, the fan, the rolling brush, the side brush and the like, so that the initial zero offset value obtained through calculation is more accurate, the error is smaller, and the calculation error of the angle value of the gyroscope obtained through calculation according to the initial zero offset value is smaller.
In an embodiment, after the step of calculating the zero offset value according to the first data, the method includes:
detecting that an obstacle exists in front of the straight-going sweeper;
controlling the sweeper to stop moving;
when the movement stopping time of the sweeper exceeds the preset time, acquiring second data of a gyroscope, and calculating to obtain a corrected zero offset value according to the second data;
replacing the initial zero-bias value with the corrected zero-bias value to update the zero-bias value.
In the above embodiment, when the sweeper works, the data of the gyroscope changes from time to time, the angle value of the gyroscope changes, the speed of the sweeper is reduced when the sweeper encounters an obstacle, the angle value of the gyroscope is calibrated at this time, the initial zero offset value is used as a reference standard for calculating the angle value of the gyroscope when the sweeper works, the error of the angle value of the gyroscope is calculated to be large, the second data of the gyroscope is collected, the corrected zero offset value is calculated according to the second data, the corrected zero offset value is replaced by the initial zero offset value to update the zero offset value, and the angle value of the gyroscope is calculated according to the corrected zero offset value. The corrected zero offset value is the zero offset value of the obstacle encountered by the sweeper during working, so that the calculation error of the angle value of the gyroscope calculated according to the corrected zero offset value is smaller. Carry out the correction of zero offset value when the machine of sweeping the floor meets the barrier, utilized the speed reduction clearance of meeting the barrier and keeping away the barrier promptly, the down time that should specially spend originally can be practiced thrift, the energy that can consume when also having practiced thrift extra restart a plurality of motors, the fan is closed when the machine of sweeping the floor stops the operation, the round brush stall, the limit brush gets into the minimum rotational speed of settlement, avoid the influence of vibrations such as motor, fan, round brush and limit brush to the second data, thereby make the correction zero offset value that obtains of calculation more accurate, the error is littleer, thereby make the calculation error of the angle value of the gyroscope that obtains according to this correction zero offset value calculation littleer.
Preferably, before "detecting that there is an obstacle in front of the straight-ahead movement of the sweeper", the method further includes: and judging whether the preset time length is met since the zero offset value is confirmed last time, and if so, detecting the straight track and the front obstacle.
In one embodiment, the step of replacing the initial zero-bias value with the corrected zero-bias value to update the zero-bias value includes:
calculating a zero offset value of the corrected zero offset value and the initial zero offset value;
judging whether the absolute value of the zero deviation value is less than or equal to a preset correction threshold value or not;
and if so, replacing the initial zero offset value with the corrected zero offset value to update the zero offset value.
In the above embodiment, after the sweeper stops when encountering an obstacle, due to reasons such as the sweeper is on the ground with different heights, calibration of the initial correction zero offset value may be affected, in order to avoid large deviation of calibration of the correction zero offset value caused by unevenness of the ground or other reasons, a correction threshold value is obtained by subtracting the correction zero offset value from the initial zero offset value, whether the absolute value of the zero offset value is less than or equal to the correction threshold value is judged, if so, the correction zero offset value is updated, and the correction zero offset value is recorded. When the absolute value of the zero offset value is larger, the influence of the external environment on the corrected zero offset value is too large, the calculated corrected zero offset value is accurate and low, and the error is large, so that the calculation error of the angle value of the gyroscope calculated according to the corrected zero offset value is larger, and the corrected zero offset value cannot be updated. The comparison formula is as follows:
Figure BDA0003293061180000091
wherein: offsetGyroRepresenting zero offset value, offsetrecordRepresenting the initial zero offset value, offsetlastThe zero offset value is indicated as initial correction, the thread _1 is indicated as a correction threshold value, and the other indicates whether the absolute value of the zero offset value is less than or equal to the other conditions except the correction threshold value.
In an embodiment, the step of calculating an average value of each set of the raw data to obtain a plurality of raw data average values includes:
obtaining a difference value of two adjacent original data;
if the absolute value of the difference value is larger than a preset original difference threshold value, modifying the data of the latter in the adjacent original data into the data of the former in the adjacent original data;
based on the modified raw data, a raw average of a plurality of the raw data is calculated.
In the above-described embodiment of the present invention,
Figure BDA0003293061180000092
wherein, AdGyroRepresenting original data, AdrecordRepresenting the last original data, AdlastThe next time the original data is represented, the thread _2 represents the original difference threshold, and the other represents the situation except that the absolute value of the difference value between two adjacent original data is less than or equal to the original difference threshold.
When the sweeper collides during working, the original data acquired by the gyroscope jumps in a short period in a large range, the difference between the two adjacent original data is large, and the error of the output angle value of the gyroscope calculated by the original data after collision is large, so that the correction accuracy is influenced.
The difference value of two adjacent original data is larger than a preset original difference threshold value, the data of the latter in the adjacent original data is modified into the data of the former in the adjacent original data, which is equivalent to discarding the data of the latter with large errors, the screening is continuous from front to back, namely, the data of the former is the data which survives through error screening and has certain credibility, so that the angle value of the gyroscope obtained through the original data is more accurate, and the errors are smaller.
In an embodiment, the step of modifying the latter data of the adjacent original data into the former data of the adjacent original data if the absolute value of the difference is greater than the preset original difference threshold includes:
judging whether n continuous absolute values of the difference values are larger than the original difference threshold value or not; or, whether n absolute values of the difference values in a first preset number of difference values are greater than the original difference threshold exists, wherein the first preset number is greater than n;
if yes, judging that the gyroscope is damaged;
if not, modifying the latter data in the adjacent original data into the former data in the adjacent original data if the absolute value of the difference is larger than the preset original difference threshold.
In the embodiment, when the sweeper works, the sweeper collides with an object or falls off, for example, when the sweeper rolls off on a stair or falls off from a height, parts in the sweeper are impacted, the parts are impacted mutually, the gyroscope is damaged after the gyroscope is impacted, so that the original data acquired by the gyroscope has large amplitude jump in a short period, the gyroscope is considered to be damaged if the absolute value of the difference value of n times of two adjacent original data in n times or a certain number is greater than the original difference threshold value, the error of the angle value of the gyroscope obtained through calculation of the original data is large, and the angle value output by the two-wheel differential model of the sweeper is used for replacing the angle value of the gyroscope to serve as the corrected angle value of the sweeper.
Referring to fig. 1 to 3, in an embodiment, the present invention further discloses a calibration device for a gyroscope of a sweeper, including:
the first acquisition unit 1 is used for acquiring a zero offset value of a gyroscope of the sweeper;
the second acquisition unit 2 is used for acquiring a plurality of original data acquired by the gyroscope within a set time length when the sweeper is in an operating state;
and the calculating unit 3 is used for calculating the angle value of the gyroscope according to the zero offset value and the plurality of original data.
In the above embodiment, the first obtaining unit 1 obtains the zero offset value of the gyroscope of the sweeper, preferably, when all the motors are in a closed state, data of the gyroscope is collected as the zero offset value, when the sweeper works, the angle of the gyroscope changes, the zero offset value of the sweeper is used as a reference value, the angle value of the gyroscope is obtained through calculation, and the angle value of the gyroscope in a moving state is more accurate; the gyroscope is a single-axis gyroscope, the angle value of the gyroscope is not interfered by data among other axes when being calculated according to the zero offset value and the plurality of original data, and the calculated angle value is the angle value of a single axis of the gyroscope, namely the angle value of the rotation angle of the z axis of the sweeper.
When the sweeper is in an operating state, the second acquisition unit 2 acquires a plurality of original data acquired by the gyroscope within a set time, and when the sweeper is in the operating state, the motor, the fan, the rolling brush, the side brush and the like in the sweeper continuously rotate, and the original data of the gyroscope are different.
The calculating unit 3 calculates the angle value of the gyroscope according to the zero offset value and the sum of the plurality of original data, obtains the angle value of the gyroscope according to the plurality of original data in the movement state of the sweeper and the zero offset value of the sweeper, and uses the angle value of the gyroscope as the calibration value of the gyroscope to judge the rotation angle of the sweeper more accurately.
This embodiment is adaptive to the first embodiment, and a plurality of details described in the first embodiment are also applicable to this embodiment, which is not described herein again.
Referring to fig. 1 to 4, the present invention also discloses a storage medium, which is a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed, the method for calibrating a gyroscope of a sweeper is implemented according to the above-mentioned embodiment. The calibration method of the gyroscope of the sweeper comprises the following specific steps:
a method of calibrating a sweeper gyroscope, the method comprising:
acquiring a zero offset value of a gyroscope of the sweeper, wherein the gyroscope is a single-axis gyroscope;
when the sweeper is in an operating state, acquiring a plurality of original data acquired by a gyroscope within a set time length;
and calculating to obtain the angle value of the gyroscope according to the zero offset value and the plurality of original data.
Further, the step of calculating the angle value of the gyroscope according to the zero offset value and the plurality of raw data includes:
calculating the average value of each group of the original data to obtain a plurality of original data average values;
calculating the average value of the average values of the plurality of original data to obtain an original average value;
and subtracting the zero offset value from the original average value to obtain the angle value of the gyroscope.
Further, the step of calculating an angle value of the gyroscope according to the zero offset value and the plurality of raw data includes:
sequentially calculating the difference value between each original data in each group of original data and the zero offset value to obtain a plurality of groups of original data difference values;
calculating the average value of the difference values of the original data of each group to obtain the average value of the difference values of the original data
And calculating the average value of the difference mean values of the plurality of original data to obtain the angle value of the gyroscope.
Further, the step of obtaining the zero offset value of the gyroscope of the sweeper comprises:
acquiring first data of a gyroscope when the sweeper is in an initial power-on state;
and calculating to obtain an initial zero offset value according to the first data, and taking the initial zero offset value as the zero offset value.
Further, after the step of calculating the zero offset value according to the first data, the method includes:
detecting that an obstacle exists in front of the straight-going sweeper;
controlling the sweeper to stop moving;
when the movement stopping time of the sweeper exceeds the preset time, acquiring second data of a gyroscope, and calculating to obtain a corrected zero offset value according to the second data;
replacing the initial zero-bias value with the corrected zero-bias value to update the zero-bias value.
Further, the step of replacing the initial zero offset value with the corrected zero offset value to update the zero offset value includes:
calculating a zero offset value of the corrected zero offset value and the initial zero offset value;
judging whether the zero deviation value is less than or equal to a preset correction threshold value or not;
and if so, replacing the initial zero offset value with the corrected zero offset value to update the zero offset value.
Further, the step of calculating an average value of each group of the raw data to obtain a plurality of raw data average values includes:
obtaining a difference value of two adjacent original data;
if the difference value is larger than a preset original difference threshold value, modifying the data of the latter in the adjacent original data into the data of the former in the adjacent original data;
based on the modified raw data, a raw average of a plurality of the raw data is calculated.
This embodiment is adaptive to the first embodiment, and a plurality of details described in the first embodiment are also applicable to this embodiment, which is not described herein again.
Referring to fig. 4, in an embodiment, the invention further discloses a computer device, which includes a processor, a memory, and a computer program stored in the memory and executable on the processor, and when the processor executes the computer program, the method for calibrating the gyroscope of the sweeper according to the embodiment is implemented.
When it runs on a computer device, the computer device is caused to execute the position location method of the terminal described in the above embodiments by a processor provided inside thereof.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product.
The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the application to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that a computer can store or a data storage device, such as a server, a data center, etc., that is integrated with one or more available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (10)

1. A method of calibrating a sweeper gyroscope, the method comprising:
acquiring a zero offset value of a gyroscope of the sweeper, wherein the gyroscope is a single-axis gyroscope;
when the sweeper is in an operating state, acquiring a plurality of original data acquired by a gyroscope within a set time length;
and calculating to obtain the angle value of the gyroscope according to the zero offset value and the plurality of original data.
2. The method of claim 1, wherein the step of calculating an angle value of the gyroscope from the zero offset value and the plurality of raw data comprises:
calculating the average value of each group of the original data to obtain a plurality of original data average values;
calculating the average value of the average values of the plurality of original data to obtain an original average value;
and subtracting the zero offset value from the original average value to obtain the angle value of the gyroscope.
3. The method of claim 1, wherein the step of calculating an angle value of the gyroscope from the zero offset value and the plurality of raw data comprises:
sequentially calculating the difference value between each original data in each group of original data and the zero offset value to obtain a plurality of groups of original data difference values;
calculating the average value of the difference values of each group of the original data to obtain the average value of the difference values of the original data;
and calculating the average value of the difference mean values of the plurality of original data to obtain the angle value of the gyroscope.
4. The method of calibrating a sweeper gyroscope of claim 1, wherein the step of obtaining a zero offset value for the sweeper gyroscope comprises:
acquiring first data of a gyroscope when the sweeper is in an initial power-on state;
and calculating to obtain an initial zero offset value according to the first data, and taking the initial zero offset value as the zero offset value.
5. The method of calibrating a gyroscope of a sweeper according to claim 4, wherein said step of calculating said zero offset value from said first data is followed by the steps of:
detecting that an obstacle exists in front of the straight-going sweeper;
controlling the sweeper to stop moving;
when the movement stopping time of the sweeper exceeds the preset time, acquiring second data of a gyroscope, and calculating to obtain a corrected zero offset value according to the second data;
replacing the initial zero-bias value with the corrected zero-bias value to update the zero-bias value.
6. The method of calibrating a sweeper gyroscope of claim 5, wherein the step of replacing the initial zero-bias value with the corrected zero-bias value to update the zero-bias value includes:
calculating a zero offset value of the corrected zero offset value and the initial zero offset value;
judging whether the zero deviation value is less than or equal to a preset correction threshold value or not;
and if so, replacing the initial zero offset value with the corrected zero offset value to update the zero offset value.
7. The method of claim 2, wherein the step of averaging each set of raw data to obtain a plurality of raw data averages comprises:
obtaining a difference value of two adjacent original data;
if the difference value is larger than a preset original difference threshold value, modifying the data of the latter in the adjacent original data into the data of the former in the adjacent original data;
based on the modified raw data, a raw average of a plurality of the raw data is calculated.
8. A calibrating device of a gyroscope of a sweeper is characterized by comprising
The first acquisition unit is used for acquiring a zero offset value of a gyroscope of the sweeper;
the second acquisition unit is used for acquiring a plurality of original data acquired by the gyroscope within a set time length when the sweeper is in an operating state;
and the calculating unit is used for calculating the angle value of the gyroscope according to the zero offset value and the plurality of original data.
9. A storage medium, characterized in that it is a computer-readable storage medium, on which a computer program is stored, which when executed implements a method of calibrating a sweeper gyroscope according to any one of claims 1 to 7.
10. Computer device, characterized in that it comprises a processor, a memory and a computer program stored on said memory and executable on said processor, said processor implementing, when executing said computer program, a method for calibrating a gyroscope of a sweeper according to any one of claims 1 to 7.
CN202111170804.2A 2021-10-08 2021-10-08 Calibration method and device of gyroscope of sweeper, storage medium and computer equipment Pending CN114001751A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111170804.2A CN114001751A (en) 2021-10-08 2021-10-08 Calibration method and device of gyroscope of sweeper, storage medium and computer equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111170804.2A CN114001751A (en) 2021-10-08 2021-10-08 Calibration method and device of gyroscope of sweeper, storage medium and computer equipment

Publications (1)

Publication Number Publication Date
CN114001751A true CN114001751A (en) 2022-02-01

Family

ID=79922344

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111170804.2A Pending CN114001751A (en) 2021-10-08 2021-10-08 Calibration method and device of gyroscope of sweeper, storage medium and computer equipment

Country Status (1)

Country Link
CN (1) CN114001751A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080022790A1 (en) * 2006-07-05 2008-01-31 Samsung Electronics Co., Ltd. Apparatus and method for correcting bias of gyroscope mounted on mobile robot
CN110672099A (en) * 2019-09-09 2020-01-10 武汉元生创新科技有限公司 Course correction method and system for indoor robot navigation
CN111504254A (en) * 2020-04-28 2020-08-07 深圳市云鼠科技开发有限公司 Sweeper angle measuring and calculating method based on six-axis gyroscope
CN112971618A (en) * 2021-02-07 2021-06-18 深圳市无限动力发展有限公司 Method and device for getting rid of difficulties of sweeping robot and computer equipment
CN113063442A (en) * 2021-03-17 2021-07-02 深圳市云鼠科技开发有限公司 Floor sweeping robot gyroscope calibration method and device, computer equipment and memory

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080022790A1 (en) * 2006-07-05 2008-01-31 Samsung Electronics Co., Ltd. Apparatus and method for correcting bias of gyroscope mounted on mobile robot
CN110672099A (en) * 2019-09-09 2020-01-10 武汉元生创新科技有限公司 Course correction method and system for indoor robot navigation
CN111504254A (en) * 2020-04-28 2020-08-07 深圳市云鼠科技开发有限公司 Sweeper angle measuring and calculating method based on six-axis gyroscope
CN112971618A (en) * 2021-02-07 2021-06-18 深圳市无限动力发展有限公司 Method and device for getting rid of difficulties of sweeping robot and computer equipment
CN113063442A (en) * 2021-03-17 2021-07-02 深圳市云鼠科技开发有限公司 Floor sweeping robot gyroscope calibration method and device, computer equipment and memory

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
徐宇程;章雪挺;高轩;余星;刘敬彪;: "海洋传感器的内嵌陀螺仪偏航角校正方法", 传感器与微***, no. 12 *

Similar Documents

Publication Publication Date Title
KR100772915B1 (en) Apparatus and method for correcting bias of gyroscope on a moving robot
CN111207774B (en) Method and system for laser-IMU external reference calibration
CN108253958B (en) Robot real-time positioning method in sparse environment
EP1489381A2 (en) Method and apparatus for compensating for acceleration errors and inertial navigation system employing the same
CN110057380B (en) Step counting method, step counting device, terminal and storage medium
JP2012024877A (en) Robot control apparatus
US20210033421A1 (en) Method and system for mobile sensor calibration
US20190344440A1 (en) Control system and method for controlling driven body
CN109827545A (en) A kind of online inclination angle measurement method based on double mems accelerometers
CN114612348A (en) Laser point cloud motion distortion correction method and device, electronic equipment and storage medium
CN111982091A (en) Laser point cloud distortion correction method based on synchronous IMU
CN114001751A (en) Calibration method and device of gyroscope of sweeper, storage medium and computer equipment
CN107981878A (en) A kind of X-ray machine motion positions method, equipment, master controller and system
CN110832274A (en) Ground slope calculation method, device, equipment and storage medium
CN113110426B (en) Edge detection method, device, robot and storage medium
CN115727871A (en) Track quality detection method and device, electronic equipment and storage medium
KR20210095624A (en) Method and Apparatus for Calibrating Zero Rate Output of Sensors
CN116969286B (en) Floor positioning method and device
CN109341677B (en) Method and device for removing accumulative error, user equipment and storage medium
CN118123850B (en) Deformation sensing and track tracking method and system for long flexible hydraulic mechanical arm
CN112859138B (en) Gesture measurement method and device and electronic equipment
CN113602920A (en) Floor calculation method and system based on acceleration sensor displacement
CN114322918B (en) Method and device for detecting movable equipment state and computer readable storage medium
CN118209130A (en) Mileage data determining method and device, electronic equipment and storage medium
CN115824206A (en) Odometer positioning method and device, electronic equipment and medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination