CN114791284A - Calibration method and device for electronic compass in robot and robot - Google Patents
Calibration method and device for electronic compass in robot and robot Download PDFInfo
- Publication number
- CN114791284A CN114791284A CN202110103542.1A CN202110103542A CN114791284A CN 114791284 A CN114791284 A CN 114791284A CN 202110103542 A CN202110103542 A CN 202110103542A CN 114791284 A CN114791284 A CN 114791284A
- Authority
- CN
- China
- Prior art keywords
- robot
- electronic compass
- calibration
- preset
- detection 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.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 68
- 230000033001 locomotion Effects 0.000 claims abstract description 95
- 230000008569 process Effects 0.000 claims abstract description 25
- 238000004422 calculation algorithm Methods 0.000 claims abstract description 13
- 238000001514 detection method Methods 0.000 claims description 97
- 239000011159 matrix material Substances 0.000 claims description 16
- 238000005070 sampling Methods 0.000 claims description 6
- 230000008859 change Effects 0.000 claims description 5
- 230000002093 peripheral effect Effects 0.000 claims description 5
- 230000008447 perception Effects 0.000 abstract description 8
- 238000010586 diagram Methods 0.000 description 7
- 230000003287 optical effect Effects 0.000 description 5
- 238000004590 computer program Methods 0.000 description 4
- 230000006870 function Effects 0.000 description 4
- 230000036544 posture Effects 0.000 description 4
- 230000005672 electromagnetic field Effects 0.000 description 3
- 238000012545 processing Methods 0.000 description 3
- 238000013461 design Methods 0.000 description 2
- 239000011664 nicotinic acid Substances 0.000 description 2
- 230000000007 visual effect Effects 0.000 description 2
- 241001465754 Metazoa Species 0.000 description 1
- 230000005856 abnormality Effects 0.000 description 1
- 238000009825 accumulation Methods 0.000 description 1
- 230000006978 adaptation Effects 0.000 description 1
- 238000004458 analytical method Methods 0.000 description 1
- 238000003491 array Methods 0.000 description 1
- 230000006399 behavior Effects 0.000 description 1
- 238000005452 bending Methods 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 230000001186 cumulative effect Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000007774 longterm Effects 0.000 description 1
- 230000005389 magnetism Effects 0.000 description 1
- 238000005259 measurement Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000035945 sensitivity Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01C—MEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
- G01C17/00—Compasses; Devices for ascertaining true or magnetic north for navigation or surveying purposes
- G01C17/38—Testing, calibrating, or compensating of compasses
Landscapes
- Engineering & Computer Science (AREA)
- Radar, Positioning & Navigation (AREA)
- Remote Sensing (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Manipulator (AREA)
Abstract
The disclosure relates to a calibration method and device of an electronic compass in a robot and the robot, wherein the method comprises the following steps: controlling the robot to move according to the planned path; collecting calibration data collected by an electronic compass in the process of movement; and calibrating the electronic compass according to the calibration data and a preset calibration algorithm. According to the method, the full-automatic online calibration of the electronic compass can be realized without manual participation, the perception capability of the robot is improved, the labor cost is reduced, and the use experience of a user is improved.
Description
Technical Field
The present disclosure relates to the field of robot technologies, and in particular, to a method and an apparatus for calibrating an electronic compass in a robot, an electronic device, a storage medium, and a computer program product.
Background
At present, an electronic compass based on MEMS (Micro-Electro-Mechanical Systems) is widely applied to consumer electronics devices such as mobile phones, mobile robots, Micro unmanned aerial vehicles and the like due to its small size, low price and high sensitivity. However, the stability of the electronic compass is always influenced by variable electromagnetic fields generated by other electromagnetic devices in the environment, for example, in the application of a micro unmanned aerial vehicle, because a plurality of motors rotate simultaneously, a certain variable electromagnetic field can be generated, which can generate a large influence on the working state of the electronic compass, so that the electronic compass cannot accurately measure the earth magnetic field. In the application of the electronic compass, if the earth magnetism is seriously disturbed to drift, calibration needs to be carried out again, and the calibration data can be put into use again, so that human participation is needed to finish off-line calibration.
In the related art, for calibration of an electronic compass in a robot, offline calibration is also usually performed in a manual participation manner. However, the manual calibration method not only greatly reduces the perception capability of the robot, but also has high labor cost, thereby affecting the user experience.
Disclosure of Invention
The present disclosure is directed to solving, at least to some extent, one of the technical problems in the related art.
The present disclosure proposes the following technical solutions:
the embodiment of the first aspect of the disclosure provides a method for calibrating an electronic compass in a robot, which includes: controlling the robot to move according to a planned path;
collecting calibration data collected by the electronic compass in the motion process; and
and calibrating the electronic compass according to the calibration data and a preset calibration algorithm.
In addition, the calibration method of the electronic compass in the robot according to the embodiment of the present disclosure may further have the following additional technical features:
according to an embodiment of the present disclosure, the method for calibrating an electronic compass in a robot further includes: acquiring a current detection value of an electronic compass in the robot; and judging whether the electronic compass needs to be calibrated or not according to the current detection value, wherein after the electronic compass needs to be calibrated, the robot is controlled to move according to the planned path.
According to one embodiment of the disclosure, when the robot works and reaches a first preset condition, or the walking mileage of the robot reaches a second preset condition, it is determined that calibration is needed.
According to an embodiment of the present disclosure, the determining whether the electronic compass needs to be calibrated according to the current detection value includes: acquiring a reference detection value of a reference sensor; and judging whether the electronic compass needs to be calibrated or not according to the reference detection value of the reference sensor and the current detection value of the electronic compass.
According to an embodiment of the present disclosure, the determining whether the electronic compass needs to be calibrated according to the reference detection value of the reference sensor and the current detection value of the electronic compass includes: generating a surrogate rotation matrix from the plurality of reference detection values and the current detection value; generating a variation threshold according to the substitute rotation matrix; obtaining a difference value between the current detection value and the change threshold value, and obtaining a weight corresponding to the difference value; updating a cumulative value according to the difference value and the corresponding weight; if the accumulated value is greater than or equal to a preset threshold value, judging that the electronic compass needs to be calibrated; and if the accumulated value is smaller than the preset threshold value, judging that the electronic compass does not need to be calibrated.
According to an embodiment of the present disclosure, before the controlling the robot to move according to the planned path, the method further includes: collecting a peripheral environment image of the robot; generating a movable space of the robot according to the surrounding environment image; judging whether the movable space meets the motion space required by the preset curve motion or not; if yes, further controlling the robot to move according to the preset curve; and if the moving space does not meet the requirement, stopping moving according to the preset curve until the movable space meets the required moving space.
According to an embodiment of the present disclosure, the controlling the robot to move according to a planned path includes: controlling the robot to return to a standing state; generating the planning path according to a preset curve; and controlling the robot to repeat the preset curve motion along the planned path.
According to an embodiment of the present disclosure, the controlling the robot to repeat the preset curvilinear motion along the planned path includes: sampling the preset curve to generate a quaternion combination of each curve motion; and circularly controlling the robot to move according to the quaternion combination of each curvilinear motion.
According to an embodiment of the disclosure, the method for calibrating the electronic compass in the robot further includes: randomly generating a starting height of the robot at each curvilinear motion.
According to an embodiment of the present disclosure, before the controlling the robot to move according to the planned path, the method further includes: sending prompt information to a user to prompt the user whether to calibrate; receiving a calibration instruction of a user, wherein the calibration instruction is used for indicating the calibration of an electronic compass in the robot; and judging to carry out calibration according to the calibration instruction.
According to an embodiment of the present disclosure, the calibration instruction carries the planned path indicated by the user.
The embodiment of the second aspect of the present disclosure provides a calibration apparatus for an electronic compass in a robot, including: a first control module configured to perform controlling the robot to move along a planned path; the first acquisition module is configured to acquire calibration data acquired by the electronic compass in the motion process; the first calibration module is configured to perform calibration on the electronic compass according to a preset calibration algorithm according to the calibration data.
In addition, the calibration device of the electronic compass in the robot according to the above embodiment of the present disclosure may further have the following additional technical features:
according to an embodiment of the present disclosure, the calibration apparatus for an electronic compass in a robot further includes: the first acquisition module is configured to acquire the current detection value of the electronic compass in the robot; and the first judging module is configured to judge whether the electronic compass needs to be calibrated or not according to the current detection value, wherein after the electronic compass is determined to need to be calibrated, the robot is controlled to move according to the planned path.
According to an embodiment of the present disclosure, the calibration apparatus for an electronic compass in a robot further includes: and the second judgment module is configured to execute that the length of the second judgment module reaches a first preset condition when the robot works, or the walking mileage of the robot reaches a second preset condition, and then the robot needs to be calibrated.
According to an embodiment of the present disclosure, the first determining module includes: a first acquisition unit configured to perform acquisition of a reference detection value of a reference sensor; a first judgment unit configured to perform judgment whether the electronic compass needs calibration or not according to the reference detection value of the reference sensor and the current detection value of the electronic compass.
According to an embodiment of the present disclosure, the reference sensor is plural, and the first determination unit includes: a first generation subunit configured to perform generation of a surrogate rotation matrix from the plurality of reference detection values and the current detection value; a second generation subunit configured to perform generation of a variation threshold from the substitute rotation matrix; a first obtaining subunit configured to perform obtaining a difference between the current detection value and the variation threshold, and obtain a weight corresponding to the difference; a first updating subunit configured to perform updating of an accumulated value according to the difference value and the corresponding weight; a first judgment subunit configured to execute, if the accumulated value is greater than or equal to a preset threshold, judgment that the electronic compass needs to be calibrated; a second judging subunit configured to execute, if the accumulated value is smaller than the preset threshold value, judging that the electronic compass does not need to be calibrated.
According to an embodiment of the present disclosure, the calibration apparatus for an electronic compass in a robot further includes: a first acquisition module configured to perform acquisition of a surrounding environment image of the robot; a first generation module configured to perform generation of a movable space of the robot from the surrounding environment image; a third judging module configured to perform a judgment of whether the movable space satisfies a motion space required for a preset curvilinear motion; a second control module configured to perform further control of the robot to move according to the preset curve if satisfied; a third control module configured to perform, if not, pausing the movement according to the preset curve until the movable space satisfies the desired movement space.
According to an embodiment of the present disclosure, the first control module includes: a first control unit configured to perform control of the robot to return to a standing state; a first generation unit configured to perform generation of the planned path according to a preset curve; a second control unit configured to perform control of the robot to repeat the preset curvilinear motion along the planned path.
According to an embodiment of the present disclosure, the first control module includes: a first control unit configured to perform control of the robot to return to a standing state; a first generation unit configured to perform generation of the planned path according to a preset curve; a second control unit configured to perform control of the robot to repeat the preset curvilinear motion along the planned path.
According to an embodiment of the present disclosure, the second control unit includes: a third generation subunit configured to perform sampling of the preset curve to generate a quaternion combination for each curvilinear motion; a first control subunit configured to execute the quaternion combination cycle for each curvilinear motion to control the robot to move.
According to an embodiment of the present disclosure, the second control unit further includes: a fourth generation subunit configured to perform random generation of a starting height of the robot at each curvilinear motion.
According to an embodiment of the present disclosure, the calibration apparatus for an electronic compass in a robot further includes: the first sending module is configured to send prompt information to a user so as to prompt the user whether to calibrate; the first receiving module is configured to execute a calibration instruction of a receiving user, wherein the calibration instruction is used for instructing to calibrate the electronic compass in the robot; and the fourth judging module is configured to execute the calibration according to the calibration instruction judgment.
According to an embodiment of the present disclosure, the calibration instruction carries the planned path indicated by the user.
An embodiment of a third aspect of the present disclosure provides a robot, including: the embodiment of the second aspect of the present disclosure provides a calibration device for an electronic compass in a robot.
In addition, the calibration device for the electronic compass in the robot according to the above embodiments of the present disclosure may further have the following additional technical features:
according to an embodiment of the present disclosure, a robot further includes: a head portion; a trunk body; a leg connected to the torso body, and a foot connected to the leg.
A fourth aspect of the present disclosure provides an electronic device, including: a processor; a memory for storing executable instructions of the processor; the processor is configured to call and execute the executable instructions stored in the memory, so as to implement the calibration method of the electronic compass in the robot, which is provided by the embodiment of the first aspect of the present disclosure.
A fifth aspect of the present disclosure provides a non-transitory computer-readable storage medium, where instructions in the storage medium, when executed by a processor of an electronic device, enable the electronic device to perform the method for calibrating an electronic compass in a robot as set forth in the first aspect of the present disclosure.
A sixth aspect of the present disclosure provides a computer program product, where the computer program, when executed by a processor of an electronic device, enables the electronic device to perform the method for calibrating an electronic compass in a robot as set forth in the first aspect of the present disclosure.
According to the technical scheme of the embodiment of the disclosure, the robot is controlled to move according to the planned path, and calibration data collected by the electronic compass in the moving process is collected, so that the electronic compass is calibrated according to the calibration data, and online autonomous calibration of the electronic compass is realized. Therefore, according to the calibration method of the electronic compass in the robot, manual participation is not needed, full-automatic online calibration of the electronic compass can be achieved, the perception capability of the robot is improved, the labor cost is reduced, and the use experience of a user is improved.
Additional aspects and advantages of the disclosure will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the disclosure.
Drawings
Fig. 1 is a flowchart of a calibration method of an electronic compass in a robot according to an embodiment of the present disclosure;
FIG. 2 is a flow chart of determining whether an electronic compass requires calibration according to one embodiment of the present disclosure;
FIG. 3 is a flowchart of determining whether an electronic compass needs calibration according to a current detection value according to an embodiment of the present disclosure;
FIG. 4 is a flowchart of determining whether the electronic compass needs calibration based on a current detection value and a reference detection value according to an embodiment of the present disclosure;
fig. 5 is a flowchart of determining a movable space to control a robot to move according to a preset curve according to an embodiment of the present disclosure;
FIG. 6 is a schematic flow diagram for controlling a robot to move along a planned path according to one embodiment of the present disclosure;
FIG. 7 is a schematic flow chart diagram for controlling the robot to repeat a predetermined curvilinear motion along a planned path according to one embodiment of the present disclosure;
fig. 8 is a block diagram of a calibration apparatus of an electronic compass in a robot according to an embodiment of the present disclosure;
FIG. 9 is a schematic structural diagram of a robot according to an embodiment of the present disclosure;
fig. 10 is a schematic structural diagram of an electronic device according to an embodiment of the disclosure.
Detailed Description
Reference will now be made in detail to the embodiments of the present disclosure, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are illustrative and intended to explain the present disclosure, and should not be construed as limiting the present disclosure.
The following describes a calibration method and device for an electronic compass in a robot and the robot according to the embodiments of the present disclosure with reference to the drawings.
The robot according to the embodiment of the present disclosure may be a multi-degree-of-freedom foot robot, such as a biped robot, a quadruped robot, or a tripod robot, and the embodiment of the present disclosure is not limited thereto. The multi-degree-of-freedom foot type robot is provided with at least 12 motors, the magnetic field interference is better than that of a micro unmanned aerial vehicle, and the perception capability of the robot is greatly reduced if the robot does not have the function of automatic online calibration.
Fig. 1 is a flowchart of a calibration method of an electronic compass in a robot according to an embodiment of the present disclosure, where an execution subject may be an electronic device, specifically, the electronic device may be, but is not limited to, a computer and a mobile terminal, and the mobile terminal may be, but is not limited to, a personal computer, a smart phone, an IPAD, and the like.
As shown in fig. 1, the calibration method of the electronic compass in the robot includes the following steps S101 to S103.
And S101, controlling the robot to move according to the planned path.
And S102, collecting calibration data collected by the electronic compass in the motion process.
The planned path may be understood as a path that facilitates the electronic compass to acquire data in multiple directions (relative to the robot) or multiple movement routes, and may also be understood as all paths including multiple possible walking paths of the robot, for example, a path similar to a path in a shape of "8", a path in a shape of "S", and the like.
According to the embodiment of the disclosure, data acquired by the electronic compass in the process of the robot moving according to the planned path can be called as calibration data.
Specifically, the calibration data acquired by the electronic compass can be acquired in real time or periodically in the process of controlling the robot to move according to the planned path.
And S103, calibrating the electronic compass according to the calibration data and a preset calibration algorithm.
Specifically, after calibration data in the movement process of the electronic compass are collected, the electronic compass is calibrated according to the calibration data and a preset calibration algorithm.
The preset calibration algorithm may be an ellipsoid similarity algorithm. Namely, the electronic compass is calibrated according to the calibration data and an ellipsoid similarity algorithm.
For example, the robot is controlled to move according to a planned path (for example, similar to a planned path in a figure of "8"), and calibration data acquired by an electronic compass during the movement is acquired: and calibrating the electronic compass according to the plurality of attitude angle values, thereby completing the online autonomous calibration of the electronic compass.
According to the calibration method of the electronic compass in the robot, the robot is controlled to move according to the planned path, the calibration data collected by the electronic compass in the moving process are collected, and the electronic compass is calibrated according to the calibration data, so that the electronic compass is calibrated on line. Therefore, the full-automatic online calibration of the electronic compass can be realized without manual participation, the perception capability of the robot is improved, the labor cost is reduced, and the use experience of a user is improved.
The robot in the embodiment of the disclosure can realize self-adaptive calibration of the electronic compass, that is, calibration of the electronic compass can be automatically realized.
In an embodiment of the present disclosure, whether to start calibration of the electronic compass may also be determined according to a working state of the robot, where the working state may be a working duration or a walking mileage. Wherein, the walking mileage can be a continuous walking mileage of the robot in the current walking or motion event.
Optionally, when the working time of the robot meets the first preset condition, the calibration of the electronic compass is determined to be started. The working duration may be a duration of continuous working of the robot, and the first preset condition may be a set duration threshold, which may be set by a user or a factory manufacturer of the robot, for example, may be 1 hour, 2 hours, and the like.
Specifically, when the robot starts to work, timing can be started so as to realize real-time timing in the working process of the robot, and when the timing time reaches a first preset condition, it is determined that an electronic compass in the robot needs to be calibrated; or acquiring the walking mileage of the robot, and judging that the electronic compass in the robot needs to be calibrated when the walking mileage reaches a preset mileage. And then the robot is controlled to move according to the planned path, calibration data collected by the electronic compass in the moving process are collected, and the electronic compass is calibrated according to the calibration data.
For example, when the working time of the robot reaches 1 hour, or the travel distance of the robot reaches 1 kilometer, it is determined that calibration is required. And then controlling the robot to move according to the planned path, collecting calibration data collected by the electronic compass in the moving process, and calibrating the electronic compass according to the calibration data.
Optionally, when the walking mileage of the robot reaches a second preset condition, it is determined that the electronic compass needs to be calibrated. The walking mileage may be a continuous walking mileage of the robot in a current walking or movement event, and the second preset condition may be a set mileage threshold, which may be set by a user or a factory manufacturer of the robot, for example, may be 50 meters, 1 kilometer, or the like.
Specifically, when the robot starts to work, the continuous walking mileage of the robot can be acquired, and when the continuous walking mileage reaches a second preset condition, it is determined that an electronic compass in the robot needs to be calibrated. And then controlling the robot to move according to the planned path, collecting calibration data collected by the electronic compass in the moving process, and calibrating the electronic compass according to the calibration data.
For example, when the walking mileage of the robot reaches 1 kilometer, the electronic compass is determined to need to be calibrated. And then the robot is controlled to move according to the planned path, calibration data collected by the electronic compass in the moving process are collected, and the electronic compass is calibrated according to the calibration data.
Therefore, whether the electronic compass needs to be calibrated or not can be judged through the current detection value of the electronic compass in the robot, and whether the electronic compass needs to be calibrated or not can also be judged according to the working time or the walking mileage of the robot, so that the reliability of calibration can be improved.
It should be noted that, in the embodiment of the present disclosure, it may also be determined whether the electronic compass needs to be calibrated according to a current detection value of the electronic compass in the robot, and the robot is controlled to move according to the planned path under the condition that the electronic compass needs to be calibrated.
That is, in an embodiment of the present disclosure, as shown in fig. 2, the method for calibrating an electronic compass in a robot may further include the following steps S201 and S202.
S201, acquiring a current detection value of an electronic compass in the robot.
The embodiment of the present disclosure may refer to the current data collected by the electronic compass as the current detection value, which may be a declination, a heading angle, or an attitude angle, for example.
Specifically, in the working process of the robot, a current detection value can be acquired in real time through an electronic compass in the robot, and the current detection value is acquired.
And S202, judging whether the electronic compass needs to be calibrated or not according to the current detection value, wherein after the electronic compass needs to be calibrated, controlling the robot to move according to the planned path.
Specifically, after the current detection value is obtained, the current working state of the electronic compass may be determined according to the current detection value, and whether the electronic compass needs to be calibrated may be determined according to the current working state, and after it is determined that the electronic compass needs to be calibrated (for example, the electronic compass drifts), the above steps S101 to S103 may be performed.
It can be understood that if the electronic compass does not need to be calibrated, the current flow is stopped or the step S201 is returned to.
And if the electronic compass in the robot needs to be calibrated, controlling the robot to move according to the planned path, acquiring calibration data acquired by the electronic compass in the moving process, and calibrating the electronic compass according to the calibration data. For example, if the current working state of the electronic compass is determined to be in an unhealthy state (drift state) according to the current attitude angle value of the electronic compass in the robot, it is determined that the electronic compass needs to be calibrated, and then the robot is controlled to move according to a planned path (for example, similar to a planned path in a shape of "8"), and calibration data collected by the electronic compass during the movement process is collected: and calibrating the electronic compass according to the plurality of attitude angle values, thereby completing the online autonomous calibration of the electronic compass.
It can be understood that, when the electronic compass is determined whether to be calibrated according to the current detection value in step S202, in order to improve the reliability of the determination, it may be determined whether the electronic compass needs to be calibrated according to the historical detection value and the current detection value of the electronic compass, or a reference detection value (set by a manufacturer or a user) may be set to determine whether the electronic compass needs to be calibrated after comparing the current detection value with the reference detection value, or the reference detection value may be collected by a reference sensor to determine whether the electronic compass needs to be calibrated according to the reference detection value and the current detection value of the electronic compass.
That is, in an embodiment of the present disclosure, as shown in fig. 3, the step S202 may include the following steps S301 and S302:
s301, a reference detection value of the reference sensor is acquired.
According to the embodiment of the disclosure, one or more reference sensors (for example, a position sensor, an attitude sensor, and the like) may be provided in the robot, and a current detection value acquired by the reference sensors may be referred to as a reference detection value.
Specifically, after the current detection value of the electronic compass is acquired, the reference detection value acquired by the reference sensor is acquired.
And S302, judging whether the electronic compass needs to be calibrated or not according to the reference detection value of the reference sensor and the current detection value of the electronic compass.
Specifically, after the current detection value of the electronic compass and the reference detection value of the reference sensor are obtained, the current detection value and the reference detection value can be analyzed and compared to analyze whether the working state of the electronic compass is healthy or not according to the analysis and comparison result, if the working state of the electronic compass is unhealthy, it is determined that the electronic compass needs to be calibrated, and then the steps S101 to S103 are executed to calibrate the electronic compass; if the working state of the electronic compass is healthy, it is determined that the electronic compass does not need to be calibrated, and the current process is stopped or the step S201 is executed.
Therefore, whether the electronic compass needs to be calibrated or not is judged according to the reference detection value and the current detection value of the electronic compass, the reliability and the accuracy of judgment are improved, and the reliability of calibration is further improved.
It should be noted that, when the step S302 is executed, if there is one reference sensor, that is, the reference detection value is one, the difference between the current detection value and the reference detection value may be determined, so as to determine whether the electronic compass needs to be calibrated according to the difference, that is, if the difference is smaller, it may be determined that the electronic compass does not need to be calibrated, and if the difference is larger, it may be determined that the electronic compass needs to be calibrated; if there are a plurality of reference sensors, i.e., a plurality of corresponding reference detection values, the above step S302 is performed according to the steps shown in fig. 4.
That is, in an embodiment of the present disclosure, when there are a plurality of reference sensors, as shown in fig. 4, the step S302 (determining whether the electronic compass needs to be calibrated according to the reference detection value of the reference sensor and the current detection value of the electronic compass) may include the following steps S401 to S406:
s401, a surrogate rotation matrix is generated from the plurality of reference detection values and the current detection value.
S402, a variation threshold is generated according to the alternative rotation matrix.
And S403, acquiring a difference value between the current detection value and the change threshold value, and acquiring a weight corresponding to the difference value.
It should be noted that the variable threshold and the weight may refer to different thresholds and weights set in different motion states of the robot, for example, when the robot stands, the threshold is lower, the weight is higher, and when the robot moves violently, the threshold is higher, and the weight is lower.
The difference between the current detection value and the change threshold may be a product between a vector and a scalar (weight).
And S404, updating the accumulated value according to the difference value and the corresponding weight.
And S405, if the accumulated value is larger than or equal to a preset threshold value, judging that the electronic compass needs to be calibrated.
And S406, if the accumulated value is smaller than the preset threshold value, judging that the electronic compass does not need to be calibrated.
It should be noted that, in the design of the sensing system of the robot, a redundant design of the sensor is usually considered, that is, the multiple reference sensors in the embodiment of the present disclosure may be multiple sensors with the same sensing capability but different performances.
In the disclosed embodiment, a plurality ofThe reference detection values may include, but are not limited to, a Visual (Visual) based pose estimate Q V Pose estimation value Q based on Optical flow meter (Optical flow) O Pose estimation value Q based on Inertial Measurement Unit (IMU for short) I And a pose estimation value Q based on a robot Body (Body) mechanical angle B And the like. Wherein the current detection value of the electronic compass is contained in Q I In (1). It should be noted that each reference detection value may be corrected based on coordinates, that is, based on the attitude of the mass point of the robot.
Since the method is only used for analyzing the working state of the electronic compass, the reference detection value can be the current attitude data of the robot, namely the attitude trajectory R e of the robot in the SO3 space belongs to the SO3, wherein the SO3 is a set composed of a 3 × 3 orthogonal matrix with a determinant of 1, and R refers to a rotation matrix (a rotation matrix for converting a body coordinate system into an inertial coordinate system).
Specifically, after the current detection value and the plurality of reference detection values of the electronic compass are acquired, quaternions may be used instead of the rotation matrix R, so that the above-described four postures may be written as a set { Q } V ,Q O ,Q I ,Q B In which Q V 、Q O 、Q I And Q B Are all quaternions. In determining the set { Q } V ,Q O ,Q I ,Q B After that, the value due to the electronic compass is also contained in Q I In (1). Therefore when Q I When the value of (2) is continuously deviated from other values within a certain time, the serious abnormality of the numerical value of the electronic compass can be judged. The judgment of large deviation can be realized by calculating Q I And { Q V ,Q O ,Q I ,Q B Comparing and judging the covariance of the compass, performing weighted accumulation on the difference value to obtain an accumulated value, and judging that the electronic compass needs to be calibrated if the accumulated value is greater than or equal to a preset threshold value; and if the accumulated value is smaller than the preset threshold value, judging that the electronic compass does not need to be calibrated.
Therefore, whether the electronic compass needs to be calibrated or not is judged according to the multiple reference detection values and the current detection value, and the judgment accuracy is further improved.
In step S103, after the electronic compass needs to be calibrated and the calibration needs to be initiated, it is determined whether the body is in the safe area. If the robot is located in a safe area, an automatic calibration step can be carried out, and if the robot is not located in the safe area, a step of requesting the robot to find and move to the safe area to carry out automatic calibration is required to be initiated.
That is, in an embodiment of the present disclosure, as shown in fig. 5, in the step S101, before controlling the robot to move along the planned path, the following steps S501 to S505 may be further included:
and S501, collecting the surrounding environment image of the robot.
Specifically, after a calibration request is initiated, an image of the surrounding environment of the robot may be acquired through the camera, and the image of the surrounding environment may include objects and/or humans around the robot, such as surrounding trees, animals, houses, and the like.
And S502, generating a movable space of the robot according to the surrounding environment image.
Wherein, the movable space may refer to a peripheral space where the robot can move currently, for example, on an open space beside the robot without any obstacle.
Specifically, after the surrounding environment image is acquired, the movable space of the robot can be determined according to the position of the object in the surrounding environment image, so that the robot can move around the obstacle or move in the space without the obstacle.
For example, if a space other than 1 m from the robot is displayed in the surrounding environment image without any obstacle, the space other than 1 m from the robot may be determined as the movable space of the robot.
And S503, judging whether the movable space meets the motion space required by the preset curve motion.
The preset curve may be a lemniscate. The rectangular coordinate system equation of lemniscate is:
(x 2 +y 2 ) 2 =a 2 (x 2 -y 2 ) (1)
wherein, x and y represent the x-axis and the y-axis of a rectangular coordinate system, and a is the absolute value of the minimum value in the farthest distance which can be reached forwards and the farthest distance which can be reached backwards when the robot stands. X and y can be parameterized as:
wherein t and θ both refer to angles.
Specifically, whether the movable space can cover the track of the robot moving based on the preset curve can be judged, and if yes, the movable space meets the motion space required by the movement of the preset curve; if not, the movable space does not meet the motion space required by the preset curve motion.
And S504, if so, further controlling the robot to move according to a preset curve.
And if the movable space meets the motion space required by the motion of the preset curve, controlling the robot to move according to the preset curve.
For example, if the movable space is A1 and the movement space required by the preset curve movement is A2, if A1 covers A2(A1 ≧ A2), then A1 satisfies A2, and the robot is controlled to move according to the lemniscate, that is, the lemniscate track is formed on the movable space.
And S505, if not, pausing the motion according to the preset curve until the movable space meets the required motion space.
And if the movable space does not meet the motion space required by the motion of the preset curve, pausing the motion according to the preset curve until the movable space meets the required motion space. When the obstacle of the movable space is a stationary object, the robot can be controlled to move, so that the movable space meets the required movement space; when the obstacle of the movable space is a living body and the living body is in a moving state, whether the movable space meets the moving space required by the preset curvilinear motion can be continuously judged after the living body moves for a period of time.
For example, if the movable space is a1 and the movement space required for the preset curvilinear movement is a2, if a1 does not completely cover a2(a1 < a2), then a1 does not satisfy a2, and the operation according to the lemniscate is suspended, and at the same time, the robot movement can be controlled so that the movable space satisfies the required movement space.
Therefore, after the electronic compass is judged to need to be calibrated, before the robot is controlled to move according to the planned path, the movable space meeting the motion space required by the preset curvilinear motion is determined according to the surrounding environment image of the robot, so that the robot is controlled to move according to the preset curvilinear motion, and the reliability of the curvilinear motion can be ensured.
The foregoing describes how to determine whether the electronic compass needs to be calibrated, and when the electronic compass needs to be calibrated, the robot may be controlled to move according to the planned path and calibration data collected by the electronic compass during the movement process is collected by performing steps S401 to S405. The following describes how the movement follows the planned path.
In an embodiment of the present disclosure, as shown in fig. 6, the controlling the robot to move according to the planned path in step S101 may include the following steps S601 to S603:
and S601, controlling the robot to return to a standing state.
It should be noted that, the robot may be currently in a motion state, such as a forward motion state, a backward motion state, and the like, and may also be in other possible states, such as a bending state, and in order to generate the planned path from the zero point, in this embodiment of the disclosure, the robot may be controlled to return to the standing state, that is, the robot is controlled to stand on the spot, the posture of the legs and feet is returned to the initial state of standing, and the rotation angles of the coordinate system of the body and the world coordinate system are both adjusted to 0, that is, the height is changed by the standing angle of the legs.
And S602, generating a planning path according to a preset curve.
The preset curve may be a lemniscate. The lemniscate may be determined according to a parameter a, which is an absolute value of a smaller value between a maximum distance that the robot is far enough forward and a maximum distance that the robot is far enough backward (an absolute value may be added because a negative value is generated due to the reference system).
For example, the maximum distance the robot can reach forward is 1.3 m and the maximum distance it can reach backward is-1.2 m (where the minus sign indicates the direction in the reference system), it can be seen that the absolute value of 1.3 m is greater than the absolute value of-1.2 m, and then 1.2 can be determined as parameter a, so that the lemniscate is determined from parameter a as:
(x 2 +y 2 ) 2 =1.2 2 (x 2 -y 2 ) (5)
wherein x and y represent the x-axis and y-axis of a rectangular coordinate system.
After the robot is controlled to stand on the spot, and the lemniscate (5) is determined, a planned path in the form of the lemniscate can be generated in the movable space of the robot based on the lemniscate.
And S603, controlling the robot to repeatedly move along the planned path by the preset curve.
After the planned path is generated, the robot may be controlled to repeat a preset curvilinear motion along the planned path in the movable space. In the process of movement, calibration data acquired by the electronic compass can be acquired in real time.
The disclosed embodiment can also adjust the current standing height to (H) Max -H Min ) Height of 0.5, wherein H Max The variable represents the maximum height, H, that the robot's fuselage can reach Min The variable represents the lowest height that the robot's fuselage can reach. Therefore, the robot is controlled to move in a planned track similar to an Arabic number 8 to sample the ellipsoid fitting algorithm, and the data in all directions can be collected to fit the ellipsoid fitting algorithm.
Further, as shown in fig. 7, the step S603 may include the following steps S701 and S702:
s701, sampling a preset curve to generate a quaternion combination of each curve motion.
And S702, circularly controlling the robot to move according to the quaternion combination of each curve motion.
Further, the step S603 may further include: the starting height of the robot is randomly generated at each curvilinear motion.
Specifically, based on a preset curve (lemniscate), quaternions are sampled to generate a plurality of discrete quaternion sets corresponding to curvilinear motion. And then, the robot is controlled to move circularly according to the quaternion set of each curvilinear motion, when the robot performs the curvilinear motion each time, the height (for example, the highest distance is the highest when the robot reaches the frontmost part, and the lowest distance is the lowest when the robot reaches the rearmost part) of the front and back maximum values (namely the maximum distance enough forwards and the maximum distance enough backwards) can be randomly generated (for example, the system random number is used as a seed body to form a positive integer and then 2 remainder calculation is performed on the seed body), the discrete height of the robot can be set according to the discrete quaternion set, the quaternion value and the height data can be used as the expected posture and height to control the robot based on the expected posture and height, and meanwhile, a calibration program can be started to calibrate the electronic compass. When the calibration program initiates and finishes the marking, or the calibration duration is too long (which can be set according to the actual working condition), the gesture automatic generation and calibration program is closed, and the result is returned.
That is to say, continuous data acquisition is carried out based on a curve similar to an Arabic number '8' and a random height for calibrating the electronic compass, and the electronic compass is a bionic behavior on the multi-freedom-degree foot-type robot, so that the robot is rich in a bionic meaning, the process is more natural, and the user experience is improved.
It should be noted that, in the embodiment of the present disclosure, when the robot determines that calibration is needed, it may prompt the user whether calibration is possible (client prompt, voice prompt), and after the user gives an instruction to perform calibration, the robot may move according to the planned path on the spot according to the instruction of the user, or move according to the planned path in an area specified by the user.
That is, in an embodiment of the present disclosure, before controlling the robot to move according to the planned path in step S101, the method may further include: sending prompt information to a user to prompt the user whether to calibrate or not; receiving a calibration instruction of a user, wherein the calibration instruction is used for indicating the calibration of an electronic compass in the robot; and judging to carry out calibration according to the calibration instruction.
Further, the calibration instruction may carry a planned path indicated by the user.
Specifically, when the robot determines that the electronic compass needs to be calibrated, prompt information can be sent to a user to prompt the user whether to calibrate, after the user receives the prompt information, the user can make a judgment whether to calibrate, if yes, a calibration instruction is sent to the robot, and after the robot receives the calibration instruction, the robot is controlled to move according to a planned path so as to calibrate the electronic compass. When the calibration instruction carries the planned path indicated by the user, the robot can be controlled to move according to the planned path indicated by the user.
Therefore, the calibration is carried out according to the instruction of the user, random calibration can be avoided, the interactivity of calibration is increased, and the user experience is improved.
To sum up, the embodiment of the present disclosure utilizes automatic online calibration, and solves the problem that the robot needs personnel to participate in calibration and cannot adapt to different working conditions from an automation perspective, and can automatically switch states to calibrate the sensor under different working conditions. On one hand, the electronic compass can be recalibrated on the basis of detecting that the electronic compass drifts due to the complex electromagnetic field change of the working environment, and on the other hand, the electronic compass is automated through more natural and perfect actions on the basis of a robot (especially a multi-degree-of-freedom foot type robot). The electronic compass can keep a stable and good working state in long-term operation, and the stability of the whole sensing system is also improved.
The embodiment of the disclosure further provides a calibration device of an electronic compass in a robot, and fig. 8 is a structural block diagram of the calibration device of the electronic compass in the robot according to the embodiment of the disclosure.
As shown in fig. 8, the calibration apparatus 100 for an electronic compass in a robot includes: the system comprises a first control module 110, a first acquisition module 120 and a first calibration module 130.
Wherein the first control module 110 is configured to execute the control robot to move according to the planned path; the first acquisition module 120 is configured to perform acquisition of calibration data acquired by the electronic compass during the motion process; the first calibration module 130 is configured to perform calibration of the electronic compass according to a preset calibration algorithm based on the calibration data.
In an embodiment of the present disclosure, the calibration apparatus 100 for an electronic compass in a robot may further include: the device comprises a first obtaining module and a first judging module.
The first acquisition module is configured to acquire a current detection value of an electronic compass in the robot; and the first judgment module is configured to execute the judgment of whether the electronic compass needs to be calibrated according to the current detection value, wherein after the electronic compass is determined to need to be calibrated, the robot is controlled to move according to the planned path.
In an embodiment of the present disclosure, the calibration apparatus 100 for an electronic compass in a robot may further include: and the second judgment module is configured to execute the step that the robot reaches the first preset condition when working, or the robot walking mileage reaches the second preset condition, and then the calibration is judged to be needed.
In an embodiment of the present disclosure, the first determining module may include: a first acquisition unit configured to perform acquisition of a reference detection value of a reference sensor; and the first judgment unit is configured to execute the judgment of whether the electronic compass needs to be calibrated or not according to the reference detection value of the reference sensor and the current detection value of the electronic compass.
In one embodiment of the present disclosure, the reference sensor may be a plurality of reference sensors, and the first determination unit may include: a first generation subunit configured to perform generation of a substitute rotation matrix from the plurality of reference detection values and the current detection value; a second generation subunit configured to perform generation of a variation threshold from the alternative rotation matrix; a first obtaining subunit configured to perform obtaining a difference between the current detection value and the variation threshold, and obtain a weight corresponding to the difference; a first updating subunit configured to perform updating of the accumulated value according to the difference value and the corresponding weight; the first judgment subunit is configured to execute the judgment that the electronic compass needs to be calibrated if the accumulated value is greater than or equal to a preset threshold value; and the second judgment subunit is configured to execute the judgment that the electronic compass does not need to be calibrated if the accumulated value is less than the preset threshold value.
In an embodiment of the present disclosure, the calibration apparatus 100 for an electronic compass in a robot may further include: a second acquisition module configured to perform acquisition of a surrounding environment image of the robot; a first generation module configured to perform generation of a movable space of the robot from the surrounding environment image; a third section module configured to perform a determination of whether the movable space satisfies a motion space required for a preset curvilinear motion; the second control module is configured to execute the following steps that if the preset curve is met, the robot is further controlled to move according to the preset curve; and the third control module is configured to execute the step of pausing the movement according to the preset curve until the movable space meets the required movement space if the movable space does not meet the required movement space.
In one embodiment of the present disclosure, the first control module 110 may include: a first control unit configured to perform control of the robot to return to a standing state; a first generation unit configured to perform generation of a planned path according to a preset curve; and a second control unit configured to execute a control of the robot to repeat the preset curve motion along the planned path.
In one embodiment of the present disclosure, the second control unit may include: a third generation subunit configured to perform sampling of a preset curve to generate a quaternion combination for each curvilinear motion; and a first control subunit configured to perform a quaternion combination cycle control of the robot to move according to each curvilinear motion.
In one embodiment of the present disclosure, the second control unit may further include: a fourth generation subunit configured to perform random generation of a starting height of the robot at each of the curvilinear motions.
In an embodiment of the present disclosure, the calibration apparatus 100 for an electronic compass in a robot may further include: the first sending module is configured to send prompt information to a user so as to prompt the user whether to calibrate; the first receiving module is configured to execute and receive a calibration instruction of a user, wherein the calibration instruction is used for indicating the calibration of an electronic compass in the robot; and the fourth judging module is configured to execute the calibration according to the calibration instruction judgment.
In an embodiment of the present disclosure, the planned path indicated by the user is carried in the calibration instruction.
It should be noted that, for a specific implementation of the calibration apparatus for an electronic compass in a robot, reference may be made to the specific implementation of the calibration method for an electronic compass in a robot, and details are not described here again to avoid redundancy.
The calibration device of the electronic compass in the robot disclosed by the embodiment of the invention can realize the full-automatic online calibration of the electronic compass without manual participation, thereby not only improving the perception capability of the robot, but also reducing the labor cost and improving the use experience of a user.
The embodiment of the disclosure also provides a robot.
As shown in fig. 9, the robot 1000 includes a calibration apparatus 100 for an electronic compass in the robot according to the embodiment of the present disclosure.
In one embodiment of the present disclosure, the robot may further include a head, a torso body, legs connected to the torso body, and feet connected to the legs.
According to the robot provided by the embodiment of the disclosure, through the calibration device of the electronic compass, the full-automatic online calibration of the electronic compass can be realized without manual participation, so that not only is the perception capability of the robot improved, but also the labor cost is reduced, and the use experience of a user is improved.
Fig. 10 is a block diagram of the structure of an electronic device according to an embodiment of the present disclosure.
As shown in fig. 10, the electronic apparatus 200 includes: a memory 210 and a processor 220, and a bus 230 connecting the various components, including the memory 210 and the processor 220.
Wherein, the memory 210 is used for storing executable instructions of the processor 220; the processor 201 is configured to call and execute the executable instructions stored in the memory 202 to implement the calibration method of the electronic compass in the robot proposed by the above-mentioned embodiments of the present disclosure.
A program/utility 280 having a set (at least one) of program modules 270 may be stored, for example, in the memory 210, such program modules 270 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which or some combination of which may comprise an implementation of a network environment. The program modules 270 generally perform the functions and/or methodologies of the embodiments described in this disclosure.
The processor 220 executes various functional applications and data processing by executing programs stored in the memory 210.
It should be noted that, for the implementation process of the electronic device according to the embodiment of the present disclosure, reference is made to the foregoing explanation for data processing according to the embodiment of the present disclosure, and details are not described here again.
According to the electronic equipment disclosed by the embodiment of the disclosure, when the processor calls and executes the executable instructions stored in the memory, the full-automatic online calibration of the electronic compass can be realized without manual participation, so that not only is the perception capability of the robot improved, but also the labor cost is reduced, and the use experience of a user is improved.
In order to achieve the above embodiments, the present disclosure also provides a non-transitory computer readable storage medium, where instructions in the storage medium, when executed by a processor of an electronic device, enable the electronic device to perform the method for calibrating an electronic compass in a robot as described above.
In order to implement the foregoing embodiments, the present disclosure further provides a computer program product, which when executed by a processor of an electronic device, enables the electronic device to execute the method for calibrating an electronic compass in a robot as described above.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims (26)
1. A calibration method of an electronic compass in a robot is characterized by comprising the following steps:
controlling the robot to move according to a planned path;
collecting calibration data collected by the electronic compass in the motion process; and
and calibrating the electronic compass according to the calibration data and a preset calibration algorithm.
2. The method of claim 1, further comprising:
acquiring a current detection value of an electronic compass in the robot;
and judging whether the electronic compass needs to be calibrated or not according to the current detection value, wherein after the electronic compass is determined to need to be calibrated, the robot is controlled to move according to the planned path.
3. The method of claim 1, wherein the calibration is determined to be needed if the robot is operating for a first predetermined period of time or if the robot mileage reaches a second predetermined period of time.
4. The method of claim 2, wherein said determining whether the electronic compass requires calibration based on the current sensed values comprises:
acquiring a reference detection value of a reference sensor;
and judging whether the electronic compass needs to be calibrated or not according to the reference detection value of the reference sensor and the current detection value of the electronic compass.
5. The method of claim 4, wherein the reference sensor is a plurality of reference sensors, and the determining whether the electronic compass needs to be calibrated according to the reference detection value of the reference sensor and the current detection value of the electronic compass comprises:
generating a surrogate rotation matrix from the plurality of reference detection values and the current detection value;
generating a variation threshold according to the alternative rotation matrix;
acquiring a difference value between the current detection value and the change threshold value, and acquiring a weight corresponding to the difference value;
updating an accumulated value according to the difference value and the corresponding weight;
if the accumulated value is greater than or equal to a preset threshold value, judging that the electronic compass needs to be calibrated;
and if the accumulated value is smaller than the preset threshold value, judging that the electronic compass does not need to be calibrated.
6. The method of claim 1, prior to said controlling said robot to move along a planned path, further comprising:
collecting a peripheral environment image of the robot;
generating a movable space of the robot according to the surrounding environment image;
judging whether the movable space meets the motion space required by the preset curve motion or not;
if yes, further controlling the robot to move according to the preset curve;
and if the moving space does not meet the requirement, stopping moving according to the preset curve until the movable space meets the required moving space.
7. The method of claim 1, wherein said controlling said robot to move according to a planned path comprises:
controlling the robot to return to a standing state;
generating the planned path according to a preset curve;
and controlling the robot to repeat the preset curve motion along the planned path.
8. The method of claim 7, wherein said controlling said robot to repeat said preset curvilinear motion along said planned path comprises:
sampling the preset curve to generate a quaternion combination of each curve motion;
and circularly controlling the robot to move according to the quaternion combination of each curvilinear motion.
9. The method of claim 8, further comprising:
randomly generating a starting height of the robot at each curvilinear motion.
10. The method of claim 1, prior to said controlling said robot to move along a planned path, further comprising:
sending prompt information to a user to prompt the user whether to calibrate;
receiving a calibration instruction of a user, wherein the calibration instruction is used for indicating the calibration of an electronic compass in the robot;
and judging to carry out calibration according to the calibration instruction.
11. The method according to claim 10, wherein the planned path indicated by the user is carried in the calibration instruction.
12. A calibration device for an electronic compass in a robot is characterized by comprising:
a first control module configured to perform controlling the robot to move along a planned path;
the first acquisition module is configured to acquire calibration data acquired by the electronic compass in the motion process;
the first calibration module is configured to perform calibration on the electronic compass according to a preset calibration algorithm according to the calibration data.
13. The apparatus as recited in claim 12, further comprising:
the first acquisition module is configured to acquire a current detection value of an electronic compass in the robot;
and the first judgment module is configured to execute judgment on whether the electronic compass needs to be calibrated or not according to the current detection value, wherein after the electronic compass is determined to need to be calibrated, the robot is controlled to move according to the planned path.
14. The apparatus as recited in claim 12, further comprising:
and the second judgment module is configured to execute that the length of the second judgment module reaches a first preset condition when the robot works, or the walking mileage of the robot reaches a second preset condition, and then the robot needs to be calibrated.
15. The apparatus of claim 13, wherein the first determining module comprises:
a first acquisition unit configured to perform acquisition of a reference detection value of a reference sensor;
a first judging unit configured to execute judging whether the electronic compass needs calibration according to the reference detection value of the reference sensor and the current detection value of the electronic compass.
16. The apparatus of claim 15, wherein the reference sensor is plural, and the first determination unit includes:
a first generation subunit configured to perform generation of a surrogate rotation matrix from the plurality of reference detection values and the current detection value;
a second generation subunit configured to perform generation of a variation threshold from the alternative rotation matrix;
a first obtaining subunit configured to perform obtaining a difference between the current detection value and the variation threshold, and obtain a weight corresponding to the difference;
a first updating subunit configured to perform updating of an accumulated value according to the difference value and the corresponding weight;
a first judging subunit configured to execute, if the accumulated value is greater than or equal to a preset threshold, judging that the electronic compass needs to be calibrated;
a second judging subunit configured to execute, if the accumulated value is smaller than the preset threshold value, judging that the electronic compass does not need to be calibrated.
17. The apparatus as recited in claim 12, further comprising:
a second acquisition module configured to perform acquisition of a surrounding environment image of the robot;
a first generation module configured to execute generating a movable space of the robot according to the surrounding environment image;
a third judging module configured to perform a judgment of whether the movable space satisfies a motion space required for a preset curvilinear motion;
a second control module configured to perform further control of the robot to move according to the preset curve if satisfied;
and the third control module is configured to execute the step of pausing the movement according to the preset curve until the movable space meets the required movement space if the movable space does not meet the required movement space.
18. The apparatus of claim 12, wherein the first control module comprises:
a first control unit configured to perform control of the robot to return to a standing state;
a first generating unit configured to perform generation of the planned path according to a preset curve;
a second control unit configured to perform control of the robot to repeat the preset curvilinear motion along the planned path.
19. The apparatus of claim 18, wherein the second control unit comprises:
a third generation subunit configured to perform sampling of the preset curve to generate a quaternion combination for each curvilinear motion;
a first control subunit configured to execute the quaternion combination cycle for each curvilinear motion to control the robot to move.
20. The apparatus of claim 19, wherein the second control unit further comprises:
a fourth generation subunit configured to perform a random generation of a starting height of the robot at each curvilinear motion.
21. The apparatus of claim 12, further comprising:
the first sending module is configured to send prompt information to a user so as to prompt the user whether to calibrate;
the first receiving module is configured to execute a calibration instruction of a receiving user, wherein the calibration instruction is used for instructing to calibrate the electronic compass in the robot;
and the fourth judging module is configured to execute the calibration according to the calibration instruction judgment.
22. The apparatus according to claim 21, wherein the calibration instructions carry the planned path indicated by the user.
23. A robot, comprising:
calibration arrangement for an electronic compass among robots according to any one of claims 12-22.
24. The robot of claim 23, further comprising:
a head;
a trunk body;
a leg connected to the torso body, and a foot connected to the leg.
25. An electronic device, comprising:
a processor;
a memory for storing executable instructions of the processor;
wherein the processor is configured to call and execute the executable instructions stored in the memory to realize the calibration method of the electronic compass in the robot according to any one of claims 1-11.
26. A non-transitory computer readable storage medium, instructions in which, when executed by a processor of an electronic device, enable the electronic device to perform a method of calibrating an electronic compass among robots according to any one of claims 1 to 11.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110103542.1A CN114791284B (en) | 2021-01-26 | 2021-01-26 | Calibration method and device of electronic compass in robot and robot |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110103542.1A CN114791284B (en) | 2021-01-26 | 2021-01-26 | Calibration method and device of electronic compass in robot and robot |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114791284A true CN114791284A (en) | 2022-07-26 |
CN114791284B CN114791284B (en) | 2024-03-01 |
Family
ID=82459549
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110103542.1A Active CN114791284B (en) | 2021-01-26 | 2021-01-26 | Calibration method and device of electronic compass in robot and robot |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114791284B (en) |
Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP0321123A1 (en) * | 1987-12-17 | 1989-06-21 | Roke Manor Research Limited | Navigation compass calibration |
US20030023380A1 (en) * | 2001-07-30 | 2003-01-30 | Mark Woloszyk | Method of automatic continuous calibration for an electronic compass |
CN102128620A (en) * | 2010-12-29 | 2011-07-20 | 河南省高迈科技有限公司 | Vehicle-mounted electronic compass satellite-assisting automatic calibrating method and system |
CN107063218A (en) * | 2017-04-21 | 2017-08-18 | 北京京东尚科信息技术有限公司 | Data processing method and device |
CN107202572A (en) * | 2017-07-21 | 2017-09-26 | 深圳市泰衡诺科技有限公司上海分公司 | Calibration method, electronic compass and the electronic equipment of electronic compass |
CN107741223A (en) * | 2017-11-29 | 2018-02-27 | 天津聚飞创新科技有限公司 | Magnetic compass calibration method, device and unmanned plane |
CN108664015A (en) * | 2017-03-29 | 2018-10-16 | 北京米文动力科技有限公司 | A kind of planing method and equipment in robot ambulation path |
CN109737940A (en) * | 2019-01-30 | 2019-05-10 | 深圳市沃感科技有限公司 | A kind of electronic compass real-time, freedom calibration method and device |
CN110609570A (en) * | 2019-07-23 | 2019-12-24 | 中国南方电网有限责任公司超高压输电公司天生桥局 | Autonomous obstacle avoidance inspection method based on unmanned aerial vehicle |
-
2021
- 2021-01-26 CN CN202110103542.1A patent/CN114791284B/en active Active
Patent Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP0321123A1 (en) * | 1987-12-17 | 1989-06-21 | Roke Manor Research Limited | Navigation compass calibration |
US20030023380A1 (en) * | 2001-07-30 | 2003-01-30 | Mark Woloszyk | Method of automatic continuous calibration for an electronic compass |
CN102128620A (en) * | 2010-12-29 | 2011-07-20 | 河南省高迈科技有限公司 | Vehicle-mounted electronic compass satellite-assisting automatic calibrating method and system |
CN108664015A (en) * | 2017-03-29 | 2018-10-16 | 北京米文动力科技有限公司 | A kind of planing method and equipment in robot ambulation path |
CN107063218A (en) * | 2017-04-21 | 2017-08-18 | 北京京东尚科信息技术有限公司 | Data processing method and device |
CN107202572A (en) * | 2017-07-21 | 2017-09-26 | 深圳市泰衡诺科技有限公司上海分公司 | Calibration method, electronic compass and the electronic equipment of electronic compass |
CN107741223A (en) * | 2017-11-29 | 2018-02-27 | 天津聚飞创新科技有限公司 | Magnetic compass calibration method, device and unmanned plane |
CN109737940A (en) * | 2019-01-30 | 2019-05-10 | 深圳市沃感科技有限公司 | A kind of electronic compass real-time, freedom calibration method and device |
CN110609570A (en) * | 2019-07-23 | 2019-12-24 | 中国南方电网有限责任公司超高压输电公司天生桥局 | Autonomous obstacle avoidance inspection method based on unmanned aerial vehicle |
Non-Patent Citations (1)
Title |
---|
唐原广;贾彩惠;徐春玲;: "电子罗盘校准方法的设计与实现", 海洋技术学报, no. 01 * |
Also Published As
Publication number | Publication date |
---|---|
CN114791284B (en) | 2024-03-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107314778B (en) | Calibration method, device and system for relative attitude | |
US11235461B2 (en) | Controller and machine learning device | |
CN108627153B (en) | Rigid body motion tracking system based on inertial sensor and working method thereof | |
US9071829B2 (en) | Method and system for fusing data arising from image sensors and from motion or position sensors | |
CN112109075B (en) | Control system and control method | |
CN106708048B (en) | Ceiling image positioning method and system for robot | |
US20070287911A1 (en) | Method and device for navigating and positioning an object relative to a patient | |
CN111338383B (en) | GAAS-based autonomous flight method and system, and storage medium | |
CN107941212B (en) | Vision and inertia combined positioning method | |
CN110068326B (en) | Attitude calculation method and apparatus, electronic device, and storage medium | |
Tomažič et al. | Fusion of visual odometry and inertial navigation system on a smartphone | |
CN113034594A (en) | Pose optimization method and device, electronic equipment and storage medium | |
CN109655059B (en) | Vision-inertia fusion navigation system and method based on theta-increment learning | |
JP2017073753A (en) | Correction method, program, and electronic apparatus | |
Karam et al. | Integrating a low-cost mems imu into a laser-based slam for indoor mobile mapping | |
JP2013185898A (en) | State estimation device | |
Irmisch et al. | Simulation framework for a visual-inertial navigation system | |
CN114791284B (en) | Calibration method and device of electronic compass in robot and robot | |
US9297660B2 (en) | System and method for determining parameters representing orientation of a solid in movement subject to two vector fields | |
CN116310991A (en) | Backboard drop point prediction method and backboard drop point prediction system based on reinforcement learning | |
CN116358525A (en) | Laser radar-based map building and positioning method, system and engineering vehicle | |
US20240134033A1 (en) | Method for determining a movement state of a rigid body | |
CN113379850B (en) | Mobile robot control method, device, mobile robot and storage medium | |
CN109186594A (en) | The method for obtaining exercise data using inertial sensor and depth camera sensor | |
CN114046800A (en) | High-precision mileage estimation method based on double-layer filtering framework |
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 | ||
TA01 | Transfer of patent application right | ||
TA01 | Transfer of patent application right |
Effective date of registration: 20231013 Address after: Room 602, 6th Floor, Building 5, Building 15, Kechuang 10th Street, Beijing Economic and Technological Development Zone, Daxing District, Beijing, 100176 Applicant after: Beijing Xiaomi Robot Technology Co.,Ltd. Address before: No.018, 8th floor, building 6, No.33 yard, middle Xierqi Road, Haidian District, Beijing 100085 Applicant before: BEIJING XIAOMI MOBILE SOFTWARE Co.,Ltd. |
|
GR01 | Patent grant | ||
GR01 | Patent grant |