Control method, control device, storage medium and self-moving equipment
Patent Information
- Application Number
- CN202480002268.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2023-08-30
- Filing Date
- 2024-02-28
- Publication Date
- 2024-12-03
AI Technical Summary
Intelligent self-moving equipment is easily trapped by dynamic or static obstacles when moving automatically, causing it to fail to work properly and reducing work efficiency.
Detect obstacles through sensors and update the map, clear the marks of difficult obstacles on the map, plan and execute the path out of the difficult area, and ensure that the equipment can effectively escape from trouble.
It improves the efficiency of self-mobile equipment to escape from difficulties, reduces the time of the escape process, and ensures that the equipment can complete its work tasks normally.
Smart Images

Figure CN119072668A_ABST
Abstract
Description
A control method, a control device, a storage medium and a self-propelled device Technical Field
[0001] The present invention relates to a control method, a control device, a storage medium and a self-moving device. Background Art
[0002] With the gradual popularization of intelligent devices in daily life, autonomous devices (such as automatic lawn mowers for garden repairs and sweeping robots for home floor cleaning) are also popular among users.
[0003] Autonomous devices typically move and / or operate within a work area. For example, an autonomous lawn mower can drive across a user's lawn and perform its mowing operations, significantly reducing labor costs.
[0004] Summary of the Invention
[0005] The present application provides a control method, a control device, a storage medium and a self-moving device to improve the working efficiency of the self-moving device.
[0006] According to a first aspect of an embodiment of the present application, a control method is provided, which is applied to a self-moving device, wherein the self-moving device is provided with a sensor, and the control method includes:
[0007] obtaining a map of a working area, wherein the map is updated based on obstacles detected by the sensor;
[0008] Controlling the self-moving device to move in the working area;
[0009] In response to the self-mobile device moving into a dilemma area, markings of at least a portion of the dilemma obstacles on the map are cleared to obtain a map after the obstacles are cleared; wherein the dilemma area represents an area limiting the range of movement of the self-mobile device, and the dilemma area is formed by at least one dilemma object, and the dilemma object includes a dilemma obstacle and / or a dilemma boundary;
[0010] Based on the map after clearing obstacles, a path for the mobile device to leave the difficult area is planned.
[0011] In one embodiment, controlling the self-moving device to move in the working area includes:
[0012] determining a first target position in the working area;
[0013] Planning a first path between the self-mobile device and the first target location based on the map;
[0014] If the planning is successful, controlling the self-moving device to move toward the first target location according to the first path;
[0015] If the planning fails, it is confirmed that the mobile device has moved into the difficult area.
[0016] In one embodiment, in response to the mobile device moving into the difficult area, clearing marks of at least a portion of difficult obstacles on the map to obtain a map after the obstacles are cleared includes:
[0017] In response to the self-mobile device moving into the dilemma area, determining, based at least on the map, a location of an opening when the self-mobile device enters the dilemma area;
[0018] Marks of difficult obstacles within the opening range on the map are cleared to obtain a map after the obstacles are cleared.
[0019] In one embodiment, the distance between any position within the opening range and the opening position is less than a preset threshold.
[0020] In one embodiment, determining the opening position of the mobile device when entering the dilemma area based at least on the map includes:
[0021] Obtaining the historical trajectory of the mobile device;
[0022] The opening position is determined according to the map and the historical trajectory.
[0023] In one embodiment, before obtaining the historical trajectory of the mobile device, the process includes:
[0024] Determining whether the space formed by the dilemma object is suitable for the self-moving device to rotate;
[0025] In response to the space formed by the dilemma object being available for the self-moving device to rotate, acquiring the historical trajectory;
[0026] In response to the space formed by the dilemma object being unable to accommodate the self-moving device, the self-moving device is controlled to move backward.
[0027] In one embodiment, determining the opening position according to the map and the historical trajectory includes:
[0028] acquiring a second target position, where the second target position is outside the dilemma area;
[0029] selecting a reference position in the historical trajectory;
[0030] planning a path between the reference location and the second target location based on the map;
[0031] If the planning is successful, the reference position is determined as the opening position.
[0032] In one embodiment, selecting a reference position in the historical trajectory includes:
[0033] Based on the map, determining an intersection position of the difficult obstacle and the historical trajectory;
[0034] The intersection position is determined as the reference position.
[0035] In one embodiment, clearing the mark of the difficult obstacle within the opening range on the map to obtain the map after the obstacle is cleared includes:
[0036] Determine the target type corresponding to the difficult obstacle within the opening range;
[0037] Obtaining an obstacle clearance priority, where the obstacle clearance priority represents the order in which obstacles are cleared for different target types;
[0038] According to the obstacle removal priority, the mark of the highest priority difficult obstacle within the opening range on the map is removed to obtain a map after the obstacles are removed.
[0039] In one embodiment, the target type represents the type of sensor that detects the difficult obstacle; and the obstacle clearance priority represents the obstacle clearance order corresponding to different sensor types.
[0040] In one embodiment, the obstacle clearance priority corresponding to the non-contact sensor is higher than the obstacle clearance priority corresponding to the contact sensor.
[0041] In one embodiment, planning a path for the mobile device to leave the difficult area based on the map after clearing obstacles includes:
[0042] acquiring a third target position, wherein the third target position is outside the dilemma area;
[0043] Planning a path between the self-moving device and a third target location based on the map after clearing obstacles;
[0044] If the planning is successful, the self-moving device is controlled to leave the difficult area according to the planned path.
[0045] In one embodiment, it further includes:
[0046] If the planning fails, clearing the mark of the second highest priority difficult obstacle within the opening range on the map to obtain a map after clearing the obstacles;
[0047] Planning a path between the self-moving device and a third target location based on the map after clearing obstacles;
[0048] If the planning is successful, controlling the self-mobile device to leave the difficult area according to the planned path;
[0049] If planning fails and it is confirmed that all marks of the difficult obstacles within the opening range on the map have been cleared, then based on the map, all marks of other difficult obstacles in the difficult area on the map are cleared to obtain a map after clearing obstacles;
[0050] Planning a path between the self-mobile device and the first target location based on the map after the obstacles are cleared;
[0051] According to the planned path, the self-moving device is controlled to move toward the first target location; wherein, during the movement toward the first target location, if an obstacle is detected again, the position of the obstacle is re-marked on the map; wherein the size of the area of the re-marked obstacle is smaller than the size of the area marked before the obstacle was cleared.
[0052] In one embodiment, it further includes:
[0053] If the self-moving device still cannot move to the first target location, the self-moving device is controlled to send a reminder message.
[0054] In one embodiment, the sensor includes at least one of an ultrasonic sensor, a collision sensor, and a torque sensor.
[0055] In one embodiment, updating a map based on obstacles detected by the sensor includes:
[0056] determining a sensor that detects the obstacle;
[0057] determining a first number according to the detection accuracy of the sensor; wherein the higher the detection accuracy, the smaller the first number;
[0058] A first number of grids in the map are marked as obstacle grids according to the locations of the obstacles.
[0059] In one embodiment, in response to the mobile device moving into the difficult area, clearing marks of at least a portion of difficult obstacles on the map to obtain a map after the obstacles are cleared includes:
[0060] In response to the mobile device moving into the dilemma area, at least based on the map, marks of all dilemma obstacles in the dilemma area on the map are cleared to obtain a map after the obstacles are cleared.
[0061] In one embodiment, after planning a path for the mobile device to leave the difficult area based on the map after clearing obstacles, the method includes:
[0062] Based on the planned path, the self-moving device is controlled to leave the difficult area; wherein, during the process of leaving the difficult area, if an obstacle is detected again, the position of the obstacle is re-marked on the map; wherein the size of the area of the re-marked obstacle is smaller than the size of the area marked before the obstacle was cleared.
[0063] According to a second aspect of an embodiment of the present application, a control device is provided, which is applied to a self-moving device, wherein the self-moving device is provided with a sensor, and the control device includes:
[0064] an acquisition module configured to acquire a map of a working area, wherein the map is updated based on obstacles detected by the sensor;
[0065] A control module configured to control the self-moving device to move in the working area;
[0066] a clearing module configured to, in response to the self-mobile device moving into a dilemma area, clear marks of at least a portion of the dilemma obstacles on the map, thereby obtaining a map after the obstacles are cleared; wherein the dilemma area represents an area limiting the range of movement of the self-mobile device, the dilemma area is formed by at least one dilemma object, and the dilemma object includes a dilemma obstacle and / or a dilemma boundary;
[0067] The planning module is configured to plan a path for the mobile device to leave the difficult area based on the map after the obstacles are cleared.
[0068] According to a third aspect of an embodiment of the present application, a computer-readable storage medium is provided, wherein the storage medium stores a computer program, and the computer program is used to execute the above method.
[0069] According to a fourth aspect of an embodiment of the present application, a self-moving device is provided, including:
[0070] processor;
[0071] a memory for storing instructions executable by the processor;
[0072] The processor is configured to execute the above method.
[0073] In the technical solution provided in the embodiment of the present application, when it is confirmed that the self-mobile device has moved into the predicament area, by clearing the marks of at least part of the predicament obstacles on the map, and then planning the path for the self-mobile device to leave the predicament area based on the map after clearing the obstacles, the self-mobile device can be effectively escaped, the time spent in the escape process can be reduced, and work efficiency can be improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0074] The above-mentioned objectives, technical solutions and beneficial effects of the present invention can be clearly obtained through the following detailed description of specific embodiments that can implement the present invention, combined with the description of the accompanying drawings.
[0075] The same reference numerals and symbols are used in the drawings and the description to designate the same or equivalent elements.
[0076] FIG1 is a schematic diagram of a lawn mower provided by an exemplary embodiment of the present application moving within a working area;
[0077] FIG2 is a schematic diagram of the structure of a self-moving device provided in Example 1 of the present application;
[0078] FIG3 is a schematic diagram of a self-moving device moving along a bow-shaped planned path in a working area according to an embodiment of the present application;
[0079] FIG4 is a schematic diagram of the detection ranges of different types of sensors in a mobile device according to an embodiment of the present application;
[0080] FIG5 is a schematic diagram of a mobile device moving into a difficult area according to an embodiment of the present application;
[0081] FIG6 is a schematic diagram of a mobile device moving to another difficult area according to an embodiment of the present application;
[0082] FIG7 is a schematic diagram of a moving trajectory of a mobile device provided by an embodiment of the present application;
[0083] FIG8 is a schematic diagram of obstacles within an opening range determined by a mobile device according to an embodiment of the present application;
[0084] FIG9 is a schematic diagram of a mobile device moving into another difficult area according to an embodiment of the present application;
[0085] FIG10 is a schematic diagram of a mobile device moving into another difficult area according to an embodiment of the present application;
[0086] FIG11 is a schematic flow chart of a method for automatically escaping a self-propelled device according to an embodiment of the present application;
[0087] FIG12 is a movable area detection result of a method for automatically escaping a self-moving device provided by an embodiment of the present application in which a movable area exists in actual application;
[0088] FIG13 is a schematic diagram of a flow chart of a method for automatically escaping from a mobile device according to an embodiment of the present application;
[0089] FIG14 is a schematic diagram of an escape strategy flow in a method for automatically escaping from a mobile device according to an embodiment of the present application;
[0090] FIG15 is a schematic diagram of a flow chart of a movable area determination process in a method for automatically escaping from a mobile device according to an embodiment of the present application;
[0091] FIG16 is a schematic diagram of a flow chart of a moving direction determination process in a method for automatically escaping from a mobile device provided by an embodiment of the present application;
[0092] FIG17 is a movable area detection result of a method for automatically escaping a self-moving device provided by an embodiment of the present application in which no movable area exists in an actual application scenario;
[0093] FIG18 is a movable area detection result of a method for automatically escaping a self-moving device provided by an embodiment of the present application in which no movable area exists in an actual application scenario;
[0094] FIG19 is a schematic diagram of a path collision strategy flow in a method for automatically escaping from a mobile device provided in an embodiment of the present application;
[0095] FIG20 is an escape strategy for a method for automatically escaping a self-moving device provided by an embodiment of the present application in which there is no movable area;
[0096] FIG21 is a working strategy after a successful escape from a mobile device in a method for automatically escaping from a predicament provided by an embodiment of the present application;
[0097] FIG22 is a diagram illustrating an escape display strategy in a method for automatically escaping from a mobile device according to an embodiment of the present application;
[0098] FIG23 is a schematic structural diagram of an automatic escape device for a self-propelled device provided in an embodiment of the present application;
[0099] FIG24 is a hardware structure block diagram of a method for automatically escaping a self-moving device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0100] To facilitate understanding of the present invention, the present invention will be described more fully below with reference to the accompanying drawings. Preferred embodiments of the present invention are shown in the accompanying drawings. However, the present invention may be implemented in many different forms and is not limited to the embodiments described herein. Rather, these embodiments are provided to provide a more thorough and comprehensive understanding of the present disclosure. The embodiments provided in this specification may be combined with each other.
[0101] In the present invention, unless otherwise specified or limited, the terms "installed," "connected," "connect," "fixed," etc. should be understood in a broad sense. For example, they can refer to fixed connection, detachable connection, or integration; mechanical connection, electrical connection; direct connection, or indirect connection through an intermediate medium; internal communication between two components, or interaction between two components, unless otherwise specified. Those skilled in the art will understand the specific meanings of the above terms in the present invention based on specific circumstances.
[0102] The terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of the technical features being referred to. Thus, a feature specified as "first" or "second" may explicitly or implicitly include at least one such feature. In the description of the present invention, "plurality" means at least two, for example, two, three, etc., unless otherwise specifically defined.
[0103] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the art to which this invention pertains. The terms used in this specification of the present invention are for the purpose of describing specific embodiments only and are not intended to limit the present invention. The term "and / or" as used herein includes any and all combinations of one or more of the associated listed items.
[0104] The present invention provides a self-moving device, a control method, and a computer-readable storage medium. The self-moving device may be an autonomous smart device, such as an autonomous lawn mower, an autonomous vacuum cleaner, an autonomous mop, or an autonomous snow blower, which can automatically move within a specified working area and perform corresponding tasks, or return to a docking station along the boundary of the working area for docking or charging.
[0105] As shown in FIG1 and FIG2 , an embodiment of the present application provides a self-moving device, which includes a body 100 , an imaging sensor 200 , a memory 400 , a position sensor 500 , a control circuit 600 , and a driving device 700 .
[0106] Specifically, the body 100 includes a drive device 700, which is used to drive the body 100 on the work surface according to received drive commands. The drive device 700 generally includes rollers and a motor that drives the rollers. The rollers may include a driving wheel and a driven wheel. The rollers may be distributed on both sides of the body 100, with one or two rollers on each side.
[0107] The body 100 also includes a working module, which is used to perform specific work tasks. For example, if the self-moving device is an automatic lawn mower, the working module includes mowing blades, a cutting motor, and other components. It may also include auxiliary components such as a mowing height adjustment mechanism to optimize or adjust the mowing effect. For example, if the self-moving device is an automatic vacuum cleaner, the working module includes a vacuum motor, a vacuum port, a vacuum tube, a vacuum chamber, a dust collection device, and other working components used to perform the vacuuming task.
[0108] The body 100 may also include an energy module, which is used to provide energy for various operations of the self-mobile device. The energy module may include a rechargeable battery and a charging connection structure, wherein the charging connection structure is usually a charging electrode sheet, which can be used in conjunction with a charging electrode sheet set at a docking station to charge the self-mobile device.
[0109] The body 100 further includes a memory 400 , which is used to store data generated by sensors or control circuits, or to pre-store data for use by the control circuits.
[0110] The body 100 further includes a position sensor 500 , which may include an inertial sensor IMU or an odometer ODO installed on the driving device 700 , etc., for obtaining a relative position according to the movement of the body 100 .
[0111] In addition to the above modules, the body 100 may also include a shell for accommodating and installing each module, a control panel for user operation, etc. It may also include various environmental sensors, such as humidity sensors, temperature sensors, acceleration sensors, light sensors, etc. The above sensors can assist the mobile device in determining the working environment to execute the corresponding program.
[0112] The control circuit 600 is the core component of the self-moving device, which is used to control the automatic movement and operation of the self-moving device. The functions it performs include controlling the working module to start or stop working, generating a moving path and controlling the drive device 700 to move according to the path, judging the power level of the energy module and promptly controlling the self-moving device to return to the docking station for automatic docking and charging, and executing corresponding programs based on the data from the environmental sensor.
[0113] 1 and 2 , in some embodiments, the self-propelled device includes an imaging sensor 200. The imaging sensor 200 is connected to the body 100 and is configured to capture images in the forward direction of the body 100. These images are at least partially images of the work surface in the forward direction. The captured images are within a field of view 210 of the imaging sensor 200. The imaging sensor 200 may be a camera or a laser radar commonly used in the industry.
[0114] Typically, the imaging sensor 200 is mounted near the front upper portion of the fuselage 100, preferably centered, with its viewing angle facing forward and downward to capture images of the work surface. Its field of view 210 can be adjusted based on actual needs. A larger field of view 210 captures more images in the forward direction of the fuselage 100, and vice versa. The forward direction of the fuselage 100 can be various, such as normal forward movement, backward movement, and turning. In this embodiment, the forward direction of the fuselage refers to the normal forward direction, i.e., the direction of the fuselage's central axis.
[0115] Of course, the above description is merely an example of a self-moving device, and this application does not limit the structure of the self-moving device. Specifically, an embodiment of the present application also provides another self-moving device, including a control module, an operating module, a movement module, an energy module, and a positioning module. The control module has similar functions to the control circuit 600 described above, and is used to control the automatic movement and operation of the self-moving device. The movement module has similar functions to the drive device 700 described above, and is used to drive the self-moving device to move within the working area.
[0116] The positioning module has similar functions to the position sensor 500 described above, and is used to obtain the position data of the self-mobile device. In some implementation scenarios, the positioning module can be detachably mounted on the self-mobile device or fixedly mounted on the self-mobile device.
[0117] In some implementation scenarios, the positioning module may include a satellite navigation module and at least one position sensor, wherein the satellite navigation module is used to receive positioning signals, and the position sensor is used to detect characteristics related to the position of the positioning module 24. The positioning signals may include Global Positioning System (GPS) signals, Galileo satellite navigation system signals, Beidou satellite navigation system signals, etc.
[0118] In some implementation scenarios, the positioning module is usually configured as a real-time kinematic (RTK) module, that is, positioning is achieved based on real-time kinematic measurement of RTK technology. It is understandable that, regardless of the specific positioning principle based on which the positioning module is implemented, the accuracy of its positioning result depends on the quality of the positioning signal. The higher the positioning signal quality, the more accurate the positioning result. On the contrary, the lower the positioning signal quality, the less accurate the positioning result, and even it is difficult to meet the basic positioning requirements. In actual applications, especially for positioning modules that rely on satellite navigation systems, the quality of the positioning signal is easily affected by environmental factors. For example, when the self-mobile device is in an open area without obstruction, the quality of the positioning signal of the positioning module is naturally higher. On the contrary, if the self-mobile device is blocked by trees or buildings, the signal strength of the positioning signal is very weak, and it may even make it difficult for the positioning module to receive the positioning signal. In this case, the quality of the positioning signal provided is naturally not high, and it may be difficult to meet the use requirements.
[0119] In this embodiment, the positioning module is an RTK module as an example. Since the navigation mode of the RTK module is a dead reckoning navigation mode, when the positioning signal quality does not meet the preset quality requirements, the positioning signal is still reliable within a certain period of time. Of course, its positioning accuracy will decrease with time. That is to say, when the positioning signal quality does not meet the preset quality requirements, it is believed that the positioning module can still provide an accurate position within a certain period of time.
[0120] In some implementation scenarios, the position sensor includes a motion or state sensor that detects motion parameters or state parameters. In some examples, the motion or state sensor includes an inertial navigation sensor, which may include an inertial measurement unit (IMU), an accelerometer, an odometer, a gyroscope, an attitude detection sensor, etc., for detecting the speed, acceleration, driving direction, etc. of the positioning module. The positioning module also includes a fusion processing unit, which includes at least two inputs, one of which is a positioning signal and the other is an output of the position sensor. The fusion processing unit operates on the positioning signal and the output of the position sensor and outputs data representing the position information of the positioning module.
[0121] In some embodiments, the self-mobile device may be provided with a training mode, in which the self-mobile device may draw a map of the work area. The map may include the boundaries of the work area, which may include at least one sub-area, and sub-areas may have cross-area channels. In training mode, the self-mobile device may be controlled by the user to move along the boundary and build the map, or the self-mobile device may automatically move along the boundary and build the map. In this embodiment, the map may be built based on satellite technology, visual technology, or RTK positioning technology.
[0122] In addition, the map can also be sent to the mobile device by the user's mobile terminal (such as a mobile phone, computer), a cloud server, etc.
[0123] In this embodiment, the number of maps may be at least one. Map types may include global maps and / or local maps. A global map may represent the entire working area. A local map may represent an area within a certain range around the machine.
[0124] The autonomous vehicle can be configured with an operating mode, in which it can move and / or operate based on a map. It can also plan a U-shaped movement path based on the map, operating while moving autonomously. It can also operate autonomously without operating, such as returning to a charging station. It can also be controlled to operate in place. If the autonomous vehicle encounters an obstacle, it can also move around it.
[0125] When a self-moving device encounters an obstacle, it can also mark the location of the obstacle on the map to form a "memory" to avoid collision in subsequent movements.
[0126] Because autonomous devices operate automatically, their intelligence significantly reduces user effort, making them popular with a wide range of users. However, intelligent autonomous devices still face numerous challenges. They can encounter complex and changing environments during autonomous movement. For example, dynamic obstacles like people or small animals moving across a lawn can collide with the device, and users may place temporary objects on the lawn, such as barbecue grills. These dynamic or temporary obstacles can disrupt the device's path, trapping it and preventing it from moving elsewhere, rendering it inoperable and reducing efficiency.
[0127] In order to effectively free a self-propelled device, reduce the time spent in the escape process, and improve the escape efficiency, an embodiment of the present application provides a control method applied to a self-propelled device. The self-propelled device is configured to store and update a map of a working area, the map including the boundaries of the working area, and the self-propelled device is equipped with sensors. The control method includes:
[0128] Step S1: Control the mobile device to move in the working area.
[0129] The mobile device can be controlled to move along the planned path by planning the movement path based on the map.
[0130] As shown in FIG3 , within work area 10, the mobile device performs path planning based on a map, resulting in a zigzag-shaped planned path 20. This zigzag-shaped planned path 20 may include multiple locations, such as locations A, B, C, D, and E. This is merely an example and does not necessarily mean that path 20 is limited to these locations. When the mobile device is at location A, it can sequentially move to other locations along path 20.
[0131] Step S1 may include: determining a first target position in the working area; and controlling the mobile device to move toward the first target position.
[0132] The first target location may be a location that the mobile device expects to move to. Based on path planning, a path between the current location and the first target location may be planned, and the movement of the mobile device may be controlled based on the planned path.
[0133] Alternatively, path planning may be performed first, and the first target position may be selected on the planned path.
[0134] 3 , when the self-moving device is located at position A, the first target position may be position B; when the self-moving device is located at position C, the first target position may be position E.
[0135] Step S2: Detect the position of the obstacle based on the sensor.
[0136] The sensor includes at least one of an ultrasonic sensor, a collision sensor, and a torque sensor.
[0137] The relative position relationship between the obstacle and the self-moving device can be determined based on the sensor, including the relative direction and relative distance.
[0138] An ultrasonic sensor is a type of non-contact sensor that can be installed in front of a machine (or self-moving device) and can detect obstacles located directly in front of, to the left of, or to the right of the machine. The ultrasonic sensor includes an ultrasonic transmitter module and an ultrasonic receiver module. The ultrasonic transmitter module can emit ultrasonic signals, which are reflected by obstacles. The ultrasonic receiver module can receive the ultrasonic signals reflected by the obstacles and convert them into electrical signals. The self-moving device can determine the relative position of the obstacle and the self-moving device based on the converted electrical signals. The self-moving device can also have other non-contact sensors such as infrared sensors and visual sensors to detect obstacles.
[0139] Both collision sensors and torque sensors are contact sensors.
[0140] Collision sensors can be located on the left and right sides of the mobile device and linked to the housing. When the housing collides with an obstacle, the collision sensors are triggered. If only the left collision sensor on the mobile device is triggered, the obstacle can be determined to be on the left side of the device. If only the right collision sensor on the mobile device is triggered, the obstacle can be determined to be on the right side of the device. If both the left and right collision sensors on the mobile device are triggered simultaneously, the obstacle can be determined to be in front of the device.
[0141] A torque sensor can be connected to the wheel assembly of the autonomous vehicle. When a wheel of the autonomous vehicle becomes stuck, entangled, trapped in mud, or stuck by a pebble, the wheel torque will change. The autonomous vehicle can be equipped with a left wheel torque sensor associated with the left wheel and a right wheel torque sensor associated with the right wheel. The autonomous vehicle can determine the wheel torque based on the torque sensor and determine the relative position of the obstacle and the autonomous vehicle based on the wheel torque.
[0142] For example, the position of the obstacle (one or more of the following: left front, right front, front, right rear, and left rear) can be determined based on the rotation direction, rotation speed, rotation difference, wheel torque value, and wheel torque slope of the two driving wheels. For example, when the rotation direction of the left and right driving wheels is both forward to advance the self-moving device, and the rotation speed difference between the two wheels is small, and the left wheel torque (torque) is greater than the right wheel torque (torque), the obstacle is determined to be located in the left front of the self-moving device. When the rotation direction of the left and right driving wheels is both forward to advance the self-moving device, and the rotation speed difference between the two wheels is small, and the left wheel torque (torque) is less than the right wheel torque (torque), the obstacle is determined to be located in the right front of the self-moving device. When the rotation direction of the left and right driving wheels is both forward to advance the self-moving device, and the rotation speed difference between the two wheels is small, and the left wheel torque (torque) is equal to the right wheel torque (torque), the obstacle is determined to be located in front of the self-moving device. When both the left and right driving wheels are rotating in the reverse direction to move the self-moving device backward, the difference in the rotational speeds of the two wheels is small, and the torque (torque) of the left wheel is greater than the torque (torque) of the right wheel, the obstacle is determined to be located to the left rear of the self-moving device. When both the left and right driving wheels are rotating in the reverse direction to move the self-moving device backward, the difference in the rotational speeds of the two wheels is small, and the torque (torque) of the left wheel is less than the torque (torque) of the right wheel, the obstacle is determined to be located to the right rear of the self-moving device.
[0143] Step S3: Mark the obstacle on the map according to the location of the obstacle.
[0144] In step S3, the map is a grid map, and the attributes of the corresponding grid can be marked as obstacle attributes according to the obstacle position, making it an obstacle grid, thereby marking the obstacle on the map.
[0145] In Mapping Mode, you can draw a boundary map of your work area. Static obstacles within the work area can also be marked on the boundary map, such as isolated islands within the work area, such as flower beds, trees, pool edges, and cliffs. The boundary map represents unchanging objects or environmental features within the work area. Once you have the boundary map, you can use it to plan your route based on the boundaries and static obstacles depicted in the map to avoid them.
[0146] In some embodiments, a self-mobile device can store and copy a boundary map. The copied boundary map can be superimposed on another map, and the movement and / or operation of the self-mobile device can be controlled based on the superimposed map. This does not change the original boundary map, thus avoiding control confusion / errors caused by incorrectly modifying the original boundary map. The copied boundary map can include only a portion of the boundary map (such as map information related to the boundary) or the entire boundary map.
[0147] Path planning can be performed based on the boundaries and static obstacles reflected in the map to avoid obstacles. Obstacles can be detected during movement and marked on the copied boundary map.
[0148] In some embodiments, when controlling the movement of a mobile device according to a boundary map, obstacles detected during movement may be marked on a blank grid map.
[0149] In some embodiments, the boundary map may not include map information related to obstacles.
[0150] After a task is completed by a mobile device, the map with obstacles marked in the task can be deleted; in the next task, obstacles can be re-marked during the process.
[0151] Step S3 includes:
[0152] Identify the sensor that detected the obstacle;
[0153] Determining a first number according to a detection accuracy of the sensor; wherein the higher the detection accuracy, the smaller the first number;
[0154] According to the locations of the obstacles, the first number of grids in the map are marked as obstacle grids.
[0155] The mobile device can also detect the location of dynamic obstacles / temporary obstacles in real time and mark them on the map.
[0156] The number of grids that need to be marked on the map can be determined based on the detection accuracy of the sensor.
[0157] For example, the ultrasonic sensor has high detection accuracy and can detect three directions of the machine: left front, front, and right front. It can divide the area within a certain distance in front of the machine into three equal parts, and the number of grids corresponding to each part is small.
[0158] As shown in Figure 4, f1 is the grid marking range corresponding to the ultrasonic sensor, f2 is the grid marking range corresponding to the collision sensor, and f3 is the grid marking range corresponding to the torque sensor. Each of the regions f1, f2, and f3 in the figure includes multiple grids. If the ultrasonic sensor detects an obstacle directly ahead, the grid in the middle region of f1 can be marked as an obstacle grid. If the collision sensor detects an obstacle to the left, the grid in the left region of f2 can be marked as an obstacle grid. If the collision sensor detects an obstacle to the right rear, the grid in the right rear region of f3 can be marked as an obstacle grid.
[0159] Step S4: When the self-mobile device moves into the dilemma area, based on the map, the self-mobile device is controlled to move through the opening position of the dilemma area and leave the dilemma area; wherein the dilemma area is an area that limits the movement range of the self-mobile device, and the dilemma area has at least one dilemma object, and the dilemma object includes a dilemma obstacle and / or a dilemma boundary.
[0160] Difficulty zones can restrict the range of movement of a mobile device, making it difficult for the device to escape. Difficulty zones can include difficult obstacles and / or difficult boundaries. Difficulty obstacles can include static obstacles (such as isolated islands or trees), dynamic obstacles (such as movable people or animals), or temporary obstacles temporarily set up by the user. Difficulty boundaries can also be part of the work area boundary.
[0161] When a mobile device moves into a predicament area, it can represent a state of the mobile device. The predicament area can be reflected in the program, and the mobile device can determine whether the mobile device is in the state of moving into the predicament area by comparing certain parameters / conditions. For example, when it is impossible to search for a path (it is impossible to plan a passable path), or the area is too narrow and it cannot be left within the preset time, or it is close to surrounding obstacles, etc.; when certain conditions are met, the state of the mobile device is determined to be in the predicament area.
[0162] Whether the mobile device has moved into a difficult area can be determined based on the path planning result of the mobile device. When a navigable path to the target location cannot be planned, the mobile device can be considered to be in a difficult area.
[0163] Exemplarily, the control method further includes: when a first path cannot be obtained based on map planning, the self-mobile device determines that it has moved into a difficult area, and the first path represents a navigable path between the self-mobile device and the first target location.
[0164] In some embodiments, when the first path cannot be obtained based on map planning, determining that the mobile device has moved into a difficult area includes:
[0165] Planning a first path between the mobile device and the first target location based on the map;
[0166] If planning fails, it is determined that the self-mobile device has moved into the difficult area;
[0167] The control method further includes: if the first path is successfully planned, controlling the mobile device to move toward the first target location according to the first path.
[0168] The first target position may be a position determined during normal movement of the mobile device, to which the mobile device needs to move during normal movement. The first target position may be located in front of the mobile device (not limited to directly in front).
[0169] As shown in Figure 5 , the first target location is location G1. When the mobile device is at location T1, it plans path 21. While moving along path 21, obstacle N1 is detected at location T2. Obstacle N1 prevents the mobile device from reaching location G1 along path 21, so the mobile device needs to plan an alternative path. It can first attempt to plan a path around obstacle N1 by bypassing it. During the bypassing process, obstacle N2 is detected at location T3, and the corresponding planned path cannot reach location G1. It can then attempt to plan another path, but obstacle N3 is detected again at location T4, and the corresponding planned path also cannot reach location G1. The mobile device continues to tentatively plan a path to the left, but boundary 10 again blocks its movement. Similarly, boundary 10 on the right also blocks the mobile device. After multiple attempts, the mobile device determines that it cannot plan a navigable path to the first target location G1, and determines that it has moved into a difficult area.
[0170] As shown in Figure 5, if the detection range and accuracy of the sensor are large enough, the self-moving device can also detect obstacles N1, N2 and N3 at position T1, and perform multiple path planning in combination with the map. If it is determined that a passable path to the first target position G1 cannot be planned, the self-moving device determines that it has moved into a difficult area.
[0171] As shown in Figure 6, the first target position is position G2. The self-moving device moves based on path 22, passes through position K smoothly and continues to move forward. Subsequently, the self-moving device finds itself trapped and surrounded by multiple obstacles, such as obstacle H. Even position K, which the device originally moved through, is also surrounded by obstacles (such as people or small animals). Therefore, the self-moving device cannot plan a path to position G2, and the self-moving device determines that it has moved into a difficult area.
[0172] In addition, based on the map, the distribution positions of the self-moving device and obstacles on the map can be determined, and based on the relative position relationship between the self-moving device and the surrounding obstacles, it can be judged whether the obstacles around the self-moving device form a dilemma area, or whether the area is a dilemma area; if so, it means that the self-moving device has moved into the dilemma area.
[0173] When a mobile device moves into a difficult area, if it cannot escape in time, the movement or work efficiency will be reduced, and the work task cannot be completed according to the user's time requirements, which will bring a very poor user experience.
[0174] The inventors of this application creatively discovered that the so-called difficult areas are often not completely without navigable paths. However, since the location of obstacles may change, the self-mobile device cannot promptly determine whether the previously detected obstacles still exist. The device will assume that the detected obstacles always exist, causing it to "stand still" and use old perception information / old maps to find the current way out.
[0175] Alternatively, the mobile device may have made an error when marking the obstacle on the map, or marked the obstacle too large, and the passable location on the map was mistakenly marked as an obstacle, making it impossible to find an area that can accommodate the aircraft, and thus unable to escape.
[0176] After careful consideration, the inventors of this application believe that, based on a map, the self-moving device can be controlled to escape from an opening in a difficult area, and the self-moving device can be controlled to move through the opening in a difficult area and leave the difficult area.
[0177] Illustratively, the opening position includes an entrance position when the mobile device enters the difficult area.
[0178] Illustratively, the opening location is located on a historical path of the self-moving device.
[0179] This embodiment can control the self-moving device to escape from trouble in a timely and effective manner, thereby improving movement / work efficiency.
[0180] In some embodiments, when the first path cannot be obtained based on map planning, determining that the mobile device has moved into a difficult area includes:
[0181] Planning a first path between the mobile device and the first target location based on the map;
[0182] If planning fails, it is determined that the self-mobile device has moved into the difficult area;
[0183] The control method further includes: if the first path is successfully planned, controlling the mobile device to move toward the first target location according to the first path.
[0184] In some embodiments, based on the map, controlling the mobile device to move through an opening position of the difficult area and leaving the difficult area includes:
[0185] Obtain historical traces from mobile devices;
[0186] Determine the opening location based on maps and historical traces;
[0187] Control the self-moving device to move through the opening position and out of the difficult area.
[0188] The opening position may be a position having a traversable path to other positions outside the dilemma area. In this embodiment, the opening position may be determined based on the historical trajectory.
[0189] In some embodiments, determining the opening location based on a map and historical trajectories includes:
[0190] obtaining a second target position, the second target position being outside the dilemma area;
[0191] Select a reference position in the historical trajectory;
[0192] Based on the map, a navigable path is planned between the reference location and the second target location;
[0193] If the planning is successful, the reference position is determined as the opening position.
[0194] The second target position may be a position at a certain distance from the self-moving device, and the second target position is located in the working area.
[0195] For example, the second target location may be a cross-region transition point, a location where the mobile device was located a certain period of time ago, or the like.
[0196] The reference location can be any location in the historical trajectory. You can traverse the locations in the historical trajectory and search for each location to determine whether there is a traversable path between it and the second target location. This method may take a long time.
[0197] In order to reduce the total time of searching for a route, the position points in the historical trajectory can be taken at intervals. For example, one point every 100 is taken as a reference position, and then the route is searched for the position points obtained by taking the intervals.
[0198] In order to further reduce the total search time, certain conditions can be set and the locations that meet the conditions in the historical trajectory can be used as reference locations, thereby greatly reducing the number of reference locations and reducing the total search time.
[0199] In some embodiments, selecting a reference position in a historical trajectory includes:
[0200] Based on the map, determine the intersection of the dilemma obstacle and the historical trajectory;
[0201] The intersection position is determined as a reference position.
[0202] After creative thinking, the inventors of this application concluded that the historical trajectory represents the path a mobile device took into a difficult area. Since a mobile device can enter a difficult area based on the historical trajectory, it can also escape from the difficult area based on the historical trajectory. Therefore, the question that must be answered is which point on the historical trajectory can serve as the escape point.
[0203] In order to reduce the total path search time and improve the accuracy of the opening position, the intersection position of the difficult obstacle and the historical trajectory can be determined as the reference position.
[0204] As shown in Figure 7, the first target position is position G3. When the self-moving device moves towards position G3, it detects an obstacle (such as obstacle H), and then changes the moving path, trying to bypass the obstacle and reach position G3. However, after multiple attempts, it still fails and can only be confined to the dilemma area, such as state T6; the historical trajectory of the self-moving device is shown in trajectory 24. Obstacles L and K in Figure 7 are obstacles detected after the self-moving device moves through the corresponding positions. For example, obstacle L is detected when the self-moving device is in state T6.
[0205] In order to reduce the total search time and quickly escape from the predicament, the intersection position of the historical path and the obstacle can be selected as the reference position; as shown in Figure 7, the second target position is position J, and the first intersection position obtained according to the historical trajectory and the obstacle position is position p1. It is judged whether the path between position p1 and position J can be successfully searched; if the judgment result is no, the second intersection position p2 is obtained, and the path between position p2 and position J cannot be successfully searched; the third intersection position p3 is obtained, and the path between position p3 and position J cannot be successfully searched; the fourth intersection position p4 is obtained, and the path between position p4 and position J can be successfully searched; then position p4 is used as the opening position.
[0206] After finding the opening position, the self-moving device can turn and move to the opening position along the reverse historical trajectory. Alternatively, it can turn and move directly in the direction of the opening position.
[0207] In some embodiments, obtaining a historical trajectory from a mobile device includes:
[0208] When the mobile device is located in the dilemma area and the space formed by the dilemma object is available for the mobile device to rotate, a historical trajectory of the mobile device is obtained.
[0209] A prerequisite for the mobile device to move toward the opening is that the difficult area has sufficient space for the mobile device to turn. Whether the mobile device can turn can be determined by determining the distance between the mobile device and the obstacle. For example, if the distance between the mobile device and the obstacle is greater than a distance threshold, it indicates that the mobile device can turn. The historical trajectory is then further obtained, and the opening position is determined based on the historical trajectory, and the mobile device then turns and moves toward the opening.
[0210] In some embodiments, controlling the self-moving device to move through the opening position and out of the difficult area includes:
[0211] When there is a difficult obstacle within the opening range on the map, clear the difficult obstacle within the opening range on the map to obtain a cleared map, and the distance between the position within the opening range and the opening position is less than a threshold;
[0212] Based on the cleared map, a navigable path is planned between the self-mobile device and a third target location, where the third target location is outside the difficult area.
[0213] If the planning is successful, a first planned path is obtained, and the self-mobile device is controlled to move through the opening position according to the first planned path and leave the difficult area.
[0214] After creative thinking, the inventors of this application believe that since the self-moving device performs path planning based on a map, obstacle K may prevent the self-moving device from planning a traversable path between the self-moving device and a location outside the dilemma area. Therefore, the inventors can first remove obstacle K from the map and mark the corresponding obstacle grid on the map as grass grid, traversable grid, or drivable grid; then, they can perform path planning between the self-moving device and the third target location.
[0215] The third target location may be any location outside the dilemma area and within the working area, or the third target location may be the same as or different from the second target location, or the third target location may be a location within the working area at a certain distance from the self-moving device.
[0216] As shown in Figure 7, the self-moving device can determine that position p4 is the opening position, and then the self-moving device can determine based on the map that there is an obstacle K near the opening position (opening range), and the obstacle K will hinder the movement of the self-moving device; the third target position can be the second target position, that is, position J; the obstacle K can be cleared, and then a passable path between the current position state T6 of the self-moving device and position J can be planned based on the map, and the passable path passes near the opening position p4; then the self-moving device is controlled to move based on the planned path, moves past the opening position p4 and leaves the difficult area.
[0217] In some embodiments, clearing difficult obstacles within an opening range on a map includes:
[0218] Determine a target type corresponding to the difficult obstacle, where the target type represents the type of sensor that detects the difficult obstacle;
[0219] Obtain the obstacle clearance priority, which represents the obstacle clearance order corresponding to different sensor types;
[0220] Determine the difficult obstacles to be cleared based on the clearance priority;
[0221] Clear the difficult obstacles within the opening range on the map.
[0222] When clearing obstacles at an opening on the map, there may be multiple obstacles with different attributes near the opening (opening range), or the same obstacle may have different attributes at the same time. The attributes here correspond to the type of sensor that detects the obstacle.
[0223] You can set obstacle clearance priorities for obstacles and try to plan paths with minimal changes to the map, so as to avoid clearing existing obstacles and avoid collisions.
[0224] In some embodiments, the obstacle clearance priority corresponding to the contactless sensor is higher than the obstacle clearance priority corresponding to the contact sensor.
[0225] Since ultrasonic sensors are non-contact sensors, the obstacles they detect are most likely moving people or animals. Although an obstacle was detected at that location before, it is likely to have moved. Therefore, obstacles detected by the ultrasonic sensor can be cleared from the map first.
[0226] Exemplarily, the priority corresponding to the ultrasonic sensor is higher than the priority of the collision sensor, and the priority of the collision sensor is higher than the priority of the torque sensor.
[0227] As shown in Figure 8, obstacles M1, M2, and M3 are located near opening position p4. Obstacle M1 is detected by the collision sensor; obstacle M2 is detected by the ultrasonic sensor; and obstacle M3 is detected by the torque sensor. Obstacle M2 can be removed first, and a path can be planned between the self-moving device and the third target location. If this fails, obstacle M1 is removed based on priority, and path planning is repeated between the self-moving device and the third target location. If this still fails, obstacle M3 is removed. If this succeeds, the device can continue along the planned path without removing obstacle M3.
[0228] In some embodiments, if a navigable path between the self-moving device and the second target location cannot be successfully planned, controlling the self-moving device to move to the opening position;
[0229] After moving to the opening position, planning an exit path from the difficult area;
[0230] If the planning is successful, controlling the autonomous moving device according to the departure path;
[0231] If the planning fails, the mobile device is controlled to send a reminder message.
[0232] While moving toward the opening and getting out of trouble, the device can still detect obstacles, update the map, and control the movement of the self-moving device based on the latest map.
[0233] For example, if after moving to the vicinity of the opening position p4, a real obstacle is detected based on the sensor, it means that the self-mobile device cannot pass near the opening position p4; then you can first move to the vicinity of the opening position p4, and then try to turn and / or search for a path; if a passable path still cannot be planned, the self-mobile device will send a reminder message, such as voice / light / APP reminder, etc.
[0234] In some embodiments, when the self-moving device is located in a dilemma area and the space enclosed by the dilemma objects is not available for the self-moving device to rotate, the self-moving device is controlled to move backward.
[0235] When the self-moving device finds that the distance to the surrounding obstacles is very close, it can be determined that it cannot rotate at the moment and can directly move back.
[0236] For example, when the mobile device detects that the distances to the obstacles / boundaries on the left and right sides are very close, it may directly retreat.
[0237] As shown in Figure 9, the obstacle is very close to the autonomous machine. In Figure 10, the obstacle is in front of the machine, and the left and right sides are boundaries. In both Figures 9 and 10, the machine cannot turn and can only move backward.
[0238] In some embodiments, based on the map, controlling the mobile device to move through an opening position of the difficult area and leaving the difficult area includes:
[0239] Identify target obstacles;
[0240] Determine the opening location based on the map and the location of the target obstacle;
[0241] Control the self-moving device to move through the opening position and out of the difficult area.
[0242] In some embodiments, the opening position may not be determined based on historical trajectories. An obstacle that meets the requirements may be used as a target obstacle. Based on a map, a plan is made to determine whether there is a traversable path between a location near the target obstacle and a second target location (path search). If the path search is successful, the location near the target obstacle is used as the opening position.
[0243] For example, if an obstacle was detected some time ago, the obstacle can be used as a target obstacle; or, if the obstacle detection results at the same location are different at different time points, for example, from no obstacle detected to detected obstacle, the obstacle can be used as a target obstacle.
[0244] In some embodiments, when the positioning accuracy of the self-moving device is less than the accuracy threshold, the self-moving device is controlled to move according to the actual detection result.
[0245] For example, if the machine drives into the shade of trees or next to a house, the GPS / RTK signal may be inaccurate. Or if the machine moves in a dimly lit environment, the visual signal may be inaccurate.
[0246] When the positioning accuracy of the mobile device decreases, the actual location of the mobile device may differ from the location set on the map. As a result, the mobile device may not be able to avoid actual obstacles when moving according to the map plan. In this case, the movement of the mobile device can be controlled based on the actual obstacles detected, and the actual obstacles can still be marked on the map.
[0247] In order to effectively free a self-moving device, reduce the time spent in the escape process, and improve the escape efficiency, the embodiment of the present application also provides a control method. It should be noted that the following embodiment focuses on the differences from the previous embodiment. For similarities, please refer to the description of the previous embodiment, which will not be repeated here. Specifically, the control method provided in this embodiment is applied to a self-moving device, which is equipped with a sensor. The control method includes:
[0248] Step S10: Acquire a map of the working area, where the map is updated based on the obstacles detected by the sensor.
[0249] As mentioned above, in some embodiments, the self-mobile device can be provided with a training mode, in which the self-mobile device can draw a map of the working area and store it in the memory. Furthermore, when it is necessary to obtain a map of the working area, it can be quickly and conveniently obtained from the memory. In the training mode, the self-mobile device can be controlled by the user to move along the boundary and build a map, or the self-mobile device can automatically move along the boundary and build a map. In this embodiment, the map can be built based on satellite technology, visual technology or RTK positioning technology. The map may include the boundary of the working area, the working area may include at least one sub-area, and there may be cross-region channels between the sub-areas.
[0250] In other embodiments, the map may also be stored in a user's mobile terminal (such as a mobile phone, a computer), a cloud server, etc., and the mobile device may obtain a map of the work area by communicating with the user's mobile terminal or the cloud server.
[0251] In this embodiment, the number of maps may be at least one. Map types may include global maps and / or local maps. A global map may represent the entire working area. A local map may represent an area within a certain range around the machine.
[0252] In this embodiment, the map may be updated based on obstacles detected by sensors.
[0253] In some implementation scenarios, when a self-mobile device moves in a work area, the location of obstacles can be detected based on sensors, and then the obstacles can be marked on a map based on the locations of the obstacles, thereby updating the map.
[0254] In some implementation scenarios, the sensor may include at least one of an ultrasonic sensor, a collision sensor, and a torque sensor.
[0255] In some implementation scenarios, the map is a grid map. After determining the location of an obstacle, the attributes of the corresponding grid in the map can be marked as obstacle attributes based on the obstacle location, making it an obstacle grid, thereby marking the obstacle on the map. Specifically, in some implementation scenarios, updating the map based on obstacles detected by sensors includes: determining the sensor that detected the obstacle; determining a first number based on the detection accuracy of the sensor; wherein the higher the detection accuracy, the smaller the first number; and marking the first number of grids in the map as obstacle grids based on the location of the obstacle.
[0256] Of course, the self-mobile device can also detect the location of dynamic obstacles / temporary obstacles in real time and mark them on the map to update the map.
[0257] It should be noted that, for the relevant descriptions about sensors, detecting obstacle positions based on sensors, and marking obstacles on the map according to the obstacle positions, reference can be made to the descriptions in the aforementioned embodiments, and no further details are given.
[0258] After a task is completed by a mobile device, the map with obstacles marked in the task can be deleted; in the next task, obstacles can be re-marked during the process.
[0259] In addition, it should be noted that in this embodiment, only the marking of obstacles detected during movement is described to achieve map update. However, in actual operation, the map can also be updated based on other scenarios. For example, when an area in the working area changes from passable to impassable, the user can update the map by operating on the area. This application does not limit this.
[0260] Step S12: Control the self-moving device to move in the working area.
[0261] In this embodiment, after obtaining a map of the work area, the mobile device can be controlled to move within the work area based on the work map. Specifically, after obtaining the map of the work area, a movement path of the mobile device can be planned based on the map, and the mobile device can be controlled to move according to the planned path.
[0262] In some embodiments, controlling the movement of the mobile device within the work area may include: determining a first target location within the work area; and planning a first path between the mobile device and the first target location based on a map. The first target location may be a location to which the mobile device is expected to move.
[0263] In some implementation scenarios, if a path between the mobile device and the first target location is successfully planned based on the map, the mobile device is controlled to move toward the first target location based on the planned path.
[0264] In some implementation scenarios, if a path cannot be planned between the self-mobile device and the first target location (i.e., path planning fails), it is considered that the self-mobile device has moved into a dilemma area. The dilemma area represents an area that limits the range of movement of the self-mobile device. The dilemma area can be formed by at least one dilemma object. The dilemma object includes a dilemma obstacle and / or a dilemma boundary. The dilemma obstacle may include a static obstacle (such as an island / tree), a dynamic obstacle (such as a movable person / animal), or a temporary obstacle temporarily set by the user. The dilemma boundary may be at least a part of the boundary of the working area.
[0265] It should be noted that, for the relevant description on determining whether the area where the mobile device is located is a distress area, reference may be made to the description in the aforementioned embodiment, and no further elaboration is given.
[0266] In this embodiment, when the self-moving device is controlled to move in the working area, by judging whether a path to the target location can be planned, it can be quickly determined whether the self-moving device is trapped.
[0267] When a self-mobile device moves into a difficult area and cannot escape in time, the movement or work efficiency will be reduced, and the work task cannot be completed according to the user's time requirement, which brings a very poor experience to the user. For this reason, the inventors of this application creatively discovered that the so-called difficult area is often not a place where there is no traversable path at all, but because the position of the obstacle may change, the self-mobile device cannot timely determine whether the obstacle detected before still exists, and the device will assume that the detected obstacle always exists, causing it to "stand still" and use old perception information / old map to find the current way out. Or, because the self-mobile device made an incorrect mark when marking the obstacle on the map, or marked the obstacle too large, the traversable location on the map was mistakenly marked as an obstacle, resulting in the inability to find an area that can accommodate the passage of the fuselage, and thus unable to escape.
[0268] Based on this, the inventors of this application have considered that, when determining that a mobile device has entered a difficult area, they can process the difficult obstacles marked on a map and, based on the processed map, plan a path for the mobile device to leave the difficult area, thereby controlling the mobile device to leave the difficult area. Accordingly, the control method further includes:
[0269] Step S14: In response to the self-mobile device moving into the dilemma area, the marks of at least a portion of the dilemma obstacles on the map are cleared to obtain a map after the obstacles are cleared; wherein, the dilemma area represents an area that limits the moving range of the self-mobile device, and the dilemma area is formed by at least one dilemma object, and the dilemma object includes a dilemma obstacle and / or a dilemma boundary.
[0270] Step S16: planning a path for the mobile device to leave the difficult area based on the map after clearing obstacles.
[0271] In this embodiment, when it is determined that the mobile device has moved into a difficult area, the markings of at least a portion of the difficult obstacles on the map are cleared, and a path for the mobile device to leave the difficult area is planned based on the map after the obstacles are cleared.
[0272] After creative thinking, the inventors of this application concluded that since a mobile device can enter a difficult area, there must be an exit location at the time of entry. Therefore, based on this exit location, after removing some difficult obstacle markers from the map, a path for the mobile device to exit the difficult area can be planned. The exit location includes the location of the entrance to the difficult area when the mobile device enters. The exit location can be located on the historical trajectory of the mobile device.
[0273] Accordingly, in some embodiments, in response to the self-mobile device moving into the dilemma area, the marks of at least a portion of the dilemma obstacles on the map are cleared to obtain a map after the obstacles are cleared, including: in response to the self-mobile device moving into the dilemma area, determining the opening position when the self-mobile device enters the dilemma area based on at least the map; clearing the marks of the dilemma obstacles within the opening range on the map to obtain a map after the obstacles are cleared.
[0274] In this embodiment, the opening position can be determined based on the historical trajectory. Specifically, the historical trajectory of the mobile device can be obtained and the opening position can be determined based on the map and the historical trajectory.
[0275] In some implementation scenarios, determining the opening location based on a map and historical trajectory includes: obtaining a second target location; selecting a reference location in the historical trajectory; planning a path between the reference location and the second target location based on the map; and if the planning is successful, determining the reference location as the opening location. The second target location is located outside the dilemma area. The second target location can be a location at a certain distance from the self-moving device, and the second target location is located in the working area. Preferably, the second target location is the same location as the first target location or the second target location is located near the first target location. The reference location can be any location in the historical trajectory. Exemplarily, the location points in the historical trajectory can be traversed, and a path search can be performed for each location point to determine whether a path can be successfully planned between it and the second target location. It should be noted that since determining the reference location by traversal takes a long time, in order to reduce the total path search time, the location points in the historical trajectory can be selected at intervals, for example, one point every 100 points can be selected as a reference location, and the path search can then be performed on the location points obtained by the interval selection.
[0276] However, although determining the reference position by taking points at intervals as described above can reduce the total time of searching for a path to a certain extent, it still takes a long time.
[0277] Therefore, after creative thinking, the inventors of this application concluded that the historical trajectory represents the path that a mobile device took into a difficult area. Since a mobile device can enter a difficult area based on the historical trajectory, it can also escape from the difficult area based on the historical trajectory. Therefore, it is necessary to determine which point on the historical trajectory can serve as the escape point.
[0278] Based on this, in order to reduce the total search time and improve the accuracy of the opening position, the intersection position of the difficult obstacle and the historical trajectory can be determined based on the map, and then the intersection position can be determined as the reference position. It should be noted that the scenario of determining the intersection position of the difficult obstacle and the historical trajectory as the reference position can be referred to the description of the previous embodiment and will not be repeated here.
[0279] In some implementation scenarios, before obtaining the historical trajectory of the mobile device, it can include: determining whether the space formed by the dilemma object is available for the mobile device to rotate, and obtaining the historical trajectory when the space formed by the dilemma object is available for the mobile device to rotate.
[0280] A prerequisite for a mobile device to escape a difficult area is that the area has sufficient space for the mobile device to turn. Therefore, before acquiring historical trajectories, the distance between the mobile device and the obstacle can be determined to determine whether the mobile device can turn. For example, if the distance between the mobile device and the obstacle is greater than a distance threshold, it indicates that the mobile device can turn. In this case, the historical trajectories can be acquired, and the exit position can be determined based on the historical trajectories, thereby controlling the mobile device to escape from the difficult area through the exit position.
[0281] In some implementations, when a mobile device is located in a difficult area and the space enclosed by the difficult object is not suitable for the mobile device to rotate, the mobile device can be controlled to retreat. For example, if the mobile device is very close to surrounding obstacles / boundaries, it can be determined that rotation is currently impossible and the mobile device can retreat directly.
[0282] It should be understood that determining that the mobile device has entered the predicament area indicates that the mobile device is unable to plan a path to the first target location at this time. In other words, an obstacle that was later marked appeared on the historical trajectory of entering the predicament area. The obstacle is an obstacle that was detected after the mobile device moved through the corresponding position. Therefore, even based on the historical trajectory of the mobile device entering the predicament area, it is impossible to escape from the predicament area. In other words, even if the mobile device is controlled to return along the historical path, it is impossible to escape from the predicament area.
[0283] To this end, after creative thinking, the inventors of this application believe that after determining the opening position of the self-moving device when entering the dilemma area, the dilemma obstacles within the opening range on the map can be cleared, and the self-moving device can be controlled to escape from the opening position of the dilemma area based on the map after the obstacles are cleared. As shown in Figure 7, obstacle K will make it impossible to plan a passable path between the self-moving device and the location outside the dilemma area. Therefore, the obstacle K can be cleared on the map first, and the corresponding obstacle grid on the map can be marked as a grass grid / passable grid / drivable grid. Then, the path for the self-moving device to leave the dilemma area can be planned, and the self-moving device can be controlled to escape from the opening position of the dilemma area.
[0284] In some implementation scenarios, the marks of the difficult obstacles within the opening range on the map are cleared to obtain the map after the obstacles are cleared, including: determining the target type corresponding to the difficult obstacles within the opening range; obtaining the obstacle clearance priority, the obstacle clearance priority representing the obstacle clearance order corresponding to different target types; according to the obstacle clearance priority, clearing the mark of the difficult obstacle with the highest priority within the opening range on the map to obtain the map after the obstacles are cleared.
[0285] The opening range can be determined based on the distance between a position within the opening range and the opening position. For example, the distance between any position within the opening range and the opening position is less than a preset threshold. In addition, the opening range can also be determined based on other conditions. For example, the opening range can be determined based on the size of the self-moving device. Such a determined opening range can ensure that the self-moving device can pass through smoothly. Of course, the method for determining the opening range is not limited to the above description. The preset threshold can be set according to the actual scenario, and this application does not limit this.
[0286] Target types can be understood as attributes.
[0287] The obstacle clearance priority can be determined based on preset information, including but not limited to the type of sensor that detected the obstacle, the obstacle marking time, and the overlap between the mobile device and the obstacle when the obstacle was detected.
[0288] In some implementation scenarios, when clearing obstacles at the opening position on the map, since there may be multiple obstacles with different attributes near the opening position (opening range), or the same obstacle may have different attributes at the same time, it is necessary to first determine the attributes corresponding to the difficult obstacles within the opening range.
[0289] Since path planning is performed with minor changes to the map, it is possible to avoid clearing existing obstacles and avoid collisions. In some implementation scenarios, obstacle clearance priorities can be set for obstacles. In this way, after determining the corresponding attributes of the difficult obstacles within the opening range, the obstacle clearance priority can be obtained, and the difficult obstacles within the opening range on the map can be cleared in sequence according to the obstacle clearance priority.
[0290] Preferably, in this embodiment, the target type represents the type of sensor that detects the difficult obstacle; and the obstacle clearance priority represents the obstacle clearance order corresponding to different sensor types.
[0291] In some implementations, the obstacle clearance priority for non-contact sensors is higher than that for contact sensors. For example, the obstacle clearance priority for ultrasonic sensors is higher than that for collision sensors, which in turn is higher than that for torque sensors. Specifically, since ultrasonic sensors are non-contact sensors, obstacles they detect are likely moving people or animals. Although an obstacle was previously detected at that location, it is likely to have moved. Therefore, obstacles detected by ultrasonic sensors can be cleared from the map first.
[0292] In this embodiment, after clearing the mark of the highest priority difficult obstacle within the opening range on the map according to the obstacle clearance priority, a path for the mobile device to leave the difficult area can be planned based on the map after the obstacles are cleared.
[0293] Specifically, in some implementation scenarios, after clearing the mark of the highest priority difficult obstacle within the opening range on the map, a path for the self-mobile device to leave the difficult area is planned based on the map after the obstacles are cleared, including: obtaining a third target position; planning a path between the self-mobile device and the third target position based on the map after the obstacles are cleared; if the planning is successful, controlling the self-mobile device to leave the difficult area according to the planned path. In some implementation scenarios, if the planning fails, further clear the mark of the second highest priority difficult obstacle within the opening range on the map; and plan the path between the self-mobile device and the third target position again based on the map after the obstacles are cleared. The third target position can be any position outside the difficult area and within the working area. The third target position can be a position in the working area that is a certain distance away from the self-mobile device. The third target position can be the same as or different from the first target position. Preferably, the third target position is the same position as the first target position or the third target position is located near the first target position.
[0294] In some implementation scenarios, after clearing the mark of the second-highest priority difficult obstacle within the opening range on the map, if a path between the mobile device and the third target location is successfully planned based on the map after clearing the obstacles, the mobile device is controlled to leave the difficult area according to the planned path; if the path between the mobile device and the third target location cannot be planned, it is further confirmed whether the marks of the difficult obstacles within the opening range on the map have all been cleared.
[0295] If the marks of all the difficult obstacles within the opening range on the map are cleared, then based on the map, all the marks of other difficult obstacles in the difficult area on the map are cleared, and then based on the map after clearing the obstacles, a path between the mobile device and the first target location is planned.
[0296] Since a traversable path between the mobile device and the first target location can be planned after all the marks of other dilemma obstacles in the dilemma area on the map are cleared, the mobile device can be controlled to move toward the first target location according to the planned path after all the marks of other dilemma obstacles in the dilemma area on the map are cleared.
[0297] Because the path to the first target location is planned after all obstacles in the predicament area have been cleared, obstacles are likely to be detected again while the self-moving device is being controlled to move toward the first target location. To improve the success rate of the self-moving device's escape, in this embodiment, if an obstacle is detected again while the self-moving device is being controlled to move toward the first target location, the location of the obstacle is re-marked on the map; the size of the re-marked obstacle area is smaller than the area marked before the obstacle was cleared.
[0298] In some implementations, while the mobile device is moving toward the first target location, if the size of the newly marked obstacle area is smaller than the size of the area marked before the obstacle was cleared, and the mobile device still cannot move to the first target location, the mobile device is controlled to issue a reminder message, thereby causing the mobile device to report an error or shut down. Methods for issuing reminder messages include, but are not limited to, voice, light, or app notifications.
[0299] The above embodiment describes that when a mobile device moves into a dilemma area, the opening position of the mobile device when entering the dilemma area is determined based on a map, and then the dilemma obstacles within the opening range on the map are cleared, and the mobile device is controlled to escape from the opening position of the dilemma area according to the map after the obstacles are cleared.
[0300] After creative thinking, the inventor of this application believes that when a mobile device moves into a predicament area, in addition to being able to escape using the above-mentioned method, it is also possible to directly clear the marks of all predicament obstacles in the predicament area on the map and control the mobile device to escape from the opening position of the predicament area.
[0301] Specifically, in other embodiments, in response to the mobile device moving into the difficult area, clearing at least a portion of the difficult obstacle markers on the map to obtain a map after the obstacles are cleared includes: in response to the mobile device moving into the difficult area, based on at least the map, clearing all difficult obstacle markers on the map within the difficult area to obtain a map after the obstacles are cleared. Furthermore, a path for the mobile device to leave the difficult area can be planned based on the map after the obstacles are cleared.
[0302] In some implementation scenarios, after planning a path for the mobile device to leave the difficult area based on the map after clearing obstacles, the method includes:
[0303] Based on the planned path, the self-moving device is controlled to leave the difficult area; wherein, during the process of leaving the difficult area, if an obstacle is detected again, the position of the obstacle is re-marked on the map; wherein the size of the area of the re-marked obstacle is smaller than the size of the area marked before the obstacle was cleared.
[0304] Because the path to the first target location is planned after all obstacles in the predicament area have been cleared, obstacles are likely to be detected again while the self-moving device is being controlled to move toward the first target location. To improve the success rate of the self-moving device's escape, in this embodiment, if an obstacle is detected again while the self-moving device is being controlled to move toward the first target location, the location of the obstacle is re-marked on the map; the size of the re-marked obstacle area is smaller than the area marked before the obstacle was cleared.
[0305] The above embodiment describes a method where, when a mobile device moves into a difficult area, all obstacles within the difficult area are directly cleared based on a map. Then, based on the cleared map, the mobile device is controlled to escape from the difficult area through an opening. Because the location of the opening when the mobile device enters the difficult area does not need to be determined, the efficiency of escaping the difficult area can be improved.
[0306] Based on the same inventive concept, an embodiment of the present application further provides a control device, applied to a self-moving device, wherein the self-moving device is configured to store and update a map of the working area, wherein the map includes a boundary of the working area, and the self-moving device is provided with a sensor; the control device comprises:
[0307] A first control module is configured to control the self-moving device to move in the working area;
[0308] a detection module, configured to detect a position of an obstacle based on the sensor;
[0309] a map marking module, configured to mark obstacles on the map according to the locations of the obstacles;
[0310] The second control module is configured to control the self-moving device to move through an opening position of the dilemma area and leave the dilemma area based on the map when the self-moving device moves into the dilemma area; wherein the dilemma area is an area that limits the movement range of the self-moving device, and the dilemma area has at least one dilemma object, and the dilemma object includes a dilemma obstacle and / or a dilemma boundary.
[0311] In addition, based on the same inventive concept, an embodiment of the present application further provides a control device, which is applied to a self-moving device, wherein the self-moving device is provided with a sensor, and the control device includes:
[0312] an acquisition module configured to acquire a map of a working area, wherein the map is updated based on obstacles detected by the sensor;
[0313] A control module configured to control the self-moving device to move in the working area;
[0314] a clearing module configured to, in response to the self-mobile device moving into a dilemma area, clear marks of at least a portion of the dilemma obstacles on the map, thereby obtaining a map after the obstacles are cleared; wherein the dilemma area represents an area limiting the range of movement of the self-mobile device, the dilemma area is formed by at least one dilemma object, and the dilemma object includes a dilemma obstacle and / or a dilemma boundary;
[0315] The planning module is configured to plan a path for the mobile device to leave the difficult area based on the map after the obstacles are cleared.
[0316] In addition, based on the same inventive concept, an embodiment of the present application further provides a computer-readable storage medium, which stores a computer program for executing the above-mentioned control method.
[0317] In addition, based on the same inventive concept, an embodiment of the present application further provides a self-moving device, including:
[0318] processor;
[0319] a memory for storing processor-executable instructions;
[0320] A processor is used to execute the above control method.
[0321] It should be noted that the implementation solutions provided by the above-mentioned apparatus, computer-readable storage medium, and mobile device for solving the problem are similar to the implementation solutions described in the above-mentioned method. The specific implementation methods can refer to the description of the above-mentioned method embodiments and will not be repeated here.
[0322] Based on the same inventive concept, the embodiment of the present application also provides a method for automatically escaping from a difficult position for a self-moving device, which can be applied to various working scenarios of self-moving devices. In conjunction with FIG11 , specifically, the method includes:
[0323] S1001: When the number of collisions of the self-moving device is greater than or equal to a first preset number of collisions, generate a first obstacle area based on the collision position.
[0324] The first preset number of collisions refers to the number of collisions between the mobile device and the surrounding environment within a preset time. The preset time and number of collisions are set based on the working scenario and actual needs. For example, in the working scenario of a sweeping robot, the preset time is two minutes, and the number of collisions can be two or three times; in the working scenario of a lawn mower, the preset time is one minute, and the number of collisions can be three or four times; the first obstacle area refers to the virtual area marked in the virtual map constructed by the mobile device based on the location of the collision between the mobile device and the surrounding environment; preferably, the mobile device constructs the virtual map with itself as the center. Referring to Figure 12, if the number of collisions between the head of the mobile device and the surrounding environment during movement is greater than or equal to the first preset number of collisions, the mobile device will pre-construct a virtual identifier corresponding to itself in the constructed virtual map, and construct a first obstacle area based on the direction corresponding to the collision location; the first obstacle area is used to represent an area that the mobile device cannot pass through.
[0325] In an embodiment of the present application, the virtual identification includes identification information and pointing information. The identification information refers to image information representing the self-mobile device. For example, the identification information can be a dot, a square, and other image information; the pointing information represents information about the orientation of the self-mobile device itself. Specifically, the pointing information refers to information pointing from the tail of the self-mobile device to the head of the self-mobile device; in a specific embodiment of the present application, the pointing information can be integrated into the identification information. For example, the virtual identification is identification information carrying direction, such as an arrow, an isosceles triangle, and a semicircle.
[0326] In a specific embodiment of the present application, when the self-moving device generates the first obstacle area for the first time, the self-moving device will stop working, such as the sweeping robot stops vacuuming and the blade of the lawn mowing robot stops rotating, thereby avoiding energy waste of the self-moving device and damage to the tool.
[0327] In a specific embodiment of the present application, the first obstacle area may be represented by a plurality of grids or by a plurality of dots, which is not limited here.
[0328] In a specific embodiment of the present application, the first obstacle area and the virtual map are constructed by the mobile device with itself as the center, so that the automatic escape method in the present application can adapt to any work scenario, thereby improving the versatility of the automatic escape method.
[0329] S1002: Detect the surrounding area of the self-moving device to obtain a movable area detection result; the surrounding area is an area that does not include the first obstacle area.
[0330] In the process of detecting the surrounding area of the self-moving device, the area marked with the first obstacle area is avoided, thereby improving the detection rate of the self-moving device on the surrounding environment.
[0331] In a specific embodiment of the present application, S1002 includes:
[0332] Comparing the size of the interval area between two adjacent first obstacle areas with the virtual marker constructed by the mobile device to obtain a comparison result;
[0333] When the comparison result indicates that the size of the interval area is smaller than the size of the virtual marker, a first obstacle area is generated in the interval area.
[0334] In a specific embodiment of the present application, the size of the interval area between two adjacent first obstacle areas is compared with the virtual identifier, and a first obstacle area is generated in the interval area that is smaller than the size of the virtual identifier. Since the size of the interval area is smaller than the size of the virtual identifier, it means that the self-moving device cannot escape from the interval area, and the interval area is an immovable area, so it is marked as an obstacle area, thereby reducing the size of the area detected by the self-moving device for the surrounding area, reducing the detection time of the self-moving device for the surrounding environment, and increasing the self-moving device's screening rate for movable areas, thereby increasing the self-moving device's escape rate.
[0335] S1003: When the movable area detection result indicates that a movable area exists around the mobile device, determine a moving direction of the mobile device based on the movable area.
[0336] The movable area refers to a direction corresponding to the area in which no collision occurs with the self-moving device; the moving direction of the self-moving device represents the initial escape direction of the self-moving device.
[0337] S1004: Based on the moving direction, control the self-moving device to escape.
[0338] In an embodiment of the present application, when the number of collisions of the self-moving device is greater than or equal to the first preset number of collisions, a first obstacle area is generated at the collision position, so that when the self-moving device detects the surrounding area, it avoids the area marked with the first obstacle area, thereby improving the rate at which the self-moving device detects the surrounding environment, and thereby improving the escape rate of the self-moving device.
[0339] In a specific embodiment of the present application, after the first obstacle area is generated by the self-moving device for the first time, the first obstacle area can be generated as long as there is a collision between the self-moving device and the surrounding environment; that is, the first preset number of collisions can be one. When the first obstacle area does not exist on the virtual map, the self-moving device and the surrounding environment need to collide more than once to generate the first obstacle area, that is, at least two collisions; when the first obstacle area already exists on the virtual map, the first obstacle area is generated when the self-moving device collides with the surrounding environment once.
[0340] In a specific embodiment of the present application, after the first obstacle area is generated for the first time, the generation conditions of the first obstacle area are lowered, thereby increasing the detection rate of the self-moving device to the surrounding area and increasing the escape rate of the self-moving device.
[0341] Referring to FIG. 13 , in the embodiment of the present application, S1004 includes:
[0342] S2001. Determine a first planning point; the first planning point is located within a working area of the self-moving device, and the first planning point is a point far away from a current location of the self-moving device.
[0343] Specifically, the first planning point is far away from the first obstacle area and the area that can be enclosed by the first obstacle area. In a specific embodiment of the present application, the first planning point is also far away from the boundary of the working area of the self-moving device to prevent the self-moving device from entering another small area; the first planning point can be marked on the virtual map.
[0344] S2002: When the self-mobile device moves to the first planned point and no collision occurs during the movement to the first planned point, determine that the self-mobile device is out of trouble.
[0345] In an embodiment of the present application, by moving the self-moving device to the first planning point, it is ensured that the self-moving device can move to an area that can be enclosed by the first obstacle area, thereby achieving the self-moving device to escape from the narrow area, thereby improving the practicality of the automatic escape method.
[0346] Referring to FIG. 14 , in the embodiment of the present application, S2002 includes:
[0347] S3001: Perform path planning based on the current location of the mobile device, the moving direction, and the first planning point to obtain a target moving path.
[0348] The current location point can be represented as the location point of the mobile device on the virtual map; path planning refers to planning a path with the current location point as the starting point and the first planning point as the end point to obtain the target movement path; the movement direction is the initial travel direction of the mobile device in the target movement path.
[0349] In a specific embodiment of the present application, path planning can be performed using a preset path-finding algorithm, i.e., finding the fastest path to the first planned point, or other path-finding algorithms can be used for path planning. Specifically, the path-finding algorithm includes an A* path-finding algorithm. By using the path-finding algorithm for path planning, the travel time of the self-moving device from the current location to the first planned point is reduced, thereby increasing the self-moving device's escape rate.
[0350] S3002: Control the mobile device to move toward the first planned point based on the target moving path.
[0351] S3003: When no collision occurs while the self-moving device is moving toward the first planned point, determine that the self-moving device is out of trouble.
[0352] In an embodiment of the present application, by performing path planning based on the current position point, moving direction and first planning point, the starting point, end point and initial moving direction in the path planning are clarified, thereby ensuring the reliability of the planned target moving path, thereby improving the success rate of the self-moving device in escaping from trouble, and by performing path planning based on the moving direction, when the moving direction is used for path planning, it is characterized that in the target moving path, the initial moving direction of the self-moving device is unique and determined, thereby improving the path planning efficiency and thereby improving the escape rate of the self-moving device.
[0353] Referring to FIG. 15 , in the embodiment of the present application, S1002 includes:
[0354] S4001: Update the direction of the self-mobile device based on the current angle and the preset steering angle to obtain the current target direction, and control the self-mobile device to turn to the current target direction.
[0355] The current angle of the mobile device may refer to the angle calculated with the direction indicated by the initial pointing information of the mobile device in the virtual map as the 0-degree axis; the preset steering angle is an angle set based on actual needs. Specifically, the preset steering angle may be 90 degrees or 45 degrees; the current target direction may refer to the direction in the virtual map that is equivalent to the direction indicated by the pointing information corresponding to the mobile device.
[0356] In a specific embodiment of the present application, when the preset steering angle is 90 degrees, the self-moving device needs to detect at least three directions of the surroundings; when the preset steering angle is 180 degrees, the self-moving device needs to detect at least seven directions of the surroundings.
[0357] S4002: Determine the collision result corresponding to the current target direction.
[0358] The collision result refers to the number of collisions with the mobile device. Specifically, if the collision count is zero, the collision result indicates that no collision occurred; if the collision count is non-zero, the collision result indicates that a collision occurred.
[0359] In a specific embodiment of the present application, the collision result may include a collision result corresponding to the front of the mobile device and a collision result corresponding to the rear of the mobile device. Specifically, it can be determined by the forward and backward movement of the mobile device; by having one direction correspond to two collision results, the detection time of the mobile device is further reduced and the escape rate of the mobile device is improved.
[0360] S4003. Determine whether the collision result corresponding to the current target direction indicates that a collision has occurred; if so, execute step S4004; if not, execute step S4005.
[0361] S4004. Generate a first obstacle area corresponding to the current target direction; and repeat steps S4001 to S4003 until the collision result corresponding to the current target direction indicates that no collision has occurred.
[0362] S4005: Determine that the movable area detection result is that a movable area exists around the mobile device.
[0363] In an embodiment of the present application, the self-moving device is controlled to perform collision detection on the area around the self-moving device according to a preset steering angle. When a collision is detected, it indicates that the current direction corresponds to an immovable area, and the target direction needs to be updated and the collision result needs to be reconfirmed. When no collision is detected, it indicates that the current direction corresponds to a movable area, and the movable area of the self-moving device is quickly found, thereby improving the escape rate of the self-moving device.
[0364] Referring to FIG. 16 , in the embodiment of the present application, S1003 includes:
[0365] S5001. Determine that the area corresponding to the current target direction is a movable area.
[0366] S5002: When the self-moving device moves a preset distance toward the current target direction without collision, determine the current target direction as the moving direction of the self-moving device.
[0367] The preset distance is a preset value set based on actual needs. Specifically, the preset distance can be 0.5m or 1m.
[0368] In an embodiment of the present application, by controlling the self-moving device to move to the movable area, when the self-moving device moves a preset distance to the current target direction, it is characterized that the self-moving device is able to move in the current direction, and there is no first obstacle area within at least the preset distance in the current target direction. The self-moving device can be considered to escape from the direction, thereby avoiding repeated collisions between the self-moving device and the surrounding environment when escaping, thereby improving the escape rate of the self-moving device.
[0369] Referring to FIG. 17 and FIG. 18 , in an embodiment of the present application, the automatic escape method further includes:
[0370] When all target directions are traversed and the collision results corresponding to all target directions indicate that a collision has occurred, it is determined that the movable area detection result is that no movable area exists around the self-moving device.
[0371] In an embodiment of the present application, when a first obstacle area mark has been generated and no movable area is detected, it is determined that there is no movable area. When there is no movable area, it indicates that the self-moving device has been completely enclosed by the first obstacle area, and it is impossible for the self-moving device to break through the enclosed space enclosed by the first obstacle area. Therefore, it is possible to consider changing the escape strategy and appropriately reducing the escape rate to increase the success rate of escape.
[0372] Referring to FIG19 , in an embodiment of the present application, the automatic escape method further includes:
[0373] S7001: When a collision occurs while a mobile device moves toward a first planned point, generate a first obstacle area based on a collision position.
[0374] S7002: Perform path planning based on the current location of the mobile device, the first planning point, and the first obstacle area to obtain a current moving path.
[0375] S7003. Determine whether the number of collisions of the mobile device is greater than a second preset number of collisions while the mobile device is moving based on the current moving path; if so, execute step S7004; if not, execute steps S7001-S7003.
[0376] In an embodiment of the present application, the second preset number of collisions refers to the number of times a mobile device collides with the surrounding environment within a preset time. The preset time is the same as the preset time of the first preset number of collisions. The second preset number of collisions is set based on the working scenario and actual needs; the second preset number of collisions can be greater than the first preset number of collisions, or less than or equal to the first preset number of collisions, and there is no limitation here.
[0377] S7004: When the automatic device moves based on the current moving path and the collision number of the self-moving device is greater than a second preset collision number, the movable area detection result is corrected to indicate that no movable area exists around the self-moving device.
[0378] In an embodiment of the present application, by re-planning the path during the movement of the self-moving device to the first planning point and when the number of collisions of the self-moving device is less than or equal to the second preset number of collisions, the newly generated first obstacle area is avoided during the movement of the self-moving device to the first planning point, thereby improving the escape rate and the escape success rate; by determining that there is no movable area during the movement of the self-moving device to the first planning point and when the number of collisions of the self-moving device is greater than the second preset number of collisions, at this time it is characterized that the current moving path of the self-moving device is still in a narrow area, and the escape strategy needs to be changed to improve the escape success rate and the escape rate.
[0379] Referring to FIG20 , in an embodiment of the present application, the automatic escape method further includes:
[0380] S8001: When the movable area detection result indicates that there is no movable area around the mobile device, delete the first obstacle area.
[0381] Deleting the first obstacle area indicates that the mobile device has formatted the virtual map. Deleting the first obstacle area can also be understood as clearing the first obstacle area marked in the virtual map. The first obstacle area can also be understood as a difficult obstacle. The virtual map can be understood as the map involved in the aforementioned control method embodiment. The absence of a movable area around the mobile device can indicate that the mobile device has entered a difficult area.
[0382] S8002. Determine a second planning point; the second planning point is any point in the working area.
[0383] Specifically, the second planned point is far away from the current location of the mobile device. It should be noted that the second planned point can be understood as the first target position involved in the above control method embodiment.
[0384] S8003: Perform path planning based on the current location of the mobile device and the second planning point to obtain a current moving path.
[0385] S8004: When a collision occurs while the mobile device is moving toward the second planned point based on the current moving path, a second obstacle area is generated based on the collision position; the size of the second obstacle area is smaller than the size of the first obstacle area.
[0386] During the marking process of the first obstacle area, the escape rate of the self-moving device is taken into consideration. Therefore, the area size of the first obstacle area is relatively large. If the first obstacle area has been generated and there is no movable area, the original first obstacle area is deleted and the path is replanned. During the movement according to the planned path, a second obstacle area smaller than the first obstacle area is regenerated based on the collision position. The obstacle area is then refined to improve the marking accuracy of the obstacle area and the success rate of the self-moving device to escape. The second obstacle area can be understood as the difficult obstacle that is re-marked during the process of controlling the self-moving device to move to the second planned point after deleting the first obstacle area. The marking size of the second obstacle area in the virtual map is smaller than the marking size of the first obstacle area in the virtual map.
[0387] In a specific embodiment of the present application, since there is no movable area during the marking of the first obstacle area, the obstacle area marking needs to be refined. Therefore, the size of the second obstacle area can be smaller than the size of the virtual identifier constructed by the self-moving device. This improves the accuracy of obstacles corresponding to the self-moving device's surrounding environment, facilitates the self-moving device's search for movable areas, and improves the success rate of the self-moving device's escape. Preferably, the size of the first obstacle area can be equal to the collision area between the self-moving device and the surrounding environment.
[0388] S8005: Update the path based on the current location of the mobile device, the second planned point, and the second obstacle area to obtain an updated moving path.
[0389] S8006: Determine that the updated moving path is the current moving path.
[0390] S8007. Determine whether the mobile device has moved to the second planned point; if so, execute step S8008; if not, execute steps S8004 to S8007 until the mobile device has moved to the second planned point.
[0391] S8008. When the self-mobile device moves to the second planned point, determine that the self-mobile device is out of trouble.
[0392] In an embodiment of the present application, when there is no movable area around the self-moving device, the first obstacle area is deleted, and the second obstacle area that is smaller than the first obstacle area is regenerated during the movement of the self-moving device to the second planned point. This can enable the self-moving device to refine the marking of the surrounding obstacle area, improve the marking accuracy of the self-moving device on the surrounding environment, and thereby reduce the area size of the inaccessible area, increase the area size of the passable area, and improve the success rate of the self-moving device in escaping from trouble.
[0393] Referring to FIG. 21 , in the embodiment of the present application, after S2002 , the automatic escape method further includes:
[0394] S9001. Obtain the location point to be worked in the work area.
[0395] The waiting working position point may represent a position point that the mobile device has not yet worked at, or may represent a position point that the mobile device was interrupted at last, and is specifically set based on actual conditions.
[0396] S9002: Perform path planning based on the first planning point and the position point to be worked on to obtain a current moving path.
[0397] S9003: When the self-moving device moves to the waiting working position based on the current moving path, control the self-moving device to work with the waiting working position as the starting point.
[0398] In an embodiment of the present application, after the self-moving device is determined to be out of trouble, the self-moving device is controlled to return to the working point position to continue working, thereby improving the autonomy and intelligence of the self-moving device. By resetting the work of the self-moving device, omissions in the work of the self-moving device are avoided, and the working integrity of the self-moving device is improved.
[0399] Referring to FIG22 , in an embodiment of the present application, the automatic escape method further includes:
[0400] S1101: Send trapped information from a mobile device and escape path information from the mobile device to a display terminal.
[0401] Specifically, the trapped mobile device information includes, but is not limited to, information about the first obstacle area, the current location and direction of the mobile device, and virtual map construction information. Escape path information includes, but is not limited to, the current movement path and the movement path before the current movement path. Display terminals include, but are not limited to, computers, mobile phones, and tablets, without further limitation.
[0402] In a specific embodiment of the present application, the display terminal device can also display the actual working scene of the mobile device.
[0403] S1102: When it is determined that the mobile device has escaped, an escape information is sent to the display terminal.
[0404] The escape information indicates that the mobile device has been escaped.
[0405] In the embodiment of the present application, by displaying the trapped information, escape path information and escape information of the self-moving device on the display terminal, it is convenient for humans to intervene in or observe the working status of the self-moving device, thereby improving the interactivity of the self-moving device with reality.
[0406] In a specific embodiment of the present application, when the duration of the self-mobile device being trapped is longer than a preset time threshold, an alarm is issued and / or a warning message is sent to a display terminal to facilitate intervention in escaping the self-mobile device.
[0407] In a specific embodiment of the present application, if the number of times the self-mobile device is trapped is greater than the preset number of times within a preset time period, an alarm is issued and / or a warning message is sent to the display terminal to facilitate intervention in the self-mobile device's escape.
[0408] Referring to FIG23 , an embodiment of the present application further provides an automatic escape device for a self-propelled device, the device comprising:
[0409] The obstacle generating module 101 is configured to generate a first obstacle area based on a collision position when the collision number of the self-moving device is greater than or equal to a first preset collision number;
[0410] The mobile area detection module 102 is used to detect the surrounding area of the self-moving device and obtain a movable area detection result; the surrounding area is an area that does not include the first obstacle area;
[0411] A moving direction determining module 103 is configured to determine a moving direction of the mobile device based on the movable area when the movable area detection result indicates that there is a movable area around the mobile device;
[0412] The escape module 104 is configured to control the self-moving device to escape based on the moving direction.
[0413] An embodiment of the present application also provides an electronic device, which includes a processor and a memory, wherein the memory stores at least one instruction or at least one program, and the at least one instruction or at least one program is loaded and executed by the processor to implement the automatic escape method of the self-moving device as described above.
[0414] The memory can be used to store software programs and modules. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory. The memory can mainly include a program storage area and a data storage area. The program storage area can store the operating system, application programs required for the functions, etc.; the data storage area can store data created based on the use of the device, etc. In addition, the memory can include high-speed random access memory and non-volatile memory, such as at least one hard disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, the memory can also include a memory controller to provide the processor with access to the memory.
[0415] The method embodiments provided in the embodiments of the present application can be executed in electronic devices such as mobile terminals, computer terminals, servers or similar computing devices. Figure 24 is an electronic device provided in an embodiment of the present application. As shown in Figure 24, the electronic device 900 may have relatively large differences due to different configurations or performances, and may include one or more central processing units (CPUs) 910 (the processor 910 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory 930 for storing data, and one or more storage media 920 (such as one or more mass storage devices) for storing application programs 923 or data 922. Among them, the memory 930 and the storage medium 920 can be temporary storage or permanent storage. The program stored in the storage medium 920 may include one or more modules, each module may include a series of instruction operations on the electronic device. Furthermore, the central processing unit 910 can be configured to communicate with the storage medium 920 and execute a series of instruction operations in the storage medium 920 on the electronic device 900. The electronic device 900 may also include one or more power supplies 960, one or more wired or wireless network interfaces 950, one or more input and output interfaces 940, and / or one or more operating systems 921, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™, etc.
[0416] The input / output interface 940 can be used to receive or send data via a network. Specific examples of the aforementioned network may include a wireless network provided by a communications provider of the electronic device 900. In one embodiment, the input / output interface 940 includes a network adapter (NIC), which can be connected to other network devices via a base station to communicate with the Internet. In one embodiment, the input / output interface 940 can be a radio frequency (RF) module for wirelessly communicating with the Internet.
[0417] Those skilled in the art will appreciate that the structure shown in FIG24 is merely illustrative and does not limit the structure of the electronic device. For example, the electronic device 900 may include more or fewer components than shown in FIG24 , or have a configuration different from that shown in FIG24 .
[0418] An embodiment of the present application also provides a storage medium storing at least one instruction or at least one program, which is loaded and executed by a processor to implement the automatic escape method for a self-moving device as described above.
[0419] It should be noted that the implementation solutions provided by the above-mentioned devices, electronic devices, and storage media are similar to the implementation solutions recorded in the above-mentioned methods. The specific implementation methods can refer to the description of the above-mentioned method embodiments and will not be repeated here.
[0420] The technical features of the above embodiments can 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 specification.
[0421] The above embodiments merely illustrate several implementations of the present invention, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present invention. It should be noted that a person skilled in the art would be able to make numerous variations and improvements without departing from the scope of the present invention, all of which fall within the scope of protection of the present invention.
[0422] The technical features of the above embodiments can 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 specification.
[0423] The above embodiments merely illustrate several implementations of the present invention. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present invention. It should be noted that variations and modifications are readily apparent to those skilled in the art without departing from the spirit of the present invention, and all such variations and modifications fall within the scope of protection of the present invention.
Claims
1. A control method, applied to a self-moving device, wherein the self-moving device is provided with a sensor, characterized in that: The control method comprises: obtaining a map of a working area, wherein the map is updated based on obstacles detected by the sensor; Control the self-moving device to move in the working area; In response to the self-mobile device moving into a dilemma area, the marks of at least a part of the dilemma obstacles on the map are cleared to obtain a map after the obstacles are cleared; wherein the dilemma area represents an area limiting the movement range of the self-mobile device, and the dilemma area is formed by at least one dilemma object, and the dilemma object includes a dilemma obstacle and / or a dilemma boundary; Based on the map after clearing obstacles, a path for the mobile device to leave the difficult area is planned.
2. The control method according to claim 1, characterized in that: Controlling the self-moving device to move in the working area includes: determining a first target position in the working area; Based on the map, planning a first path between the self-mobile device and the first target location; If the planning is successful, controlling the self-moving device to move toward the first target location according to the first path; If the planning fails, it is confirmed that the mobile device moves into the difficult area.
3. The control method according to claim 2, characterized in that: In response to the mobile device moving into the difficult area, clearing marks of at least a portion of difficult obstacles on the map to obtain a map after the obstacles are cleared, including: In response to the self-moving device moving into the dilemma area, determining, based at least on the map, a position of an opening when the self-moving device enters the dilemma area; The marks of the difficult obstacles within the opening range on the map are cleared to obtain a map after the obstacles are cleared.
4. The control method according to claim 3, characterized in that: The distance between any position within the opening range and the opening position is less than a preset threshold.
5. The control method according to claim 3 or 4, characterized in that: Determining, based at least on the map, an opening position of the self-mobile device when entering the dilemma area, comprising: Obtain the historical trajectory of the mobile device; The opening position is determined according to the map and the historical trajectory.
6. The control method according to claim 5, characterized in that: Before obtaining the historical track of the mobile device, the following steps are included: Determining whether the space formed by the difficult object is available for the self-moving device to rotate; In response to the space formed by the dilemma object being available for the self-moving device to rotate, acquiring the historical trajectory; In response to the space formed by the dilemma object being unable to be used for the self-moving device to rotate, the self-moving device is controlled to move backward.
7. The control method according to claim 5 or 6, characterized in that: Determining the opening position according to the map and the historical trajectory includes: Acquire a second target position, where the second target position is outside the dilemma area; Selecting a reference position in the historical trajectory; Based on the map, planning a path between the reference position and the second target position; If the planning is successful, the reference position is determined as the opening position.
8. The control method according to claim 7, characterized in that: Selecting a reference position in the historical trajectory includes: Based on the map, determining the intersection position of the difficult obstacle and the historical trajectory; The intersection position is determined as the reference position.
9. The control method according to claim 3, characterized in that: Clearing the mark of the difficult obstacle within the opening range on the map to obtain a map after the obstacle is cleared, including: Determine the target type corresponding to the difficult obstacle within the opening range; Obtaining an obstacle clearance priority, where the obstacle clearance priority represents an obstacle clearance order corresponding to different target types; According to the obstacle removal priority, the mark of the highest priority difficult obstacle within the opening range on the map is removed to obtain a map after the obstacles are removed.
10. The control method according to claim 9, characterized in that: The target type represents the type of the sensor that detects the difficult obstacle; and the obstacle clearance priority represents the obstacle clearance order corresponding to different sensor types.
11. The control method according to claim 10, characterized in that: The obstacle clearance priority corresponding to the non-contact sensor is higher than the obstacle clearance priority corresponding to the contact sensor.
12. The control method according to claim 9, characterized in that: Planning a path for the mobile device to leave the difficult area based on the map after clearing obstacles includes: Acquire a third target position, wherein the third target position is located outside the dilemma area; Planning a path between the self-moving device and a third target location based on the map after removing obstacles; If the planning is successful, the self-moving device is controlled to leave the difficult area according to the planned path.
13. The control method according to claim 12, characterized in that: Also includes: If the planning fails, clear the mark of the difficult obstacle with the second highest priority within the opening range on the map to obtain a map after clearing the obstacles; Planning a path between the self-moving device and a third target location based on the map after removing obstacles; If the planning is successful, controlling the self-mobile device to leave the difficult area according to the planned path; If the planning fails and it is confirmed that all the marks of the difficult obstacles within the opening range on the map have been cleared, then based on the map, all the marks of other difficult obstacles within the difficult area on the map are cleared to obtain a map after clearing the obstacles; Planning a path between the self-mobile device and the first target location based on the map after clearing obstacles; According to the planned path, the self-moving device is controlled to move toward the first target location; During the movement of the first target position, if an obstacle is detected again, the position of the obstacle is re-marked in the map; wherein the area size of the re-marked obstacle is smaller than the area size marked before the obstacle is cleared.
14. The control method according to claim 13, characterized in that: Also includes: If the self-moving device still cannot move to the first target position, the self-moving device is controlled to send a reminder message.
15. The control method according to claim 1, characterized in that: The sensor includes at least one of an ultrasonic sensor, a collision sensor, and a torque sensor.
16. The control method according to claim 1, characterized in that: Updating a map based on obstacles detected by the sensor, comprising: determining a sensor that detects the obstacle; Determining a first number according to the detection accuracy of the sensor; wherein the higher the detection accuracy, the smaller the first number; According to the positions of the obstacles, a first number of grids in the map are marked as obstacle grids.
17. The control method according to claim 2, characterized in that: In response to the mobile device moving into the difficult area, clearing marks of at least a portion of difficult obstacles on the map to obtain a map after the obstacles are cleared, including: In response to the mobile device moving into the dilemma area, at least based on the map, marks of all dilemma obstacles in the dilemma area on the map are cleared to obtain a map after the obstacles are cleared.
18. The control method according to claim 17, characterized in that: After planning a path for the mobile device to leave the difficult area based on the map after clearing obstacles, the method includes: Based on the planned path, the self-moving device is controlled to leave the difficult area; wherein, in the process of leaving the difficult area, if an obstacle is detected again, the position of the obstacle is re-marked in the map; wherein the area size of the re-marked obstacle is smaller than the area size marked before the obstacle is cleared.
19. A control device, applied to a self-moving device, wherein the self-moving device is provided with a sensor, characterized in that: The control device comprises: an acquisition module, configured to acquire a map of a working area, wherein the map is updated based on obstacles detected by the sensor; A control module, configured to control the self-moving device to move in the working area; a clearing module, configured to clear marks of at least a portion of the difficult obstacles on the map in response to the self-mobile device moving into a difficult area, so as to obtain a map after clearing the obstacles; wherein the difficult area represents an area limiting the moving range of the self-mobile device, the difficult area is formed by at least one difficult object, and the difficult object includes a difficult obstacle and / or a difficult boundary; The planning module is configured to plan a path for the mobile device to leave the difficult area based on the map after the obstacles are cleared.
20. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and the computer program is used to execute the method according to any one of claims 1 to 18.
21. A self-propelled device, characterized in that: include: processor; a memory for storing instructions executable by the processor; The processor is used to execute the method according to any one of claims 1 to 18.
Citation Information
Cited By
Body-equipped robot advancing control method and device, body-equipped robot and medium
CN119806159A
