Method for robot to avoid carpet based on ultrasonic detection
Through ultrasonic detection and edge fitting line calculation, the cleaning robot can effectively avoid carpets, solving the problem of wet mop staining the carpet and low cleaning efficiency, achieving more efficient cleaning effects and path continuity.
Patent Information
- Application Number
- CN202411085092.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-08
- Publication Date
- 2024-11-26
- Estimated Expiration
- 2044-08-08
AI Technical Summary
Existing cleaning robots are difficult to effectively avoid carpets when dealing with floor environments with carpets, resulting in the risk of wet mop staining the carpet and low cleaning efficiency, and difficulty in maintaining the consistency of cleaning modes.
Using a robot based on ultrasonic detection method to avoid carpets, detect the carpet edges through ultrasonic sensors, calculate the edge fit line, determine the target backward distance and rotation angle, so that the robot exits the carpet without turning around, and adjusts the walking direction to match the carpet. The edges are parallel.
Improves the cleaning effect at the junction of carpet and hard floor, reduces the risk of wet mop staining carpets, and improves the cleaning efficiency and path continuity of cleaning robots in carpet areas.
Smart Images

Figure CN119014766A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of carpet recognition, and in particular to a method for a robot to avoid carpets based on ultrasonic detection. Background Art
[0002] The Chinese invention patent with patent application number CN202211238871.8 discloses an ultrasonic-based ground environment motion planning method. For a cleaning robot working in a ground environment with carpet, the cleaning robot divides the hard floor area into multiple carpet partitions after traversing an entire hard floor area or walking along the boundary line of the carpet. It will decide whether to traverse the carpet partition based on the ratio of the area of the carpet partition to the area of the hard floor area. After the cleaning robot completes the traversal of the carpet partition for a predetermined time, it repositions itself back to the current position of the cleaning robot by extracting the edge position information, and then withdraws the carpet. When the cleaning robot returns to the hard floor area from the repositioned current position, it does not correct itself back to the cleaning trajectory parallel to the edge of the carpet, and cannot maintain the robot's established cleaning mode in the hard floor area.
[0003] In addition, since the cleaning robot disclosed in the Chinese invention patent with patent application number CN202211238871.8 decides to traverse the carpet partition by calculating the area of the area, it needs to calculate the cleaning time when walking in the carpet partition to be cleaned and can exit the carpet only after completing the traversal for a predetermined time (such as the standard cleaning time). However, the cleaning robot equipped with a wet mop needs to speed up the exit to the edge of the carpet area for cleaning. The cleaning robot equipped with a wet mop cannot bear the risk of the carpet being soiled by the wet mop due to its continuous walking in the carpet partition for a predetermined time. Summary of the invention
[0004] This application discloses a method for a robot to avoid carpet based on ultrasonic detection, and proposes the following technical solutions: A method for robot avoiding carpet based on ultrasonic detection, the method is applied to a robot equipped with an ultrasonic sensor, the method comprising: step 1, when the robot detects a carpet through an ultrasonic sensor trigger, the current trigger position is obtained; then step 2 is executed; step 2, an edge fitting line is calculated using the current trigger position and the historical trigger position to determine the position of the edge of the carpet currently crossed by the robot and the direction of the carpet edge; then step 3 is executed; step 3, a target retreat distance is calculated based on the edge fitting line, the current walking direction of the robot, a preset safety distance and the body radius of the robot, so that the robot walks the target retreat distance in the opposite direction of the current walking direction without turning around, and then exits the carpet to a preset avoidance position; and a target rotation angle is calculated based on the current walking direction of the robot and the edge fitting line, so that the robot adjusts the current walking direction to be parallel to the direction of the carpet edge by rotating the target rotation angle.
[0005] In summary, the method for robot avoiding carpet based on ultrasonic detection provided in the present application can be applied to the robot after it goes on the carpet. The current trigger position is obtained by triggering the carpet detection, and the edge fitting line is calculated using the current trigger position and the historical trigger position. Based on this, the placement position and trend of the carpet are inferred, and then the target retreat distance and target rotation angle are calculated based on the edge fitting line, the current walking direction of the robot, the preset safety distance and the body radius of the robot, respectively, to facilitate the robot to move from the inside of the carpet to the outside of the carpet edge and plan subsequent motion trajectories outside the carpet edge, so as to maintain the robot's established cleaning mode in the hard floor area.
[0006] When the robot is applied to a cleaning robot equipped with a wet mop, the robot's posture parameters for completely withdrawing from the carpet are obtained by executing the aforementioned steps 1 to 3, including the target retreat distance and the target rotation angle, so that the robot walks the target retreat distance in the opposite direction of the current walking direction without turning around, and then withdraws from the carpet to the preset avoidance position. Then, at the preset avoidance position, the robot adjusts the walking direction to be parallel to the edge of the carpet by rotating the target rotation angle, and then walks in a direction parallel to the edge of the carpet to correct the cleaning track to be parallel to the edge of the carpet. This can not only improve the cleaning effect at the junction of the carpet and other ground media, but also reduce the risk of the wet mop soiling the carpet, and also reduce the problem of low coverage efficiency of the cleaning robot repeatedly going up and down the carpet. BRIEF DESCRIPTION OF THE DRAWINGS
[0007] Figure 1 A schematic diagram of the position layout of ultrasonic sensors in the chassis of a robot provided in one embodiment of the present application.
[0008] Figure 2A schematic diagram of an application scenario in which a robot enters a carpet from different directions according to an embodiment of the present application.
[0009] Figure 3 A schematic diagram of the coordinate relationship between an ultrasonic sensor and the body center of a robot provided in one embodiment of the present application.
[0010] Figure 4 A schematic diagram of a robot provided in an embodiment of the present application triggering detection and fitting an edge fitting line on a carpet twice in succession.
[0011] Figure 5 A schematic diagram of the positional relationship between a robot and an edge fitting line provided in one embodiment of the present application.
[0012] Figure 6 A planar geometric diagram of a robot planning its direction and distance of exiting a carpet according to an embodiment of the present application.
[0013] Figure 7 A schematic diagram showing that the walking direction of the robot at a turn of a bow-shaped motion is parallel to the edge of a carpet provided in an embodiment of the present application.
[0014] Figure 8 A schematic diagram of a robot provided for one embodiment of the present application, showing the robot exiting a carpet and rotating back into the carpet during cleaning along the edge of the carpet.
[0015] Fig. 9 A schematic flow chart of a method for a robot to avoid carpet based on ultrasonic detection provided in one embodiment of the present application. DETAILED DESCRIPTION
[0016] The technical solutions in the embodiments of the present application will be described in detail below in conjunction with the drawings in the embodiments of the present invention. In the absence of conflict, the following embodiments and the features in the embodiments can be combined with each other. In the present application, it is necessary to understand that the terms "center", "middle position", "central axis", "up", "down", "left", "right", "vertical", "horizontal", "inside", "outside" and the like, the orientation or positional relationship indicated by them is based on the orientation or positional relationship shown in the drawings, and is only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation or be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation of the present invention. If the terms "first", "second", "third" and the like appear in the embodiments, it is to facilitate the distinction of related features, and cannot be understood as indicating or implying the relative importance, order or number of technical features.
[0017] The carpet described in this application is a broad concept, which can be understood as a floor material different from hard materials such as wooden floors and tiles. The walking of the cleaning robot on the carpet may cause the output power of the roller brush motor or the drive wheel motor to change, or the floor material is not suitable for the cleaning robot to clean in the mopping mode; specifically, the carpet can be: a short-haired carpet, a long-haired carpet, a plush mat, etc. The cleaning robot can be a robot with a cleaning mechanism and a mopping mechanism installed on the chassis. The robot involved in this application can use one of the cleaning mechanism or the mopping mechanism or both to contact the cleaning surface during the cleaning process to clean the cleaning surface. The mopping mechanism is generally used to clean hard floors such as floors and tiles. The water sprayed by the mopping mechanism during the cleaning process or the water accumulated by the mopping mechanism itself may wet or damage the carpet. Due to the difference between the hard floor and the carpet, even the cleaning mechanism may damage the carpet or cause damage to the cleaning robot when the same cleaning strategy is adopted.
[0018] Therefore, when the cleaning robot is cleaning in an indoor home environment, it travels back and forth between carpets and hard floors, two areas of different hard and soft ground media. Therefore, the cleaning robot needs to avoid carpets during autonomous planning of mopping. If the cleaning robot does not avoid carpets, the risk of the wet mop soiling the carpet increases, and the continuity of the cleaning path and cleaning efficiency are also affected.
[0019] One of the sensors that can stably identify carpets and has a high degree of industrialization is the ultrasonic sensor. Generally, the number of sensors installed on the chassis of cleaning robots is limited, the detection range will be limited, and there will be blind spot defects. In the subsequent planning of cleaning, the blind area will be bypassed, so the cleaning robot is prone to miss sweeping on hard floors. When used in carpet avoidance scenarios, the cleaning robot will miss sweeping the area around the carpet; if too many attempts are made to clean the carpet, the wet mop will dirty the carpet. Specifically, the cleaning robot's body enters the carpet at different distances. In order to avoid the carpet, the cleaning robot will retreat at different distances; if the cleaning robot's retreat distance becomes shorter, the cleaning robot cannot completely exit the carpet, and the subsequent cleaning action may have the risk of the wet mop dirtying the carpet; if the cleaning robot retreats too long, there will be a risk of missing sweeps in subsequent cleaning.
[0020] The present application discloses a method for a robot to avoid carpet based on ultrasonic detection, and the method is applied to a robot equipped with an ultrasonic sensor. The ultrasonic sensor is installed on the left and / or right side of the universal wheel, as shown schematically. Figure 1 As shown, in the schematic diagram of the position layout of the robot's chassis, the ultrasonic sensor is installed on the right side of the universal wheel, the universal wheel is installed on the longitudinal axis of the robot's body, the current walking direction shown in the figure is parallel to the longitudinal axis of the body, and the current walking direction points to the front side of the robot's body.
[0021] In some embodiments, the ultrasonic sensor can continuously collect ultrasonic data of the detection plane area at intervals of 6 ms, and the robot can convert the regional position coordinate information detected by the ultrasonic sensor into the global map. The detection plane area generated by the ultrasonic sensor is formed by the ultrasonic transmission angle and the maximum detection distance constraint, preferably forming a conical area range, wherein the measurement signal returned by the ultrasonic reflection signal carries the ultrasonic data, and the intensity of the measurement signal returned by the ultrasonic reflection signal includes the ultrasonic signal intensity of the obstacle surface closest to the ultrasonic sensor and the surface of the walking plane in the conical area, which is generally expressed by the level size, and the surface medium type can be distinguished according to the intensity of the ultrasonic signal.
[0022] Since the surface of the carpet and the hard surface of the floor (wooden floor or tile) reflect the sensor signal differently, the carpet can be identified based on the ultrasonic data received by the ultrasonic sensor. In an exemplary embodiment, when the robot cleans the cleaning area along the cleaning path, the ultrasonic sensor transmits an ultrasonic signal to the ground and receives the signal reflected from the ground to identify the carpet. When the robot travels from the hard ground to the carpet, the reflected ultrasonic signal emission changes, based on which it can be determined that the carpet is identified. If the left and right driving wheels of the robot are on the hard ground and only the universal wheel climbs onto the carpet, the ultrasonic sensor can detect the carpet. At this time, the robot's grip is still there and no slipping has occurred.
[0023] It should be noted that a global map will be constructed during the robot's walking process. The global map is the first time the robot is used. It uses its own various sensors (such as accelerometers, gyroscopes, ultrasonic rangefinders, cameras, single-line lidars, etc.) to search the walking environment area of each room, sense the position, shape and size of each room, as well as the position, shape and size of detected obstacles, and calculates the posture information based on the integration of relevant ranging information to draw a global map containing environmental information.
[0024] The method for avoiding carpets by robots based on ultrasonic detection disclosed in this application involves the following steps: Fig. 9 As shown, including: Step 1: When the robot detects the carpet through the ultrasonic sensor, the current trigger position is obtained; then step 2 is executed. The trigger detection of step 1 is implemented when the robot crosses the edge of the carpet and then walks inside the carpet and filters the ultrasonic data reflected by the ground received in real time. If the carpet is detected by the trigger, the position of the ultrasonic sensor on the ground is set as the current trigger position, which can also be understood as marking the installation position of the ultrasonic sensor (relative to the center of the body) as the current trigger position; it is worth noting that step 1 detects the carpet through triggering, not based on the real-time ultrasonic data reflected by the ground received, but through filtering and matching comparison after a period of detection cycle.
[0025] The robot will identify the edge of the carpet when entering and exiting the carpet; specifically, it will distinguish whether the robot is currently stepping into the edge of the carpet or whether the distance between the installation position of the ultrasonic sensor and the edge of the stepped carpet is greater than a preset distance threshold based on the ultrasonic data reflected by the ground received in real time. When the distance between the installation position of the ultrasonic sensor and the edge of the stepped carpet is greater than the preset distance threshold, the carpet is detected; or it will distinguish whether the robot is currently stepping out of the edge of the carpet or whether the distance between the installation position of the ultrasonic sensor and the edge of the stepped carpet is greater than the preset distance threshold based on the ultrasonic data reflected by the ground received in real time. When the distance between the installation position of the ultrasonic sensor and the edge of the stepped carpet is greater than the preset distance threshold, the hard floor detection is reset.
[0026] When the robot enters the carpet and triggers the detection of the carpet, it is considered to trigger the ultrasonic detection. Then the coordinates of the current installation position of the ultrasonic sensor are recorded as the coordinates of the current trigger position and marked on the map. Schematically, Figure 3 As shown, the robot will establish a map coordinate system during its walking process. The center of the robot is the origin of the coordinate system. The current walking direction of the robot (the direction of the longitudinal axis of the body) is the Y axis, and the coordinate axis perpendicular to the Y axis is the X axis. The robot knows the position of the center of the body in real time and reflects it in the map. According to the preset relative position relationship, the installation position of the ultrasonic sensor can be calculated, so as to obtain the coordinates of the current trigger position in the map to update the carpet information marked on the map. The robot did not trigger the carpet detection and walked in the direction of exiting the carpet until the robot reset and detected the hard ground, which can be understood as the ultrasonic detection reset. The robot / ultrasonic sensor has completely exited the carpet.
[0027] Step 2, using the current trigger position and the historical trigger position to calculate the edge fitting line to determine the position of the edge of the carpet currently crossed by the robot and the direction of the carpet edge; then execute step 3; wherein the historical trigger position can be updated by the current trigger position; Step 2 is to calculate the edge fitting line based on the robot crossing the edge of the carpet from the hard ground. A straight line equation can be directly constructed using a current trigger position and a historical trigger position to represent the edge fitting line, or at least one current trigger position and at least one historical trigger position can be used to perform straight line fitting processing to obtain the edge fitting line. The edge fitting line can be used to simulate the edge of the carpet currently crossed by the robot, and the position of the edge of the carpet currently crossed by the robot is calculated based on the distance the robot walks in the carpet after crossing the edge of the carpet. At the same time, the direction of the corresponding carpet edge is determined based on the direction of the historical trigger position pointing to the current trigger position, and the carpet edge direction is set to adapt to the walking direction of the robot. In this way, the placement trend and coverage boundary of the carpet relative to the robot are determined, so that the robot can correct the motion trajectory parallel to the edge of the carpet when exiting the carpet no matter from which angle it enters the carpet.
[0028] In step 2, each time an edge fitting line is calculated, the robot has stepped into a carpet edge and is at a certain distance from the carpet edge. In some embodiments, the robot can distinguish between carpet and other ground detection results when walking the certain distance. Other ground detection results can be areas that the robot has covered. Other ground detection results include carpet candidate results or hard ground candidate results. Taking into account the detection error, the carpet candidate result can be the internal position of the carpet or the edge position of the carpet. It is not determined that the carpet is actually detected until the carpet is triggered and detected. Otherwise, it is classified as a candidate result for carpet detection before reaching the current trigger position; the hard ground candidate result can also be the edge position of the hard ground or the internal position of the hard ground. It is not determined that the hard ground is actually detected until the hard ground is reset and detected. Otherwise, it is classified as a candidate result for hard ground detection before the robot completely enters the hard ground or the preset avoidance position. Equivalently, both triggering detection of carpet and resetting detection of hard floor can detect adjacent areas starting from the same carpet edge, and starting detection from carpet candidate results and hard floor candidate results (which can be understood as candidate results detected at the dividing line) respectively. The carpet edge can be regarded as the dividing line between the carpet and the hard floor. Triggering detection of carpet and resetting detection of hard floor can improve the recognition accuracy of carpet and hard floor respectively.
[0029] Step 3: Calculate the target retreat distance based on the edge fitting line, the current walking direction of the robot, the preset safety distance and the body radius of the robot, so that the robot walks the target retreat distance in the opposite direction of the current walking direction without turning around, and then exits the carpet to the preset avoidance position. That is, when the current walking direction is regarded as the forward direction, walking the target retreat distance in the opposite direction of the current walking direction is actually the robot retreating the target retreat distance to reach the preset avoidance position; combined with Figure 5 and Figure 6 It can be seen that according to the angle between the edge fitting line and the current walking direction of the robot, based on the triangular geometric relationship, the distance from the edge fitting line to the nearest carpet edge crossed by the robot along its current walking direction, the insurance distance and the body radius of the robot are converted into an equivalent distance value in the current walking direction, which is used as the avoidance distance configured by the robot based on the edge fitting line, so that the robot completely withdraws from the carpet to the hard ground starting from the edge fitting line. Since the edge fitting line is a straight line associated with the coordinates calculated from the current trigger position (determined by the installation position of the ultrasonic sensor), the distance that the robot walks from the edge fitting line must be converted from the current trigger position to the center of the body. Therefore, the target retreat distance required to be calculated in step 3 is regarded as the actual retreat distance of the center of the body.
[0030] In the indoor environment where the present application is located, no carpets are added or removed, and the location of the carpets is not moved.
[0031] On the basis that the avoidance distance and its equivalent distance in the current walking direction have been calculated, the ratio between the distance from the center of the body to the edge fitting line and the sine value of the angle between the edge fitting line and the current walking direction of the robot is calculated to obtain the body redundant distance; in the process of the robot's body center moving to drive the robot as a whole to exit the carpet, in order to allow the robot's body center to move over the avoidance distance so as to drive the ultrasonic sensor not to detect the carpet, the equivalent distance is controlled to subtract the body redundant distance to obtain the target retreat distance. After planning the target retreat distance in advance, the robot exits the carpet to the preset avoidance position by walking the target retreat distance in the opposite direction of the current walking direction.
[0032] Moreover, step 3 calculates the target rotation angle based on the current walking direction of the robot and the edge fitting line, and the angle formed by the current walking direction of the robot and the edge fitting line is equal to the target rotation angle, so that the robot adjusts the current walking direction to be parallel to the corresponding carpet edge by rotating the target rotation angle; if the robot exits the carpet to the preset avoidance position, the robot adjusts the walking direction to be parallel to the corresponding carpet edge at the preset avoidance position, and then the carpet edge strategy can be adopted to walk along the outer side of the carpet edge.
[0033] In summary, the method for robot avoiding carpet based on ultrasonic detection provided in the present application can be applied to the robot after it goes on the carpet. The current trigger position is obtained by triggering the carpet detection, and the edge fitting line is calculated using the current trigger position and the historical trigger position. Based on this, the placement position and trend of the carpet are inferred, and then the target retreat distance and target rotation angle are calculated based on the edge fitting line, the current walking direction of the robot, the preset safety distance and the body radius of the robot, respectively, to facilitate the robot to move from the inside of the carpet to the outside of the carpet edge and plan subsequent motion trajectories outside the carpet edge, so as to maintain the robot's established cleaning mode in the hard floor area.
[0034] When the robot is applied to a cleaning robot equipped with a wet mop, the robot's posture parameters for completely withdrawing from the carpet are obtained by executing the aforementioned steps 1 to 3, including the target retreat distance and the target rotation angle, so that the robot walks the target retreat distance in the opposite direction of the current walking direction without turning around, and then withdraws from the carpet to the preset avoidance position. Then, at the preset avoidance position, the robot adjusts the walking direction to be parallel to the edge of the carpet by rotating the target rotation angle, and then walks in a direction parallel to the edge of the carpet to correct the cleaning track to be parallel to the edge of the carpet. This can not only improve the cleaning effect at the junction of the carpet and other ground media, but also reduce the risk of the wet mop soiling the carpet, and also reduce the problem of low coverage efficiency of the cleaning robot repeatedly going up and down the carpet.
[0035] As an embodiment, when the robot detects a carpet candidate result during the process of executing the target work behavior, the robot executes steps 1 to 3 or executes step 3 to obtain the target retreat distance. Specifically, the robot obtains the target retreat distance once when executing steps 1 to 3 for the first time to control the robot to move to a preset avoidance position; when the robot walks along the same side edge of the carpet, in addition to the first execution of steps 1 to 3, the robot subsequently repeats step 3 multiple times to sequentially calculate and obtain multiple target retreat distances based on the same edge fitting line, so that the robot moves to each preset avoidance position in turn. In addition, whenever the robot walks along the same side edge of the carpet and walks to the other side edge of the same carpet or one side edge of another carpet, steps 1 to 3 are repeated to sequentially calculate and obtain the corresponding target retreat distances based on each edge fitting line, so that the robot moves to the corresponding preset avoidance positions at different carpet edges in turn.
[0036] After obtaining the corresponding target retreat distance, the robot walks the corresponding target retreat distance in the opposite direction of the current walking direction without turning around to the corresponding preset avoidance position. Figure 6It can be seen that the body center R can move in the opposite direction of the arrow corresponding to the current walking direction to the preset avoidance position H shown in the figure. It can be understood that the body center of the robot retreats from the carpet to the preset avoidance position H, driving the ultrasonic sensor to follow the body to move to the lower right to deviate from the current trigger position. The target retreat distance shown in the figure is represented by the length of the line segment RH, and the distance between the preset avoidance position shown in the figure and the edge fitting line shown in the figure is the avoidance distance.
[0037] After the robot's body center moves from the carpet to the preset avoidance position, the current walking direction is adjusted to be parallel to the edge fitting line by rotating the target rotation angle at the preset avoidance position, schematically making the robot's latest walking direction at the preset avoidance position parallel to the carpet edge direction, and then the robot continues to execute the target work behavior, so that the trajectory formed by the target work behavior extends along the carpet edge direction, that is, the trajectory direction of the target work behavior at the preset avoidance position becomes parallel to the edge fitting line, wherein the edge fitting line is regarded as being parallel to the carpet edge direction, and the trajectory direction of the target work behavior at the preset avoidance position is the carpet edge direction, schematically represented as Figure 6 In the right-to-left direction, if the robot's target working behavior is a right-to-left cleaning motion, the cleaning trajectory at the preset avoidance position extends from right to left according to the arrow direction of the edge fitting line, so as to complete the left cleaning of the carpet edge and its vicinity.
[0038] It should be noted that each time step 3 is executed, the target retreat distance and the target rotation angle are updated once, so that the preset avoidance position is updated once.
[0039] When the robot detects the carpet candidate, the robot enters the carpet and walks on the carpet in the current walking direction until the carpet is triggered. It can be understood that the robot detects the carpet candidate after crossing the boundary between the hard ground and the carpet; and before the robot detects the carpet candidate through the ultrasonic sensor, the robot performs the target work behavior.
[0040] The target work behavior includes but is not limited to walking along the same side edge of the carpet or different side edges of the same carpet or different side edges of different carpets to perform edge work, extending along the same side edge of the carpet or different side edges of the same carpet or different side edges of different carpets in a bow-shaped motion.
[0041] Taking into account the detection error, the carpet candidate result may be a carpet interior position or a carpet edge position, and the carpet is not determined to be truly detected until the carpet is detected by the trigger, otherwise it is classified as a carpet detection candidate result before reaching the current trigger position. Equivalently, when the carpet is detected by the trigger, the adjacent area can be detected from the same carpet edge, and the detection starts from the carpet candidate result (which can be understood as the candidate result detected at the dividing line), wherein the carpet edge can be regarded as the dividing line between the carpet and the hard floor, thereby improving the carpet recognition accuracy in the process of repeatedly entering and exiting the carpet and the hard floor through the target work behavior.
[0042] As an example, when the target work behavior is walking along the same side edge of the carpet, there are: Action 1: When the robot detects the carpet candidate, it stops executing the target work behavior and starts walking in a straight line. This means that the robot walks in a straight line when it detects the edge of the carpet. Figure 8 The rightmost robot walks along the vertical upward arrow, so that the robot steps from the hard ground to the carpet until the carpet is detected, and then the target retreat distance is obtained by executing step 3, and then the robot is controlled to walk to the preset avoidance position to completely exit the carpet, such as Figure 8 The rightmost robot walks along the vertical downward arrow, so that the robot's body is completely outside the carpet. Then the robot performs action 2.
[0043] Action 2: At the preset avoidance position, the target rotation angle is rotated to adjust the current walking direction to be parallel to the pre-calculated edge fitting line, that is, parallel to the edge fitting line calculated by the most recently executed step 2, so that the robot's walking direction starting from the preset avoidance position is parallel to the edge of the carpet; it should be noted that the same side edge of the carpet can be regarded as the edge fitting line obtained by the first execution of step 2 in the scenario where the robot crosses the same side edge of the carpet and enters the carpet, and is parallel to the same side edge of the carpet. Corresponding to Figure 8 The target rotation angle is the angle between the vertical arrow and the horizontal edge of the carpet, and the angle is equal to 90 degrees. After the robot is rotated 90 degrees, the direction in which the robot starts walking from the preset avoidance position is parallel to the horizontal arrow direction. Then the robot performs action three.
[0044] Action 3: The robot walks along the same side edge of the carpet for a preset distance along the edge according to the adjusted current walking direction, wherein the preset distance along the edge is greater than or equal to the body diameter of the robot. Then the robot performs action 4.
[0045] Action 4: Walk in a circular arc towards the same edge of the carpet, corresponding to Figure 8In the figure, the second robot on the left rotates to the upper left and enters the carpet; then it repeats action 1 to trigger the detection of the carpet. Figure 8 As shown in the position of the first robot on the left, the installation position of the ultrasonic sensor on the right side of the first robot on the left triggers and detects the carpet. The installation position of the ultrasonic sensor on the right side of the first robot on the left can be recorded as the current trigger position or the historical trigger position. Among them, the current walking direction of the first robot on the left is Figure 8 The first straight arrow on the left side points to the upper left. Then, while keeping the edge fitting line unchanged, perform step 3 to calculate the new target retreat distance and the new target rotation angle, so that the robot can walk the target retreat distance in the opposite direction of the current walking direction without turning around, and then exit the carpet to the preset avoidance position. The robot adjusts the current walking direction to be parallel to the same side edge of the carpet by rotating the target rotation angle.
[0046] Therefore, by executing actions one to four, the robot is controlled to perform cleaning movements along the edge of the carpet as it repeatedly enters and exits the carpet, and by introducing a target retreat distance and a preset avoidance position, the robot is prevented from going too deep into the carpet and causing damage to the carpet, which also facilitates maintaining the working efficiency of the robot's cleaning movements along the edge of the carpet.
[0047] On the basis of the above embodiment, after the robot walks along the same side edge of the same carpet, it walks in a circular arc to the other side edge of the same carpet (if the same carpet is a rectangular carpet, when the robot walks along the bottom edge of the carpet and walks to the left side of the carpet, the edge of the carpet detected by the robot changes by 90 degrees, and an error occurs when the previous current trigger position or historical trigger position is used) or the side edge of another carpet (there are multiple carpets in the environment, and other carpets are put on again). When the robot detects a carpet candidate result, since it has walked along the same side edge of the same carpet, the currently detected carpet candidate result is from the same carpet The robot enters the other side edge of the same carpet or the other side edge of another carpet, and determines that the robot has begun to cross the other side edge of the same carpet or the other side edge of another carpet and is detected by the ultrasonic sensor. At this time, the edge fitting line needs to be updated to represent the new carpet edge; then the robot performs straight-line walking, which is regarded as the first time the robot enters the edge of the current carpet until the carpet is triggered and detected, and then steps 1 to 3 are executed to maintain the robot to continue walking along the other side edge of the same carpet or the other side edge of another carpet by updating the edge fitting line, and when the robot enters the edge of the current carpet again, the historical data of the edge fitting line is directly used to maintain the edge-following behavior.
[0048] As an example, when the target working behavior is a bow-shaped motion extending along the same side edge of the carpet, there are: Whenever the robot triggers and detects the carpet, the robot is controlled to walk to the preset avoidance position by executing step 3 to completely exit the carpet, and then the current walking direction is adjusted to be parallel to the pre-calculated edge fitting line by rotating the target rotation angle at the preset avoidance position. Since the robot is currently performing a bow-shaped motion along the same side edge of the carpet, the corresponding Figure 7 In the figure, the robot performs a bow-shaped motion along the actual carpet edge or edge fitting line shown in the figure, and the trajectory formed by the bow-shaped motion is shown outside the actual carpet edge shown in the figure, so the edge fitting line required to perform step 3 in the process of entering and exiting the same side edge is the same, that is, the pre-calculated edge fitting line is used.
[0049] Then the robot walks along the same side edge of the carpet for a preset bending distance according to the adjusted current walking direction, so that the bow-shaped movement extending along the same side edge of the carpet is parallel to the same side edge of the carpet at its turning trajectory, corresponding to Figure 7 The trajectory formed by the bow-shaped motion extends from the upper right to the lower left, so the current walking direction after the above adjustment is also from the upper right to the lower left and parallel to the edge fitting line shown in the figure, especially the straight line trajectory of the bow-shaped motion at the turning point of its short side is parallel to the edge fitting line shown in the figure.
[0050] In order to meet the area coverage rate, the preset bending distance can be set to be less than or equal to the body radius of the robot, shortening the distance between the adjacent long straight line tracks on both sides of the short side track formed by the bow-shaped motion.
[0051] It should be noted that when the target working behavior is a bow-shaped path, the robot can be a cleaning robot, and the cleaning trajectory route generated in the hard ground other than the carpet is a bow-shaped cleaning route. Specifically, the bow-shaped path generated by the cleaning robot is composed of multiple parallel motion trajectory segments, wherein the vertical distance between two adjacent parallel motion trajectory segments (adjacent in position) can be less than the body diameter of the cleaning robot, and the two adjacent parallel motion trajectory segments have an endpoint connected by a bend line or a short line segment (shorter than the parallel motion trajectory segment), and the bend line or short line segment is adjusted in this application to be parallel to the edge of the carpet that the robot is currently following.
[0052] Those skilled in the art can understand that these mutually parallel motion trajectory segments are the long side routes of the bow-shaped motion, and the aforementioned bending lines or short line segments are the short side routes between two adjacent motion trajectory segments, so that these mutually parallel motion trajectory segments cover the reachable area of the robot, and the aforementioned short side routes are initially set to be perpendicular to the motion trajectory segments or the initial cleaning direction, but in the present application, when the robot triggers and detects the carpet and controls the robot to walk to the preset avoidance position by executing step 3, after rotating the target rotation angle, the current walking direction is adjusted to be parallel to the pre-calculated edge fitting line.
[0053] On the basis of the above embodiment, after the robot walks along the same side edge of the same carpet by performing the bow-shaped motion, when continuing to perform the bow-shaped motion, steps 1 to 3 are performed to configure the bow-shaped motion performed by the robot to extend successively along different side edges of the same carpet or successively along edges of different carpets by updating the edge fitting line; wherein the carpet edge along which the bow-shaped motion extends is the carpet edge along which the robot extends.
[0054] When the robot walks along the bottom edge of the carpet through the bow-shaped motion and walks to the left edge of the carpet, the edge of the carpet detected by the robot changes by 90 degrees, and an error occurs when the previous current trigger position or historical trigger position is used) or one side edge of another carpet (there are multiple carpets in the environment, and other carpets are put on again). When the robot triggers and detects the carpet during the bow-shaped motion, since the same side edge of the same carpet has been walked, the currently detected carpet candidate result is from the other side edge of the same carpet or one side edge of another carpet, and it is determined that the robot has begun to cross the other side edge of the same carpet or one side edge of another carpet and is detected by the ultrasonic sensor. At this time, the edge fitting line needs to be updated to represent the new carpet edge; therefore, by executing steps 1 to 3 to update the edge fitting line to configure the bow-shaped motion performed by the robot to extend successively along different side edges of the same carpet or successively along the edges of different carpets.
[0055] When the robot needs to execute step 1 at the edge of the carpet mentioned in the aforementioned embodiment, the more times step 1 is repeated, the more current trigger positions are obtained, and the more historical trigger positions are obtained in the subsequent step 2, so that the edge fitting line is updated more times. The number of updates here is the cumulative number of calculations of the edge fitting line at different carpet edges. In some embodiments, the edge fitting line is calculated once for the same carpet edge, and the number of trigger positions required for calculation is at least two, including the current trigger position and the historical trigger position.
[0056] In some embodiments, the robot uses multiple ultrasonic sensors, each of which detects a current trigger position. When each ultrasonic sensor is triggered and detects the carpet at the same time, the installation positions of these ultrasonic sensors are considered to be located on a straight line parallel to the edge of the carpet, thereby achieving multiple current trigger positions in the carpet at the same time.
[0057] In the scenario where steps 1 to 3 are repeatedly executed or in the scenario where step 3 is repeatedly executed, the current trigger position obtained by the last executed step 1 is updated to the historical trigger position in the current executed step 2, and a current trigger position and multiple historical trigger positions are provided to participate in straight line fitting, and then an edge fitting line parallel to the edge of the same carpet or multiple edge fitting lines parallel to the edges of different carpets are calculated. Then, as the historical trigger positions increase, the number of edge fitting lines can be increased to simulate carpet edges of different directions, and the edge fitting lines parallel to the edge of the same carpet can be corrected to achieve the update of the edge fitting lines.
[0058] Therefore, as the current trigger position and the historical trigger position increase, a more comprehensive and accurate edge fitting line is inferred, which improves the accuracy of the inferred relative position of the carpet edge and the direction of the carpet edge (carpet placement trend). It is used in cleaning scenarios near the carpet edge to infer the carpet shape and coverage, improve the cleaning coverage rate of the outside of the carpet area, and prevent the robot from entering the carpet too deeply and causing the risk of the wet mop dirtying the carpet.
[0059] As an embodiment, after the robot obtains the edge fitting line by executing step 2, when the robot triggers and detects the carpet and the current trigger position is in the carpet area between the edge of the carpet along which the robot is walking and the edge fitting line currently obtained, if the vertical distance from the current trigger position to the edge fitting line is less than or equal to the preset detection distance, the current trigger position approaches the edge fitting line, driving the center of the body to tend to move to the edge of the carpet along which the robot is walking, and then the robot can start to perform logical processing such as deceleration or early avoidance, including decelerating walking or starting to walk in the opposite direction of the current walking direction without turning around, to prevent the robot from continuing to walk too long into the carpet.
[0060] It should be noted that, combined with Figure 3It can be seen that the installation position of the ultrasonic sensor on the robot's body chassis is closer to the collision plate on the front side of the robot in the current walking direction relative to the center of the body. The front side here refers to the side of the robot's casing in the current walking direction. Along the current walking direction, when the installation position of the ultrasonic sensor crosses the edge of the carpet and reaches the edge fitting line, the carpet is triggered to be detected, that is, the ultrasonic detection is triggered, and the center of the body is also close to the edge of the carpet along the current walking direction. In other words, when the center of the body reaches the edge of the carpet, the ultrasonic sensor has triggered the detection of the carpet.
[0061] As an embodiment, after the robot currently obtains the edge fitting line by executing step 2, during the robot's walking process, if the robot does not trigger the detection of the carpet from the time the robot detects the carpet candidate result to the installation position of the ultrasonic sensor crossing the currently obtained edge fitting line, it is determined that the robot has walked to the corner position of the carpet; specifically, in the process of the robot using the target retreat distance obtained in the last step 3 to exit the carpet to the preset avoidance position, the robot may start from the carpet corner position to walk the target retreat distance to the outside of the carpet to the preset avoidance position, and then start from the preset avoidance position and walk back to the carpet in a straight line, for example, when starting to cross the edge of the carpet, the robot detects the carpet candidate result, but the installation position of the ultrasonic sensor moves to or even crosses the currently obtained edge. If the carpet is not triggered and detected during the fitting process, it is determined that there is a working blind area between the robot and the detected carpet edge, including the undetected carpet edge; a leak repair action is required, and the leak repair action includes at least one of the following: rotating by changing the angular velocity, turning by changing the angular velocity and linear velocity, and moving forward or backward by changing the linear velocity; in order to perform the leak repair action, this embodiment turns by setting the differential between the left driving wheel and the right driving wheel of the robot, forming an arc trajectory between the detected carpet edge and the working blind area, so that the robot walks into the undetected carpet edge in an arc manner, and adds the carpet edge information to the carpet, and then executes steps 1 to 3, and the edge fitting line and the preset avoidance position can be updated in sequence based on the triggering of the carpet detection. In this way, at least part of the working blind area can be traversed; it is also possible to perform two arc movements, and the trajectories formed by the two arc movements are orthogonal to ensure that most or all of the leaked working areas, that is, the working blind areas, can have a chance to repair leaks.
[0062] From another perspective, when the robot walks to the corner of the carpet, it has walked along one edge of the same carpet and needs to enter the other edge of the same carpet, otherwise it continues to perform the target work behavior along one edge of the same carpet, and repeatedly enters and exits the carpet near one edge of the same carpet by repeatedly executing step 3. Each time the robot crosses the edge fitting line, the carpet is not triggered to be detected, and it is regarded as walking to the corner of the carpet each time. The corner of the carpet can be located on the boundary line between the detected carpet and the working blind area. After the robot walks to the corner of the carpet, the working blind area is not regarded as the carpet area, and the working blind area is not detected. Therefore, it is necessary to fill the gap in the working blind area.
[0063] As an embodiment, in step 1, when the robot detects the carpet through the ultrasonic sensor, the method for obtaining the current trigger position includes: combining Figure 4 It can be seen that when the robot is triggered and detects the carpet for the first time, the installation position of the ultrasonic sensor is marked as the first trigger position. Then, the robot walks in a straight line from the carpet to the reset position and detects the hard ground without turning around, driving the installation position of the ultrasonic sensor back to the hard ground, and detecting the corresponding changes in the ultrasonic data caused by the ultrasonic reflection signal, and determining that the hard ground state has been restored; then, the robot rotates the preset trigger angle on the hard ground to obtain the longitudinal axis of the body after rotation, wherein the robot uses the extension direction of the longitudinal axis of the body toward the front side of the body to represent the current walking direction, and therefore the direction in which the longitudinal axis of the rotated body points to the front side of the robot is configured as the walking direction after rotation as shown in the figure, and the preset trigger angle is preferably 45 degrees. Then, the robot walks along the longitudinal axis of the rotated body until the carpet is triggered and detected, and the installation position of the ultrasonic sensor is marked as the second trigger position, that is, the robot follows Figure 4 The robot moves forward in the direction of rotation shown in the figure to the installation position of the ultrasonic sensor and enters the edge fitting line with the arrow in the figure. The robot triggers and detects the carpet again, and marks the installation position of the ultrasonic sensor as the second trigger position. The second trigger position is then marked as the current trigger position, and the first trigger position is marked as the historical trigger position. The current trigger position is set using the trigger positions obtained by entering the carpet twice in a row.
[0064] On the basis of marking the second trigger position, if the robot walks in a straight line without turning around until it detects the hard ground, and then rotates the preset trigger angle, the preset trigger angle at this time can be less than 45 degrees, and then walks along the rotated longitudinal axis of the body until the carpet is triggered, the installation position of the ultrasonic sensor is marked as the third trigger position; then the third trigger position is marked as the current trigger position, and the second trigger position is marked as the historical trigger position. The trigger positions obtained by entering the carpet detection twice in a row are used to update the current trigger position and the historical trigger position.
[0065] Based on the above embodiment, in step 2, the method of calculating the edge fitting line using the current trigger position and the historical trigger position includes: When a current trigger position and a historical trigger position are obtained by executing step 1 once, a straight line equation is constructed by the coordinates of a current trigger position and a historical trigger position to obtain an edge fitting line. The constructed straight line equation is equivalent to the coordinates of a current trigger position and a historical trigger position. After the coordinates are substituted into the distance formula between the two points, the parameters are obtained, and then the straight line equation is constructed by the parameters and coordinate variables. Then, the straight line equation is represented as the edge fitting line in the map and is located inside the carpet; wherein, the robot is equipped with an ultrasonic sensor, and a historical trigger position and a current trigger position detected successively by an ultrasonic sensor are both located on the edge fitting line.
[0066] Since the generation time of the coordinates of the historical trigger position is earlier than the generation time of the coordinates of the current trigger position, the straight line direction of the edge fitting line is the direction from the historical trigger position to the current trigger position. Schematically, as shown in Figure 4 As shown in the direction in which the edge fitting line in FIG. 1 extends to the left, the edge fitting line is preferably parallel to the lower edge of the carpet to indicate the direction in which the robot walks along the edge of the carpet parallel to the edge fitting line.
[0067] In addition, there is another method for calculating the edge fitting line, including: when multiple current trigger positions and multiple historical trigger positions are accumulated by executing step 1 once, the coordinates of the multiple current trigger positions and the coordinates of the multiple historical trigger positions are subjected to straight line fitting processing to obtain the edge fitting line, wherein the robot is equipped with multiple ultrasonic sensors, and the robot can obtain multiple current trigger positions at the same time by executing step 1 once; when the robot detects the carpet through each ultrasonic sensor respectively, there are multiple ultrasonic carpet detection trigger points, that is, the number of ultrasonic sensors is equal to the number of current trigger positions, and all current trigger positions and historical trigger positions can be subjected to straight line fitting, wherein one ultrasonic sensor corresponds to one current trigger position, and the number of current trigger positions is equal to the number of historical trigger positions. When the robot detects the carpet through some ultrasonic sensors respectively, the number of ultrasonic sensors is greater than the number of current trigger positions, and all current trigger positions can be subjected to straight line fitting. All current trigger positions and all historical trigger positions are not necessarily located on the same edge fitting line. When the number of current trigger positions and historical trigger positions required for fitting processing is larger, the relative position and placement trend direction inferred by the edge fitting line become more accurate.
[0068] If an edge fitting line is calculated for each edge of the carpet, the outline of the carpet can be formed, and the shape of the carpet can be inferred. Based on this, parameters such as the distance and rotation angle required for the robot to exit the carpet can be calculated, so as to plan the subsequent robot motion trajectory.
[0069] Specifically, in step 1, when the robot detects the carpet candidate result through the ultrasonic sensor, it is determined that the detection position of the ultrasonic sensor has changed from other ground media to the carpet, which can also be understood as the installation position of the ultrasonic sensor has changed from other ground media to the carpet; in some working scenarios, the detection position of the ultrasonic sensor remains in the carpet. The robot detects the carpet candidate result by comparing the threshold of the ultrasonic data received by the ultrasonic sensor. For example, when the ultrasonic data received by the ultrasonic sensor is greater than the preliminary judgment threshold, the detection position of the ultrasonic sensor is still on the hard ground; when the ultrasonic data received by the ultrasonic sensor is less than or equal to the preliminary judgment threshold, the detection position of the ultrasonic sensor becomes on the carpet as the carpet candidate result. At this time, the robot preliminarily detects the carpet.
[0070] Then, in the process of the robot walking on the carpet, multiple frames of ultrasonic data are sampled by counting a detection cycle, and all the sampled frames of ultrasonic data are filtered. Schematically, the detection time of one frame of ultrasonic data is set to 18-20ms. By sampling 10 frames of ultrasonic data in sequence, a detection cycle of about 200ms can be counted. The filtering process disclosed in this application is set to filter the interference of actual environmental scenes such as jitter in the robot and gaps between floor tiles. The filtering process disclosed in this application adopts the filtering algorithm program pre-cured in the ultrasonic sensor. The filtering algorithm includes limiting filtering method, median filtering method, arithmetic average filtering method, recursive average filtering method (sliding average filtering method), median average filtering method (anti-pulse interference average filtering method), limiting average filtering method, etc. It can be applicable to the application scenarios of ultrasonic sensors collecting ultrasonic data and the accuracy requirements of ultrasonic detection of ground media.
[0071] As soon as the ultrasonic sensor enters the carpet, it can distinguish between the carpet and the hard ground, but it usually counts and filters to filter out false positives. Then, based on the result of the filtering process, it is determined whether the robot has triggered and detected the carpet; specifically, the size relationship between the result of the filtering process and the preset filtering threshold is compared. When the result of the filtering process is greater than the preset filtering threshold, the robot has not triggered and detected the carpet. It is possible that the robot is walking on the carpet but the detection position of the ultrasonic sensor has entered the hard ground; when the result of the filtering process is less than or equal to the preset filtering threshold, the robot has triggered and detected the carpet.
[0072] If the robot is triggered to detect the carpet, the installation position of the ultrasonic sensor is marked as the first trigger position or the second trigger position; specifically, when the robot is triggered to detect the carpet for the first time, the installation position of the ultrasonic sensor is marked as the first trigger position, and then the robot retreats straight to the hard ground, and then the longitudinal axis of the robot body rotates by a preset trigger angle, and then walks to the carpet, until the carpet is triggered again, the installation position of the ultrasonic sensor is marked as the second trigger position. Preferably, the detection position of the ultrasonic sensor covers the installation position of the ultrasonic sensor.
[0073] Among them, the intensity of the ultrasonic reflection signal received by the ultrasonic sensor (which can be represented by ultrasonic data) is the reflected signal of the ultrasonic sensor on the surface of the robot's walking environment, and the level signal is obtained through analog-to-digital conversion. The robot can use the ultrasonic sensor to detect the strength of the signal feedback from the surface medium, especially to identify the carpet, to prevent the robot from mistakenly entering the carpet and reduce the degree of contamination of the carpet.
[0074] As an embodiment, in step 3, the method for calculating the target retreat distance based on the edge fitting line, the current walking direction of the robot, the preset safety distance and the body radius of the robot includes: When the robot detects a carpet candidate result through an ultrasonic sensor, it is determined that the robot has entered the carpet from other ground media, specifically, it is determined that the robot has crossed over one side edge of the carpet, counts a detection cycle, and calculates in real time the distance the robot has walked in the current walking direction, until the robot triggers and detects the carpet, the installation position of the ultrasonic sensor is offset to the current trigger position, and the calculated distance is marked as the robot trigger distance, to be expressed as the distance from the edge fitting line to the edge of one side crossed by the robot; specifically, the time from the detection of the carpet candidate result to the triggering of the detection of the carpet is one detection cycle, and the distance the robot has walked in the current walking direction within one detection cycle is calculated, that is, the speed measured by the control robot is multiplied by the detection cycle to obtain the distance the robot has walked in the current walking direction.
[0075] It should be noted that since the mark of the current trigger position needs to be filtered and the filtering process needs to go through a detection cycle, the robot will walk the distance it enters the carpet within the detection cycle based on its walking speed, that is, the robot trigger distance.
[0076] Combination Figure 6 It can be seen that the angle between the current walking direction of the robot and the edge fitting line is marked as the target rotation angle, and the projection distance of the robot trigger distance in the vertical direction of the edge fitting line is calculated, and then the projection distance is equivalent to Figure 5 The sensor trigger distance shown is equivalent to calculating Figure 6 The distance between the mid-edge fit line and its nearest carpet edge is also equivalent to Figure 5 The distance between the true edge line and the edge fitting line.
[0077] When the edge fitting line is parallel to the carpet edge closest to it, the map coordinates of the edge fitting line are controlled to subtract the sensor trigger distance to obtain the relative position of the carpet edge closest to the edge fitting line; wherein the carpet edge closest to the edge fitting line is the carpet edge crossed by the robot in the process of walking from the hard ground to detecting the carpet candidate result.
[0078] Combination Figure 5 and Figure 6 It can be seen that the sum of the sensor trigger distance, the safety distance and the robot's body radius is marked as the avoidance distance; among them, the safety distance can be set with an empirical value of 2cm to 5cm, so that when the cleaning robot performs the target work behavior (for example, planning cleaning near the edge of the carpet), a certain gap is reserved between the mop installed on the cleaning robot and the carpet.
[0079] Then, according to the trigonometric relationship between the avoidance distance and the geometric model where the target rotation angle is located, the ratio between the avoidance distance and the sine value of the target rotation angle is calculated to obtain the retreat planning distance, that is, an oblique line from the preset avoidance position to the edge fitting line passing through the center R of the body, wherein the line segment RH is located in the oblique line, and the angle formed by the oblique line and the edge fitting line in the directions of their respective arrows is the target rotation angle.
[0080] The ratio of the distance from the robot's body center to the edge fitting line to the sine value of the target rotation angle is calculated to obtain the body redundant distance, wherein a line segment extending from the body center R with a length of the body redundant distance is located on the oblique line, so that the line segment with a length of the body redundant distance and the line segment RH constitute the oblique line.
[0081] Then, the planned retreat distance is controlled to be subtracted from the redundant distance of the aircraft body, and the difference obtained by the subtraction is marked as the target retreat distance, that is, Figure 6 The length of the line segment RH shown; after the robot walks the target backward distance in the opposite direction of the current walking direction without turning around, the center of the robot's body reaches the preset avoidance position.
[0082] It should be noted that, in the current walking direction of the robot, the ultrasonic sensor is closer to the front side of the robot body relative to the center of the robot body, schematically represented as Figure 6 The current trigger position (the current installation position of the ultrasonic sensor) is located at the upper right of the center of the robot's body.
[0083] Combination Figure 2It can be seen that the robot goes on the carpet from different angles, forming Figure 2 Current walking direction, which is slightly to the left. Figure 2 The current walking direction in the middle and Figure 2 In the current walking direction slightly to the right of the center, when the ultrasonic sensor is triggered to detect the carpet, the distance that the robot enters the carpet is different. By executing step 3, the robot is dynamically calculated according to the different target retreat distances calculated by trigonometric functions based on the edge fitting line, the current walking direction of the robot, the preset safety distance, and the body radius of the robot. This ensures that the robot can retreat to the avoidance position at the edge of the carpet from any direction. This prevents the robot from not completely retreating to the carpet due to the shortened distance that the robot retreats from the carpet to the hard ground, which may cause the robot's subsequent cleaning action to dirty the carpet with a wet mop; it also prevents the robot from retreating too long from the carpet to the hard ground, which causes the distance between the robot and the carpet to lengthen, which may cause the robot to miss the area near the carpet when cleaning it later.
[0084] As an embodiment, in step 3, the method for calculating the target rotation angle based on the current walking direction of the robot and the edge fitting line includes: combining Figure 6 It can be seen that when the robot triggers and detects the carpet and calculates the target retreat distance RH, the robot's body center walks the target retreat distance in the opposite direction of the current walking direction to the preset avoidance position, and then calculates the angle between the robot's current walking direction and the edge fitting line, and then marks the angle as the target rotation angle; then the robot adjusts the current walking direction to be parallel to the edge fitting line according to the target rotation angle, so that the robot walks along the edge of the carpet parallel to the edge fitting line, corresponding to Figure 6 In the figure, after the robot's body center retreats from position R to the preset avoidance position shown in the figure, it rotates counterclockwise by the target rotation angle shown in the figure, and the current walking direction after the rotation becomes parallel to the edge fitting line. Starting from the preset avoidance position shown in the figure, the robot walks from right to left, and the arrow of the edge fitting line in the figure points horizontally to the left, that is, the edge of the carpet extends to the left, so as to plan the subsequent path direction of the robot, including planning the walking direction of the robot at the preset avoidance position in the aforementioned target working behavior.
[0085] Although the present invention has been described in detail with reference to preferred embodiments, a person skilled in the art should understand that the specific implementation modes of the present invention can still be modified or some technical features can be replaced by equivalents without departing from the spirit of the technical solution of the present invention, which should be included in the scope of the technical solution for protection of the present invention.
Claims
1. A method for avoiding carpets by a robot based on ultrasonic detection, characterized in that: The method is applied to a robot equipped with an ultrasonic sensor, and the method comprises: Step 1: When the robot detects the carpet through the ultrasonic sensor, it obtains the current trigger position; then executes step 2; Step 2: Calculate the edge fitting line using the current trigger position and the historical trigger position to determine the position of the carpet edge that the robot currently crosses and the direction of the carpet edge; then execute step 3; Step 3: Calculate the target retreat distance based on the edge fitting line, the current walking direction of the robot, the preset safety distance and the body radius of the robot, so that the robot walks the target retreat distance in the opposite direction of the current walking direction without turning around, and then exits the carpet to the preset avoidance position; and calculate the target rotation angle based on the current walking direction of the robot and the edge fitting line, so that the robot adjusts the current walking direction to be parallel to the edge of the carpet by rotating the target rotation angle.
2. The method according to claim 1, characterized in that During the process of the robot performing the target work behavior, when the robot detects the carpet candidate result, the robot executes steps 1 to 3 or executes step 3 to obtain the target retreat distance, and then the robot walks the target retreat distance in the opposite direction of the current walking direction to the preset avoidance position without turning around, and then adjusts the current walking direction to be parallel to the edge fitting line by rotating the target rotation angle at the preset avoidance position, and then the robot continues to perform the target work behavior, so that the trajectory formed by the target work behavior extends along the edge of the carpet; Each time step 3 is executed, the target retreat distance and the target rotation angle are updated once, so that the preset avoidance position is updated once; When the robot detects a carpet candidate result, the robot enters the carpet and walks on the carpet in the current walking direction until the carpet is triggered and detected.
3. The method according to claim 2, characterized in that In the case where the target working behavior is walking along the same side edge of the carpet, when the robot detects a carpet candidate result, the target working behavior is suspended and a straight-line walking is performed instead until the carpet is triggered and detected, and then the target retreat distance is obtained by executing step 3, and then the robot is controlled to walk to a preset avoidance position to completely exit the carpet, and then the current walking direction is adjusted to be parallel to the pre-calculated edge fitting line by rotating the target rotation angle at the preset avoidance position, and then the robot walks along the same side edge of the carpet for a preset edge distance according to the adjusted current walking direction, and then walks toward the same side edge of the carpet in a circular arc manner until the carpet is triggered and detected, and then step 3 is performed while keeping the edge fitting line unchanged.
4. The method according to claim 3, characterized in that After the robot walks along the same side edge of the same carpet, in the process of walking towards the other side edge of the same carpet or one side edge of another carpet in a circular arc manner, when the robot detects a carpet candidate result, it performs straight-line walking until the carpet is detected, and then executes steps 1 to 3 to walk along the other side edge of the same carpet or one side edge of another carpet by updating the edge fitting line.
5. The method according to claim 2, characterized in that: When the target working behavior is a bow-shaped motion extending along the same side edge of the carpet, each time the robot is triggered and detects the carpet, step 3 is executed to control the robot to walk to a preset avoidance position to completely exit the carpet, and then the current walking direction is adjusted to be parallel to the pre-calculated edge fitting line by rotating the target rotation angle at the preset avoidance position. Then, the robot walks a preset bending distance along the same side edge of the carpet in the adjusted current walking direction, so that the trajectory of the bow-shaped motion extending along the same side edge of the carpet at its turning point is parallel to the same side edge of the carpet.
6. The method according to claim 5, characterized in that After the robot walks along the same side edge of the same carpet by performing the bow-shaped motion, when continuing to perform the bow-shaped motion, steps 1 to 3 are performed to configure the bow-shaped motion performed by the robot to extend successively along different side edges of the same carpet or successively along edges of different carpets by updating the edge fitting line; wherein the carpet edge along which the bow-shaped motion extends is the carpet edge along which the robot moves.
7. The method according to claim 4 or 6, characterized in that: The more times step 1 is repeated, the more current trigger positions are obtained, and the more historical trigger positions are obtained in the subsequent step 2, so that the edge fitting line is updated more often; The current trigger position obtained in the last executed step 1 is updated to the historical trigger position in the current executed step 2.
8. The method according to claim 7, characterized in that After the robot obtains the edge fitting line by executing step 2, when the robot triggers and detects the carpet and the current trigger position is in the carpet area between the edge of the carpet along which the robot is walking and the edge fitting line currently obtained, if the vertical distance from the current trigger position to the edge fitting line is less than or equal to the preset detection distance, the robot slows down or starts walking in the opposite direction of the current walking direction without turning around.
9. The method according to claim 7, characterized in that: After the robot currently obtains the edge fitting line by executing step 2, during the robot's walking process, if the robot does not trigger the detection of the carpet from the time the robot detects the carpet candidate result to the installation position of the ultrasonic sensor crossing the currently obtained edge fitting line, it is determined that the robot walks to the corner position of the carpet.
10. The method according to claim 7, characterized in that In step 1, when the robot detects the carpet through the ultrasonic sensor, the method for obtaining the current trigger position includes: When the robot is triggered and detects the carpet for the first time, the installation position of the ultrasonic sensor is marked as the first trigger position. Then the robot walks in a straight line without turning around until it resets and detects the hard ground. Then it rotates to a preset trigger angle and walks along the rotated longitudinal axis of the body until the carpet is triggered and detected. In this case, the installation position of the ultrasonic sensor is marked as the second trigger position. Then the second trigger position is marked as the current trigger position, and the first trigger position is marked as the historical trigger position. The robot uses the extension direction of the longitudinal axis of the body toward the front side of the body to indicate the current walking direction.
11. The method according to claim 10, characterized in that In step 2, the method of calculating the edge fitting line using the current trigger position and the historical trigger position includes: When a current trigger position and a historical trigger position are obtained by executing step 1 once, a straight line equation is constructed from the coordinates of the current trigger position and the coordinates of the historical trigger position to obtain an edge fitting line, wherein the robot is equipped with an ultrasonic sensor; Alternatively, when multiple current trigger positions and multiple historical trigger positions are accumulated by executing step 1 once, straight line fitting is performed on the coordinates of the multiple current trigger positions and the coordinates of the multiple historical trigger positions to obtain an edge fitting line, wherein the robot is equipped with multiple ultrasonic sensors.
12. The method according to claim 10, characterized in that In step 1, when the robot detects a carpet candidate result through an ultrasonic sensor, it is determined that the detection position of the ultrasonic sensor has changed from other ground media to the carpet. Then, in the process of the robot walking on the carpet, multiple frames of ultrasonic data are sampled by counting a detection cycle, and all the sampled frames of ultrasonic data are filtered, and then it is determined whether the robot triggers the detection of the carpet according to the result of the filtering process; If the robot is triggered to detect the carpet, the installation position of the ultrasonic sensor is marked as the first trigger position or the second trigger position; The robot detects the carpet candidate result by performing a threshold comparison on the ultrasonic data received by the ultrasonic sensor.
13. The method according to claim 12, characterized in that In step 3, the method for calculating the target retreat distance based on the edge fitting line, the current walking direction of the robot, the preset safety distance and the body radius of the robot includes: After the robot detects the carpet candidate result through the ultrasonic sensor, it counts a detection cycle and calculates in real time the distance the robot has walked in the current walking direction, until the robot triggers and detects the carpet, and marks the distance calculated in real time as the robot trigger distance, which is expressed as the distance from the edge fitting line to the edge of one side crossed by the robot; The angle between the robot's current walking direction and the edge fitting line is marked as the target rotation angle, the projection distance of the robot's trigger distance in the vertical direction of the edge fitting line is calculated, and then the projection distance is marked as the sensor trigger distance; The sum of the sensor trigger distance, the safety distance and the robot's body radius is marked as the avoidance distance; then the ratio between the avoidance distance and the sine value of the target rotation angle is calculated to obtain the retreat planning distance; Calculate the ratio between the distance from the robot body center to the edge fitting line and the sine value of the target rotation angle to obtain the body redundant distance; Then, the planned retreat distance is controlled to be subtracted from the redundant distance of the body, and the difference obtained by subtraction is marked as the target retreat distance, so that after the robot walks the target retreat distance in the opposite direction of the current walking direction without turning around, the center of the robot's body reaches the preset avoidance position.
14. The method according to claim 1, characterized in that In step 3, the method for calculating the target rotation angle based on the current walking direction of the robot and the edge fitting line includes: When the robot triggers and detects the carpet and calculates the target retreat distance, the robot's body center walks the target retreat distance in the opposite direction of the current walking direction to the preset avoidance position, and then calculates the angle between the robot's current walking direction and the edge fitting line, and then marks the angle as the target rotation angle; then the robot adjusts the current walking direction to be parallel to the edge fitting line according to the target rotation angle.
Citation Information
Patent Citations
Carpet detection method and device of cleaning robot, cleaning robot and medium
CN113974507A
Robot walking environment detection method, walking control method, robot and chip
CN116954205A
Obstacle avoidance control method and device of automatic cleaning equipment, storage medium and equipment
CN116998993A
Carpet detection method, carpet detection device, cleaning robot and storage medium
CN117179637A
Operation method and device of sweeping robot, computer equipment and storage medium
CN118319195A
Cited By
Cleaning method of cleaning robot, cleaning robot and cleaning system
CN120203455A
Ultrasonic detection-based carpet avoidance method for robot
WO2026031803A1
