Methods, devices, equipment, and media for identifying optical flow anomalies in robotic vacuum cleaners.
By combining data processing from speed sensors, optical flow sensors, and grating sensors in a robotic vacuum cleaner, the problem of optical flow sensors failing to accurately reflect displacement under specific conditions is solved, enabling accurate positioning under different conditions and improving the working efficiency of the robotic vacuum cleaner.
Patent Information
- Application Number
- CN202310394634.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-07
- Publication Date
- 2025-11-14
- Estimated Expiration
- 2043-04-07
AI Technical Summary
Under certain working conditions, the optical flow sensor of existing robotic vacuum cleaners cannot accurately reflect the actual displacement of the machine, making it impossible to determine the actual position of the robotic vacuum cleaner.
The robot vacuum cleaner's motion is detected by a speed sensor. Under acceleration or constant speed conditions, the data from the optical flow sensor and grating sensor are combined to determine whether the optical flow data is abnormal, and a more accurate data source is selected to determine the location under different working conditions.
This improves the accuracy of robot vacuum cleaners in determining their location under different working conditions, thereby increasing work efficiency.
Smart Images

Figure CN116421099B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of robotic vacuum cleaners, and particularly relates to a method, device, terminal equipment, and computer-readable storage medium for identifying optical flow anomalies in robotic vacuum cleaners. Background Technology
[0002] With the rapid development of technology and the improvement of people's quality of life, the use of robotic vacuum cleaners is becoming more and more common.
[0003] Currently, inertial navigation-based robotic vacuum cleaners only use optical grating odometry to calculate the machine's displacement. However, under certain operating conditions, slippage of the drive wheels can prevent the odometry from reflecting the actual displacement. Therefore, optical flow sensors have been added to assist in determining the vacuum cleaner's displacement. However, even optical flow sensors cannot accurately reflect the actual displacement under certain operating conditions, making it impossible to determine the vacuum cleaner's actual position.
[0004] In summary, how to identify whether optical flow data is abnormal under different working conditions based on the working mode of the robotic vacuum cleaner, and thus select a more accurate data source to determine the actual position of the robotic vacuum cleaner under different working conditions, has become an urgent technical problem to be solved in the field of robotic vacuum cleaners. Summary of the Invention
[0005] The main objective of this invention is to provide a method, apparatus, terminal device, and computer-readable storage medium for identifying optical flow anomalies in a robotic vacuum cleaner. The aim is to determine the actual location of the robotic vacuum cleaner by identifying whether the optical flow data is abnormal, thereby selecting a more accurate data source under different operating conditions.
[0006] To achieve the above objectives, the present invention provides a method for identifying optical flow anomalies in a sweeping robot. The method for identifying optical flow anomalies in a sweeping robot is applied to a sweeping robot control system, which includes a sweeping robot, a speed sensor, an optical flow sensor, and a grating sensor.
[0007] The method for identifying optical flow anomalies in the robotic vacuum cleaner includes:
[0008] The motion state of the sweeping robot is detected by the speed sensor;
[0009] When the motion state is an acceleration state or a constant speed state, acquire the optical flow displacement data obtained by the optical flow sensor and the grating displacement data obtained by the grating sensor;
[0010] The optical flow data output by the optical flow sensor is detected to be abnormal based on the optical flow displacement data and the grating displacement data.
[0011] Optionally, the control system further includes a pitch angle sensor, and the method further includes:
[0012] The pitch angle sensor detects the pitch angle formed by the plane where the sweeping robot is located and the horizontal plane.
[0013] If the pitch angle exceeds the first threshold, the abnormal detection of the optical flow data will not be triggered.
[0014] Optionally, the step of acquiring the optical flow displacement data obtained by the optical flow sensor and the grating displacement data obtained by the grating sensor includes:
[0015] The optical flow data output by the optical flow sensor and the grating data output by the grating sensor are recorded at fixed intervals to obtain multiple optical flow data records and multiple grating data records;
[0016] The optical flow sensor is invoked to determine the optical flow displacement data based on the two most recent optical flow data records.
[0017] The grating sensor is invoked to determine the grating displacement data based on the two most recent grating data records from the current time.
[0018] Optionally, the step of detecting whether the optical flow data output by the optical flow sensor is abnormal based on the optical flow displacement data and the grating displacement data further includes:
[0019] Determine the difference between the optical flow displacement data and the grating displacement data;
[0020] If the difference exceeds the second threshold, the optical flow data output by the optical flow sensor is determined to be abnormal.
[0021] If the difference does not exceed the second threshold, then the optical flow data is determined to be normal.
[0022] Optionally, after the step of determining that the optical flow data output by the optical flow sensor is abnormal, the method further includes:
[0023] Acquire the latest optical flow displacement data obtained by the optical flow sensor and the latest grating displacement data obtained by the grating sensor;
[0024] The duration for which the difference between the latest optical flow displacement data and the latest grating displacement data is less than the second threshold;
[0025] If the duration exceeds the first preset time, it is determined that the optical flow data has returned to normal.
[0026] Optionally, before the step of detecting the motion state of the robotic vacuum cleaner via the speed sensor, the method further includes:
[0027] The detection results are obtained by determining whether the surface on which the sweeping robot is located is a hard surface or a non-hard surface;
[0028] Based on the detection results, either the grating sensor or the optical flow sensor is selected as the data source for calculating the position of the sweeping robot.
[0029] Optionally, after the step of detecting whether the optical flow data output by the optical flow sensor is abnormal based on the optical flow displacement data and the grating displacement data, the method further includes:
[0030] If the optical flow data is abnormal, the grating sensor is selected as the data source for calculating the position of the robotic vacuum cleaner;
[0031] If the optical flow data is normal, then the optical flow sensor is selected as the data source;
[0032] When the data source is switched, abnormal data output by the data source before the switch within a second preset time period before the switch is detected;
[0033] Replace the abnormal data with data output by the switched data source at the time the abnormal data occurred.
[0034] In addition, to achieve the above objectives, the present invention also provides a device for identifying optical flow anomalies in a sweeping robot. The method for identifying optical flow anomalies in a sweeping robot is applied to a sweeping robot control system, which includes a sweeping robot, a speed sensor, an optical flow sensor, and a grating sensor.
[0035] The device for identifying optical flow anomalies in the robotic vacuum cleaner includes:
[0036] The status detection module detects the motion status of the sweeping robot through the speed sensor;
[0037] The displacement acquisition module acquires optical flow displacement data obtained by the optical flow sensor and grating displacement data obtained by the grating sensor when the motion state is acceleration or uniform motion.
[0038] The anomaly detection module detects whether the optical flow data output by the optical flow sensor is abnormal based on the optical flow displacement data and the grating displacement data.
[0039] In addition, to achieve the above objectives, the present invention also provides a terminal device, the terminal device comprising: a memory, a processor, and a robot vacuum cleaner optical flow anomaly identification program stored in the memory and executable on the processor, wherein when the robot vacuum cleaner optical flow anomaly identification program of the terminal device is executed by the processor, the steps of the robot vacuum cleaner optical flow anomaly identification method as described above are implemented.
[0040] In addition, to achieve the above objectives, the present invention also provides a computer-readable storage medium storing a program for identifying optical flow anomalies in a robotic vacuum cleaner. When the program for identifying optical flow anomalies in a robotic vacuum cleaner is executed by a processor, it implements the steps of the method for identifying optical flow anomalies in a robotic vacuum cleaner as described above.
[0041] This invention discloses a method, apparatus, terminal device, and computer-readable storage medium for identifying optical flow anomalies in a robotic vacuum cleaner. The method is applied to a robotic vacuum cleaner control system, which includes the robotic vacuum cleaner, a speed sensor, an optical flow sensor, and a grating sensor. The method detects the motion state of the robotic vacuum cleaner using the speed sensor. When the motion state is either accelerating or at a constant speed, it acquires optical flow displacement data obtained from the optical flow sensor and grating displacement data obtained from the grating sensor. Based on the optical flow displacement data and grating displacement data, it detects whether the optical flow data output by the optical flow sensor is abnormal.
[0042] This invention uses a speed sensor to detect the motion state of the sweeping robot. When the sweeping robot is accelerating or moving at a constant speed, it determines whether the optical flow data output by the optical flow sensor is abnormal based on the acquired optical flow displacement data and grating displacement data. Compared with the problem that existing optical flow sensors cannot be identified when they cannot work properly under certain working conditions, this invention can identify whether the optical flow data is abnormal, thereby selecting a more accurate data source to determine the actual position of the sweeping robot under different working conditions, and thus improving the working efficiency of the sweeping robot. Attached Figure Description
[0043] Figure 1 This is a schematic diagram of the device structure of the terminal device hardware operating environment involved in the embodiments of the present invention;
[0044] Figure 2 This is a flowchart illustrating the steps of the first embodiment of the method for identifying optical flow anomalies in a sweeping robot according to the present invention.
[0045] Figure 3 This is a schematic diagram of the optical flow anomaly detection process involved in an embodiment of the optical flow anomaly identification method for a sweeping robot of the present invention;
[0046] Figure 4This is a schematic diagram of the data source selection process involved in an embodiment of the method for identifying optical flow anomalies in a robotic vacuum cleaner according to the present invention;
[0047] Figure 5 This is a schematic diagram of the functional modules of an embodiment of the optical flow abnormality identification device for a sweeping robot of the present invention.
[0048] The realization of the objective, functional features and advantages of the present invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0049] It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
[0050] Reference Figure 1 , Figure 1 This is a schematic diagram of the hardware operating environment of the terminal device involved in the embodiment of the present invention.
[0051] The terminal device in this embodiment of the invention can be a terminal device applied in the field of robotic vacuum cleaners, integrating a robotic vacuum cleaner control system. Furthermore, the robotic vacuum cleaner control system includes a robotic vacuum cleaner, a speed sensor, an optical flow sensor, and a grating sensor. Specifically, the terminal device can be a smartphone, PC (Personal Computer), tablet computer, portable computer, etc.
[0052] like Figure 1 As shown, the terminal device may include: a processor 1001, such as a CPU; a communication bus 1002; a user interface 1003; a network interface 1004; and a memory 1005. The communication bus 1002 is used to enable communication between these components. The user interface 1003 may include a display screen and an input unit such as a keyboard; optionally, the user interface 1003 may also include a standard wired interface or a wireless interface. The network interface 1004 may optionally include a standard wired interface or a wireless interface (such as a Wi-Fi interface). The memory 1005 may be high-speed RAM or non-volatile memory, such as a disk drive. Optionally, the memory 1005 may also be a storage device independent of the aforementioned processor 1001.
[0053] Those skilled in the art will understand that Figure 1 The terminal device structure shown does not constitute a limitation on the terminal device and may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0054] like Figure 1As shown, the memory 1005, which serves as a computer storage medium, may include an operating system, a network communication module, a user interface module, and a program for identifying optical flow anomalies in the sweeping robot.
[0055] exist Figure 1 In the terminal shown, network interface 1004 is mainly used to connect to the backend server and communicate data with it; user interface 1003 is mainly used to connect to the client and communicate data with it; and processor 1001 can be used to call the robot vacuum cleaner optical flow anomaly identification program stored in memory 1005 and perform the following operations:
[0056] The motion state of the sweeping robot is detected by the speed sensor;
[0057] When the motion state is an acceleration state or a constant speed state, acquire the optical flow displacement data obtained by the optical flow sensor and the grating displacement data obtained by the grating sensor;
[0058] The optical flow data output by the optical flow sensor is detected to be abnormal based on the optical flow displacement data and the grating displacement data.
[0059] Optionally, the control system further includes a pitch angle sensor, and the processor 1001 can also be used to call the identification program for abnormal optical flow of the sweeping robot stored in the memory 1005, and perform the following operations:
[0060] The pitch angle sensor detects the pitch angle formed by the plane where the sweeping robot is located and the horizontal plane.
[0061] If the pitch angle exceeds the first threshold, the abnormal detection of the optical flow data will not be triggered.
[0062] Optionally, the processor 1001 can also be used to call the robot vacuum cleaner optical flow anomaly identification program stored in the memory 1005, and perform the following operations:
[0063] The optical flow data output by the optical flow sensor and the grating data output by the grating sensor are recorded at fixed intervals to obtain multiple optical flow data records and multiple grating data records;
[0064] The optical flow sensor is invoked to determine the optical flow displacement data based on the two most recent optical flow data records.
[0065] The grating sensor is invoked to determine the grating displacement data based on the two most recent grating data records from the current time.
[0066] Optionally, the processor 1001 can also be used to call the robot vacuum cleaner optical flow anomaly identification program stored in the memory 1005, and perform the following operations:
[0067] Determine the difference between the optical flow displacement data and the grating displacement data;
[0068] If the difference exceeds the second threshold, the optical flow data output by the optical flow sensor is determined to be abnormal.
[0069] If the difference does not exceed the second threshold, then the optical flow data is determined to be normal.
[0070] Optionally, the processor 1001 can also be used to call the identification program for optical flow anomalies of the sweeping robot stored in the memory 1005, and after the step of determining that the optical flow data output by the optical flow sensor is abnormal, perform the following operations:
[0071] Acquire the latest optical flow displacement data obtained by the optical flow sensor and the latest grating displacement data obtained by the grating sensor;
[0072] The duration for which the difference between the latest optical flow displacement data and the latest grating displacement data is less than the second threshold;
[0073] If the duration exceeds the first preset time, it is determined that the optical flow data has returned to normal.
[0074] Optionally, the processor 1001 can also be used to call the identification program for abnormal optical flow of the sweeping robot stored in the memory 1005, and before the step of detecting the motion state of the sweeping robot by the speed sensor, perform the following operations:
[0075] The detection results are obtained by determining whether the surface on which the sweeping robot is located is a hard surface or a non-hard surface;
[0076] Based on the detection results, either the grating sensor or the optical flow sensor is selected as the data source for calculating the position of the sweeping robot.
[0077] Optionally, the processor 1001 can also be used to call the robot vacuum cleaner optical flow anomaly identification program stored in the memory 1005. After the step of detecting whether the optical flow data output by the optical flow sensor is abnormal based on the optical flow displacement data and the grating displacement data, the following operation is also performed:
[0078] If the optical flow data is abnormal, the grating sensor is selected as the data source for calculating the position of the robotic vacuum cleaner;
[0079] If the optical flow data is normal, then the optical flow sensor is selected as the data source;
[0080] When the data source is switched, abnormal data output by the data source before the switch within a second preset time period before the switch is detected;
[0081] Replace the abnormal data with data output by the switched data source at the time the abnormal data occurred.
[0082] Based on the aforementioned terminal devices, various embodiments of the present invention's method for identifying optical flow anomalies in a sweeping robot are proposed.
[0083] Currently, inertial navigation-based robotic vacuum cleaners only use optical grating odometry to calculate the machine's displacement. However, under certain operating conditions, slippage of the drive wheels can prevent the odometry from reflecting the actual displacement. Therefore, optical flow sensors have been added to assist in determining the vacuum cleaner's displacement. However, even optical flow sensors cannot accurately reflect the actual displacement under certain operating conditions, making it impossible to determine the vacuum cleaner's actual position.
[0084] To address the above-mentioned issues, this invention proposes a method for identifying optical flow anomalies in a robotic vacuum cleaner. This method is applied to the control system of the robotic vacuum cleaner, which includes the robotic vacuum cleaner, a speed sensor, an optical flow sensor, and a grating sensor.
[0085] The present invention provides a method for identifying optical flow anomalies in robotic vacuum cleaners. This method uses a speed sensor to detect the motion state of the vacuum cleaner. When the vacuum cleaner is accelerating or moving at a constant speed, it determines whether the optical flow data output by the optical flow sensor is abnormal based on the acquired optical flow displacement data and grating displacement data. Compared with existing optical flow sensors that cannot be identified when they malfunction under certain working conditions, this invention identifies whether the optical flow data is abnormal, thereby selecting a more accurate data source to determine the actual position of the robotic vacuum cleaner under different working conditions, and thus improving the working efficiency of the robotic vacuum cleaner.
[0086] Please refer to Figure 2 , Figure 2 This is a flowchart illustrating the first embodiment of the method for identifying optical flow anomalies in a robotic vacuum cleaner according to the present invention. It should be noted that although the logical order is shown in the flowchart, in certain situations, the method for identifying optical flow anomalies in a robotic vacuum cleaner according to the present invention may, of course, execute the steps shown or described in a different order than that shown here.
[0087] In a first embodiment of the method for identifying optical flow anomalies in a robotic vacuum cleaner according to the present invention, the method includes:
[0088] Step S10: Detect the motion state of the sweeping robot using the speed sensor;
[0089] In this embodiment, the motion state of the sweeping robot is detected by a speed sensor to determine whether the sweeping robot is accelerating, moving at a constant speed, or decelerating.
[0090] For example, when the robot vacuum is moving in a straight line, the accelerometer in the speed sensor is used to detect the motion state of the robot vacuum and determine whether the robot vacuum is in an accelerating or constant speed motion state.
[0091] Step S20: When the motion state is acceleration or constant speed, acquire the optical flow displacement data obtained by the optical flow sensor and the grating displacement data obtained by the grating sensor;
[0092] In this embodiment, when the speed sensor detects that the sweeping robot is in an accelerating or constant speed state, the sweeping robot control system acquires the optical flow displacement data obtained by the optical flow sensor and the grating displacement data obtained by the grating sensor.
[0093] For example, when the sweeping robot is in an accelerated or constant speed motion state, the control system acquires the optical flow data output by the optical flow sensor and the grating data output by the grating sensor. Starting from the latest recorded data, the optical flow sensor calculates the latest optical flow displacement data, and the grating sensor calculates the latest grating displacement data. Then, the control system acquires the latest optical flow displacement data and the latest grating displacement data.
[0094] Furthermore, in a feasible embodiment, step S20, the step of "acquiring the optical flow displacement data obtained by the optical flow sensor and the grating displacement data obtained by the grating sensor", may include:
[0095] Step S201: Record the optical flow data output by the optical flow sensor and the grating data output by the grating sensor at fixed time intervals to obtain multiple optical flow data records and multiple grating data records;
[0096] Step S202: The optical flow sensor is invoked to determine the optical flow displacement data based on the two optical flow data records most recent to the current time;
[0097] Step S203: The grating sensor is invoked to determine the grating displacement data based on the two grating data records most recent to the current time.
[0098] In this embodiment, the optical flow sensor is invoked to obtain the latest optical flow data and the previous optical flow data from the output data recorded by the control system. The optical flow sensor performs algorithm processing on the two acquired optical flow data to obtain optical flow displacement data. The grating sensor is invoked to obtain the latest recorded grating data and the previous recorded grating data from the records. The grating sensor performs algorithm processing on the two acquired grating data to obtain grating displacement data.
[0099] It should be noted that during the sweeping process, the control system records the following data every 100ms: machine speed calculated by the side wheel grating odometer, machine speed calculated by the optical flow sensor, machine position coordinates calculated by the grating odometer, machine position coordinates calculated by the optical flow sensor, the current data source flag, the determined optical flow working status, and the sweeping machine pitch angle. Among these, the grating odometer is a type of grating sensor.
[0100] For example, based on the machine position coordinates calculated by the grating odometer and the machine position coordinates calculated by the optical flow sensor, which are recorded by the control system, the grating odometer obtains the latest calculated machine position coordinates and the machine position coordinates calculated 100ms ago, calculates the displacement between the two position coordinates, and obtains the aforementioned grating displacement data. The optical flow odometer obtains the latest calculated machine position coordinates and the machine position coordinates calculated 100ms ago, calculates the displacement between the two position coordinates, and obtains the aforementioned optical flow displacement data. The control system then obtains the grating displacement data and the optical flow displacement data.
[0101] Step S30: Detect whether the optical flow data output by the optical flow sensor is abnormal based on the optical flow displacement data and the grating displacement data.
[0102] In this embodiment, the control system detects the optical flow data output by the optical flow sensor based on the acquired optical flow displacement data and grating displacement data, and determines whether the optical flow data is abnormal.
[0103] For example, when the sweeping robot is in a non-deceleration state, if the optical flow displacement data and grating displacement data obtained by the control system show a large difference, then the optical flow data output by the optical flow sensor may be problematic.
[0104] Furthermore, in one feasible embodiment, step S30 may include:
[0105] Step S301: Determine the difference between the optical flow displacement data and the grating displacement data;
[0106] Step S302: If the difference exceeds the second threshold, it is determined that the optical flow data output by the optical flow sensor is abnormal.
[0107] Step S303: If the difference does not exceed the second threshold, then the optical flow data is determined to be normal.
[0108] In this embodiment, the control system calculates the difference between the optical flow displacement data and the grating displacement data. When the difference is detected to exceed a second threshold, it is determined that the optical flow data output by the optical flow sensor is abnormal and the optical flow sensor cannot work properly. When the difference is detected to be less than the second threshold, it is determined that the optical flow data output by the optical flow sensor is normal and the optical flow sensor can work properly.
[0109] For example, when the sweeping robot is in an accelerated or constant speed motion state, after the control system obtains the optical flow displacement data and the grating displacement data, it calculates the difference between the two data. When the difference exceeds a first threshold, it is determined that the optical flow data output by the optical flow sensor is abnormal and the optical flow sensor cannot work properly. When the difference does not exceed the first threshold, it is determined that the optical flow data output by the optical flow sensor is normal and the optical flow sensor can work properly.
[0110] Furthermore, in one feasible embodiment, the control system includes a pitch angle sensor, and the method for identifying optical flow anomalies in the sweeping robot of the present invention may further include:
[0111] Step A: Detect the pitch angle between the plane where the sweeping robot is located and the horizontal plane using the pitch angle sensor;
[0112] Step B: If the pitch angle exceeds the first threshold, then the abnormal detection of the optical flow data is not triggered.
[0113] In this embodiment, the angle formed between the plane where the sweeping robot is located and the horizontal plane is detected by the pitch angle sensor. This angle is the pitch angle of the sweeping robot. When the pitch angle exceeds the first threshold, the abnormal detection of the optical flow data output by the optical flow sensor is not triggered.
[0114] For example, all steps of optical flow data anomaly detection require the pitch angle as a constraint. When the pitch angle sensor detects that the robot vacuum's pitch angle exceeds the first threshold of 5 degrees, the robot vacuum may not move normally, so the grating data output by the grating odometer may be abnormal, and therefore the anomaly detection of optical flow data is not triggered.
[0115] For example, such as Figure 3As shown, the sweeper control system first records the data output by each sensor every 100ms. Then, the speed sensor detects whether the sweeper is accelerating or moving at a constant speed. If the sweeper is accelerating or moving at a constant speed, the optical flow data output by the optical flow sensor will decrease, meaning the optical flow data is smaller than the grating data. This determines whether the current pitch angle is normal. If the pitch angle is normal, the optical flow data is abnormal. The sweeper position is recorded from the nearest optical flow sensor and grating odometer. The optical flow sensor calculates the nearest optical flow displacement data, and the grating odometer calculates the nearest grating displacement data. If the optical flow displacement data is not smaller than the grating displacement data, it is determined whether the difference between the optical flow displacement data and the grating displacement data is small within 300ms. If so, the optical flow is normal, and the optical flow sensor is working properly.
[0116] In this embodiment, the method for identifying optical flow anomalies in a robotic vacuum cleaner of the present invention detects the motion state of the vacuum cleaner using an accelerometer in a speed sensor when the vacuum cleaner is moving straight, determining whether the vacuum cleaner is in an accelerating or constant-speed motion state. When the speed sensor detects that the vacuum cleaner is in an accelerating or constant-speed motion state, the robotic vacuum cleaner control system acquires optical flow displacement data obtained from the optical flow sensor and grating displacement data obtained from the grating sensor. The system then calls the optical flow sensor to acquire the latest optical flow data and the previous optical flow data from the output data recorded by the control system. The optical flow sensor processes the two acquired data using an algorithm to obtain optical flow displacement data. Similarly, the system calls the grating sensor to acquire the latest recorded grating data and the previous recorded grating data. The grating sensor then processes the two acquired data using an algorithm to obtain grating position data. The system detects optical flow data from the optical flow sensor based on the acquired optical flow displacement data and grating displacement data to determine if the optical flow data is abnormal. The system calculates the difference between the optical flow displacement data and the grating displacement data. If the difference exceeds a second threshold, the optical flow data output by the optical flow sensor is deemed abnormal, and the optical flow sensor cannot function properly. If the difference does not exceed the second threshold, the optical flow data output by the optical flow sensor is deemed normal, and the optical flow sensor can function properly. At each step of the anomaly detection, the pitch angle is used as a constraint. The pitch angle sensor detects the angle between the plane where the robot is located and the horizontal plane. This angle is the robot's pitch angle. If the pitch angle exceeds a first threshold, the anomaly detection of the optical flow data output by the optical flow sensor is not triggered.
[0117] Thus, in this embodiment of the invention, the motion state of the sweeping robot is detected by a speed sensor. When the sweeping robot is in an accelerating or constant-speed state, the optical flow data output by the optical flow sensor is judged to be abnormal based on the acquired optical flow displacement data and grating displacement data. The difference between the two data is calculated. When the difference exceeds a second threshold, the optical flow data is determined to be abnormal, and the optical flow sensor cannot work properly. Compared with the problem that existing optical flow sensors cannot be identified when they cannot work properly under certain working conditions, this invention realizes the identification of whether the optical flow data is abnormal, thereby selecting a more accurate data source to determine the actual position of the sweeping robot under different working conditions, thereby improving the working efficiency of the sweeping robot.
[0118] Furthermore, based on the first embodiment of the method for identifying optical flow anomalies in a robotic vacuum cleaner of the present invention, a second embodiment of the method for identifying optical flow anomalies in a robotic vacuum cleaner of the present invention is proposed.
[0119] In this embodiment, after the step of "determining that the optical flow data output by the optical flow sensor is abnormal" in step S40 above, the method for identifying optical flow abnormalities in the sweeping robot of the present invention may further include:
[0120] Step C: Obtain the latest optical flow displacement data obtained by the optical flow sensor and the latest grating displacement data obtained by the grating sensor;
[0121] Step D: If the duration for which the difference between the latest optical flow displacement data and the latest grating displacement data is less than the second threshold exceeds the first preset time, then it is determined that the optical flow data has returned to normal.
[0122] In this embodiment, after the control system determines that the optical flow data output by the optical flow sensor is abnormal, it acquires the latest optical flow displacement data calculated by the optical flow sensor and the latest grating displacement data calculated by the grating sensor. The control system then calculates the difference between the two latest data and if the difference persists for more than a first preset time, it determines that the optical flow data output by the optical flow sensor has returned to normal and the optical flow sensor can work normally.
[0123] For example, after the control system determines that the optical flow sensor is not working properly, it acquires the latest optical flow displacement data calculated by the optical flow sensor based on the optical flow data recorded every 100ms. At the same time, it acquires the latest grating displacement data calculated by the grating odometer based on the grating data recorded every 100ms. The control system calculates the difference between the two latest data every 100ms and determines whether the difference is less than a second threshold. If the difference is less than the second threshold after three consecutive determinations, it means that the duration for which the difference between the latest optical flow displacement data and the latest grating displacement data is less than the second threshold exceeds a first preset time of 300ms. Then, it is determined that the optical flow data output by the optical flow sensor has returned to normal.
[0124] In this embodiment, the method for identifying optical flow anomalies in the sweeping robot of the present invention obtains the latest optical flow displacement data calculated by the optical flow sensor and the latest grating displacement data calculated by the grating sensor after the control system determines that the optical flow data output by the optical flow sensor is abnormal. Then, the control system calculates the difference between the two latest data and if the difference continues for more than a first preset time, it is determined that the optical flow data output by the optical flow sensor has returned to normal and the optical flow sensor can work normally.
[0125] Thus, by re-detecting the optical flow data after determining that the optical flow is abnormal, this embodiment of the invention enables timely detection of whether the optical flow has returned to normal. After determining that the optical flow has returned to normal, the data source is switched according to the actual situation, thereby reducing the error between the position calculated by the robot vacuum cleaner and the actual position of the robot vacuum cleaner.
[0126] Furthermore, based on the first and / or second embodiments of the method for identifying optical flow anomalies in a robotic vacuum cleaner as described above, a third embodiment of the method for identifying optical flow anomalies in a robotic vacuum cleaner as described above is proposed.
[0127] In this embodiment, prior to step S10 above, the method for identifying optical flow anomalies in a robotic vacuum cleaner of the present invention may further include:
[0128] Step E: Detect whether the ground where the sweeping robot is located is a hard surface or a non-hard surface to obtain the detection result;
[0129] Step F: Select the grating sensor or the optical flow sensor as the data source for calculating the position of the sweeping robot based on the detection results.
[0130] In this embodiment, the control system detects whether the ground where the robot vacuum is located is a hard surface or a non-hard surface. If the robot vacuum is working on a hard surface, the grating data output by the grating sensor is selected as the data source for calculating the robot vacuum's position. If the robot vacuum is working on a non-hard surface, the optical flow data output by the optical flow sensor is selected as the data source for calculating the robot vacuum's position.
[0131] For example, under normal circumstances, when the robot vacuum is working on a hard surface, the grating data has higher precision and accuracy. Therefore, when the robot vacuum is moving in a straight line on a hard surface, the grating data is selected as the data source for calculating the robot vacuum's position. When the robot vacuum is walking on a carpet, the optical flow data is closer to the actual displacement. In this case, the optical flow data is selected as the data source for calculating the robot vacuum's position.
[0132] For example, such as Figure 4 As shown, when the robot vacuum is in obstacle avoidance mode, it consistently uses optical flow data as the data source. When the robot vacuum is working on well-lit surfaces, the optical flow module activates the infrared laser as the light source. When the robot vacuum is working on rough surfaces, the optical flow module activates the LED (Light Emitted Diode) light as the light source. When the optical flow module switches the light source, if optical flow data was previously used as the data source, it should switch to raster data as the data source during this process. However, if the pitch angle is unstable and the optical flow module switches the light source frequently, the robot vacuum may be in an unstable state. In this case, maintaining optical flow as the data source can minimize errors. When the robot vacuum is working on carpets, if the optical flow sensor is working properly, it uses optical flow data as the data source; if the optical flow sensor is not working properly, it uses raster data as the data source. When the robot vacuum collides with something, it may cause the robot's side... If the on-wheel grating odometer is not working properly, and the optical flow sensor is working properly, then optical flow data is used as the data source; if the optical flow sensor is not working properly, then grating data is used as the data source. When the robot vacuum's pitch angle is too large, i.e., between 5 and 10 degrees, if the optical flow sensor is working properly, then optical flow data is used as the data source; if the optical flow sensor is not working properly, then it is determined whether the robot vacuum's pitch angle is too large, i.e., above 10 degrees. If the pitch angle is greater than 10 degrees, then optical flow data is used as the data source; if the pitch angle is less than 10 degrees, then grating data is used as the data source.
[0133] In this embodiment, the method for identifying optical flow anomalies in a robotic vacuum cleaner according to the present invention detects whether the ground on which the robotic vacuum cleaner is located is a hard surface or a non-hard surface by the control system. If the robotic vacuum cleaner is working on a hard surface, the grating data output by the grating sensor is selected as the data source for calculating the position of the robotic vacuum cleaner. If the robotic vacuum cleaner is working on a non-hard surface, the optical flow data output by the optical flow sensor is selected as the data source for calculating the position of the robotic vacuum cleaner.
[0134] Thus, by detecting the ground material in the working environment of the sweeper, this embodiment of the invention selects more accurate data as the data source for calculating the sweeper's position, thereby ensuring the accuracy of the sweeper's position calculation even on different ground materials by switching data sources.
[0135] Furthermore, based on the first, second, and / or third embodiments of the method for identifying optical flow anomalies in a robotic vacuum cleaner as described above, a fourth embodiment of the method for identifying optical flow anomalies in a robotic vacuum cleaner as described above is proposed.
[0136] In this embodiment, after the step S30 described above, which involves "detecting whether the optical flow data output by the optical flow sensor is abnormal based on the optical flow displacement data and the grating displacement data," the method for identifying optical flow anomalies in a robotic vacuum cleaner of the present invention may further include:
[0137] Step G: If the optical flow data is abnormal, then the grating sensor is selected as the data source for calculating the position of the sweeping robot.
[0138] Step H: If the optical flow data is normal, then select the optical flow sensor as the data source;
[0139] Step 1: When the data source is switched, detect the data output by the data source before the switch within a second preset time before the switch and filter out abnormal data;
[0140] Step J: Replace the abnormal data with data output by the switched data source at the time when the abnormal data occurred.
[0141] In this embodiment, if the control system detects that the optical flow data output by the optical flow sensor is abnormal, the grating sensor is selected as the data source. If the control system detects that the optical flow data output by the optical flow sensor is normal, the optical flow sensor is selected as the data source. When switching the data source for calculating the position of the robot vacuum cleaner, the control system detects the data output by the data source before the switch within a second preset time before the switch, filters out abnormal data from the data, and then replaces the abnormal data with the data output by the data source after the switch within the time period of the abnormal data.
[0142] For example, before triggering the anomaly detection of the optical flow sensor, the data source for calculating the position of the robot vacuum cleaner is the optical flow data output by the optical flow sensor. Then, when the anomaly detection result is that the optical flow data is abnormal, the data source is switched to the grating sensor, and when the anomaly detection result is that the optical flow data is normal, the data source is switched to the optical flow sensor.
[0143] For example, within 300ms before the light source switching of the optical flow module, the optical flow data error is relatively large. At this time, the grating data is more accurate. The control system queries the most recently recorded data to find abnormal data where the difference between the optical flow data and the grating data in the last 300ms exceeds a certain threshold, and the system coordinate data source is not the grating sensor. It should be noted that there can be multiple abnormal data points, existing in multiple time segments within the last 300ms. These multiple abnormal data points are replaced with multiple grating data points output by the grating sensor in multiple corresponding time segments, and the displacement calculated by the optical flow is removed from the system coordinates and replaced with the displacement calculated by the grating. Since the control system's judgment of collision events of the sweeping robot has a delay, and the delay time may vary, using optical flow data to replace and replenish the grating data before the collision occurs will approximate the actual situation.
[0144] In this embodiment, the method for identifying optical flow anomalies in the sweeping robot of the present invention selects the grating sensor as the data source if the control system detects that the optical flow data output by the optical flow sensor is abnormal, and selects the optical flow sensor as the data source if the control system detects that the optical flow data output by the optical flow sensor is normal. When switching the data source for calculating the position of the sweeping robot, the control system detects the data output by the data source before the switch within a second preset time before the switch, filters out abnormal data from the data, and then replaces the abnormal data with the data output by the data source after the switch within the time period of the abnormal data.
[0145] In this way, by switching data sources and detecting and replenishing abnormal data, the robot vacuum cleaner can maintain a small deviation during movement, and the position coordinates calculated internally by the robot vacuum cleaner are made closer to the actual coordinates.
[0146] Furthermore, this invention also provides a device for identifying optical flow anomalies in a robotic vacuum cleaner. The method for identifying optical flow anomalies in a robotic vacuum cleaner is applied to a robotic vacuum cleaner control system, which includes a robotic vacuum cleaner, a speed sensor, an optical flow sensor, and a grating sensor.
[0147] Please refer to Figure 5 , Figure 5 This is a functional module diagram of an embodiment of the optical flow anomaly identification device for a robotic vacuum cleaner according to the present invention, as shown below. Figure 5 As shown, the device for identifying optical flow abnormalities in a robotic vacuum cleaner according to the present invention includes:
[0148] The state detection module 10 is used to detect the motion state of the sweeping robot through the speed sensor;
[0149] The displacement acquisition module 20 is used to acquire optical flow displacement data obtained by the optical flow sensor and grating displacement data obtained by the grating sensor when the motion state is acceleration or uniform motion.
[0150] The anomaly detection module 30 is used to detect whether the optical flow data output by the optical flow sensor is abnormal based on the optical flow displacement data and the grating displacement data.
[0151] Optionally, the control system includes a pitch angle sensor, and the device for identifying abnormal optical flow in the sweeping robot of the present invention further includes:
[0152] The pitch angle detection module is used to detect the pitch angle formed by the plane where the sweeping robot is located and the horizontal plane through the pitch angle sensor;
[0153] The non-triggering module is used to prevent the detection of anomalies in the optical flow data if the pitch angle exceeds the second threshold.
[0154] Optionally, the displacement acquisition module 20 is further configured to record the optical flow data output by the optical flow sensor and the grating data output by the grating sensor at fixed time intervals to obtain multiple optical flow data records and multiple grating data records; call the optical flow sensor to determine the optical flow displacement data based on the two optical flow data records most recent to the current time; and call the grating sensor to determine the grating displacement data based on the two grating data records most recent to the current time.
[0155] Optionally, the anomaly detection module 30 is further configured to determine the difference between the optical flow displacement data and the grating displacement data; if the difference exceeds a second threshold, the optical flow data output by the optical flow sensor is determined to be abnormal; if the difference does not exceed the second threshold, the optical flow data is determined to be normal.
[0156] Optionally, the device for identifying optical flow abnormalities in a robotic vacuum cleaner according to the present invention further includes:
[0157] The reacquisition module is used to acquire the latest optical flow displacement data obtained by the optical flow sensor and the latest grating displacement data obtained by the grating sensor.
[0158] The time detection module detects the duration for which the difference between the latest optical flow displacement data and the latest grating displacement data is less than the second threshold.
[0159] The abnormal recovery module determines that the optical flow data has returned to normal if the duration exceeds a first preset time.
[0160] Optionally, the device for identifying optical flow abnormalities in a robotic vacuum cleaner according to the present invention further includes:
[0161] The ground detection module is used to detect whether the ground where the sweeping robot is located is a hard ground or a non-hard ground to obtain a detection result; based on the detection result, the grating sensor or the optical flow sensor is selected as the data source for calculating the position of the sweeping robot.
[0162] Optionally, the device for identifying optical flow abnormalities in a robotic vacuum cleaner according to the present invention further includes:
[0163] An anomaly handling module is used to select the grating sensor as the data source for calculating the position of the sweeping robot if the optical flow data is abnormal.
[0164] A normal processing module is used to select the optical flow sensor as the data source if the optical flow data is normal.
[0165] The data filtering module is used to detect abnormal data output by the data source before the switch within a second preset time before the switch when the data source is switched.
[0166] The data replacement module is used to replace the abnormal data with data output by the switched data source at the time when the abnormal data occurred.
[0167] The present invention also provides a computer storage medium storing a program for identifying optical flow anomalies in a robotic vacuum cleaner. When the program is executed by a processor, it implements the steps of the method for identifying optical flow anomalies in a robotic vacuum cleaner as described in any of the above embodiments.
[0168] The specific embodiments of the computer storage medium of the present invention are basically the same as the embodiments of the above-described method for identifying optical flow anomalies in the sweeping robot of the present invention, and will not be described in detail here.
[0169] The present invention also provides a computer program product, which includes a computer program. When the computer program is executed by a processor, it implements the steps of the method for identifying optical flow abnormalities in a sweeping robot as described in any of the above embodiments, which will not be elaborated here.
[0170] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or system. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or system that includes that element.
[0171] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0172] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes several instructions to cause a terminal device (such as TWS earphones, etc.) to execute the methods described in the various embodiments of the present invention.
[0173] The above are merely preferred embodiments of the present invention and do not limit the scope of the patent. Any equivalent structural or procedural transformations made based on the description and drawings of the present invention, or direct or indirect applications in other related technical fields, are similarly included within the scope of patent protection of the present invention.
Claims
1. A method for identifying optical flow anomalies in a robotic vacuum cleaner, characterized in that, The method for identifying optical flow anomalies in a sweeping robot is applied to the sweeping robot control system, which includes the sweeping robot, a speed sensor, an optical flow sensor, and a grating sensor. The method for identifying optical flow anomalies in the robotic vacuum cleaner includes: The motion state of the sweeping robot is detected by the speed sensor; When the motion state is an acceleration state or a constant speed state, acquire the optical flow displacement data obtained by the optical flow sensor and the grating displacement data obtained by the grating sensor; Detect whether the optical flow data output by the optical flow sensor is abnormal based on the optical flow displacement data and the grating displacement data; If the optical flow data is abnormal, the grating sensor is selected as the data source for calculating the position of the robotic vacuum cleaner; If the optical flow data is normal, then the optical flow sensor is selected as the data source; When the data source is switched, abnormal data output by the data source before the switch within a second preset time period before the switch is detected; Replace the abnormal data with data output by the switched data source at the time the abnormal data occurred.
2. The method for identifying optical flow anomalies in a sweeping robot as described in claim 1, characterized in that, The control system further includes a pitch angle sensor, and the method further includes: The pitch angle sensor detects the pitch angle formed by the plane where the sweeping robot is located and the horizontal plane. If the pitch angle exceeds the first threshold, the abnormal detection of the optical flow data will not be triggered.
3. The method for identifying optical flow anomalies in a sweeping robot as described in claim 1, characterized in that, The step of acquiring the optical flow displacement data obtained by the optical flow sensor and the grating displacement data obtained by the grating sensor includes: The optical flow data output by the optical flow sensor and the grating data output by the grating sensor are recorded at fixed intervals to obtain multiple optical flow data records and multiple grating data records; The optical flow sensor is invoked to determine the optical flow displacement data based on the two most recent optical flow data records. The grating sensor is invoked to determine the grating displacement data based on the two most recent grating data records from the current time.
4. The method for identifying optical flow anomalies in a sweeping robot as described in claim 1, characterized in that, The step of detecting whether the optical flow data output by the optical flow sensor is abnormal based on the optical flow displacement data and the grating displacement data includes: Determine the difference between the optical flow displacement data and the grating displacement data; If the difference exceeds the second threshold, the optical flow data output by the optical flow sensor is determined to be abnormal. If the difference does not exceed the second threshold, then the optical flow data is determined to be normal.
5. The method for identifying optical flow anomalies in a sweeping robot as described in claim 4, characterized in that, After the step of determining that the optical flow data output by the optical flow sensor is abnormal, the method further includes: Acquire the latest optical flow displacement data obtained by the optical flow sensor and the latest grating displacement data obtained by the grating sensor; The duration for which the difference between the latest optical flow displacement data and the latest grating displacement data is less than the second threshold; If the duration exceeds the first preset time, it is determined that the optical flow data has returned to normal.
6. The method for identifying optical flow anomalies in a sweeping robot as described in claim 1, characterized in that, Prior to the step of detecting the motion state of the robotic vacuum cleaner via the speed sensor, the method further includes: The detection results are obtained by determining whether the surface on which the sweeping robot is located is a hard surface or a non-hard surface; Based on the detection results, either the grating sensor or the optical flow sensor is selected as the data source for calculating the position of the sweeping robot.
7. A device for identifying abnormal optical flow in a robotic vacuum cleaner, characterized in that, The method for identifying optical flow anomalies in a sweeping robot is applied to the sweeping robot control system, which includes the sweeping robot, a speed sensor, an optical flow sensor, and a grating sensor. The device for identifying optical flow anomalies in the robotic vacuum cleaner includes: The status detection module detects the motion status of the sweeping robot through the speed sensor; The displacement acquisition module acquires optical flow displacement data obtained by the optical flow sensor and grating displacement data obtained by the grating sensor when the motion state is acceleration or uniform motion. The anomaly detection module detects whether the optical flow data output by the optical flow sensor is abnormal based on the optical flow displacement data and the grating displacement data. An anomaly handling module is used to select the grating sensor as the data source for calculating the position of the sweeping robot if the optical flow data is abnormal. A normal processing module is used to select the optical flow sensor as the data source if the optical flow data is normal. The data filtering module is used to detect abnormal data output by the data source before the switch within a second preset time before the switch when the data source is switched. The data replacement module is used to replace the abnormal data with data output by the switched data source at the time when the abnormal data occurred.
8. A terminal device, characterized in that, The terminal device includes: a memory, a processor, and a program for identifying optical flow anomalies in a robotic vacuum cleaner, which is stored in the memory and can run on the processor. When the program for identifying optical flow anomalies in a robotic vacuum cleaner is executed by the processor, it implements the steps of the method for identifying optical flow anomalies in a robotic vacuum cleaner as described in any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a program for identifying optical flow anomalies in a robotic vacuum cleaner. When the program is executed by a processor, it implements the steps of the method for identifying optical flow anomalies in a robotic vacuum cleaner as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Sweeping robot control method and device and storage medium
CN112704437A
Sweeping robot, target obstacle crossing method thereof and computer readable storage medium
CN113093725A
Mobile robot with optical flow sensor and control method thereof
CN113238555A
Fusion positioning method and device based on optical flow and grating
CN114440874A