Cleaning robot and cliff judgment method and device thereof
By acquiring the height and color data of the robotic vacuum cleaner, and combining it with color compensation values and preset thresholds, the problem of cliff sensors misjudging on dark ground was solved, achieving more accurate cliff identification and safer cleaning.
Patent Information
- Application Number
- CN202411038163.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-31
- Publication Date
- 2024-11-01
AI Technical Summary
When existing robotic vacuum cleaners work on dark floors or dark ground, the cliff sensors are easily affected by the lightness or darkness of the ground color, leading to misjudgments, reducing the accuracy of cliff detection, and affecting the cleaning path and equipment safety.
By acquiring the height detection data of the cleaning robot and the color data of the cleaning surface, a color compensation value is determined, and combined with a preset height threshold, cliff judgment is made, reducing the error of color on the height detection data and improving the accuracy of the judgment.
It improves the accuracy of cliff identification, ensures the safe operation of cleaning robots, avoids falls and injuries, and allows them to adjust their direction of travel in time to avoid cliff areas.
Smart Images

Figure CN118873035A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of smart home devices, and in particular to a cleaning robot and a cliff determination method, device, computer equipment, computer-readable storage medium, and computer program product thereof. Background Art
[0002] With the rapid advancement of science and technology and the continuous improvement of people's living standards, smart home devices have gradually become an important part of people's daily lives. Among them, sweeping robots are popular because they can clean the floor autonomously and reduce the pressure of cleaning labor in the room. Faced with the complex and changing indoor environment, cliff sensors are key components to ensure the safe operation of sweeping robots. They can detect the distance between the sweeping robot and the ground, and then detect whether the sweeping robot is in a suspended state, and change the action strategy accordingly to prevent it from falling.
[0003] However, when current sweeping robots work on dark floors or dark ground media, cliff sensors often make misjudgments due to the influence of the color depth of the ground: the cliff sensor sends out a detection light, and when the ground is a dark medium, it absorbs more light, causing the cliff sensor to receive less reflected light, thus mistakenly judging the ground height as a cliff, resulting in the sweeping robot's normal cleaning path being restricted or even being unable to work at all. Therefore, how to improve the sweeping robot's cliff judgment accuracy is an issue that needs to be solved urgently. Summary of the invention
[0004] Based on this, it is necessary to provide a cleaning robot and its cliff determination method, device, computer equipment, computer-readable storage medium and computer program product that can improve the accuracy of cliff determination in order to address the above technical problems.
[0005] In a first aspect, the present application provides a cleaning robot cliff determination method, the method comprising:
[0006] Acquire height detection data of the cleaning robot; the height detection data is the distance between the side of the cleaning robot close to the cleaning surface and the cleaning surface;
[0007] Acquiring color data of the cleaning surface, and determining a color compensation value based on the color data;
[0008] The cleaning robot is subjected to cliff determination according to the height detection data, the color compensation value and a preset height threshold.
[0009] In one embodiment, performing cliff determination on the cleaning robot according to the height detection data, the color compensation value and a preset height threshold comprises:
[0010] Adding the height detection data to the color compensation value to obtain a measured data value;
[0011] The measured data value is compared with a preset height threshold to perform cliff determination on the cleaning robot.
[0012] In one embodiment, comparing the measured data value with a preset height threshold to perform cliff determination on the cleaning robot includes:
[0013] If the measured data value is greater than a preset height threshold, it is determined that the cleaning surface of the cleaning robot is not a cliff;
[0014] If the measured data value is less than or equal to the preset height threshold, it is determined that the cleaning surface of the cleaning robot is a cliff.
[0015] In one embodiment, determining the color compensation value based on the color data includes:
[0016] A color compensation value is determined according to the color data and a historical color compensation value; the historical color compensation value is obtained based on historical height detection data and historical color data.
[0017] In one embodiment, after performing cliff determination on the cleaning robot according to the height detection data, the color compensation value and the preset height threshold, the method further includes:
[0018] If it is determined that the cleaning surface of the cleaning robot is a cliff, the moving direction of the cleaning robot is controlled to change.
[0019] In one embodiment, controlling the moving direction of the cleaning robot to change comprises:
[0020] Control the steering of the traveling mechanism of the cleaning robot.
[0021] In one embodiment, before controlling the travel mechanism of the cleaning robot to turn, the method further includes:
[0022] The traveling mechanism of the cleaning robot is controlled to run in the reverse direction for a preset avoidance time.
[0023] In a second aspect, the present application also provides a cleaning robot cliff determination device, the device comprising:
[0024] A distance sensing module, used to obtain height detection data of the cleaning robot; the height detection data is the distance between the side of the cleaning robot close to the cleaning surface and the cleaning surface;
[0025] A color compensation module, used to obtain color data of the cleaning surface and determine a color compensation value based on the color data;
[0026] The cliff determination module is used to perform cliff determination on the cleaning robot according to the height detection data, the color compensation value and a preset height threshold.
[0027] In the third aspect, the present application provides a cleaning robot, which includes a controller, a distance sensor, a color sensor and a robot body, wherein the controller, the distance sensor and the color sensor are all arranged on the robot body, and the controller connects the distance sensor, the color sensor and the robot body; the distance sensor is used to collect the distance between the side of the cleaning robot close to the cleaning surface and the cleaning surface, the color sensor is used to collect color data of the cleaning surface, and the controller is used to implement the above-mentioned cleaning robot cliff judgment method.
[0028] In a fourth aspect, the present application further provides a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:
[0029] Acquire height detection data of the cleaning robot; the height detection data is the distance between the side of the cleaning robot close to the cleaning surface and the cleaning surface;
[0030] Acquiring color data of the cleaning surface, and determining a color compensation value based on the color data;
[0031] The cleaning robot is subjected to cliff determination according to the height detection data, the color compensation value and a preset height threshold.
[0032] In a fifth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the following steps are implemented:
[0033] Acquire height detection data of the cleaning robot; the height detection data is the distance between the side of the cleaning robot close to the cleaning surface and the cleaning surface;
[0034] Acquiring color data of the cleaning surface, and determining a color compensation value based on the color data;
[0035] The cleaning robot is subjected to cliff determination according to the height detection data, the color compensation value and a preset height threshold.
[0036] In a sixth aspect, the present application further provides a computer program product, including a computer program, which implements the following steps when executed by a processor:
[0037] Acquire height detection data of the cleaning robot; the height detection data is the distance between the side of the cleaning robot close to the cleaning surface and the cleaning surface;
[0038] Acquiring color data of the cleaning surface, and determining a color compensation value based on the color data;
[0039] The cleaning robot is subjected to cliff determination according to the height detection data, the color compensation value and a preset height threshold.
[0040] The above-mentioned cleaning robot and its cliff determination method, device, computer equipment, computer-readable storage medium and computer program product include obtaining height detection data of the cleaning robot, obtaining color data of the cleaning surface, and determining a color compensation value based on the color data, and performing cliff determination on the cleaning robot according to the height detection data, the color compensation value and a preset height threshold. The height detection data is the distance between the side of the cleaning robot close to the cleaning surface and the cleaning surface. By obtaining the color data of the cleaning surface of the cleaning robot and obtaining the color compensation value to compensate for the error of the height detection data, the influence of the color of the cleaning surface can be reduced when performing cliff determination, thereby improving the accuracy of cliff determination. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0042] Figure 1 A diagram showing an application environment of a cleaning robot in one embodiment;
[0043] Figure 2 It is a schematic diagram of the flow chart of a method for determining a cliff of a cleaning robot in one embodiment;
[0044] Figure 3 It is a flowchart of the steps of performing cliff determination on the cleaning robot according to the height detection data, the color compensation value and the preset height threshold in one embodiment;
[0045] Figure 4 It is a flowchart of the steps of performing cliff determination on the cleaning robot according to the height detection data, the color compensation value and the preset height threshold in one embodiment;
[0046] Figure 5 A schematic diagram of a flow chart of a method for determining a cliff of a cleaning robot in another embodiment;
[0047] Figure 6 It is a flowchart of a method for determining a cliff of a cleaning robot in another embodiment;
[0048] Figure 7 is a diagram of an application environment of a cleaning robot in another embodiment;
[0049] Figure 8 is a bottom view of a cleaning robot in one embodiment;
[0050] Fig. 9 A bottom view of a cleaning robot in another embodiment;
[0051] Fig.10 is a structural block diagram of a cliff determination device for a cleaning robot in one embodiment;
[0052] Fig.11 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment.
[0053] Description of reference numerals: controller 102 , distance sensor 104 , color sensor 106 , robot body 108 . DETAILED DESCRIPTION
[0054] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0055] It is understood that the terms "first", "second", etc. used in this application may be used herein to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish a first element from another element. For example, without departing from the scope of this application, a first resistor may be referred to as a second resistor, and similarly, a second resistor may be referred to as a first resistor. Both the first resistor and the second resistor are resistors, but they are not the same resistor.
[0056] It can be understood that the “connection” in the following embodiments should be understood as “electrical connection”, “communication connection”, etc. if the connected circuits, modules, units, etc. have electrical signals or data transmission between each other.
[0057] When used herein, the singular forms "a", "an", and "said / the" may also include plural forms, unless the context clearly indicates otherwise. It should also be understood that the terms "include / comprise" or "have" and the like specify the presence of stated features, wholes, steps, operations, components, parts, or combinations thereof, but do not exclude the possibility of the presence or addition of one or more other features, wholes, steps, operations, components, parts, or combinations thereof. At the same time, the term "and / or" used in this specification includes any and all combinations of the relevant listed items.
[0058] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein in the specification of this application are only for the purpose of describing specific embodiments and are not intended to limit this application.
[0059] The cleaning robot cliff determination method provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown. Figure 1 As shown, the present application provides a cleaning robot, which includes a controller 102, a distance sensor 104, a color sensor 106 and a robot body 108. The controller 102, the distance sensor 104 and the color sensor 106 are all arranged on the robot body 108, and the controller 102 is connected to the distance sensor 104, the color sensor 106 and the robot body 108. Among them, the robot body 108 is used to complete the cleaning of the cleaning surface, and can drive the cleaning robot to move under the control of the controller 102 to clean different cleaning surfaces. The cleaning surface is usually the ground, that is, the plane on which the cleaning robot moves, and can also be an object placed on the ground.
[0060] Since the distance between the cleaning surface and the cleaning robot is not fixed, when the cleaning surface is a floor, there may be areas with large fluctuations in the cleaning surface, such as steps. At this time, if the cleaning robot fails to make a cliff determination, it may fall from a height, causing damage to the cleaning robot and being unable to continue working. Therefore, the cleaning robot is equipped with sensors to continuously detect the cleaning surface and continuously make cliff determinations. When a cliff is found on the cleaning surface, which has a dramatic change in height, the cleaning robot can take a detour to avoid the cliff and continue working, while protecting the operating safety of the cleaning robot itself.
[0061] like Figure 1As shown, the distance sensor 104 of the cleaning robot detects in the direction close to the cleaning surface, and is used to collect the distance between the side of the cleaning robot close to the cleaning surface and the cleaning surface, and the height detection data can be obtained based on the distance. Since the height detection data collected by the distance sensor 104 is easily affected by the color change of the cleaning surface, resulting in errors in the data, the cleaning robot is also provided with a color sensor 106, and the color sensor 106 can also detect the cleaning surface and collect the color data of the cleaning surface. The controller 102 is connected to the distance sensor 104 and the color sensor 106, and can implement the cleaning robot cliff determination method recorded in each embodiment of the present application based on the height detection data and the color data.
[0062] In an exemplary embodiment, Figure 2 As shown, a method for determining cliffs of a cleaning robot is provided, and the method is applied to Figure 1 The controller 102 in the example is used for explanation, and the steps include the following steps 202 to 206.
[0063] Step 202, obtaining height detection data of the cleaning robot.
[0064] The height detection data is the distance between the side of the cleaning robot close to the cleaning surface and the cleaning surface. Figure 1 As shown, it can be detected by the distance sensor, and the cleaning robot can drive the robot body through the controller to move in the specified direction of travel, so that the cleaning robot can clean different cleaning surfaces. The cleaning surface is usually the ground, that is, the plane on which the cleaning robot moves, and can also be an object placed on the ground.
[0065] Specifically, the controller is arranged in the cleaning robot and connected to the distance sensor. The distance sensor collects the height detection data of the cleaning robot, and the controller obtains the height detection data from the distance sensor. The distance sensor can be a cliff sensor or an infrared sensor, which can emit specific light to the cleaning surface and analyze the returned light to determine the distance between the cleaning surface and the side of the cleaning robot close to the cleaning surface.
[0066] Furthermore, the height detection data may include basic data of the distance sensor and distance detection data, wherein the basic data of the distance sensor is a fixed value, which represents the normal operation of the distance sensor. The basic data of the distance sensor can be used as part of the height detection data to participate in the cliff determination of the cleaning robot, and can also be used as a standard for the controller to determine the working state of the distance sensor. When there is basic data of the distance sensor with a corresponding value, the controller determines that the distance sensor is operating normally. The distance detection data is a value determined by the distance between the side of the cleaning robot close to the cleaning surface and the cleaning surface, and changes as the distance between the two changes.
[0067] However, since the distance detection data is obtained by the distance sensor through detection of the clean surface, when the height remains unchanged, the distance detection data will also change when the color of the clean surface is different, resulting in errors in the height detection data obtained by the distance sensor. For example, when the distance sensor is an infrared sensor, the reflectivity of infrared light will also change when it is reflected on media of different colors, resulting in different intensities of the returned light received, and different height detection data actually obtained. Therefore, a color sensor is also provided in this embodiment to adjust the error of the distance sensor.
[0068] Step 204 , obtaining color data of the cleaning surface, and determining a color compensation value based on the color data.
[0069] The color data is obtained by the color sensor in the cleaning robot detecting the cleaning surface, and can reflect the color depth of the cleaning surface. For example, the color sensor can detect the gray value of the cleaning surface and obtain the corresponding color data according to the corresponding gray value.
[0070] The controller is connected to the color sensor and can obtain the color data of the cleaning surface collected by the color sensor. At the same time, the controller can also process the color data and obtain different color compensation values according to different color data.
[0071] Furthermore, the color data includes color sensor basic data and grayscale data, wherein the color sensor basic data is a fixed value, which represents the normal operation of the color sensor. The color sensor basic data can be used as part of the color data to participate in the cliff determination of the cleaning robot, and can also be used as a controller to determine the working state of the color sensor. When there is a color sensor basic data with a corresponding value, the controller determines that the color sensor is operating normally. Grayscale data is a value determined according to the color of the cleaning surface, and changes with the change of the color of the cleaning surface.
[0072] When the controller determines the color compensation value based on the color data, it may not process the color sensor basic data, but process the grayscale data based on the received color sensor basic data, and adjust the color compensation value according to the grayscale data. Optionally, the color compensation value includes a color basic value and a color change value, and the color basic value may be the color sensor basic data, or the color sensor basic data after numerical conversion or corresponding replacement. The color change value is a value obtained by the controller after corresponding processing according to the grayscale data, and has a one-to-one correspondence with different grayscale data.
[0073] Step 206 , performing cliff determination on the cleaning robot according to the height detection data, the color compensation value and the preset height threshold.
[0074] The controller stores a preset height threshold, and the size of the preset height threshold can be determined according to actual needs, such as the height difference that the cleaning robot can receive, which is determined by the design requirements, model, structure and material of the cleaning robot. This is not limited in this application. After obtaining the height detection data and the color compensation value, the controller can use the color compensation value to eliminate the error in the height detection data caused by the color of the cleaning surface, and compare it with the preset height threshold after eliminating the error. The result obtained by comparing with the preset height threshold is used to make a cliff judgment on the cleaning robot.
[0075] The above-mentioned method for determining a cliff of a cleaning robot includes obtaining height detection data of the cleaning robot, obtaining color data of the cleaning surface, and determining a color compensation value based on the color data, and performing cliff determination on the cleaning robot according to the height detection data, the color compensation value, and a preset height threshold. The height detection data is the distance between the side of the cleaning robot close to the cleaning surface and the cleaning surface. By obtaining the color data of the cleaning surface of the cleaning robot and obtaining the color compensation value to compensate for the error of the height detection data, the influence of the color of the cleaning surface can be reduced when performing cliff determination, thereby improving the accuracy of cliff determination.
[0076] The cliff determination of the cleaning robot can also be achieved in other ways after step 204. In one case, step 204 also includes steps 208 and 210.
[0077] Step 208, adjusting the working state of the distance sensor according to the color compensation value to obtain compensated height detection data.
[0078] Specifically, unlike step 206 in which the height detection data and the color compensation value are directly processed, in step 208, the color compensation value is used as the basis for adjusting the distance sensor, and the controller can adjust the working state of the distance sensor according to the color compensation value. Optionally, after obtaining the color data in step 204, the controller can also directly adjust the working state of the distance sensor according to the color data.
[0079] Optionally, the controller has a different way of adjusting the working state of the distance sensor. When the distance sensor is an infrared sensor, the controller can adjust the control signal (PWM signal, etc.) of the infrared sensor's light emission lamp to adjust the intensity of the emitted light. The controller can also adjust the infrared sensor's receiving light intensity threshold.
[0080] By adjusting the working state of the distance sensor, the height detection data obtained by subsequent detection by the distance sensor is changed, and compensated height detection data is obtained.
[0081] Step 210 , performing cliff determination on the cleaning robot according to the compensated height detection data and a preset height threshold.
[0082] The controller stores a preset height threshold, and the size of the preset height threshold can be determined according to actual needs, such as the height difference that the cleaning robot can receive, which is determined by the design requirements, model, structure and material of the cleaning robot. This is not limited in this application. After obtaining the compensated height detection data, the controller compares the compensated height detection data with the preset height threshold to obtain a cliff determination result. Since the compensated height detection data has eliminated the original error, the cliff determination result obtained by this comparison can have a higher accuracy.
[0083] In this embodiment, the working state of the distance sensor is adjusted according to the color compensation value to obtain compensated height detection data, and the cleaning robot is judged to be on a cliff according to the compensated height detection data and the preset height threshold. The color sensor is used to feedback and adjust the working state of the distance sensor to ensure the accuracy of the compensated height detection data obtained by the distance sensor, thereby ensuring the accuracy of the cleaning robot's cliff judgment.
[0084] There is no unique way to determine the cliff of the cleaning robot based on the height detection data, the color compensation value and the preset height threshold. The height detection data and the color compensation value can be compared with the preset height threshold after different data operations are performed, or the cliff determination can be performed after comparing them with the preset height threshold. Figure 3 As shown, step 206 includes steps 302 to 304. Among them:
[0085] Step 302, adding the height detection data and the color compensation value to obtain the measured data value.
[0086] Specifically, since there is an error in the height detection data due to the color of the cleaning surface, and the color compensation value is obtained according to the color of the cleaning surface, the height detection data can be subjected to four arithmetic operations with the color compensation value to eliminate the error caused by the color of the cleaning surface.
[0087] Alternatively, the height detection data and the color compensation value may be added to obtain the measured data value. In this case, the error in the height detection data and the color change value obtained according to the color of the clean surface in the color compensation value are opposite to each other. At this time, the error can be eliminated by directly adding the height detection data and the color compensation value to obtain the measured data value. In another case, the height detection data and the color compensation value may be subtracted to obtain the measured data value. At this time, the error in the height detection data and the color change value obtained according to the color of the clean surface in the color compensation value are the same value, and the error can be eliminated by subtracting each other.
[0088] Step 304, comparing the measured data value with the preset height threshold, and making a cliff determination for the cleaning robot.
[0089] After obtaining the measured data value, the controller compares the measured data value with the preset height threshold, and the comparison result is used as the cliff judgment result of the cleaning robot.
[0090] Correspondingly, when the height detection data is added to the color compensation value to obtain the measured data value, the preset height threshold is set to the first preset value; when the height detection data is subtracted from the color compensation value to obtain the measured data value, the preset height threshold is set to the second preset value. When the other values are the same, the first preset value should be greater than the second preset value, and both the first preset value and the second preset value need to consider the size of the color base value of the color compensation value.
[0091] Different cliff determination results can be obtained according to different comparison results. For example, in an exemplary embodiment, Figure 4 As shown, step 304 includes step 402 and step 404 .
[0092] Step 402: If the measured data value is greater than the preset height threshold, it is determined that the cleaning surface of the cleaning robot is not a cliff.
[0093] The height detection data may include the distance sensor basic data and the distance detection data, and the color compensation value includes the color basic value and the color change value, wherein the error in the distance detection data is compensated by the color change value, and the measured data value obtained by adding the two is mainly determined by the distance detection value. Among them, the larger the distance detection value, the smaller the distance between the side of the cleaning robot close to the cleaning surface and the cleaning surface. Then, if the measured data value is greater than the preset height threshold, that is, the distance detection value is a larger value, the distance between the side of the cleaning robot close to the cleaning surface and the cleaning surface is smaller. Therefore, the controller can determine that the cleaning surface of the cleaning robot is not a cliff. At this time, the cleaning robot can continue to operate on the cleaning surface and will not be damaged due to changes in the height of the cleaning surface.
[0094] Step 404: If the measured data value is less than or equal to the preset height threshold, it is determined that the cleaning surface of the cleaning robot is a cliff.
[0095] If the measured data value is less than or equal to the preset height threshold, that is, the distance detection value is a small value, according to the representation meaning of the distance detection value, it can be obtained that the distance between the side of the cleaning robot close to the cleaning surface and the cleaning surface is large and exceeds the preset acceptable distance height. Therefore, the controller can determine that the cleaning surface of the cleaning robot is a cliff. At this time, the cleaning robot cannot continue to operate on the cleaning surface and will be damaged due to the height change of the cleaning surface.
[0096] In this embodiment, the measured data value is obtained according to the height detection data and the color compensation value, and whether the cleaning surface of the cleaning robot is a cliff is determined according to the size relationship between the measured data value and the preset height threshold, thereby completing the cliff determination of the cleaning robot. By eliminating the error caused by the color of the cleaning surface before making the cliff determination, the accuracy of the cliff determination can be improved, and the operation safety of the cleaning robot can be guaranteed.
[0097] In an exemplary embodiment, Figure 5 As shown, the step 204 of determining the color compensation value based on the color data includes step 502: determining the color compensation value according to the color data and the historical color compensation value.
[0098] Among them, the historical color compensation value is obtained based on the historical height detection data and the historical color data. The historical height detection data is a collection of multiple height detection data, which can be the height detection data previously collected by the distance sensor of the cleaning robot, or the height detection data previously collected by other cleaning robots of the same model, or the height detection data obtained by fitting big data on the cloud. The controller can obtain the historical height detection data by networking, interacting with the cloud, interacting with other cleaning robots, and manual input. Similarly, the historical color data is a collection of multiple color data, which can be the color data previously collected by the color sensor of the cleaning robot, or the color data previously collected by other cleaning robots of the same model, or the color data obtained by fitting big data on the cloud. The controller can obtain the historical color data by networking, interacting with the cloud, interacting with other cleaning robots, and manual input.
[0099] Specifically, the historical color compensation value is obtained by comprehensive analysis of the historical height detection data and the historical color data. First, different historical height detection data and their corresponding historical color data are grouped. Each group may include historical height detection data at a specified height and historical color data with different cleaning surface colors, or historical color data with a specified cleaning surface color and historical height data at different heights. By analyzing the data in different groups, the degree of influence of the color of the cleaning surface on the historical height detection data and the historical color data is determined, and the historical color compensation value that needs to be converted to obtain different historical color data is determined according to different degrees of influence.
[0100] The controller calculates a plurality of historical color compensation values corresponding to different cleaning surface colors. The calculation process of the historical color compensation values can be performed in the controller, on other terminals, or on a cloud server. Correspondingly, the historical color compensation values can also be stored in the controller, or in other terminals connected to the controller, or in a cloud server. When the historical color compensation values are not stored in the controller, when the historical color compensation values are needed, the controller can call the historical color compensation values by establishing communication with the terminal or cloud where the historical color compensation values are stored.
[0101] After obtaining the historical color compensation value and acquiring the color data of the cleaning surface, the controller matches the corresponding historical color compensation value from multiple historical color compensation values according to the color data, and uses the successfully matched historical color compensation value as the current color compensation value.
[0102] In this embodiment, the color compensation value for this time is determined by the historical color compensation value obtained through historical experience such as historical height detection data and historical color data, thereby ensuring the accuracy of the correspondence between the color data and the color compensation value, being able to better compensate for the error in the height detection data, and improving the accuracy of cliff judgment.
[0103] After completing the cliff determination of the cleaning robot, if it is determined that the cleaning surface of the cleaning robot is a cliff, the controller can control the cleaning robot to stop running to prevent the cleaning robot from falling. Optionally, the controller can also perform corresponding control on the cleaning robot to bypass the area determined to be a cliff and maintain the cleaning work of the cleaning robot. In an exemplary embodiment, Figure 6 As shown, after step 206, step 602 is also included: if it is determined that the cleaning surface of the cleaning robot is a cliff, the moving direction of the cleaning robot is controlled to change.
[0104] The robot body of the cleaning robot includes a driving mechanism and a cleaning mechanism. The driving mechanism includes a walking driving assembly and a reversing mechanism. When the cleaning robot moves straight, the rollers of the walking driving assembly roll, driving the cleaning robot to move forward in the rolling direction. The traveling direction at this time is marked as "forward"; when the cleaning robot needs to turn, the reversing mechanism controls the turning of the rollers of the walking driving assembly. At this time, the rollers roll, driving the cleaning robot to move forward in the turning direction. When the rollers turn to the left, the traveling direction is controlled to be "left", and when the rollers turn to the right, the traveling direction is controlled to be "right".
[0105] Specifically, when the cleaning surface of the cleaning robot is determined to be a cliff, the controller can control the cleaning robot to change its travel direction. Optionally, in one embodiment, step 602 includes step 702: controlling the travel mechanism of the cleaning robot to turn. The travel mechanism refers to a mechanism that controls the movement of the cleaning robot, which has the same meaning as the driving mechanism above. If the controller controls the original travel direction of the cleaning robot to move forward, the turn here can be to switch the forward movement of the cleaning robot to move left or right.
[0106] Optionally, in one embodiment, step 802 may be included before step 702: controlling the traveling mechanism of the cleaning robot to run in the reverse direction for a preset avoidance time.
[0107] The rollers of the traveling mechanism of the cleaning robot can also roll backwards, which is equivalent to the traveling direction of the cleaning robot being opposite to the forward direction, that is, moving backwards. The preset avoidance time is set according to actual needs, for example, according to parameters such as the model of the cleaning robot, the rated speed, the roller size, and the set safety range.
[0108] Before controlling the traveling mechanism of the cleaning robot to turn, the controller may also control the traveling mechanism of the cleaning robot to run in the opposite direction, control the cleaning robot to retreat by running in the opposite direction, and run in the opposite direction for a preset avoidance time. Similarly, after the traveling mechanism runs in the opposite direction for a preset avoidance time, the traveling mechanism is controlled to turn, so that the cleaning robot is far enough away from the area determined to be a cliff to reduce the risk of falling.
[0109] Based on the same technical concept, the present application also provides a cleaning robot, such as Figure 7As shown, the cleaning robot includes a controller 102, a distance sensor 104, a color sensor 106 and a robot body 108. The controller 102, the distance sensor 104 and the color sensor 106 are all arranged on the robot body 108, and the controller 102 is connected to the distance sensor 104, the color sensor 106 and the robot body 108. Among them, the robot body 108 is used to complete the cleaning of the cleaning surface, and can drive the cleaning robot to move under the control of the controller 102 to clean different cleaning surfaces. The cleaning surface is usually the ground, that is, the plane on which the cleaning robot moves, and can also be an object placed on the ground.
[0110] The distance sensor 104 of the cleaning robot detects in the direction close to the cleaning surface, and is used to collect the distance between the side of the cleaning robot close to the cleaning surface and the cleaning surface, and the height detection data can be obtained based on the distance. Since the height detection data collected by the distance sensor 104 is easily affected by the color change of the cleaning surface, resulting in errors in the data, the cleaning robot is also provided with a color sensor 106, which can also detect the cleaning surface and collect the color data of the cleaning surface. The controller 102 is connected to the distance sensor 104 and the color sensor 106, and can implement the cleaning robot cliff determination method recorded in each embodiment of the present application based on the height detection data and the color data.
[0111] In one embodiment, the robot body 108 includes a shell, a driving mechanism and a cleaning mechanism, and the controller 102, the distance sensor 104, the color sensor 106, the driving mechanism and the cleaning mechanism are all arranged in the shell. The shell is used to protect each device and to support the fixation of each device. Optionally, the shell is in a flat cylindrical shape as a whole, and its bottom surface is provided with holes for the driving mechanism and the cleaning mechanism to complete the driving and cleaning, which match the size of the driving mechanism and the cleaning mechanism. The controller 102, the distance sensor 104 and the color sensor 106 are all arranged inside the shell. Optionally, the shell is provided with holes at the positions where the distance sensor 104 and the color sensor 106 are arranged, so that the distance sensor 104 and the color sensor 106 can detect the cleaning surface. Further, the top surface of the shell is also provided with a control panel and a display screen for interacting with the user, and the control panel and the display screen are connected to the controller 102, so that the user can control the working state of the cleaning robot. The distance sensor 104 and the color sensor 106 can be disposed on the bottom surface of the cylindrical housing, or on the side surface of the cylindrical housing, and disposed on one end of the side surface close to the cleaning surface, which is not limited in this embodiment. Figure 1 As shown, the distance sensor 104 and the color sensor 106 are disposed on the bottom surface of the housing.
[0112] The robot body 108 of the cleaning robot also includes a driving mechanism and a cleaning mechanism. The driving mechanism is used to drive the cleaning robot to move, and the cleaning mechanism is used to complete the cleaning work of the cleaning surface. Among them, the driving mechanism includes a walking driving component and a reversing mechanism. The walking driving component includes a plurality of rollers, and the reversing mechanism connects each roller and controls the rolling direction of the roller. As shown in 2, the number of rollers is three. When the cleaning robot goes straight, the roller of the walking driving component rolls, driving the cleaning robot to move forward in the rolling direction, and the traveling direction at this time is marked as "forward"; when the cleaning robot needs to turn, the reversing mechanism controls the roller of the walking driving component to turn, and the roller at this time rolls, driving the cleaning robot to move forward in the direction of turning. When the roller turns to the left, the traveling direction is controlled to be "left", and when the roller turns to the right, the traveling direction is controlled to be "right".
[0113] The distance sensor 104 and the color sensor 106 can be set near the outside of the shell, close to the outer edge of the cleaning robot, and the detection direction is directly below the setting position or diagonally in front of the cleaning robot. The cleaning surface can be detected in advance, giving the cleaning robot enough distance and time to avoid the cliff area.
[0114] In order to ensure the reliability of the data detected by the distance sensor 104 and the color sensor 106, in one embodiment, Figure 8 As shown, in the bottom view of the cleaning robot, the distance sensor 104 is set at a position matching the travel direction of the robot body 108, and the color sensor 106 is set in close contact with the distance sensor 104. Optionally, the color sensor 106 and the distance sensor 104 can be set in close contact with each other front to back or left to right. Figure 1 The color sensor 106 and the distance sensor 104 are arranged in a front-to-back manner. Figure 8 The color sensor 106 and the distance sensor 104 are arranged in a left-right fit. At the same time, by setting the detection directions of the distance sensor 104 and the color sensor 106 to the same direction, the cleaning surface of the same area can be detected, avoiding detection errors caused by excessive color changes of the cleaning surface.
[0115] In this embodiment, by fitting the distance sensor 104 and the color sensor 106 together and setting them at a position that matches the direction of travel of the robot body 108, it is possible to accurately detect the area to be entered and promptly determine whether it is a cliff area, thereby ensuring the safe operation of the cleaning robot.
[0116] In order to ensure the accuracy of height detection of the cleaning surface, in one embodiment, the number of distance sensors 104 is more than two. The distance sensor 104 can be arranged in close contact with the color sensor 106, for example, multiple distance sensors 104 are arranged in close contact with different positions around the color sensor 106, or arranged in the same position of the color sensor 106. The multiple distance sensors 104 respectively detect and obtain multiple height detection data, and the controller 102 can take the average or median of the multiple height detection data to further improve the accuracy of the height detection data.
[0117] The robot body 108 has a different direction of travel, such as "front", "left", "right" and "back", which means that the cliff area around the cleaning robot may affect the operation of the cleaning robot. In order to provide all-round protection for the operation safety of the cleaning robot and avoid approaching the cliff area, a distance sensor 104 can be provided in each direction of travel.
[0118] In one embodiment, each distance sensor 104 is respectively disposed at a position matching a different moving direction of the robot body 108 , and the distance between each distance sensor 104 and the center position of the robot body 108 is equal.
[0119] like Fig. 9 As shown, there are three distance sensors 104, which are respectively arranged at corresponding positions of the "front", "left" and "right" in the travel direction of the cleaning robot, and the distance between each distance sensor 104 and the center position of the robot body 108 is equal. The color sensor 106 is arranged in the "front" travel direction of the cleaning robot, and is arranged in close contact with the distance sensor 104 arranged in the "front".
[0120] The color sensor 106 is arranged in front of the roller, detecting forward and downward, having a wide lateral detection range, and detecting and obtaining color data. One of the distance sensors 104 is arranged in close contact with the color sensor 106, and the other two are arranged symmetrically at the bottom of the housing, with a detection range downward, and detecting and obtaining height detection data.
[0121] Furthermore, in one embodiment, each distance sensor 104 is disposed on a bottom surface of the robot body 108 close to a side surface of the robot, and the bottom surface of the robot body 108 is a side of the robot body 108 close to a cleaning surface.
[0122] In order to extend the cleaning robot's sensing lead time for the cliff area, the distance sensor 104 needs to be set as far as possible outside the robot body 108, that is, outside the shell. Therefore, the distance sensor 104 can be set at the junction of the bottom and side of the shell, and the detection direction is set to detect downward. By setting the distance sensor 104 at the outermost periphery of the cleaning robot, the cleaning surface can be detected as early as possible, leaving more processing time for the controller 102, and the cliff area can be avoided more timely.
[0123] Similarly, in order to ensure the accuracy of color detection of the cleaning surface, in one embodiment, the number of color sensors 106 is more than two. When there is only one distance sensor 104, the color sensor 106 can be attached to the distance sensor 104, for example, multiple color sensors 106 are attached to different positions around the distance sensor 104, or arranged in sequence at the same position of the distance sensor 104. When there are multiple distance sensors 104, the number of color sensors 106 can match the number of distance sensors 104, and they are attached to the distance sensors 104 respectively, that is, one distance sensor 104 is attached with one color sensor 106. Multiple color sensors 106 detect and obtain multiple color data respectively, and the controller 102 can take the average or median of the multiple color data to further improve the accuracy of the color data.
[0124] Based on the fact that the robot body 108 has multiple directions of travel, that is, the cliff area around the cleaning robot may affect the operation of the cleaning robot. In order to provide all-round protection for the operation safety of the cleaning robot and avoid approaching the cliff area, a color sensor 106 can be provided in each direction of travel.
[0125] In one embodiment, each color sensor 106 is respectively disposed at a position matching a different moving direction of the robot body 108 , and the distance between each color sensor 106 and the center position of the robot body 108 is equal.
[0126] Exemplarily, there are three color sensors 106, which are respectively arranged at the corresponding positions of the "front", "left" and "right" in the travel direction of the cleaning robot, and the distance between each color sensor 106 and the center position of the robot body 108 (or shell) is equal. Optionally, the distance sensor 104 can be only arranged in the "front" travel direction of the cleaning robot, and is arranged in close contact with the color sensor 106 arranged in the "front". There can also be three distance sensors 104, such as Fig. 9As shown, they are respectively arranged at the corresponding positions of the "front", "left" and "right" in the traveling direction of the cleaning robot, and are all arranged in close contact with the color sensor 106 arranged in the corresponding traveling direction.
[0127] In this embodiment, by setting up multiple color sensors 106 and multiple distance sensors 104 to detect the cleaning surface, the accuracy of height detection data and color data is further improved, and cliff areas can be discovered in time, ensuring the stable and safe operation of the cleaning robot.
[0128] Furthermore, in one embodiment, each color sensor 106 is disposed on the bottom surface of the robot body 108 close to the side surface of the robot body 108 , and the bottom surface of the robot body 108 is the side of the robot body 108 close to the cleaning surface.
[0129] In order to extend the sensing lead time of the cleaning robot to the cleaning surface, the color sensor 106 can be arranged as much as possible on the periphery of the robot body 108, that is, on the periphery of the shell. Therefore, the color sensor 106 can be arranged at the junction of the bottom surface and the side surface of the shell, and the detection direction is set to detect outward and downward.
[0130] Furthermore, in order to extend the cleaning robot's sensing lead time for the cliff area, the distance sensor 104 and the color sensor 106 are both arranged as much as possible on the periphery of the robot body 108. At this time, the adjacent distance sensors 104 and color sensors 106 are arranged in close proximity and are in close proximity to the side of the outer shell.
[0131] In this embodiment, by arranging the color sensor 106 at the outermost periphery of the cleaning robot, the color of the cleaning surface is detected as early as possible, leaving more processing time for the controller 102. At the same time, the color sensor 106 and the distance sensor 104 are arranged at the outermost periphery of the cleaning robot, so that the color and height of the cleaning surface can be detected as early as possible, and the cliff area can be avoided more timely, ensuring the safe operation of the cleaning robot.
[0132] In order to better understand the above scheme, combined with Figure 1 and Figure 7 The application scenario shown is explained in detail below in conjunction with a specific embodiment.
[0133] In one embodiment, the cleaning robot is a sweeping robot, including a controller 102, a distance sensor 104, a color sensor 106 and a robot body 108. The distance sensor 104 is a cliff sensor, such as an infrared sensor, and the color sensor 106 is an optical color sensor, such as an RGB camera. The robot body 108 includes a driving mechanism (traveling mechanism) and a cleaning mechanism, and the driving mechanism includes a walking driving component and a reversing mechanism.
[0134] The cliff sensor and optical color sensor are set near the outside of the traveling mechanism, close to the outer edge of the sweeping robot, and the detection direction is directly below the setting position or diagonally forward to the outside. The cliff of the cleaning surface can be judged in advance, giving the cleaning robot enough distance and time to avoid the cliff area.
[0135] When the cleaning robot moves straight, the rollers of the travel drive assembly roll, driving the cleaning robot forward in the rolling direction. The travel direction at this time is marked as "forward"; when the cleaning robot needs to turn, the reversing mechanism controls the rollers of the travel drive assembly to turn. At this time, the rollers roll, driving the cleaning robot forward in the turning direction. When the rollers turn to the left, the travel direction is controlled to be "left", and when the rollers turn to the right, the travel direction is controlled to be "right".
[0136] The height detection data obtained by the cliff sensor is marked as b. Among them, b includes the distance sensor basic data b1 and the distance detection data b2. Due to the different colors of the clean surface, the distance detection data b2 includes the detection error d and the height value e, that is, d+e=b2, b=b1+d+e, where b1 is a constant.
[0137] The color data obtained by the optical color sensor is marked as a. a includes the color sensor basic data a1 and the grayscale data a2. The controller processes the color data according to the historical color compensation value to obtain the color compensation value a'. The color compensation value a' includes the color basic value a1' and the color change value a2'. The color change value a2' is obtained according to the grayscale data a2 in the color data a and the historical color compensation value, and the color change value a2' is opposite to the detection error d. The color basic value a1' and the color sensor basic data a1 can be the same, that is, a'= a1'+ a2', and a2'=-d, a1'= a1, then a'= a1-d, where a1 is a constant.
[0138] The preset height threshold is marked as c, and the sum of b+a' is compared with c to make a cliff judgment. b+a'= b1+d+e+ a1-d=b1 +e+a1. Since b1 and a1 are fixed values, the size of this value is related to the height value e. The height value e decreases as the distance between the side of the sweeping robot close to the cleaning surface and the cleaning surface increases (for example, e can be a negative value of the time required for the distance sensor to receive the reflected light). When the sum of b+a' is greater than c, the cleaning surface is judged not to be a cliff. When the sum of b+a' is less than or equal to c, the cleaning surface is judged to be a cliff. Exemplarily, c represents the distance between the side of the sweeping robot close to the cleaning surface and the cleaning surface is 8 cm. If Figure 1 As shown, the detected e value is large, then the sum of b+a' is greater than c, and the clean surface is judged not to be a cliff; if Figure 7 As shown, the detected e value is small, and the sum of b+a' is less than c. At this time, it is judged that the cleaning surface is a cliff. When the cleaning surface is judged to be a cliff, the controller controls the sweeping robot to leave the cliff and avoid the cliff area.
[0139] In this embodiment, an optical color sensor and a cliff sensor are combined, the optical color sensor identifies the color depth of a cleaning surface and other media, and provides a compensation value based on the identified color depth. The cliff sensor detects the height from the ground in real time and outputs height detection data. The sum of the two is compared with a preset height threshold to determine whether it is a cliff. When it is determined to be a cliff, the direction of travel of the sweeping robot is controlled to avoid the preset position, thereby reducing the influence of the color depth of the cleaning surface on the work of the sweeping robot, more accurately determining whether there is a cliff, and ensuring the safe operation of the sweeping robot.
[0140] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0141] Based on the same inventive concept, the embodiment of the present application also provides a cleaning robot cliff determination device for implementing the cleaning robot cliff determination method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more cleaning robot cliff determination device embodiments provided below can refer to the limitations of the cleaning robot cliff determination method above, and will not be repeated here.
[0142] In an exemplary embodiment, Fig.10 As shown, a cleaning robot cliff determination device is provided, comprising: a distance sensing module 820, a color compensation module 840 and a cliff determination module 860, wherein:
[0143] The distance sensing module 820 is used to obtain the height detection data of the cleaning robot; the height detection data is the distance between the side of the cleaning robot close to the cleaning surface and the cleaning surface;
[0144] A color compensation module 840, for acquiring color data of the cleaning surface and determining a color compensation value based on the color data;
[0145] The cliff determination module 860 is used to perform cliff determination on the cleaning robot according to the height detection data, the color compensation value and the preset height threshold.
[0146] In one of the embodiments, the cliff determination module 860 is further used to add the height detection data and the color compensation value to obtain a measured data value, compare the measured data value with a preset height threshold, and perform cliff determination on the cleaning robot.
[0147] In one embodiment, the cliff determination module 860 is also used to determine that the cleaning surface of the cleaning robot is not a cliff if the measured data value is greater than a preset height threshold; if the measured data value is less than or equal to the preset height threshold, determine that the cleaning surface of the cleaning robot is a cliff.
[0148] In one of the embodiments, the color compensation module 840 is further configured to determine a color compensation value according to the color data and a historical color compensation value; the historical color compensation value is obtained based on the historical height detection data and the historical color data.
[0149] In one of the embodiments, the cliff determination device of the cleaning robot also includes an avoidance module, which is used to control the change of the moving direction of the cleaning robot if it is determined that the cleaning surface of the cleaning robot is a cliff after the cleaning robot is determined to be a cliff based on height detection data, color compensation value and preset height threshold.
[0150] In one of the embodiments, the avoidance module is also used to control the steering of the traveling mechanism of the cleaning robot.
[0151] In one of the embodiments, the avoidance module is also used to control the traveling mechanism of the cleaning robot to run in the opposite direction for a preset avoidance time.
[0152] Each module in the above-mentioned cleaning robot cliff determination device can be implemented in whole or in part by software, hardware, or a combination thereof. Each of the above-mentioned modules can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each of the above modules.
[0153] In an exemplary embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as shown in FIG. Fig.11 As shown. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. Among them, the processor, the memory and the input / output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a mobile cellular network, near field communication (Near Field Communication, NFC) or other technologies. When the computer program is executed by the processor, a method for determining a cliff of a cleaning robot is implemented. The display unit of the computer device is used to form a visually visible picture, which can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device shell, or an external keyboard, touchpad or mouse.
[0154] Those skilled in the art will understand that Fig.11 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0155] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:
[0156] Acquire height detection data of the cleaning robot; the height detection data is the distance between the side of the cleaning robot close to the cleaning surface and the cleaning surface;
[0157] Acquiring color data of the clean surface, and determining a color compensation value based on the color data;
[0158] The cleaning robot is subjected to cliff judgment based on the height detection data, color compensation value and preset height threshold.
[0159] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0160] The height detection data is added to the color compensation value to obtain the measured data value, and the measured data value is compared with the preset height threshold to make a cliff judgment on the cleaning robot.
[0161] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0162] If the measured data value is greater than the preset height threshold, it is determined that the cleaning surface of the cleaning robot is not a cliff; if the measured data value is less than or equal to the preset height threshold, it is determined that the cleaning surface of the cleaning robot is a cliff.
[0163] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0164] The color compensation value is determined according to the color data and the historical color compensation value; the historical color compensation value is obtained based on the historical height detection data and the historical color data.
[0165] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0166] If it is determined that the cleaning surface of the cleaning robot is a cliff, the moving direction of the cleaning robot is controlled to change.
[0167] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0168] Control the steering of the traveling mechanism of the cleaning robot.
[0169] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0170] Control the traveling mechanism of the cleaning robot to run in the opposite direction for a preset avoidance time.
[0171] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:
[0172] Acquire height detection data of the cleaning robot; the height detection data is the distance between the side of the cleaning robot close to the cleaning surface and the cleaning surface;
[0173] Acquiring color data of the clean surface, and determining a color compensation value based on the color data;
[0174] The cleaning robot is subjected to cliff judgment based on the height detection data, color compensation value and preset height threshold.
[0175] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0176] The height detection data is added to the color compensation value to obtain the measured data value, and the measured data value is compared with the preset height threshold to make a cliff judgment on the cleaning robot.
[0177] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0178] If the measured data value is greater than the preset height threshold, it is determined that the cleaning surface of the cleaning robot is not a cliff; if the measured data value is less than or equal to the preset height threshold, it is determined that the cleaning surface of the cleaning robot is a cliff.
[0179] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0180] The color compensation value is determined according to the color data and the historical color compensation value; the historical color compensation value is obtained based on the historical height detection data and the historical color data.
[0181] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0182] If it is determined that the cleaning surface of the cleaning robot is a cliff, the moving direction of the cleaning robot is controlled to change.
[0183] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0184] Control the steering of the traveling mechanism of the cleaning robot.
[0185] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0186] Control the traveling mechanism of the cleaning robot to run in the opposite direction for a preset avoidance time.
[0187] In one embodiment, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the following steps:
[0188] Acquire height detection data of the cleaning robot; the height detection data is the distance between the side of the cleaning robot close to the cleaning surface and the cleaning surface;
[0189] Acquiring color data of the clean surface, and determining a color compensation value based on the color data;
[0190] The cleaning robot is subjected to cliff judgment based on the height detection data, color compensation value and preset height threshold.
[0191] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0192] The height detection data is added to the color compensation value to obtain the measured data value, and the measured data value is compared with the preset height threshold to make a cliff judgment on the cleaning robot.
[0193] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0194] If the measured data value is greater than the preset height threshold, it is determined that the cleaning surface of the cleaning robot is not a cliff; if the measured data value is less than or equal to the preset height threshold, it is determined that the cleaning surface of the cleaning robot is a cliff.
[0195] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0196] The color compensation value is determined according to the color data and the historical color compensation value; the historical color compensation value is obtained based on the historical height detection data and the historical color data.
[0197] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0198] If it is determined that the cleaning surface of the cleaning robot is a cliff, the moving direction of the cleaning robot is controlled to change.
[0199] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0200] Control the steering of the traveling mechanism of the cleaning robot.
[0201] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0202] Control the traveling mechanism of the cleaning robot to run in the opposite direction for a preset avoidance time.
[0203] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.
[0204] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0205] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A method for determining cliffs of cleaning robots. It is characterized in that The method comprises: Acquire height detection data of the cleaning robot; the height detection data is the distance between the side of the cleaning robot close to the cleaning surface and the cleaning surface; Acquiring color data of the cleaning surface, and determining a color compensation value based on the color data; The cleaning robot is subjected to cliff determination according to the height detection data, the color compensation value and a preset height threshold.
2. The method according to claim 1, It is characterized in that The performing cliff determination on the cleaning robot according to the height detection data, the color compensation value and a preset height threshold comprises: Adding the height detection data to the color compensation value to obtain a measured data value; The measured data value is compared with a preset height threshold to perform cliff determination on the cleaning robot.
3. The method according to claim 2, It is characterized in that The step of comparing the measured data value with a preset height threshold and performing cliff determination on the cleaning robot includes: If the measured data value is greater than a preset height threshold, it is determined that the cleaning surface of the cleaning robot is not a cliff; If the measured data value is less than or equal to the preset height threshold, it is determined that the cleaning surface of the cleaning robot is a cliff.
4. The method according to claim 1, It is characterized in that The determining of the color compensation value based on the color data comprises: A color compensation value is determined according to the color data and a historical color compensation value; the historical color compensation value is obtained based on historical height detection data and historical color data.
5. The method according to any one of claims 1 to 4, It is characterized in that After performing cliff determination on the cleaning robot according to the height detection data, the color compensation value and the preset height threshold, the method further includes: If it is determined that the cleaning surface of the cleaning robot is a cliff, the moving direction of the cleaning robot is controlled to change.
6. The method according to claim 5, It is characterized in that The controlling the traveling direction of the cleaning robot to change comprises: Control the steering of the traveling mechanism of the cleaning robot.
7. The method according to claim 6, It is characterized in that Before controlling the traveling mechanism of the cleaning robot to turn, the method further includes: The traveling mechanism of the cleaning robot is controlled to run in the reverse direction for a preset avoidance time.
8. A cleaning robot cliff determination device, It is characterized in that The device comprises: A distance sensing module, used to obtain height detection data of the cleaning robot; the height detection data is the distance between the side of the cleaning robot close to the cleaning surface and the cleaning surface; A color compensation module, used to obtain color data of the cleaning surface and determine a color compensation value based on the color data; The cliff determination module is used to perform cliff determination on the cleaning robot according to the height detection data, the color compensation value and a preset height threshold.
9. A cleaning robot, It is characterized in that The cleaning robot includes a controller, a distance sensor, a color sensor and a robot body, wherein the controller, the distance sensor and the color sensor are all arranged on the robot body, and the controller connects the distance sensor, the color sensor and the robot body; the distance sensor is used to collect the distance between the side of the cleaning robot close to the cleaning surface and the cleaning surface, the color sensor is used to collect color data of the cleaning surface, and the controller is used to implement the cleaning robot cliff judgment method described in any one of claims 1-7.
10. A computer device comprising a memory and a processor, wherein the memory stores a computer program. It is characterized in that When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
11. A computer-readable storage medium having a computer program stored thereon, It is characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
12. A computer program product comprising a computer program, It is characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
