Method for detecting carpet by a robot vacuum cleaner, electronic device and medium
By combining side-sweep current and center-sweep current with gyroscope pitch angle detection, the problem of misjudgment in carpet detection of robotic vacuum cleaners has been solved, achieving highly accurate and stable carpet recognition and ensuring effective cleaning of robotic vacuum cleaners in complex environments.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- QINGDAO TAPER ROBOTICS CO LTD
- Filing Date
- 2026-01-09
- Publication Date
- 2026-05-19
AI Technical Summary
Existing robotic vacuum cleaners rely on current difference detection to detect carpets, which carries the risk of misjudgment. Furthermore, the response time required for current detection leads to delays in carpet boundary determination, affecting the accurate execution of cleaning strategies.
By acquiring the side-sweeping and center-sweeping currents of the robotic vacuum cleaner and combining them with the pitch angle detection of the gyroscope, the carpet driving status is determined. Precise judgment is made using preset current thresholds and pitch angle ranges, eliminating sudden current surges caused by accidental reasons in a single motor, and improving the stability and reliability of the recognition system.
It improves the accuracy of carpet detection, enhances the stability and reliability of the recognition system in complex environments, avoids additional hardware costs, meets real-time recognition requirements, protects hardware, and extends its lifespan.
Smart Images

Figure CN121465445B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of smart home technology, and in particular to a method, electronic device and medium for carpet detection in a robotic vacuum cleaner. Background Technology
[0002] In the field of smart cleaning equipment, robotic vacuum cleaners have gradually become an important tool for daily household cleaning, and carpet detection, as one of the key functions to improve cleaning effectiveness, has been widely used. This function aims to enable robotic vacuum cleaners to recognize changes in floor materials. When a carpet is detected, the robot automatically adjusts its working mode, such as increasing the suction power of the fan to deeply clean dirt deep within the carpet, while reducing or stopping water output to prevent bacteria growth due to excessive moisture in the carpet, thereby optimizing the overall cleaning experience and safety of use.
[0003] Currently, the mainstream method for carpet detection in robotic vacuum cleaners relies on motor current difference detection. Specifically, when a robotic vacuum cleaner operates on smooth surfaces and carpets, the load on its side brush motors and center brush motors differs, resulting in differences in operating current. By monitoring and analyzing these motor current changes in real time, the robotic vacuum cleaner can determine whether the surface it is on is carpeted. Compared to detection solutions relying on ultrasonic or infrared sensors, the motor current difference detection method is simple in principle, has lower implementation costs, relatively high recognition stability, and is less affected by external environmental interference factors, thus becoming the mainstream technology in the current market.
[0004] However, the carpet detection method mentioned above, which relies on current differences, may be prone to misjudgment. This is because the carpet is not the only factor that can cause changes in motor current. For example, if the side brush or center brush is entangled in foreign objects such as tape, hair, or yarn on the floor, or if the robot vacuum cleaner is crossing obstacles, the motor current will continue to increase. This may cause the system to misjudge that the robot has entered a carpeted area. In addition, current detection itself requires a certain response time, which will cause a delay in the machine's judgment of the carpet boundary. This may lead to a misjudgment of the actual size of the carpet and affect the accurate execution of subsequent cleaning strategies. Summary of the Invention
[0005] This invention provides a carpet detection method, electronic device, and medium for a robotic vacuum cleaner, which addresses the shortcomings of existing carpet detection methods that rely on current differences and have the risk of misjudgment. It effectively eliminates the risk of sudden current surges caused by accidental reasons in a single motor, improves the accuracy of judgment, and greatly enhances the stability and reliability of the entire recognition system in complex environments.
[0006] This invention provides a carpet detection method for a robotic vacuum cleaner, comprising: acquiring the side sweeping current and the center sweeping current of the robotic vacuum cleaner; determining that when the side sweeping current is greater than a first preset current threshold and the center sweeping current is greater than a second preset current threshold, detecting the pitch angle of the gyroscope; determining that when the pitch angle conforms to the pitch angle range for carpet travel, determining that it is in carpet travel state; wherein, the pitch angle range for carpet travel is obtained based on prior detection of the robotic vacuum cleaner traveling on different types of carpets.
[0007] According to the carpet detection method of the sweeping robot provided by the present invention, after determining that the pitch angle is within the range of carpet travel pitch angles and thus determining that it is in carpet travel state, the method further includes: determining that when a collision with a wall is detected, it is in carpet boundary travel state; when no collision with a wall is detected, the side sweeping current and the center sweeping current are reacquired; when the reacquired side sweeping current is within the range of a first preset normal current value and the reacquired center sweeping current is greater than a second preset current threshold, the pitch angle of the gyroscope is re-detected; wherein, the upper limit of the first preset normal current value range is less than the first preset current threshold; when the re-detected pitch angle is within the range of pitch angles of the upper and lower carpets, it is in carpet boundary travel state; wherein, the range of pitch angles of the upper and lower carpets is obtained based on the sweeping robot's travel detection on the carpet boundaries of different types of carpets.
[0008] According to the carpet detection method of the sweeping robot provided by the present invention, after reacquiring the side sweeping current and the center sweeping current, the method further includes: when no collision with the wall is detected, if it is determined that the reacquiring side sweeping current does not meet the first preset normal current value range, the method is determined to be in carpet driving state; if it is determined that the reacquiring side sweeping current meets the first preset normal current value range and the reacquiring center sweeping current is less than or equal to a second preset current threshold, the method is determined to be in abnormal detection state; the abnormal detection state is used to characterize the state in which the center sweeping current detection has failed.
[0009] When it is determined that the reacquired side scan current is within the first preset normal current range and the reacquired center scan current is greater than the second preset current threshold, after re-detecting the pitch angle of the gyroscope, the following steps are taken: when it is determined that the re-detected pitch angle is greater than the upper limit of the pitch angle range of the upper and lower carpets, it is determined to be an obstacle crossing accidental touch state; when it is determined that the re-detected pitch angle is less than the lower limit of the pitch angle range of the upper and lower carpets, it is determined to be a foreign object entanglement state.
[0010] According to the carpet detection method of the sweeping robot provided by the present invention, after obtaining the side sweeping current and the middle sweeping current of the sweeping robot, the method further includes: determining the ground driving state when the side sweeping current is less than or equal to a first preset current threshold; and determining the foreign object entanglement state when the side sweeping current is greater than the first preset current threshold and the middle sweeping current is less than or equal to a second preset current threshold.
[0011] After detecting the pitch angle of the gyroscope when the side scan current is greater than the first preset current threshold and the center scan current is greater than the second preset current threshold, the method further includes: determining the obstacle crossing accident state when the pitch angle is greater than the upper limit of the pitch angle range of the carpet travel; and determining the foreign object entanglement state when the pitch angle is less than the lower limit of the pitch angle range of the carpet travel.
[0012] According to the carpet detection method for a sweeping robot provided by the present invention, after determining that the side sweeping current is less than or equal to a first preset current threshold and thus determining that the robot is in a ground driving state, the method further includes: when determining that the side sweeping current is within the first preset normal current range and the center sweeping current is within the second preset normal current range, detecting the pitch angle of the gyroscope; wherein, the upper limit of the first preset normal current range is less than the first preset current threshold, and the upper limit of the second preset normal current range is less than the second preset current threshold; when determining that the pitch angle is within the ground pitch angle range, the robot is determined to be in a ground driving state; wherein, the ground pitch angle range is obtained based on prior detection of the sweeping robot driving on different materials of the ground.
[0013] According to the carpet detection method of the sweeping robot provided by the present invention, after determining that the side sweeping current is less than or equal to a first preset current threshold and thus determining that the robot is in a ground driving state, the method further includes: determining that the side sweeping current does not meet the first preset normal current value range and thus determining that the side sweeping brush is in a state of foreign object entanglement or obstacle crossing mis-touch; and determining that the side sweeping current meets the first preset normal current value range and the center sweeping current does not meet the second preset normal current value range and thus determining that the center sweeping component is in a state of foreign object entanglement or obstacle crossing mis-touch.
[0014] After determining that the side-scan current is within the first preset normal current range and the center-scan current is within the second preset normal current range, the process after detecting the pitch angle of the gyroscope further includes: determining that when the pitch angle is greater than the upper limit of the ground pitch angle range, it is determined to be an obstacle crossing accident state; and determining that when the pitch angle is less than the lower limit of the ground pitch angle range, it is determined to be a foreign object entanglement state.
[0015] According to the carpet detection method of the sweeping robot provided by the present invention, after determining that the pitch angle conforms to the ground pitch angle range and is in the ground driving state, the method further includes: re-acquiring the side sweeping current and the center sweeping current; when the re-acquiring side sweeping current conforms to a first preset current threshold and the re-acquiring center sweeping current conforms to a second preset normal current value range, re-detecting the pitch angle of the gyroscope; wherein, the upper limit of the second preset normal current value range is less than the second preset current threshold; when the re-detected pitch angle conforms to the upper and lower carpet pitch angle range, the method is determined to be in the carpet boundary driving state; wherein, the upper and lower carpet pitch angle range is obtained based on the sweeping robot's driving detection on the carpet boundaries of different types of carpets.
[0016] According to a carpet detection method for a sweeping robot provided by the present invention, after reacquiring the side sweeping current and the middle sweeping current, the method includes: determining the ground driving state when the reacquiring side sweeping current does not meet the first preset current threshold; and determining the foreign object entanglement state when the reacquiring side sweeping current meets the first preset current threshold and the reacquiring middle sweeping current does not meet the second preset normal current value range.
[0017] After determining that the reacquired side scan current meets the first preset current threshold and the reacquired center scan current meets the second preset normal current value range, and after re-detecting the pitch angle of the gyroscope, the following steps are also included: if the re-detected pitch angle is greater than the upper limit of the pitch angle range of the upper and lower carpets, it is determined to be an obstacle crossing accidental touch state; if the re-detected pitch angle is less than the lower limit of the pitch angle range of the upper and lower carpets, it is determined to be a foreign object entanglement state.
[0018] The present invention also provides a carpet detection device for a robotic vacuum cleaner, comprising: a current detection module for acquiring the side-sweeping current and the center-sweeping current of the robotic vacuum cleaner; a pitch angle detection module for detecting the pitch angle of a gyroscope when the side-sweeping current is greater than a first preset current threshold and the center-sweeping current is greater than a second preset current threshold; and a carpet recognition module for determining that the robot is in carpet driving state when the pitch angle conforms to the carpet driving pitch angle range; wherein the carpet driving pitch angle range is obtained based on prior detection of the robotic vacuum cleaner driving on different types of carpets.
[0019] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the carpet detection method for a sweeping robot as described above.
[0020] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the carpet detection method for a sweeping robot as described above.
[0021] The present invention also provides a computer program product, including a computer program that, when executed by a processor, implements the carpet detection method for a sweeping robot as described above.
[0022] The carpet detection method, electronic device, and medium for sweeping robots provided by this invention acquire the side sweeping current and center sweeping current of the sweeping robot to avoid introducing additional hardware detection costs. Moreover, the current data acquisition and processing speed is fast, which can meet the needs of real-time identification and ensure the system's response efficiency. Furthermore, the side sweeping current and center sweeping current are used to quickly filter the ground driving status to effectively eliminate the current surge caused by accidental reasons in a single motor. And when both side sweeping motors and center sweeping motors are under high load at the same time, the pitch angle is combined for accurate judgment, which improves the accuracy of judgment and greatly enhances the stability and reliability of the entire identification system in complex environments. Attached Figure Description
[0023] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0024] Figure 1 This is one of the flowcharts illustrating the carpet detection method for a sweeping robot provided by the present invention;
[0025] Figure 2 This is the second flowchart illustrating the carpet detection method for a sweeping robot provided by the present invention;
[0026] Figure 3 This is the third flowchart of the carpet detection method for a sweeping robot provided by the present invention;
[0027] Figure 4 This is the fourth flowchart of the carpet detection method for a sweeping robot provided by the present invention;
[0028] Figure 5 This is the fifth flowchart illustrating the carpet detection method for a sweeping robot provided by the present invention;
[0029] Figure 6 This is a schematic diagram of the carpet detection device for a sweeping robot provided by the present invention;
[0030] Figure 7 This is a schematic diagram of the electronic device provided by the present invention. Detailed Implementation
[0031] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.
[0032] Figure 1 This is one of the flowcharts illustrating the carpet detection method for a robotic vacuum cleaner provided by the present invention, such as... Figure 1 As shown, the method includes the following:
[0033] S11, obtain the side sweeping current and center sweeping current of the sweeping robot;
[0034] S12, when the side scan current is greater than the first preset current threshold and the center scan current is greater than the second preset current threshold, the pitch angle of the gyroscope is detected.
[0035] S13, when the pitch angle is determined to be within the range of pitch angles for carpet driving, the state is determined to be carpet driving; wherein, the range of pitch angles for carpet driving is obtained based on the detection of the sweeping robot driving on different types of carpets.
[0036] It should be noted that the following will be combined with specific details. Figures 2-5 The present invention describes a carpet detection method for a robotic vacuum cleaner.
[0037] Step S11: Obtain the side sweeping current and center sweeping current of the sweeping robot.
[0038] Step S12: When the side scan current is greater than the first preset current threshold and the center scan current is greater than the second preset current threshold, the pitch angle of the gyroscope is detected.
[0039] In one alternative embodiment, reference Figure 2 After acquiring the side-sweeping current and center-sweeping current of the robotic vacuum cleaner, the process further includes: determining the robot to be in ground-based driving mode when the side-sweeping current is less than or equal to a first preset current threshold; and determining the robot to be in a foreign object entanglement mode when the side-sweeping current is greater than the first preset current threshold and the center-sweeping current is less than or equal to a second preset current threshold. It should be noted that the foreign object entanglement mode is used to characterize the state where the robot's brush is entangled with foreign objects such as tape, hair, or yarn on the ground.
[0040] In addition, the first preset current threshold and the second preset current threshold can be determined based on the side sweeping current and the center sweeping current corresponding to the sweeping robot's driving state from the ground to the carpet and from the carpet to the ground. This is used to classify the sweeping robot's driving state, so as to facilitate the determination of whether the sweeping robot is driving on the ground or on the carpet by working together through the first preset current threshold and the second preset current threshold.
[0041] In one alternative embodiment, reference Figure 3 After determining that the side-sweeping current is less than or equal to the first preset current threshold and thus in a ground-based driving state, the system further includes: when the side-sweeping current is within the first preset normal current range and the center-sweeping current is within the second preset normal current range, detecting the pitch angle of the gyroscope; wherein the upper limit of the first preset normal current range is less than the first preset current threshold, and the upper limit of the second preset normal current range is less than the second preset current threshold; when the pitch angle is within the ground pitch angle range, the system is determined to be in a ground-based driving state; wherein the ground pitch angle range is obtained based on prior detection of the robot vacuum cleaner driving on different materials of the ground.
[0042] It should be noted that because robotic vacuum cleaners are easily affected by small obstacles or foreign objects on the ground when moving, they may fail to accurately identify them, leading to inaccurate judgments in all subsequent steps. Therefore, cross-validation of the side-sweeping current and the center-sweeping current is used to reduce misjudgments caused by single-point current anomalies, such as slight entanglement or pressing on foreign objects, thus ensuring the reliability of the ground movement status. When both the side-sweeping current and the center-sweeping current are normal, the corresponding pitch angle range is further detected to introduce attitude information and determine whether the pitch angle conforms to the ground pitch angle range, thereby improving the accuracy of the judgment of the ground movement status.
[0043] In addition, the first preset normal current range, the second preset normal current range, and the ground pitch angle range are configured in advance based on the side sweeping current, middle sweeping current, and pitch angle of the robot vacuum cleaner when it is driving normally on different surfaces. The first preset normal current range is used to characterize the side sweeping current range of the robot vacuum cleaner when it is driving normally on the ground, the second preset normal current range is used to characterize the middle sweeping current range of the robot vacuum cleaner when it is driving normally on the ground, and the ground pitch angle range is used to characterize the pitch angle range of the robot vacuum cleaner when it is driving normally on the ground. Different surfaces can be determined by referring to the normal floor materials of a household, such as wooden floors, tile floors, etc., without further limitation here.
[0044] It should be added that, through the above methods, it can be determined whether the current robot vacuum is moving on a smooth floor or a carpet. By introducing the gyroscope angle judgment, the possibility of misjudgment due to excessive current caused by foreign objects getting tangled in the side sweeping and / or center sweeping can be eliminated.
[0045] In addition, continue to refer to Figure 3After determining that the side sweep current is less than or equal to the first preset current threshold and thus the state is ground driving, the system further includes: determining that the side sweep current does not meet the first preset current normal value range and thus the state is side sweep foreign object entanglement or obstacle crossing accidental touch; and determining that the side sweep current meets the first preset current normal value range and the center sweep current does not meet the second preset current normal value range and thus the state is center sweep component foreign object entanglement or obstacle crossing accidental touch.
[0046] It should be noted that when the side-sweeping current is abnormal, it indicates that the side brush is encountering additional resistance. This resistance may originate from foreign objects entangled in the side brush or the side brush attempting to cross an obstacle. Therefore, by identifying the abnormal side-sweeping current, the problem can be narrowed down from the entire robot vacuum to the side brush component, making it easier for users to troubleshoot and thus improving maintenance efficiency. When the side-sweeping current is normal but the central sweeping current is abnormal, interference from the side brush has been ruled out. In this case, identifying the abnormal central sweeping current pinpoints the problem to the central sweeping component, greatly improving diagnostic accuracy, preventing motor overheating and burnout due to prolonged blockage, protecting the hardware, and extending its lifespan.
[0047] In addition, continue to refer to Figure 3 After determining that the side-scan current is within the first preset normal current range and the center-scan current is within the second preset normal current range, after detecting the pitch angle of the gyroscope, the following steps are also included: when the pitch angle is greater than the upper limit of the ground pitch angle range, it is determined to be an obstacle crossing accident state; when the pitch angle is less than the lower limit of the ground pitch angle range, it is determined to be a foreign object entanglement state.
[0048] It should be noted that by determining whether the pitch angle exceeds the upper limit of the ground pitch angle range, obstacle-crossing status can be accurately detected. Even if the current temporarily recovers due to increased resistance, it will not affect the obstacle-crossing perception, avoiding frequent interruptions or misjudgments during the cleaning process of the robot vacuum cleaner in complex terrain, thus enhancing scene perception. Similarly, by determining whether the pitch angle is below the lower limit of the ground pitch angle range, the state of foreign object entanglement can be accurately detected, thereby facilitating timely maintenance.
[0049] Furthermore, when the pitch angle is determined to be less than the lower limit of the ground pitch angle range, after determining that it is in a foreign object entanglement state, the following measures are taken: triggering a protection mechanism, such as immediately reducing the intermediate sweep speed or stopping the intermediate sweep, to prevent the motor from burning out due to overload, thereby protecting the core hardware and extending the product life. The specific protection mechanism can be designed according to actual design requirements, and no further limitations are made here.
[0050] In one alternative embodiment, reference Figure 4After determining that the pitch angle conforms to the ground pitch angle range and is in ground driving mode, the process further includes: reacquiring the side-scanning current and center-scanning current; and re-detecting the pitch angle of the gyroscope when the re-acquiring side-scanning current conforms to the first preset current threshold and the re-acquiring center-scanning current conforms to the second preset normal current range. The upper limit of the second preset normal current range is less than the second preset current threshold. When the re-detected pitch angle conforms to the pitch angle range of the upper and lower carpets, the process is determined to be in carpet boundary driving mode. The pitch angle range of the upper and lower carpets is obtained based on the robot's driving detection on the carpet boundaries of different types of carpets.
[0051] It should be noted that, because the robot is prone to navigating to carpet boundaries when on the ground, the side-scan and center-scan currents are re-acquired when the robot is confirmed to be on the ground to trigger boundary recognition. This prevents the robot from erroneously entering the boundary recognition logic due to current fluctuations inside the carpet or on obstacles, improving the overall system's logical rigor. This re-verifies the normality of the side-scan and center-scan currents, allowing for accurate capture of the transition from the ground to the carpet. Furthermore, combining this with the pitch angle enables instantaneous and accurate carpet boundary recognition. This multi-verification mechanism improves the reliability of carpet boundary recognition results and effectively eliminates misjudgments caused by a single sensor. Additionally, carpet types include long-pile carpets, short-pile carpets, polyester carpets, and wool carpets. The robot's movement when moving up and down the carpet is also captured; during these movements, the side-scan current changes before the center-scan current, and the pitch angle changes significantly.
[0052] In addition, the upper and lower carpet pitch angle range is configured based on the pitch angle of the robot vacuum cleaner when it travels along the carpet boundary. The upper and lower carpet pitch angle range is used to characterize the pitch angle range of the robot vacuum cleaner when it travels along the carpet boundary.
[0053] Furthermore, after reacquiring the side-scan current and the center-scan current, the process includes: determining the ground driving state when the reacquiring side-scan current does not meet the first preset current threshold; and determining the foreign object entanglement state when the reacquiring side-scan current meets the first preset current threshold and the reacquiring center-scan current does not meet the second preset normal current value range.
[0054] In addition, after determining that the reacquired side scan current meets the first preset current threshold and the reacquired center scan current meets the second preset normal current value range, after re-detecting the pitch angle of the gyroscope, the following steps are also included: if the re-detected pitch angle is greater than the upper limit of the pitch angle range of the upper and lower carpets, it is determined to be an obstacle crossing accidental touch state; if the re-detected pitch angle is less than the lower limit of the pitch angle range of the upper and lower carpets, it is determined to be a foreign object entanglement state.
[0055] Step S13: When the pitch angle is within the range of pitch angles for carpet driving, the state is determined to be carpet driving; wherein, the range of pitch angles for carpet driving is obtained by prior detection based on the robot vacuum cleaner driving on different types of carpets.
[0056] It should be noted that when determining that the pitch angle falls within the range of carpet travel pitch angles, the pitch angle needs to be compared with the previously determined ranges of different carpet types to determine the corresponding carpet type based on the range that matches the target range. If none of the ranges match the target range, the carpet type is determined based on the smallest difference between the pitch angle and the upper and lower limits of the corresponding range. Alternatively, a machine learning algorithm can be used to classify the pitch angles and determine the carpet type. The machine learning algorithm can be selected according to the actual design requirements, such as the K-NN algorithm, SVM model, cluster analysis algorithm, etc., to improve the accuracy of the judgment.
[0057] In addition, the carpet travel pitch angle range is configured based on the pitch angle of the robot vacuum cleaner when traveling on the carpet. The carpet travel pitch angle range is used to characterize the pitch angle range of the robot vacuum cleaner when traveling on the carpet.
[0058] In this embodiment, reference Figure 5 After determining that the pitch angle is within the range of carpet driving pitch angles, and thus determining that it is in carpet driving state, the process further includes: determining that when a collision with a wall is detected, and thus determining that it is in carpet boundary driving state; when no collision with a wall is detected, re-acquiring the side-scan current and the center-scan current, and determining that the re-acquiring side-scan current is within the first preset normal current value range and the re-acquiring center-scan current is greater than the second preset current threshold, and then re-detecting the pitch angle of the gyroscope; wherein, the upper limit of the first preset normal current value range is less than the first preset current threshold; and determining that the re-detected pitch angle is within the range of upper and lower carpet pitch angles, and thus determining that it is in carpet boundary driving state; wherein, the range of upper and lower carpet pitch angles is obtained based on the detection of the robot vacuum cleaner driving on the carpet boundaries of different types of carpets.
[0059] It should be noted that, under the pre-determined carpet driving state, determining whether a collision with a wall is detected is used to determine whether it is a carpet boundary, in order to improve the response speed of carpet boundary recognition, improve the recognition accuracy in specific fields, and further, if no collision with a wall is detected, the edge scan current and center scan current are reacquired and combined with the pitch angle to identify the carpet boundary, so as to achieve effective recognition of the boundaries of independent carpets and carpets not attached to walls, improve the comprehensiveness of boundary recognition, and increase the speed of carpet detection.
[0060] It's worth noting that the carpet boundary detection logic described above indicates the carpet boundary when the robot vacuum is on a smooth surface and the side-sweeping current suddenly increases while the pitch angle matches the angle range of the upper carpet. Similarly, when the robot vacuum is on a carpet and the side-sweeping current suddenly returns to normal while the pitch angle matches the angle range of the lower carpet, it can also be identified as a carpet boundary. If the robot vacuum collides with a wall while moving on a carpet, it's considered that the carpet is touching the wall. This logic can identify carpeted environments throughout the house. Furthermore, by incorporating a gyroscope for more precise carpet boundary detection, the carpet can be displayed more accurately on the app map, minimizing the risk of the robot vacuum wetting the carpet.
[0061] In an optional embodiment, carpet boundary recognition can also be performed by combining the z-axis acceleration of the robot vacuum cleaner. The z-axis acceleration of the robot vacuum cleaner will change significantly when it moves up and down the carpet. The up and down vibration of the robot on the carpet can also be represented by the z-axis acceleration. On hard and smooth surfaces, the z-axis acceleration is close to 0. The principle of measuring z-axis acceleration is similar to that of measuring the pitch angle of the robot vacuum cleaner. Adding a judgment condition can make the judgment result more accurate, which will not be repeated here.
[0062] In addition, after reacquiring the side scan current and the center scan current, the process also includes: when no collision wall is detected, if it is determined that the reacquiring side scan current does not meet the first preset normal current value range, it is determined to be a carpet driving state; if it is determined that the reacquiring side scan current meets the first preset normal current value range and the reacquiring center scan current is less than or equal to the second preset current threshold, it is determined to be an abnormal detection state; the abnormal detection state is used to characterize the state in which the center scan current detection has failed.
[0063] In addition, after determining that the reacquired side scan current is within the first preset normal current range and the reacquired center scan current is greater than the second preset current threshold, after re-detecting the pitch angle of the gyroscope, the method further includes: determining the obstacle crossing accidental touch state when the re-detected pitch angle is greater than the upper limit of the pitch angle range of the upper and lower carpets; and determining the foreign object entanglement state when the re-detected pitch angle is less than the lower limit of the pitch angle range of the upper and lower carpets.
[0064] It's worth noting that when the pitch angle changes excessively, the current changes in the center or side sweepers might be due to obstacle crossing. Therefore, obstacle crossing needs to be ruled out to prevent false triggering of carpet recognition. When the robot vacuum is moving over or under carpets, the side sweeper current always changes before the center sweeper current. Without using a gyroscope for judgment, it's impossible to distinguish between moving over or under carpets and the center sweeper being entangled, easily leading to misjudgments. Furthermore, to identify different types of carpets, the corresponding detection thresholds need to be calibrated through testing, as described above, and will not be repeated here.
[0065] In an optional embodiment, after detecting the pitch angle of the gyroscope when the side scan current is greater than a first preset current threshold and the center scan current is greater than a second preset current threshold, the method further includes: determining an obstacle crossing accidental touch state when the pitch angle is greater than the upper limit of the pitch angle range of carpet travel; and determining a foreign object entanglement state when the pitch angle is less than the lower limit of the pitch angle range of carpet travel.
[0066] In summary, this invention obtains the side-sweeping current and center-sweeping current of the robotic vacuum cleaner to avoid introducing additional hardware detection costs. Furthermore, the current data acquisition and processing speed is fast, meeting the needs of real-time identification and ensuring system response efficiency. The side-sweeping current and center-sweeping current are used to quickly filter out ground movement conditions, effectively eliminating sudden current surges caused by accidental factors in a single motor. Only when both side-sweeping and center-sweeping motors are under high load simultaneously is the pitch angle used for precise judgment, improving accuracy and greatly enhancing the stability and reliability of the entire identification system in complex environments.
[0067] The carpet detection device for a robotic vacuum cleaner provided by the present invention is described below. The carpet detection device for a robotic vacuum cleaner described below can be referred to in correspondence with the carpet detection method for a robotic vacuum cleaner described above.
[0068] Figure 6 A schematic diagram of a carpet detection device for a robotic vacuum cleaner is shown. The device includes:
[0069] The current detection module 61 acquires the side-sweeping current and the middle-sweeping current of the sweeping robot;
[0070] The pitch angle detection module 62 detects the pitch angle of the gyroscope when the side scan current is greater than the first preset current threshold and the center scan current is greater than the second preset current threshold.
[0071] The carpet recognition module 63 determines that the carpet driving state is when the pitch angle is within the range of carpet driving pitch angles; wherein, the range of carpet driving pitch angles is obtained based on the detection of the sweeping robot driving on different types of carpets.
[0072] In an optional embodiment, the device further includes: a ground recognition module, which, after acquiring the side-sweeping current and the center-sweeping current of the sweeping robot, determines the robot to be in a ground-based driving state when the side-sweeping current is less than or equal to a first preset current threshold; and a judgment module, which determines the robot to be in a foreign object entanglement state when the side-sweeping current is greater than the first preset current threshold and the center-sweeping current is less than or equal to a second preset current threshold. Additionally, the judgment module is further configured to: after determining that the side-sweeping current is greater than the first preset current threshold and the center-sweeping current is greater than the second preset current threshold, detect the pitch angle of the gyroscope, and determine that the robot to be in an obstacle-crossing accidental touch state when the pitch angle is greater than the upper limit of the carpet-based driving pitch angle range; and determine that the robot to be in a foreign object entanglement state when the pitch angle is less than the lower limit of the carpet-based driving pitch angle range.
[0073] In an optional embodiment, the pitch angle detection module 62 is further configured to: after determining that the side-sweeping current is less than or equal to a first preset current threshold and thus determining that the robot is in a ground-based driving state, and after determining that the side-sweeping current is within the first preset normal current range and the center-sweeping current is within the second preset normal current range, detect the pitch angle of the gyroscope; wherein the upper limit of the first preset normal current range is less than the first preset current threshold, and the upper limit of the second preset normal current range is less than the second preset current threshold; the carpet recognition module 63 is further configured to: determine that the robot is in a ground-based driving state when the pitch angle is within the ground pitch angle range; wherein the ground pitch angle range is obtained based on the robot's driving detection on different materials of the ground.
[0074] In addition, the judgment module is also used to: determine the ground driving state when the side sweep current is less than or equal to the first preset current threshold; determine the side sweep current as being outside the normal range of the first preset current when the side sweep current does not meet the normal range of the first preset current; and determine the side sweep current as being outside the normal range of the first preset current and the center sweep current as being outside the normal range of the second preset current when the side sweep current meets the normal range of the first preset current and the center sweep current does not meet the normal range of the second preset current.
[0075] In addition, the judgment module is also used to: when the side scan current is within the first preset normal current range and the center scan current is within the second preset normal current range, after detecting the pitch angle of the gyroscope, determine the obstacle crossing accident state when the pitch angle is greater than the upper limit of the ground pitch angle range; and determine the foreign object entanglement state when the pitch angle is less than the lower limit of the ground pitch angle range.
[0076] Furthermore, the device also includes a protection module that, upon determining that the pitch angle is less than the lower limit of the ground pitch angle range, indicates a foreign object entanglement state, triggers a protection mechanism, such as immediately reducing the intermediate sweep speed or stopping the intermediate sweep, to prevent the motor from burning out due to overload, thereby protecting the core hardware and extending the product life. The specific protection mechanism can be designed according to actual design requirements, and is not further limited here.
[0077] In an optional embodiment, after determining that the pitch angle conforms to the ground pitch angle range and thus indicates a ground driving state, the current detection module 61 is further configured to reacquire the side-sweep current and the center-sweep current, and the pitch angle detection module 62 is further configured to re-detect the pitch angle of the gyroscope when the re-acquired side-sweep current conforms to a first preset current threshold and the re-acquired center-sweep current conforms to a second preset normal current value range; wherein, the upper limit of the second preset normal current value range is less than the second preset current threshold; the carpet recognition module 63 is further configured to determine that the driving state is a carpet boundary when the pitch angle conforms to the upper and lower carpet pitch angle range; wherein, the upper and lower carpet pitch angle range is obtained first based on the detection of the sweeping robot driving on the carpet boundaries of different types of carpets.
[0078] Furthermore, the judgment module is also used to: determine the ground driving state when the re-acquired side-scan current does not meet the first preset current threshold after re-acquiring the side-scan current and the center-scan current; and determine the foreign object entanglement state when the re-acquired side-scan current meets the first preset current threshold and the re-acquired center-scan current does not meet the second preset normal current value range.
[0079] In addition, the judgment module is also used to: when it is determined that the re-acquired side scan current meets the first preset current threshold and the re-acquired center scan current meets the second preset normal current value range, after re-detecting the pitch angle of the gyroscope, if the re-detected pitch angle is greater than the upper limit of the pitch angle range of the upper and lower carpets, determine it as an obstacle crossing accidental touch state; if it is determined that the re-detected pitch angle is less than the lower limit of the pitch angle range of the upper and lower carpets, determine it as a foreign object entanglement state.
[0080] In this embodiment, the carpet recognition module 63 further includes: a boundary recognition unit, which determines the carpet driving state when the pitch angle conforms to the carpet driving pitch angle range, and determines the carpet boundary driving state when a collision with a wall is detected; a detection unit, which re-acquires the side-scan current and center-scan current when no collision with a wall is detected, and re-detects the pitch angle of the gyroscope when the re-acquired side-scan current conforms to the first preset normal current value range and the re-acquired center-scan current is greater than the second preset current threshold; wherein, the upper limit of the first preset normal current value range is less than the first preset current threshold; and the boundary recognition unit, which determines the carpet boundary driving state when the re-detected pitch angle conforms to the upper and lower carpet pitch angle range; wherein, the upper and lower carpet pitch angle range is obtained based on the detection of the sweeping robot driving on the carpet boundaries of different types of carpets.
[0081] In addition, the judgment module is also used to: determine the carpet driving state when no collision wall is detected after the side scan current and the center scan current are reacquired; determine the abnormal detection state when the reacquired side scan current does not meet the first preset current normal value range; and determine the abnormal detection state when the reacquired side scan current meets the first preset current normal value range and the reacquired center scan current is less than or equal to the second preset current threshold. The abnormal detection state is used to characterize the state in which the center scan current detection has failed.
[0082] In addition, the judgment module is also used to: when it is determined that the re-acquired side scan current is within the first preset normal current value range and the re-acquired center scan current is greater than the second preset current threshold, after re-detecting the pitch angle of the gyroscope, determine that the re-detected pitch angle is greater than the upper limit of the pitch angle range of the upper and lower carpets, and determine that the obstacle crossing accidental touch state is determined; when it is determined that the re-detected pitch angle is less than the lower limit of the pitch angle range of the upper and lower carpets, determine that the foreign object entanglement state is determined.
[0083] In summary, this embodiment of the invention obtains the side-sweeping current and center-sweeping current of the sweeping robot through a current detection module, thus avoiding the introduction of additional hardware detection costs. Furthermore, the current data acquisition and processing speed is fast, meeting the needs of real-time identification and ensuring the system's response efficiency. The pitch angle detection module further uses the side-sweeping current and center-sweeping current to quickly filter the ground travel status, effectively eliminating sudden current surges caused by accidental factors in a single motor. Only when both side-sweeping motors and the center-sweeping motor are under high load simultaneously is the carpet recognition module combined with the pitch angle used for accurate judgment, improving the accuracy of the judgment and greatly enhancing the stability and reliability of the entire recognition system in complex environments.
[0084] Figure 7 An example is a schematic diagram of the physical structure of an electronic device, such as... Figure 7 As shown, the electronic device may include a processor 710, a communications interface 720, a memory 730, and a communication bus 740. The processor 710, communications interface 720, and memory 730 communicate with each other via the communication bus 740. The processor 710 can call logic instructions in the memory 730 to execute a carpet detection method for a robotic vacuum cleaner. This method includes: acquiring the side-sweeping current and the center-sweeping current of the robotic vacuum cleaner; determining that when the side-sweeping current is greater than a first preset current threshold and the center-sweeping current is greater than a second preset current threshold, detecting the pitch angle of a gyroscope; and determining that the carpet travel pitch angle falls within the carpet travel pitch angle range, thus defining the state as carpet travel. The carpet travel pitch angle range is obtained prior to detection based on the robotic vacuum cleaner's travel on different types of carpets.
[0085] Furthermore, the logical instructions in the aforementioned memory 730 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, essentially, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0086] On the other hand, the present invention also provides a computer program product, which includes a computer program that can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the carpet detection method for a sweeping robot provided by the above methods. The method includes: acquiring the side sweeping current and the center sweeping current of the sweeping robot; determining that when the side sweeping current is greater than a first preset current threshold and the center sweeping current is greater than a second preset current threshold, detecting the pitch angle of the gyroscope; determining that when the pitch angle conforms to the carpet travel pitch angle range, determining that it is in carpet travel state; wherein, the carpet travel pitch angle range is obtained based on the sweeping robot's travel detection on different types of carpets.
[0087] In another aspect, the present invention also provides a non-transitory computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the carpet detection method for a sweeping robot provided by the above methods. The method includes: acquiring the side sweeping current and the center sweeping current of the sweeping robot; determining that when the side sweeping current is greater than a first preset current threshold and the center sweeping current is greater than a second preset current threshold, detecting the pitch angle of a gyroscope; determining that when the pitch angle conforms to the carpet travel pitch angle range, determining that it is in carpet travel state; wherein, the carpet travel pitch angle range is obtained in advance based on the sweeping robot's travel detection on different types of carpets.
[0088] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0089] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0090] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for carpet detection using a robotic vacuum cleaner, characterized in that, include: Obtain the side-sweeping current and center-sweeping current of the robotic vacuum cleaner; When the side-scan current is greater than a first preset current threshold and the center-scan current is greater than a second preset current threshold, the pitch angle of the gyroscope is detected. When the pitch angle is determined to be within the range of pitch angles for carpet driving, the system is determined to be in carpet driving mode; wherein, the range of pitch angles for carpet driving is obtained based on prior detection of the robot vacuum cleaner driving on different types of carpets; After determining that the pitch angle falls within the pitch angle range for carpet driving, and thus establishing a carpet driving state, the process further includes: When a collision with a wall is detected, the vehicle is determined to be in a carpet boundary driving state. When it is determined that no collision with the wall is detected, the side scan current and the middle scan current are reacquired. When it is determined that the reacquired side scan current is within the first preset normal current value range and the reacquired middle scan current is greater than the second preset current threshold, the pitch angle of the gyroscope is re-detected. Wherein, the upper limit of the first preset normal current value range is less than the first preset current threshold. When the re-detected pitch angle is determined to be within the pitch angle range of the upper and lower carpets, it is determined to be the carpet boundary driving state; wherein, the pitch angle range of the upper and lower carpets is obtained based on the detection of the sweeping robot driving on the carpet boundaries of different types of carpets.
2. The carpet detection method for a sweeping robot according to claim 1, characterized in that, After reacquiring the side-scan current and mid-scan current, the following is also included: If no collision with the wall is detected, and the newly acquired edge scan current does not meet the normal value range of the first preset current, the state is determined to be carpet driving. When it is determined that the reacquired side scan current is within the first preset normal current range and the reacquired center scan current is less than or equal to the second preset current threshold, it is determined to be an abnormal detection state; the abnormal detection state is used to characterize the state in which the center scan current detection has failed. After determining that the reacquired side-scan current is within the first preset normal current range and the reacquired center-scan current is greater than the second preset current threshold, the pitch angle of the gyroscope is re-detected, including: When the re-detected pitch angle is determined to be greater than the upper limit of the pitch angle range of the upper and lower carpets, it is determined to be an obstacle crossing accidental touch state; When the re-detected pitch angle is determined to be less than the lower limit of the pitch angle range of the upper and lower carpets, it is determined to be a foreign object entanglement state.
3. The carpet detection method for a sweeping robot according to any one of claims 1 to 2, characterized in that, After obtaining the side-sweeping current and center-sweeping current of the robotic vacuum cleaner, the following is also included: When the side-sweep current is determined to be less than or equal to the first preset current threshold, the vehicle is determined to be in a ground driving state. When the side-scanning current is greater than the first preset current threshold and the center-scanning current is less than or equal to the second preset current threshold, it is determined to be a foreign object entanglement state. After determining that the side-scan current is greater than a first preset current threshold and the center-scan current is greater than a second preset current threshold, and after detecting the pitch angle of the gyroscope, the method further includes: When the pitch angle is determined to be greater than the upper limit of the range of pitch angles for carpet travel, it is determined to be an obstacle crossing accident state; When the pitch angle is determined to be less than the lower limit of the range of pitch angles for carpet travel, it is determined to be a foreign object entanglement state.
4. The carpet detection method for a sweeping robot according to claim 3, characterized in that, After determining that the side-sweep current is less than or equal to the first preset current threshold and thus indicating a ground driving state, the process further includes: When the side-scan current is determined to be within the first preset normal current range and the center-scan current is within the second preset normal current range, the pitch angle of the gyroscope is detected; wherein, the upper limit of the first preset normal current range is less than the first preset current threshold, and the upper limit of the second preset normal current range is less than the second preset current threshold. When the pitch angle is determined to be within the ground pitch angle range, it is determined to be in ground driving state; wherein, the ground pitch angle range is obtained based on the robot vacuum cleaner's driving detection on different ground materials.
5. The carpet detection method for a sweeping robot according to claim 4, characterized in that, After determining that the side-sweep current is less than or equal to the first preset current threshold and thus indicating a ground driving state, the process further includes: When it is determined that the side-sweep current does not meet the normal value range of the first preset current, it is determined to be a state of side-sweep foreign object entanglement or accidental contact when crossing an obstacle; When it is determined that the side-scanning current is within the first preset normal current range and the center-scanning current is not within the second preset normal current range, it is determined to be a state of foreign object entanglement or accidental contact of the center-scanning component. After determining that the side-scan current meets the first preset normal current value range and the center-scan current meets the second preset normal current value range, and after detecting the pitch angle of the gyroscope, the method further includes: When the pitch angle is determined to be greater than the upper limit of the ground pitch angle range, it is determined to be an obstacle crossing accident state; When the pitch angle is determined to be less than the lower limit of the ground pitch angle range, it is determined to be a foreign object entanglement state.
6. The carpet detection method for a sweeping robot according to claim 4, characterized in that, After determining that the pitch angle conforms to the ground pitch angle range and is in a ground driving state, the process further includes: The side scan current and the center scan current are reacquired. When the reacquired side scan current meets the first preset current threshold and the reacquired center scan current meets the second preset normal current range, the pitch angle of the gyroscope is re-detected. The upper limit of the second preset normal current range is less than the second preset current threshold. When the re-detected pitch angle is determined to be within the pitch angle range of the upper and lower carpets, it is determined to be the carpet boundary driving state; wherein, the pitch angle range of the upper and lower carpets is obtained based on the detection of the sweeping robot driving on the carpet boundaries of different types of carpets.
7. The carpet detection method for a sweeping robot according to claim 6, characterized in that, After reacquiring the side scan current and mid-scan current, the following is included: When it is determined that the reacquired side-scan current does not meet the first preset current threshold, the state is determined to be ground driving state; When it is determined that the reacquired side-scan current meets the first preset current threshold and the reacquired center-scan current does not meet the second preset normal current range, it is determined to be a foreign object entanglement state. After determining that the reacquired side-scan current meets the first preset current threshold and the reacquired center-scan current meets the second preset normal current range, and after re-detecting the gyroscope's pitch angle, the process further includes: When the re-detected pitch angle is determined to be greater than the upper limit of the pitch angle range of the upper and lower carpets, it is determined to be an obstacle crossing accidental touch state; When the re-detected pitch angle is determined to be less than the lower limit of the pitch angle range of the upper and lower carpets, it is determined to be a foreign object entanglement state.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that, When the processor executes the computer program, it implements the carpet detection method for a sweeping robot as described in any one of claims 1 to 7.
9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the carpet detection method for a sweeping robot as described in any one of claims 1 to 7.