Nothing Special   »   [go: up one dir, main page]

WO2024213062A1 - Control method for autonomous mobile device, autonomous mobile device, and storage medium - Google Patents

Control method for autonomous mobile device, autonomous mobile device, and storage medium Download PDF

Info

Publication number
WO2024213062A1
WO2024213062A1 PCT/CN2024/087292 CN2024087292W WO2024213062A1 WO 2024213062 A1 WO2024213062 A1 WO 2024213062A1 CN 2024087292 W CN2024087292 W CN 2024087292W WO 2024213062 A1 WO2024213062 A1 WO 2024213062A1
Authority
WO
WIPO (PCT)
Prior art keywords
area
type
self
moving device
working
Prior art date
Application number
PCT/CN2024/087292
Other languages
French (fr)
Chinese (zh)
Inventor
于航
汪圆圆
吴俊杰
郑思远
潘勋
张兆龙
Original Assignee
苏州宝时得电动工具有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 苏州宝时得电动工具有限公司 filed Critical 苏州宝时得电动工具有限公司
Publication of WO2024213062A1 publication Critical patent/WO2024213062A1/en

Links

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05DSYSTEMS FOR CONTROLLING OR REGULATING NON-ELECTRIC VARIABLES
    • G05D1/00Control of position, course, altitude or attitude of land, water, air or space vehicles, e.g. using automatic pilots

Definitions

  • the present invention relates to the field of intelligent control technology, and in particular to a control method for a self-moving device, a self-moving device and a storage medium.
  • Autonomous mobile devices can walk according to pre-set paths or areas and perform related tasks.
  • Commonly used self-moving equipment includes automatic lawn mowers, automatic sprinklers, etc.
  • automatic lawn mowers there may be objects that cannot be cut outside the boundary of the working area, such as walls, roads, flowers, etc.
  • automatic lawn mowers usually only cut inside the boundary.
  • the cutting range of the body shell and the blade disc are both inside the boundary, or there is a certain distance from the inside of the boundary, resulting in the grass at the boundary cannot be cut cleanly.
  • the present disclosure provides a control method of a self-moving device, a self-moving device and a storage medium.
  • a control method for a self-moving device wherein the self-moving device includes a working part, the working part is configured to perform a work operation, and the self-moving device further includes: an image acquisition device, the image acquisition device is configured to acquire an image in front of the self-moving device, and the self-moving device is configured to travel and/or work in a working area, wherein the method includes:
  • each area at least includes: an area to be driven and a target area, wherein the area to be driven is a part of the working area, and the target area is an area adjacent to the area to be driven;
  • the self-moving device is controlled to change the driving mode so that the coverage range of the working unit includes a part of the target area.
  • the method further includes: inputting the collected image into a trained image recognition model to perform semantic segmentation on the image to obtain the region type of each region.
  • the method further comprises:
  • the working mode is a preset working mode
  • the self-moving device is controlled to change the driving mode so that the coverage range of the working unit includes a part of the target area.
  • the preset working mode is an edge working mode or a working mode preset by the user.
  • the edge working mode is a mode for controlling the self-moving device to move and work along the boundary of the working area.
  • the first area type includes one or more of roads, manhole covers, stone roads, hard roads, fallen leaves and mud, or the first area type is obtained according to a user instruction.
  • obtaining the region type of each region in the acquired image further includes:
  • the self-moving device is controlled to change the driving mode, including include:
  • the self-moving device is controlled to change the driving mode according to the area type of the target area and the depth information, so that when the area type of the target area is the first area type and the height difference between the target area and the area to be driven is less than a height threshold, the coverage range of the working unit includes a part of the target area.
  • semantic segmentation is performed on the image to obtain the region type of each region, the region type of the to-be-traveled region is a grassland type, and the region type of the target region is a first region type; accordingly,
  • Controlling the coverage of the working portion to include a portion of the target area comprises:
  • the self-moving device is controlled to travel and/or operate along a boundary between an area defined by the grass type and an area defined by the first area type.
  • the self-moving device is controlled to travel and/or work in the working area.
  • the second area type includes one or more of a wall, a dirt pit, a pool, a fence, a flower bed, soil with a hardness less than a hardness threshold, an irrigation facility area, and a movable life form area.
  • controlling the self-moving device to travel and/or work in the working area includes:
  • the self-moving device is controlled to travel and/or work in the working area according to the edge distance information.
  • obtaining edge distance information includes:
  • the edge distance information is determined according to the user instruction information.
  • the method further includes: when the area type of the target area is a first area type, controlling the self-moving device to change the driving mode so that the self-moving device avoids the area where the second area type is located, wherein the area type of the target area includes a first area type and a second area type, and the area where the first area type is located and the area where the second area type is located are both adjacent to the area to be driven.
  • the method further includes: when the area type of the target area is a first area type, controlling the self-moving device to change the driving mode so that the driving distance of the working unit is less than the boundary length between the area where the first area type is located and the area to be driven, wherein the driving distance is the distance traveled by the self-moving device when the coverage range of the working unit includes a part of the target area.
  • controlling the self-moving device to change the driving mode includes:
  • the self-moving device is controlled to continue traveling along the first path for a period of time, and after traveling for a period of time, the traveling path is changed so that the coverage range of the working unit includes a part of the target area.
  • an embodiment of the present application provides a self-moving device, the self-moving device comprising:
  • a working unit configured to perform a work operation
  • An image acquisition device wherein the image acquisition device is configured to acquire an image in front of the mobile device
  • a controller is connected to the working part and the image acquisition device by signal, and the controller is configured to control the self-moving device to travel and/or work in the working area, including:
  • the controller obtains the area type of each area in the collected image, and each area at least includes: a waiting area and a target area, wherein the waiting area is a part of the working area, and the target area is adjacent to the waiting area. area;
  • the self-moving device is controlled to change the driving mode so that the coverage range of the working unit includes a part of the target area.
  • an embodiment of the present application provides a computer-readable storage medium, in which a computer program is stored, and when the computer program is executed by a processor, the steps of the above method are implemented.
  • the technical solution provided by the embodiment of the present disclosure may include the following beneficial effects: obtaining the area type of each area in the captured image, and when the area type of the target area is the first area type, controlling the self-moving device to change the driving mode so that the coverage of the working part includes a part of the target area.
  • the self-moving device can process the boundary of the working area while taking safety into consideration, thereby improving the processing coverage rate of the boundary of the working area and enhancing the user experience.
  • the self-moving device can quickly identify the area type of each area in the image, that is, it can quickly identify a variety of scenes, so that different working strategies can be selected for different scenes.
  • FIG1 is a schematic flow chart of a method for controlling a self-moving device provided by an embodiment of the present invention
  • FIG2 is a schematic diagram of a working area according to an embodiment of the present invention.
  • FIG3 is a second schematic diagram of a working area in an embodiment of the present invention.
  • FIG4 is a third schematic diagram of a working area in an embodiment of the present invention.
  • FIG5 is a schematic diagram of the offset between each boundary of the working area and the charging station in an embodiment of the present invention.
  • FIG6 is a schematic diagram of a scenario in which an obstacle area is detected by a mobile device according to an embodiment of the present invention.
  • FIG7 is a first image captured by a mobile device according to an embodiment of the present invention.
  • FIG8 is a second image provided by an embodiment of the present invention after marking the area type of the portion of the first image adjacent to the area to be driven as a grassland type;
  • FIG9 is a schematic diagram of a scenario in which a mobile device is traveling along a boundary of a working area within a working area according to an embodiment of the present invention.
  • FIG10 is a schematic diagram of a scenario in which a mobile device performs a cross-edge action according to an embodiment of the present invention
  • 11-12 are schematic diagrams of another scenario in which a mobile device performs a cross-border action according to an embodiment of the present invention.
  • FIG. 13-14 are schematic diagrams of another scenario in which a mobile device performs a cross-border action according to an embodiment of the present invention.
  • FIG15 is a schematic diagram of the structure of a self-moving device provided in an embodiment of the present invention.
  • FIG. 16 is a schematic diagram of a working module of a self-moving device provided in an embodiment of the present invention.
  • first, second, third, etc. may be used to describe various information in this article, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other.
  • first information may also be referred to as the second information
  • second information may also be referred to as the first information.
  • word “if” as used herein can be interpreted as “at the time of -- or "when" or "in response to determination”.
  • singular forms “one”, “one” and “the” are intended to also include plural forms, unless there is an opposite indication in the context.
  • step codes such as S101, S102, etc. are used for the purpose of expressing the corresponding content more clearly and concisely, and do not constitute a substantial limitation on the sequence.
  • S102 first and then S101, etc., but these should all be within the scope of protection of this application.
  • module means, “component” or “unit” used to represent elements are only used to facilitate the description of the present application, and have no specific meanings. Therefore, “module”, “component” or “unit” can be used in a mixed manner.
  • the processing coverage rate at the boundary of the working area is low when the self-moving device is working in the working area defined by the boundary.
  • the self-moving device as an automatic lawn mower as an example
  • the cutting coverage rate at the boundary of the working area of the automatic lawn mower is low when cutting.
  • the main reasons include three aspects: one is that the outside of the boundary may be flowers planted by the user, or obstacles such as fences, walls, and roads. In order to avoid cutting ornamental flowers or avoiding collisions with obstacles, the general automatic lawn mower cuts inside the boundary when working, and the entire body (including the shell and the cutting range of the blade) is located inside the boundary, and even has a certain distance from the boundary.
  • Another aspect is that the automatic lawn mower based on visual products needs to rely on visual cameras to move.
  • the distance In the scene where the boundary is identified by the camera and the cutting is moved along the boundary, when the lateral distance between the boundary and the body is determined in real time by vision, the distance generally has an error, resulting in a distance between the body and the boundary.
  • the cutting range of the blade in the general automatic lawn mower will not exceed the body, which may cause missed cutting areas between the blade and the boundary. At least due to the above three reasons, after the machine completes the cutting work in the working area, it will still identify the existence of uncut grass in the working area, and most of the uncut grass is concentrated near the boundary.
  • users may have the following requirements: they hope to cut the boundary between the road and the lawn cleanly; or, they hope to cut the boundary between the mud and the lawn cleanly; or, because the visual recognition model only divides the image into two categories: grass and non-grass, a pile of yellow fallen leaves on the lawn will be identified as non-grass, and the boundary between grass and non-grass will make the automatic lawn mower unable to cut the area around the fallen leaves cleanly, but the user actually hopes to cut it cleanly.
  • it is necessary to solve the problem of how existing self-moving equipment can handle the grass at the boundary of the working area while taking safety into consideration.
  • the self-moving device is also required to be able to quickly identify multiple scenes, and select different working strategies for different scenes.
  • the present application proposes a control method for a self-moving device. It should be noted that although the present disclosure provides method operation steps as shown in the following embodiments or drawings, more or fewer operation steps may be included in the method based on routine or no creative labor. In the steps where there is no necessary causal relationship logically, the execution order of these steps is not limited to the execution order provided in the embodiments of the present disclosure.
  • the self-moving device includes a working part and the self-moving device is configured to travel and/or work in a working area.
  • the method provided in this embodiment includes:
  • each area at least includes: a to-be-traveled area and a target area, wherein the target area is an area adjacent to the working area.
  • the self-moving device includes a body 27, an imaging sensor 200 (hereinafter also referred to as a visual sensor, or an image acquisition device 28), a position sensor 500 and a control circuit 600.
  • the body 27 includes a driving device 700, which is used to drive the body 27 to move on the work surface according to the received driving instruction, and generally includes a roller and a motor that drives the roller to rotate.
  • the roller may include a driving wheel and a driven wheel.
  • the rollers 211 and 212 may be distributed on both sides of the body 27, and the number of rollers on each side may be one or two.
  • the body 27 also includes a working part, which is used to perform specific work tasks.
  • the working part includes a mowing blade 221, a cutting motor 222, etc., and 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 part includes a vacuum motor, a vacuum port, a vacuum pipe, a vacuum chamber, a dust collection device, etc., which are used to perform vacuum tasks.
  • the body 27 may also include an energy module, which is used to provide energy for various operations of the self-moving 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 the docking station to charge the self-moving device.
  • the body 27 also 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.
  • the fuselage 27 also includes a position sensor 500 , which may include a satellite positioning sensor, 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 fuselage 27 .
  • a position sensor 500 which may include a satellite positioning sensor, 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 fuselage 27 .
  • the body 27 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 self-mobile device in determining the working environment so as to execute the corresponding program.
  • the control circuit 600 (also known as the controller) 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 along the path, judging the power of the energy module and timely controlling the self-moving device to return to the docking station for automatic docking and charging, and executing corresponding programs in combination with the data of the environmental sensor.
  • the self-moving device includes an imaging sensor 200, which is connected to the fuselage 100 and is used to collect images in the forward direction of the fuselage 27, and the image is at least partially an image of the working surface in the forward direction.
  • the collected image is located within the field of view 210 of the imaging sensor 200.
  • the imaging sensor 200 can be a camera or a laser radar commonly used in the industry.
  • the imaging sensor 200 is installed at the upper front part of the fuselage 27, preferably in the center, with the viewing angle facing the front and bottom to collect images of the work surface.
  • the size of its field of view can be adjusted according to actual needs. The larger the field of view 210, the more images collected in the forward direction of the fuselage 27, and vice versa.
  • the forward direction of the fuselage 27 can have multiple directions, such as normal forward movement, backward movement, turning, etc.
  • the forward direction of the fuselage refers to the normal forward direction, that is, the direction of the central axis of the fuselage.
  • the imaging sensor 200 in this application The middle one can be a camera.
  • the working area may be an area where the self-moving device travels and/or works, and the working area is defined by a boundary.
  • the self-moving device may also travel outside the working area to perform work.
  • the area to be traveled may be a part of the working area, for example: it may be a working area within a specified range in front of the moving direction of the self-moving device, or an area marked on the working area where the self-moving device is located.
  • the self-moving device as an automatic lawn mower as an example
  • the working area may be a grass area in front of the moving direction of the self-moving device and within 3 meters of the self-moving device.
  • the area to be traveled may be a partial area in the working area, that is, any area in the working area, and the target area may be any area outside the working area and adjacent to the area to be traveled.
  • the area to be driven and the target area may both be located in the working area, or only the area to be driven may be located in the working area, while the target area is not in the working area.
  • the area type can be used to indicate the attributes of the area.
  • the area type can be the name of the area, such as road, stone road, hard road surface, manhole cover, earth pit, feces, fallen leaves, soil, wall, tree, fence, flower bed, stone, step, pool, soft soil, irrigation facility area, movable life area, etc.; wherein the soil hardness of soft soil is less than the hardness threshold, and the soil hardness of mud is higher than that of soft soil; soft soil, such as granular soil, may cause the self-moving device to sink and be trapped when driving on the soft soil; the irrigation facility area can be the area where the irrigation facilities (such as faucets) are located; the movable life can be a person or an animal, and the movable life can move by itself; the movable life area is the area where the movable life is located.
  • the self-moving device includes an image acquisition device configured to acquire images in front of the self-moving device, the images including images corresponding to the to-be-traveled area and images corresponding to the target area.
  • the area type of each area in the image is determined by processing the image.
  • the self-moving device can trigger the image acquisition device to acquire images in real time, irregularly or periodically to obtain images corresponding to the area to be driven and the target area acquired by the image acquisition device, and then perform preset processing on the acquired images to obtain the area type of the target area. It can be understood that the self-moving device can also trigger the image acquisition device to acquire images only when it is close to the boundary of the area to be driven to save energy consumption, and the self-moving device can determine whether it is close to the boundary of the area to be driven based on the relationship between its own position and the position of the boundary of the area to be driven.
  • the image acquisition device can be specifically a camera or other device, and the image acquisition range corresponding to the image acquisition device can be set according to the actual needs, and can usually include the designated range in front of the moving direction of the self-moving device and on both sides.
  • the self-moving device as an automatic lawn mower as an example, as shown in Figure 2, the dotted box in Figure 2 represents the image acquisition range corresponding to the image acquisition device of the automatic lawn mower.
  • the acquired image includes both images corresponding to the lawn area and images corresponding to the non-grass area, such as images corresponding to a pool or a wall.
  • Step S101 can be performed according to the actual needs: obtaining the area type of each area in the image, each area at least includes: a to-be-traveled area and a target area, wherein the to-be-traveled area is a part of the working area, and the target area is an area adjacent to the to-be-traveled area.
  • the method of obtaining the type includes but is not limited to semantic segmentation processing, classification processing, etc., which is not specifically limited here.
  • the mobile device collects images corresponding to the area to be driven and the target area through an image acquisition device, and performs preset processing on the images to obtain the area type of the target area.
  • the operation is convenient and the accuracy is high.
  • the image may include a two-dimensional image.
  • the captured image is input into an image recognition model trained in advance, and each pixel in the image is classified to determine the category of each pixel (such as grass, cobblestone road, or fence, etc.), thereby achieving the goal of semantic segmentation of the image (semantic segmentation is also referred to as image segmentation below) to identify the area type of each area.
  • the image recognition model can be a multi-classification model, that is, it can identify more than two area types, such as whether the area type is grass, road, or wall. It can be understood that the regional classification model established based on the classification algorithm can be trained in advance with training samples, The training samples may include image samples of different regions and corresponding region type labels.
  • the image recognition model may be a neural network model.
  • semantic segmentation By performing semantic segmentation on the image, compared to other methods such as using depth information to only identify scenes with obstacles, the present application can quickly identify a variety of richer scenes such as roads, mud, fences, walls, etc., making it easier for subsequent users to set different cutting requirements for different scenes.
  • semantic segmentation of an image results in that the area type of the area to be driven is a grassland type, and the type of the target driving area is a first area type or a second area type, which may also be collectively referred to as a target type.
  • the area type may be used to indicate the attributes of an area
  • the grassland area in the image represents the area where the space where the grassland is located is mapped onto the image.
  • the attributes or area types of the grassland area may be referred to as grassland attributes, grassland types, or simply grassland.
  • the target area in the image represents the area where the space where the target object is located is mapped onto the image, and the attributes or area types of the target area are the target type, which may also be the first area type or the second area type.
  • the automatic lawn mower After obtaining an image corresponding to any virtual frame, the automatic lawn mower performs semantic segmentation processing on the image to determine the presence of walls, pools, fallen leaves, etc. in the image.
  • the user can also set identification devices (such as identification signs, identification lines, etc.) corresponding to the area type in each area.
  • the mobile device can detect and identify the identification device based on the image, determine the identification information corresponding to the identification device, and identify the area type of the target image based on the identification information.
  • a mobile device performs semantic segmentation processing on an image corresponding to the area to be driven and an image corresponding to the target area to obtain a corresponding area type without user involvement in the setting and with a fast processing speed.
  • the image includes a depth image
  • the image is processed to determine the area type of each area in the image, including: performing depth estimation processing on the image to determine depth information corresponding to the target area, the depth information is used to represent the distance between each position of the target area and the self-mobile device; based on the depth information, determining the area type of the target area.
  • depth estimation processing is performed on the depth image including the image corresponding to the area to be driven and the image corresponding to the target area to determine the depth information corresponding to the target area, and the depth information is used to represent the distance between each position of the target area and the self-moving device. Then, the area type of the target area is determined based on the change amplitude information of the depth information.
  • performing depth estimation processing on an image refers to estimating the distance between the object represented by each pixel in the image and the self-mobile device, which can be specifically processed by a depth estimation network model or the like. Since different objects (i.e., areas) are photographed at the same time, the pixels of different objects in the depth image have different change characteristics. For example, the farther away from the image acquisition device of the self-mobile device, the adjacent pixels of normal grass will gradually increase, the adjacent pixels of the wall will not change, and the adjacent pixels of the depression will increase suddenly. Therefore, the area type of the target area can be determined based on the change amplitude information of the depth information corresponding to the target area. It should be noted that the specific process of performing depth estimation processing on an image can refer to the prior art and will not be repeated here.
  • the depth information includes pixel information.
  • the region type of the target region is determined based on the change amplitude information of the depth information, including: when the change amplitude information represents that the depth information is continuously changed, determining the region type of the target region as the first region type; and/or, when the change amplitude information represents that the depth information is discontinuously changed, determining the region type of the target region as the second region type.
  • the area type of the target area can be determined based on the change amplitude information of the depth information, that is, when the change amplitude information represents that the depth information is continuously changed, the area type of the target area is determined to be the first area type, and/or, when the change amplitude information represents that the depth information is discontinuously changed, the area type of the target area is determined to be the second area type.
  • obtaining the region type of each region includes: detecting a boundary signal and determining a detection result,
  • the boundary signal includes a magnetic field signal generated by a boundary line set at the boundary of the area to be driven; and the area type of each area is determined according to the detection result.
  • whether to set a boundary line on the target boundary can be determined in advance according to the area type of the target area adjacent to the area to be traveled, so as to generate a boundary signal through the boundary line.
  • a boundary line can be set on the target boundary between the area to be traveled and the target area, so as to generate a boundary signal for indicating that the target area is a dangerous area through the boundary line; and when the target area adjacent to the area to be traveled is a safe area such as soil or fallen leaves, a boundary line may not be set on the target boundary between the area to be traveled and the target area, so as not to generate a boundary signal.
  • the boundary line is a conductor that forms a loop after being energized.
  • a constant current is passed through the boundary line, a constant magnetic field surrounding the boundary line is generated around it, and the self-moving device can identify the magnetic field signal of the constant magnetic field, i.e., the boundary signal, during the working and walking process.
  • the boundary line can be specifically a geomagnetic line, etc., and the geomagnetic line can be specifically a permanent magnet, a energized conductor, etc.
  • the self-moving device may be provided with a signal detection device for detecting boundary signals.
  • the self-moving device may detect boundary signals in real time, irregularly or periodically and determine the detection results, and then determine the area type of the target area according to the detection results. For example, if the detection result shows that no boundary signal is detected, it means that the area type of the target area or the boundary type of the target boundary is safe; if the detection result shows that a boundary signal is detected, it means that the area type of the target area or the boundary type of the target boundary is dangerous, etc.
  • the self-moving device may also trigger the detection boundary signal only when it is close to the boundary of the area to be driven to save energy consumption, and the self-moving device may judge whether it is close to the boundary of the area to be driven based on its own position and the position of the boundary of the area to be driven.
  • the region type of the target area or the boundary type of the target boundary is determined according to the detection result, including: when no boundary signal is detected, the region type of the target area is determined to be the first region type; when a boundary signal is detected, the region type of the target area is determined to be the second region type, or the boundary type of the target boundary is determined to be the second boundary type.
  • the detection result when it is determined according to the detection result that no boundary signal is detected, it means that it is safe for the self-moving device or the working part to move and work in the target area or at the target boundary, and the region type of the target area is determined to be the first region type.
  • a boundary line may not be set at the boundary between the grassland and the fallen leaves, so that when the self-moving device moves to the vicinity of the boundary between the grassland and the fallen leaves, the boundary signal cannot be detected.
  • the region type of the target area is determined to be the second region type.
  • a boundary line may be set at the boundary between the grassland and the pond, so that a boundary signal is detected when the mobile device moves near the boundary between the grassland and the pond.
  • the region type of each region is obtained, including:
  • boundary signal is a magnetic field signal generated by a boundary line set at the boundary of the area to be driven
  • the preset mapping information represents a correspondence between the strength of the boundary signal and the area type
  • the area type of each area is determined according to the strength of the boundary signal and the preset mapping information.
  • the parameters of the boundary line of the boundary between the area to be driven and the target area can be set or controlled accordingly, so that when the area type of the target area is different, the strength of the magnetic field signal generated by the corresponding boundary line is also different accordingly.
  • the magnetic field signal generated by the corresponding boundary line can be controlled.
  • the intensity of the field signal is a first preset threshold
  • the intensity of the magnetic field signal generated by the corresponding boundary line can be controlled to be a second preset threshold, and the second preset threshold is greater than the first preset threshold, etc.
  • the correspondence between the strength of the predetermined boundary signal and the area type or boundary type can be queried according to the strength of the boundary signal, thereby determining the area type of the target area or the boundary type of the target boundary.
  • the intensity of the magnetic field signal generated by the corresponding boundary line can be different by controlling the input current to the boundary line of the boundary between the area to be driven and the adjacent area.
  • the input current of the boundary line of the boundary between the area to be driven and the soil area can be controlled to be a first current value
  • the input current of the boundary line of the boundary between the area to be driven and the stone area can be controlled to be a second current value, and the second current value is greater than the first current value, so as to increase the intensity of the magnetic field signal generated by the boundary line.
  • obtaining the area type of each area includes: obtaining the type of the boundary between the area to be driven and the target area, and determining the area type according to the type of the boundary. Specifically, obtaining map information, the map information including the map, the position information of each boundary in the map, and the type information of each boundary in the map; determining the first position information of each boundary; and determining the boundary type according to the first position information of each boundary and the map information.
  • the map information can be obtained by mapping based on satellite positioning sensors, inertial sensors and odometer sensors.
  • the self-mobile device as an automatic lawn mower as an example, refer to Figure 4.
  • the offset of each boundary (a, b, c, d, e) of the grass area and the charging station can be recorded according to the satellite positioning sensor, inertial sensor and odometer sensor, as shown in Figure 5; then, the user can set the type of each boundary (a, b, c, d, e) through APP, etc.; finally, the offset of each boundary of the grass area and the charging station and the type of each boundary are stored in the map.
  • the map information is obtained by mapping based on visual real-time positioning and map construction technology.
  • the user can set the attributes of each boundary of the work area on the map in advance, and the attributes of the boundary include the location information and type information of the boundary, and mark and save the attribute information of each boundary in the map.
  • the attributes of the boundary include the location information and type information of the boundary, and mark and save the attribute information of each boundary in the map.
  • the shape of the work area is a rectangle
  • the areas adjacent to the work area are stone, road, mud and pool, respectively
  • the attribute information of the boundary corresponding to the work area can be set in the map as stone, road, mud and pool
  • the location information of each boundary can be marked in the map.
  • the user can pre-divide the regions on the map, including the location of each region and the corresponding region type, and mark and save the region division results including the region type and the corresponding location in the map.
  • the map includes three adjacent regions, namely, grass, mud, and a pool
  • the attribute information corresponding to each region can be set in the map, namely, grass, mud, and a pool
  • the location information of each region can be marked in the map, so that the mobile device can obtain the region type of the to-be-traveled region and the target region according to the region type marked in the map during operation.
  • the area type of each area in the captured image is obtained, and the mobile device can quickly identify various scenes such as roads, mud, fences, walls, etc., so as to select different working strategies for different scenes.
  • Step S102 When the area type of the target area is the first area type, control the self-mobile device to change the driving mode so that the coverage of the working unit includes a part of the target area.
  • the self-moving device after obtaining the area type of each area in the captured image, can be controlled to travel and/or work based on the area type of the target area, so that when the area type of the target area is the first area type, the self-moving device is controlled to change the driving mode so that the coverage of the working part includes a part of the target area; when the area type of the target area is identified as the second area type, the self-moving device is controlled to travel and/or work along the boundary of the area to be driven.
  • Changing the driving mode may include: changing the driving path or changing the driving direction.
  • the position of the working unit can be adjusted according to the area type so that the coverage of the working unit meets the preset conditions, so as to improve the processing coverage rate at the boundary of the working area and enhance the user experience. It can be understood that the preset conditions can be set according to actual needs.
  • the coverage of the working unit is set to include a part of the target area, that is, it can cross the boundary, so that the automatic lawn mower can cut the grass at the boundary of the working area; if it is determined according to the area type that the automatic lawn mower cannot cross the boundary, then the working unit is set to travel within the working area, which can be along the boundary of the area to be traveled, that is, the working unit cannot cross the boundary.
  • the coverage of the working part can be controlled to include a part of the target area. At this time, there will be no collision, entanglement, jamming, excessive tilting, falling, etc. that hinder the movement of the self-moving device, and there will be no harm to the safety of pedestrians or animals; if the area type of the target area is unsafe or the user does not expect the machine to travel in the second area type, the machine can be controlled not to travel to the target area during the driving process to ensure the safety of the machine.
  • the self-moving device can cross the boundary between the cobblestone road and the working area to safely travel and/or work on the cobblestone road. If the target area is a pool, the mobile device cannot cross the boundary between the pool and the working area. It should be noted that the self-moving device can keep working during the adjustment of the working part, or it can work after the adjustment of the working part is completed, which is not specifically limited here.
  • the working mode when the working mode is a preset working mode, when the area type of the target area is the first area type, the self-moving device is controlled to change the driving mode so that the coverage of the working part includes a part of the target area.
  • the preset working mode is an edge working mode or a working mode preset by the user.
  • the edge working mode is a mode for controlling the self-moving device to move and work along the boundary of the working area.
  • the self-moving device at least includes: a random working mode and an edge working mode.
  • the random working mode the self-moving device randomly cuts or drives along the planned path in the working area; in the edge working mode, the self-moving device drives along the boundary of the working area.
  • the machine can execute the steps of obtaining the area type of each area in the collected image proposed in this application, and controlling the movement of the self-moving device according to the area type.
  • the working part of the machine can cover the part of the target area beyond the working area, which is referred to as performing a cross-edge action.
  • the machine in the edge mode, can perform a cross-edge action during the process of driving along the boundary, for example: driving astride the boundary of the working area.
  • the self-moving device may also include a cross-edge working mode.
  • the coverage range of the working part of the self-moving device includes a part of the target area; at this time, the edge working mode may only control the machine to drive along the boundary inside the working area.
  • the random working mode when the self-moving device works near the boundary of the working area, in order to enable the self-moving device to cover more working ranges, it can be controlled to trigger the cross-edge action when the image meets the area type.
  • the cross-border action can be triggered only when the cross-border working mode is turned on, thereby improving the flexibility and convenience of controlling the self-mobile device.
  • the self-moving device drives along the boundary of the working area inside the working area.
  • the self-moving device can move and work in the working area surrounded by the boundary 10, and can move and work along the boundary 10.
  • the machine can determine the actual distance d between the machine and the boundary 10 based on the image.
  • FIG10 is a schematic diagram of the machine performing a crossing-edge action.
  • the target area 70 is an area where the self-moving device can safely travel, such as a stone slab area, a sidewalk area, a dirt area, etc.; when the self-moving device is located on the side of the target area 70, the target area exists in the image taken by the self-moving device, and the to-be-marked area of the target area can be marked as grass attribute, thereby changing the boundary between the grass attribute area and the target attribute area.
  • FIG7 is a first image taken by the self-moving device
  • FIG8 is a second image after the area type of the part adjacent to the to-be-traveled area in the first image is marked as grass type.
  • the self-mobile device moves along the boundary 60 between the grass type area and the first area type in the second image, so that it can move across the boundary 10 of the actual space, achieve cutting to the edge, and cleanly cut the grass between the working area and the slate area.
  • the self-mobile device may provide multiple working modes for the user to choose from, or the self-mobile device may automatically select the desired working mode during operation.
  • the machine may, according to the working mode selected by the user, execute the steps of obtaining the region type of each region in the acquired image and controlling the movement of the self-mobile device according to the region type when the working mode is the edge working mode.
  • the corresponding process may be executed according to the execution flow planned within the machine. For example, the random working mode may be executed first, and after the work corresponding to the random working mode is completed, the machine may switch to the edge working mode for work.
  • the self-moving device when the area type of the target area is identified as the first area type, the self-moving device is controlled so that the coverage of its working part includes a part of the target area.
  • the first area type includes one or more of roads, manhole covers, stone roads, hard roads, fallen leaves and soil. Among them, roads include but are not limited to cement ground, asphalt ground, roads, sidewalks, etc.
  • the first area type is not limited to this, as long as the self-moving device can safely drive and/or work on it.
  • the first area type can also be set according to the received user instructions, so that the machine can perform cross-edge in certain scenarios according to user needs.
  • the self-moving device can identify multiple types of objects or objects in the image based on the image recognition model, for example, it can simultaneously identify grass, ditches, puddles, fences, stone slabs, fallen leaves, walls and other non-grass; the user can select one or more types as the first area type, for example, the user can select stone slabs and fallen leaves as the first area type.
  • the self-moving device when the area type of the target area is the second area type, the self-moving device is controlled to travel and/or work along the boundary of the area to be driven.
  • the second area type may include one or more of a wall, a pit, a pool, a fence, a flower bed, soil with a soil hardness less than a hardness threshold, an irrigation facility area, and a movable life area.
  • the second area type is met, if the height difference between the area where the second area type is located and the area to be driven is equal to or greater than the height threshold (for example, 10 cm), the machine is controlled to travel along the boundary of the area to be driven to ensure the safety of the machine.
  • the height threshold for example, 10 cm
  • the image captured by the image acquisition device can be detected based on the image recognition model.
  • an obstacle area 30 i.e., the area where the second area type in the present application is located
  • the self-moving device is controlled to stay away from the boundary between the obstacle area 30 (such as a pool) and the working area, and the self-moving device is controlled to maintain a safety distance f from the boundary, and the machine moves and works while maintaining the safety distance f to avoid damage to the machine.
  • the value of the safety distance f can be fixed or adjustable.
  • the value of the safety distance f can be automatically adjusted by the machine, or it can be set or adjusted by the user.
  • the self-moving device is controlled to travel and/or work based on the area type of the target area, so that when the area type of the target area is the first area type, the coverage of the working unit includes a part of the target area, which may include: marking the area type of the part of the target area adjacent to the area to be traveled as a grassland type; controlling the self-moving device to travel and/or work along the boundary between the area determined by the grassland type and the area determined by the first area type.
  • the area to be traveled is a grassland type.
  • the area type of the target area is the first area type
  • the area to be traveled can be expanded as shown in FIG8 , and the intersection area between the grassland area obtained after the expansion and the target area is marked as a grassland attribute (i.e., a grassland type) to obtain a second image.
  • the area to be marked can be determined in the target area, and the part of the target area close to the grassland area can be taken as the area to be marked, and then the area to be marked can be marked as a grassland attribute to obtain a marked grassland area to obtain a second image.
  • the self-moving device can be controlled to move along the boundary between the grassland area and the target area in the second image.
  • the self-moving device since the boundary position between the grassland area and the target area is adjusted, the self-moving device can move along the adjusted boundary, and the boundary is basically consistent with the physical boundary in the actual space. Therefore, the self-moving device can move across the physical boundary in the actual space. The boundary moves and cuts during the movement, so that the grass at the boundary is cut cleanly, achieving the effect of cutting to the edge, improving the cutting coverage rate and user satisfaction.
  • the height threshold can be set to 3 cm, 5 cm, etc.
  • the target area is a manhole cover with a height difference of 3 cm with the working area, then the self-moving device can be controlled to perform a cross-edge action.
  • the self-moving device when the self-moving device enters the edge-along working mode and identifies the process of the stone slab 70 crossing the edge, when a collision with the stone 81 is detected, the self-moving device can be controlled to change the driving direction to drive inside the working area as shown in Figure 14.
  • Driving inside the working area may include: driving along the boundary of the working area, and may also include controlling the projection of the working part in the working area to be inside the working area. For example: when the lawn mower is driving across the edge, when the camera is detected to be displaced, it can be controlled to drive within the working area.
  • the time or continuous distance of the machine driving into the working area is recorded. If it exceeds 5 meters, the machine can be controlled to restart to identify whether the first area type exists. If it exists, the machine continues to drive across the boundary. If no stone slab is detected during the edge-traveling process, the machine is controlled to drive into the working area. If the driving distance exceeds 5 meters, the machine can be controlled to restart the driving across the boundary.
  • the stepping stone is used as a stone road and the crossing action is performed; if it is not in a stable crossing state, the processing logic of avoiding the stepping stone, that is, controlling the machine to travel into the working area, is executed.
  • the processing logic of avoiding the stepping stone that is, controlling the machine to travel into the working area.
  • the stable crossing state is entered, and if the stone road boundary is not seen for a continuous period of time (such as: within 5S), the stable crossing state is exited.
  • the first image captured by the image acquisition device may contain one or more of a grass area, a target area of a first area type, and a target area of a second area type (hereinafter also referred to as an obstacle area).
  • the self-moving device when there are multiple area types in the target area of the first image, can be controlled to travel and/or work based on the area type of the target area, so that the self-moving device avoids the area where the second area type is located during driving, and prevents the self-moving device from traveling along the boundary between the area determined by the grass type and the area determined by the first area type, and part of the machine body travels to the area where the second area type is located, which may cause safety problems.
  • the area types of the target area include the first area type and the second area type, and the area where the first area type is located and the area where the second area type is located are both adjacent to the area to be driven.
  • the self-moving device is controlled to travel and/or work based on the area type of the target area so that the travel distance of the working unit is less than the boundary length between the area where the first area type is located and the area to be traveled, wherein the travel distance is the distance traveled by the self-moving device when the coverage of the working unit includes a part of the target area. That is, the travel distance of the self-moving device in response to identifying the first area type is less than the actual physical boundary length adjacent to the first area type.
  • the control machine only performs part of the cross-border action to prevent safety problems.
  • the area type of each area in the image is obtained, and the area type may include: grass 90, stone road 70 and pool 80.
  • the stone road is adjacent to the pool, and the stone road and the pool as a whole are adjacent to the working area.
  • the lawn mower is controlled to start the cross-edge mode, the camera captures the image, and the grass, stone road and pool in the image are semantically identified, the grass in the image is expanded, and the part of the expanded image that overlaps with the stone road is obtained, and the part is modified to grass, and the stone road and the pool in the non-overlapping part are marked as non-grass.
  • the machine can be controlled to continue driving in the current direction for a period of time, and then the lawn mower can be controlled to change the driving direction to drive along the boundary between grass and non-grass in the image. By delaying the response to the image recognition result, the lawn mower will not fall into the pool when driving to the grass area in the image to ensure the safety of the lawn mower.
  • the self-mobile device collects images during driving and establishes a local map of its surrounding area based on the images.
  • the driving path of the self-mobile device can be planned according to the local map to control the vehicle to avoid the area where the second area type is located after driving according to the adjusted image.
  • the color of the pixels in the area to be marked may be modified to green, or the pattern shape of the area to be marked may be modified to the shape of grass.
  • marking the area type of a portion of the target area adjacent to the area to be driven as a grassland type includes:
  • the raster image includes a grassland raster corresponding to the grassland area and a target raster corresponding to the target area
  • the attributes of the grassland raster are grassland attributes
  • the attributes of the target raster are the first area type or the second area type
  • the attribute of the overlapping grid in the target grid is the first area type, the attribute of the overlapping grid is modified to the grassland attribute;
  • the attribute of the overlapping grid in the target grid is the second area type
  • the attribute of the overlapping grid is modified to a non-grassland attribute to obtain a second image.
  • the grid to be marked may be determined according to the position of the grassland grid and the position of the target grid; the attributes of the grid to be marked are marked as grassland attributes to obtain the second image.
  • the standard for rasterizing an image is: a grid contains 25 pixels, each pixel is marked with a corresponding attribute, and each grid attribute is based on the attribute of a larger number of pixels.
  • the first image can be rasterized based on the camera's internal parameters, external parameters, distortion parameters, and image pixels to obtain a raster image corresponding to the first image.
  • the grassland area can be converted into a grassland grid, and the attributes of the grassland grid are grassland attributes;
  • the target area can be converted into a target grid, and the attributes of the target grid are target attributes, that is, the first region type or the second region type.
  • Non-grass attributes include the first region type or the second region type.
  • the target attribute of the grid to be marked can be modified to the grassland attribute to obtain the second image.
  • the neighboring grid of the grid to be marked includes a grassland grid.
  • the grid to be marked may be a grid adjacent to the grassland grid.
  • the grid to be marked may be regarded as a grassland grid.
  • the left grid of the grid to be marked is a grass grid.
  • the target grid can be used as the grid to be marked.
  • the target grid When the mobile device moves along the boundary of the working area in a clockwise direction, it is determined whether the right grid of the target grid is a grassland grid. If it is a grassland grid, the target grid can be used as a grid to be marked.
  • the lower grid of the grid to be marked is a grass grid.
  • the stone slab may be located directly in front of the machine, and the camera does not capture the side of the stone slab parallel to the machine's forward direction, but only captures the side of the stone slab perpendicular to the machine's forward direction.
  • the left grid of all target grids is the target area, it can be determined whether the grid below the target grid is a grass grid. If it is a grass grid, the target grid can be used as a grid to be marked.
  • the machine when there is no area to be driven in the image, it means that the machine is at a right angle to the boundary. When the machine is driving counterclockwise along the boundary, the machine is controlled to turn left or an alarm is issued.
  • determining the grid to be marked according to the positions of the grassland grid and the target grid includes:
  • the grid to be marked is determined according to the position of the grassland grid, the position of the target grid and the cross-edge distance conditions.
  • the span distance condition may represent the width of a portion of a machine body that exceeds an actual boundary, or the width of a portion of a machine working portion that exceeds a boundary.
  • the target grid adjacent to the grassland grid can be determined as the first column of grids to be marked, and further according to the cross-edge distance condition, the X columns of target grids located on the side of the first column of grids to be marked can be used as other columns of grids to be marked.
  • the X value can be determined according to the cross-edge distance condition.
  • the width of the portion of the machine body that exceeds the actual boundary is required to be 10 cm, and the width of a grid is 5 cm, two columns of target grids can be used as grids to be marked, and X is 1.
  • the control logic of the machine is that the fuselage and the corresponding position of the boundary in the image need to maintain a certain distance, such as 10 cm, and the cross-edge distance condition requires that the width of the part of the machine fuselage that exceeds the actual boundary is 10 cm, and the width of a grid is 5 cm, then the four-column target grid that meets the conditions can be used as the grid to be marked, and X is 3.
  • all the raster in the first raster image can be traversed to determine the raster to be marked in the first raster image, mark it as grass attribute, and obtain a second raster image; then determine the raster to be marked in the second raster image, mark it as grass attribute, and obtain a third raster image; then mark the raster to be marked in the third raster image
  • the grid is marked as grass attribute, and the fourth grid image is obtained; then the grids to be marked in the fourth grid image are marked as grass attribute, and the fifth grid image, i.e., the second image, is obtained.
  • all grids in the image are traversed four times, and four columns of target grids are used as grids to be marked.
  • the grass grid originally having grass attributes will not be modified, and the obstacle grid originally having obstacle attributes will not be modified.
  • controlling the self-moving device to travel and/or work according to the second image includes:
  • the self-moving device is controlled to travel and/or work in the space corresponding to the grass attribute area, avoid the space corresponding to the non-grass attribute area, and control the coverage range of the working part of the self-moving device to meet preset conditions;
  • the preset conditions include that the coverage range of the working part includes a part of the target area, or the coverage range of the working part intersects with the boundary of the working area, or the distance between the coverage range of the working part and the boundary of the working area is less than a first threshold.
  • the self-mobile device in the process of moving along the border in a counterclockwise direction, when the self-mobile device detects the target area based on the image, the self-mobile device can be controlled to turn right and move according to the processed second image until the self-mobile device drives and/or works in the space corresponding to the grass attribute area of the second image, and drives along the position corresponding to the boundary between the grass attribute area and the target attribute area, thereby achieving cross-edge cutting.
  • the self-moving device in the actual space, the self-moving device is driving and cutting across the edge; but in the internal control logic of the self-moving device, it still thinks that it is driving and cutting along the boundary; this is because the grass attribute area and the target attribute area in the second image are re-marked based on the first image.
  • This method is also more compatible with other control logics of the machine.
  • controlling the self-moving device to travel and/or work according to the second image includes:
  • a map of the working area is generated, the map including a drivable area and a non-drivable area, the drivable area corresponds to the grass attribute area of the second image, and the non-drivable area corresponds to the non-grass attribute area of the second image; based on the map, the self-moving device is controlled to drive and/or work so that the self-moving device drives and/or works in the space corresponding to the drivable area and avoids the space corresponding to the non-drivable area.
  • a map of a local area in the working area is generated based on the second image, and the map can reflect the environment around the mobile device, and reflect the grass and non-grass around the mobile device.
  • the drivable area corresponds to the grass attribute area of the second image, including the real grass area and the target area whose attributes are changed to grass attributes.
  • the non-drivable area corresponds to the non-grass attribute area of the second image, including the real obstacle area, the target area whose attributes are not changed, and the obstacle area.
  • the self-moving device can plan the path according to the map, so as to move along the boundary between the drivable area and the non-drivable area, and realize cross-edge cutting in the actual space.
  • the height difference between the target area and the grass area is less than a second threshold.
  • the target area is a safe area, so the height difference between the two cannot be too large.
  • the method further includes:
  • the distance d between the mobile device and the boundary 10 of the working area is controlled.
  • the second area type is identified in the image collected by the self-moving device during the movement along the edge, it means that the outside of the boundary between the to-be-traveled area and the target area may be dangerous, so it cannot move across the boundary.
  • a certain distance d can be maintained between the machine and the boundary 10, and the distance can be fixed or adjustable.
  • the actual distance d may be adjusted according to the acquired edge distance information so that the actual distance d is equal to the distance value represented by the edge distance information.
  • obtaining the edge distance information includes: obtaining user instruction information; and determining the edge distance information according to the user instruction information.
  • the edge distance information can be determined according to the user instruction. For example, if the user selects 10 cm, the edge distance information is 10cm, the self-moving device can adjust the moving direction, thereby adjusting the distance d between itself and the boundary 10 to 10cm.
  • the area type of the portion of the target area adjacent to the area to be driven is marked as a grass type to obtain a second image, including: determining the area to be marked; and when no collision is detected, marking the attributes of the area to be marked in the first image as grass attributes to obtain a second image.
  • the attributes of the area to be marked in the first image are marked as grass attributes to obtain a second image, including: determining the area to be marked; in the case of a collision being detected, determining a first area and a second area of the area to be marked, the distance between the first area and the grass area being smaller than the distance between the second area and the grass area; marking the attributes of the first area as grass attributes to obtain a second image.
  • the machine is provided with collision detection sensors.
  • the control logic of the machine when the machine does not have the cross-edge cutting function (that is, the cross-edge action described above) turned on, the control logic of the machine is that the fuselage needs to maintain a certain distance from the position corresponding to the boundary in the image, such as 15 cm.
  • the control logic of the machine when the machine turns on the cross-edge cutting function and the machine does not detect a collision, the control logic of the machine is that the fuselage needs to maintain a certain distance from the position corresponding to the boundary in the image, such as 10 cm.
  • the cross-edge distance condition requires that the width of the part of the machine body that exceeds the actual boundary is 10 cm, and the width of a grid is 5 cm. In this case, the four-column target grid that meets the conditions can be used as the grid to be marked.
  • the machine can be controlled to move away from the collision object, increase the distance between the machine and the collision object, and move.
  • the control logic of the machine is that the fuselage and the corresponding position of the boundary in the image need to maintain a certain distance, such as 10cm, and the cross-edge distance condition can be changed to require that the width of the part of the machine body that exceeds the actual boundary is 0cm, and the two columns of target grids that meet the conditions can be used as grids to be marked.
  • the number of columns of grids to be marked can be reduced so that the number of columns is less than the number of columns of grids to be marked when cross-edge cutting is turned on and no collision is detected.
  • the area type of the portion of the target area adjacent to the area to be driven is marked as a grass type, including: determining the area to be marked; determining a first area and a second area of the area to be marked, wherein the distance between the first area and the grass area is smaller than the distance between the second area and the grass area; marking the attributes of the first area and the second area as grass attributes; and in the event of a collision being detected, marking the attributes of the second area as target attributes to obtain a second image.
  • all grids to be marked may be marked as grass grids, and then a portion of the grids to be marked may be marked back to the target attribute, thereby obtaining a second image.
  • the control method when the self-moving device does not detect a collision, the step of marking the attributes of the area to be marked in the first image as grass attributes to obtain a second image is executed; the control method also includes: when the self-moving device detects a collision, marking the attributes of the area to be selected in the first image as target attributes to obtain a third image, and the area to be selected is an area in the grass area close to the target area; according to the third image, the self-moving device is controlled to travel and/or work.
  • the attribute of the area to be marked can be directly marked as a grass attribute to obtain a second image.
  • the grid near the target area in the grass area can be marked as a target attribute to obtain a third image, and then the self-moving device can be controlled to travel and/or work according to the third image, so that the boundary is retracted toward the grass, and the self-moving device is away from the collision object to avoid collision.
  • the position of the retracted boundary can be directly analyzed according to the third image, and then the machine can be controlled.
  • a grid map can also be generated according to the third image, and the machine can be controlled according to the boundary information in the map.
  • an attribute of a to-be-selected area in the first image is marked as a target attribute to obtain a third image.
  • the step of marking the attributes of the area to be selected in the first image as the target attributes is performed to obtain the third image.
  • the step of marking the attributes of the area to be marked in the first image as the grass attributes is performed to obtain the second image. steps.
  • the control logic of the machine is that the machine body needs to maintain a certain distance from the position corresponding to the boundary in the image, such as 15 cm.
  • the machine's control logic is that the machine body needs to maintain a certain distance from the corresponding position of the boundary in the image, such as 10 cm.
  • the cross-edge distance condition requires that the width of the part of the machine body that exceeds the actual boundary is 10 cm, and the width of a grid is 5 cm.
  • the four-column target grid that meets the conditions can be used as the grid to be marked.
  • the machine's control logic is that the machine body needs to maintain a certain distance from the corresponding position of the boundary in the image, such as 10 cm, and the cross-edge distance condition is changed to require the machine body to retract 10 cm inward from the actual boundary. In this way, the two columns of target grids in the grass area can be used as candidate grids.
  • the self-moving device when the cross-edge cutting function is turned on and a collision is detected when crossing the edge, the self-moving device can be controlled to move inward along the edge within a period of time after the collision, that is, the self-moving device can be controlled to move along the edge inside the grass, and the distance between the self-moving device and the boundary can be appropriately increased to avoid collision.
  • An embodiment of the present disclosure also provides a self-moving device, comprising: a processor, a memory, and a computer program stored in the memory and executable by the processor, wherein when the computer program is executed by the processor, the control method of the self-moving device described in any one of the embodiments of the present disclosure is implemented.
  • this embodiment further provides a computer storage medium, in which a computer program is stored.
  • the computer storage medium may be a ferromagnetic random access memory (FRAM), a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a flash memory, a magnetic surface memory, an optical disc, or a compact disc read-only memory (CD-ROM); or various devices including one or any combination of the above memories, such as a mobile phone, a computer, a tablet device, a personal digital assistant, etc.
  • FRAM ferromagnetic random access memory
  • ROM read-only memory
  • PROM programmable read-only memory
  • EPROM erasable programmable read-only memory
  • EEPROM electrically erasable programmable read-only memory
  • flash memory a magnetic surface memory
  • CD-ROM compact disc read-only memory
  • various devices including one or

Landscapes

  • Engineering & Computer Science (AREA)
  • Aviation & Aerospace Engineering (AREA)
  • Radar, Positioning & Navigation (AREA)
  • Remote Sensing (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Automation & Control Theory (AREA)
  • Control Of Position, Course, Altitude, Or Attitude Of Moving Bodies (AREA)

Abstract

The present application discloses a control method for an autonomous mobile device, an autonomous mobile device, and a storage medium. The method comprises: obtaining the region type of each region in an acquired image, each region at least comprising: a region for traveling and a target region, wherein the region for traveling is a part of a working region, and the working region is a region adjacent to the region for traveling; and when the region type of the target region is a first region type, controlling an autonomous mobile device to change a traveling mode, such that the coverage range of a working unit comprises a part of the target region. In this way, the autonomous mobile device can process the boundary of the working region while the safety is guaranteed, the processing coverage rate at the boundary of the working region is improved, and the use experience of a user is improved.

Description

自移动设备的控制方法、自移动设备及存储介质Self-equipping device control method, self-equipping device and storage medium 技术领域Technical Field
本发明涉及智能控制技术领域,特别是涉及一种自移动设备的控制方法、自移动设备及存储介质。The present invention relates to the field of intelligent control technology, and in particular to a control method for a self-moving device, a self-moving device and a storage medium.
背景技术Background Art
随着智能化的发展趋势越来越快,自移动设备已广泛应用于多种行业以及人们的日常生活,自移动设备能够根据预先设定的路径或区域行走并执行相关工作。As the trend of intelligent development is getting faster and faster, autonomous mobile devices have been widely used in various industries and people's daily lives. Autonomous mobile devices can walk according to pre-set paths or areas and perform related tasks.
常用的自移动设备包括自动割草机、自动洒水器等,以自动割草机为例,由于工作区域的边界外侧可能存在不能切割的物体,如墙体、公路、花等,为了安全考虑,自动割草机通常只在边界内侧切割,此时机身壳体和刀盘的切割范围都位于边界内侧,或者与边界内侧存在一定距离,导致边界处的草无法切割干净。Commonly used self-moving equipment includes automatic lawn mowers, automatic sprinklers, etc. Taking automatic lawn mowers as an example, there may be objects that cannot be cut outside the boundary of the working area, such as walls, roads, flowers, etc. For safety reasons, automatic lawn mowers usually only cut inside the boundary. At this time, the cutting range of the body shell and the blade disc are both inside the boundary, or there is a certain distance from the inside of the boundary, resulting in the grass at the boundary cannot be cut cleanly.
发明内容Summary of the invention
为克服相关技术中存在的问题,本公开提供一种自移动设备的控制方法、自移动设备及存储介质。In order to overcome the problems existing in the related art, the present disclosure provides a control method of a self-moving device, a self-moving device and a storage medium.
根据本公开实施例的第一方面,提供一种自移动设备的控制方法,所述自移动设备包括工作部,所述工作部被配置为执行作业工作,所述自移动设备还包括:图像采集装置,所述图像采集装置被配置为采集所述自移动设备前方的图像,所述自移动设备被配置为在工作区域中行驶和/或工作,其特征在于,所述方法包括:According to a first aspect of an embodiment of the present disclosure, a control method for a self-moving device is provided, wherein the self-moving device includes a working part, the working part is configured to perform a work operation, and the self-moving device further includes: an image acquisition device, the image acquisition device is configured to acquire an image in front of the self-moving device, and the self-moving device is configured to travel and/or work in a working area, wherein the method includes:
获取所采集的图像中各个区域的区域类型,所述各个区域至少包括:待行驶区域以及目标区域,其中,所述待行驶区域为所述工作区域的一部分,所述目标区域为与所述待行驶区域相邻的区域;Acquire the area type of each area in the acquired image, wherein each area at least includes: an area to be driven and a target area, wherein the area to be driven is a part of the working area, and the target area is an area adjacent to the area to be driven;
当所述目标区域的区域类型为第一区域类型时,控制所述自移动设备改变行驶方式,以使得所述工作部的覆盖范围包括所述目标区域的一部分。When the area type of the target area is the first area type, the self-moving device is controlled to change the driving mode so that the coverage range of the working unit includes a part of the target area.
在一个实施例中,所述方法还包括:将所采集的图像输入训练得到的图像识别模型,以对所述图像进行语义分割得到各个区域的区域类型。In one embodiment, the method further includes: inputting the collected image into a trained image recognition model to perform semantic segmentation on the image to obtain the region type of each region.
在一个实施例中,所述方法还包括:In one embodiment, the method further comprises:
当所述工作模式为预设工作模式时,执行当所述目标区域的区域类型为第一区域类型时,控制所述自移动设备改变行驶方式,以使得所述工作部的覆盖范围包括所述目标区域的一部分,所述预设工作模式为沿边工作模式或用户预先设置的工作模式,所述沿边工作模式为控制所述自移动设备沿着所述工作区域的边界移动和工作的模式。When the working mode is a preset working mode, when the area type of the target area is a first area type, the self-moving device is controlled to change the driving mode so that the coverage range of the working unit includes a part of the target area. The preset working mode is an edge working mode or a working mode preset by the user. The edge working mode is a mode for controlling the self-moving device to move and work along the boundary of the working area.
在一个实施例中,所述第一区域类型包括道路、井盖、石板路、硬质路面、落叶和泥土中的一个或多个,或,根据用户指令得到所述第一区域类型。In one embodiment, the first area type includes one or more of roads, manhole covers, stone roads, hard roads, fallen leaves and mud, or the first area type is obtained according to a user instruction.
在一个实施例中,所述方法还包括:在所述工作部覆盖所述目标区域的一部分的过程中,当检测到接触式碰撞时,控制所述自移动设备改变行驶路径以向所述工作区域内部行驶。In one embodiment, the method further comprises: when a contact collision is detected during the process in which the working part covers a portion of the target area, controlling the self-moving device to change a driving path so as to drive toward the inside of the working area.
在一个实施例中,获取所采集的图像中各个区域的区域类型,还包括:In one embodiment, obtaining the region type of each region in the acquired image further includes:
对所述图像进行深度估计处理,以确定所述目标区域对应的深度信息,所述深度信息用于表示所述目标区域的各位置与所述图像采集装置之间的距离;Performing depth estimation processing on the image to determine depth information corresponding to the target area, the depth information being used to represent the distance between each position of the target area and the image acquisition device;
相应的,当所述目标区域的区域类型为第一区域类型时,控制所述自移动设备改变行驶方式,包 括:Correspondingly, when the area type of the target area is the first area type, the self-moving device is controlled to change the driving mode, including include:
根据所述目标区域的区域类型以及所述深度信息控制所述自移动设备改变行驶方式,以使得当所述目标区域的区域类型为第一区域类型,并且,所述目标区域与所述待行驶区域之间的高度差小于高度阈值时,所述工作部的覆盖范围包括所述目标区域的一部分。The self-moving device is controlled to change the driving mode according to the area type of the target area and the depth information, so that when the area type of the target area is the first area type and the height difference between the target area and the area to be driven is less than a height threshold, the coverage range of the working unit includes a part of the target area.
在一个实施例中,对所述图像进行语义分割得到各个区域的区域类型,所述待行驶区域的区域类型为:草地类型,所述目标区域的区域类型为:第一区域类型;相应的,In one embodiment, semantic segmentation is performed on the image to obtain the region type of each region, the region type of the to-be-traveled region is a grassland type, and the region type of the target region is a first region type; accordingly,
控制所述工作部的覆盖范围包括所述目标区域的一部分,包括:Controlling the coverage of the working portion to include a portion of the target area comprises:
将所述目标区域中与所述待行驶区域相邻部分的区域类型标记为草地类型;Marking the area type of the portion of the target area adjacent to the area to be driven as a grassland type;
控制所述自移动设备沿着所述草地类型所确定的区域与所述第一区域类型所确定的区域之间的边界行驶和/或工作。The self-moving device is controlled to travel and/or operate along a boundary between an area defined by the grass type and an area defined by the first area type.
在一个实施例中,当所述目标区域的区域类型为第二区域类型时,控制所述自移动设备在所述工作区域内行驶和/或工作。In one embodiment, when the area type of the target area is the second area type, the self-moving device is controlled to travel and/or work in the working area.
在一个实施例中,所述第二区域类型包括墙体、土坑、水池、栅栏、花圃、土壤硬度小于硬度阈值的土壤、灌溉设施区域和可移动生命体区域中的一个或多个。In one embodiment, the second area type includes one or more of a wall, a dirt pit, a pool, a fence, a flower bed, soil with a hardness less than a hardness threshold, an irrigation facility area, and a movable life form area.
在一个实施例中,控制所述自移动设备在所述工作区域内行驶和/或工作,包括:In one embodiment, controlling the self-moving device to travel and/or work in the working area includes:
获取沿边距离信息;Get the distance information along the edge;
根据所述沿边距离信息,控制所述自移动设备在所述工作区域内行驶和/或工作。The self-moving device is controlled to travel and/or work in the working area according to the edge distance information.
在一个实施例中,获取沿边距离信息,包括:In one embodiment, obtaining edge distance information includes:
获取用户指令信息;Get user command information;
根据所述用户指令信息,确定所述沿边距离信息。The edge distance information is determined according to the user instruction information.
在一个实施例中,所述方法还包括:当所述目标区域的区域类型为第一区域类型时,控制所述自移动设备改变行驶方式,以使得所述自移动设备避开所述第二区域类型所在区域,其中,所述目标区域的区域类型包括第一区域类型以及第二区域类型,且所述第一区域类型所在区域以及所述第二区域类型所在区域均与所述待行驶区域相邻。In one embodiment, the method further includes: when the area type of the target area is a first area type, controlling the self-moving device to change the driving mode so that the self-moving device avoids the area where the second area type is located, wherein the area type of the target area includes a first area type and a second area type, and the area where the first area type is located and the area where the second area type is located are both adjacent to the area to be driven.
在一个实施例中,所述方法还包括:当所述目标区域的区域类型为第一区域类型时,控制所述自移动设备改变行驶方式,以使得所述工作部的行驶距离小于第一区域类型所在区域与所述待行驶区域之间的边界长度,其中,所述行驶距离为所述工作部的覆盖范围包括所述目标区域的一部分时所述自移动设备行驶的距离。In one embodiment, the method further includes: when the area type of the target area is a first area type, controlling the self-moving device to change the driving mode so that the driving distance of the working unit is less than the boundary length between the area where the first area type is located and the area to be driven, wherein the driving distance is the distance traveled by the self-moving device when the coverage range of the working unit includes a part of the target area.
在一个实施例中,获取所采集的图像中各个区域的区域类型之前,所述自移动设备沿着第一路径行驶;当所述目标区域的区域类型为第一区域类型时,控制所述自移动设备改变行驶方式,包括:In one embodiment, before obtaining the area type of each area in the acquired image, the self-moving device travels along a first path; when the area type of the target area is the first area type, controlling the self-moving device to change the driving mode includes:
控制所述自移动设备沿着第一路径继续行驶一段时间,在行驶一段时间之后,改变行驶路径以使得所述工作部的覆盖范围包括所述目标区域的一部分。The self-moving device is controlled to continue traveling along the first path for a period of time, and after traveling for a period of time, the traveling path is changed so that the coverage range of the working unit includes a part of the target area.
根据本公开实施例的第二方面,本申请实施例提供一种自移动设备,所述自移动设备包括:According to a second aspect of an embodiment of the present disclosure, an embodiment of the present application provides a self-moving device, the self-moving device comprising:
工作部,所述工作部被配置为执行作业工作;A working unit configured to perform a work operation;
图像采集装置,所述图像采集装置被配置为采集所述自移动设备前方的图像;An image acquisition device, wherein the image acquisition device is configured to acquire an image in front of the mobile device;
控制器,与所述工作部与所述图像采集装置信号相连,所述控制器被配置为控制所述自移动设备在工作区域中行驶和/或工作,包括:A controller is connected to the working part and the image acquisition device by signal, and the controller is configured to control the self-moving device to travel and/or work in the working area, including:
所述控制器获取所采集的图像中各个区域的区域类型,所述各个区域至少包括:待行驶区域以及目标区域,其中,所述待行驶区域为所述工作区域的一部分,所述目标区域为与所述待行驶区域相邻 的区域;The controller obtains the area type of each area in the collected image, and each area at least includes: a waiting area and a target area, wherein the waiting area is a part of the working area, and the target area is adjacent to the waiting area. area;
当所述目标区域的区域类型为第一区域类型时,控制所述自移动设备改变行驶方式,以使得所述工作部的覆盖范围包括所述目标区域的一部分。When the area type of the target area is the first area type, the self-moving device is controlled to change the driving mode so that the coverage range of the working unit includes a part of the target area.
根据本公开实施例的第三方面,本申请实施例提供一种计算机可读存储介质,所述计算机可读存储介质中存储有计算机程序,所述计算机程序被处理器执行时实现上述方法的步骤。According to a third aspect of an embodiment of the present disclosure, an embodiment of the present application provides a computer-readable storage medium, in which a computer program is stored, and when the computer program is executed by a processor, the steps of the above method are implemented.
本公开实施例提供的技术方案可以包括以下有益效果:获取所采集的图像中各个区域的区域类型,当目标区域的区域类型为第一区域类型时,控制自移动设备改变行驶方式,以使得工作部的覆盖范围包括目标区域的一部分。使自移动设备能够在兼顾安全性的前提下,对工作区域的边界处进行处理,提高了对工作区域的边界处的处理覆盖率,提升了用户使用体验。进一步的,自移动设备能够快速识别出图像中各个区域的区域类型,即,能够快速识别出多种场景,从而可以针对不同场景选取采取不同的工作策略。The technical solution provided by the embodiment of the present disclosure may include the following beneficial effects: obtaining the area type of each area in the captured image, and when the area type of the target area is the first area type, controlling the self-moving device to change the driving mode so that the coverage of the working part includes a part of the target area. The self-moving device can process the boundary of the working area while taking safety into consideration, thereby improving the processing coverage rate of the boundary of the working area and enhancing the user experience. Furthermore, the self-moving device can quickly identify the area type of each area in the image, that is, it can quickly identify a variety of scenes, so that different working strategies can be selected for different scenes.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
图1为本发明实施例提供的自移动设备的控制方法的流程示意图;FIG1 is a schematic flow chart of a method for controlling a self-moving device provided by an embodiment of the present invention;
图2为本发明实施例中工作区域的示意图一;FIG2 is a schematic diagram of a working area according to an embodiment of the present invention;
图3为本发明实施例中工作区域的示意图二;FIG3 is a second schematic diagram of a working area in an embodiment of the present invention;
图4为本发明实施例中工作区域的示意图三;FIG4 is a third schematic diagram of a working area in an embodiment of the present invention;
图5为本发明实施例中工作区域的各边界与起充站之间偏移量的示意图;FIG5 is a schematic diagram of the offset between each boundary of the working area and the charging station in an embodiment of the present invention;
图6为本发明实施例提供的自移动设备检测到障碍区域的场景示意图;FIG6 is a schematic diagram of a scenario in which an obstacle area is detected by a mobile device according to an embodiment of the present invention;
图7为本发明实施例提供的自移动设备拍摄的第一图像;FIG7 is a first image captured by a mobile device according to an embodiment of the present invention;
图8为本发明实施例提供的将第一图像中的与待行驶区域相邻部分的区域类型标记为草地类型后的第二图像;FIG8 is a second image provided by an embodiment of the present invention after marking the area type of the portion of the first image adjacent to the area to be driven as a grassland type;
图9为本发明实施例提供的自移动设备在工作区域内部沿着工作区域的边界行驶的场景示意图;FIG9 is a schematic diagram of a scenario in which a mobile device is traveling along a boundary of a working area within a working area according to an embodiment of the present invention;
图10为本发明实施例提供的自移动设备执行跨边动作的场景示意图;FIG10 is a schematic diagram of a scenario in which a mobile device performs a cross-edge action according to an embodiment of the present invention;
图11-12为本发明实施例提供的自移动设备执行跨边界动作的另一场景示意图;11-12 are schematic diagrams of another scenario in which a mobile device performs a cross-border action according to an embodiment of the present invention;
图13-14为本发明实施例提供的自移动设备执行跨边界动作的另一场景示意图;13-14 are schematic diagrams of another scenario in which a mobile device performs a cross-border action according to an embodiment of the present invention;
图15为本发明实施例提供的自移动设备结构示意图;FIG15 is a schematic diagram of the structure of a self-moving device provided in an embodiment of the present invention;
图16为本发明实施例提供的自移动设备工作模块示意图。FIG. 16 is a schematic diagram of a working module of a self-moving device provided in an embodiment of the present invention.
具体实施方式DETAILED DESCRIPTION
这里将详细地对示例性实施例进行说明,其示例表示在附图中。下面的描述涉及附图时,除非另有表示,不同附图中的相同数字表示相同或相似的要素。以下示例性实施例中所描述的实施方式并不代表与本申请相一致的所有实施方式。相反,它们仅是与如所附权利要求书中所详述的、本申请的一些方面相一致的装置和方法的例子。Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素,此外,本申请不同实施例中具有同样命名的部件、特征、要素可能具有相同含义,也 可能具有不同含义,其具体含义需以其在该具体实施例中的解释或者进一步结合该具体实施例中上下文进行确定。It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "includes a..." does not exclude the existence of other identical elements in the process, method, article or device including the element. In addition, components, features, and elements with the same names in different embodiments of the present application may have the same meaning, and also It may have different meanings, and its specific meaning needs to be determined by its explanation in this specific embodiment or further combined with the context in this specific embodiment.
应当理解,尽管在本文可能采用术语第一、第二、第三等来描述各种信息,但这些信息不应限于这些术语。这些术语仅用来将同一类型的信息彼此区分开。例如,在不脱离本文范围的情况下,第一信息也可以被称为第二信息,类似地,第二信息也可以被称为第一信息。取决于语境,如在此所使用的词语"如果"可以被解释成为"在……时"或"当……时"或"响应于确定"。再者,如同在本文中所使用的,单数形式“一”、“一个”和“该”旨在也包括复数形式,除非上下文中有相反的指示。应当进一步理解,术语“包含”、“包括”表明存在所述的特征、步骤、操作、元件、组件、项目、种类、和/或组,但不排除一个或多个其他特征、步骤、操作、元件、组件、项目、种类、和/或组的存在、出现或添加。此处使用的术语“或”和“和/或”被解释为包括性的,或意味着任一个或任何组合。因此,“A、B或C”或者“A、B和/或C”意味着“以下任一个:A;B;C;A和B;A和C;B和C;A、B和C”。仅当元件、功能、步骤或操作的组合在某些方式下内在地互相排斥时,才会出现该定义的例外。It should be understood that, although the terms first, second, third, etc. may be used to describe various information in this article, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of this article, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein can be interpreted as "at the time of..." or "when..." or "in response to determination". Furthermore, as used in this article, the singular forms "one", "one" and "the" are intended to also include plural forms, unless there is an opposite indication in the context. It should be further understood that the terms "comprising", "including" indicate that there are described features, steps, operations, elements, components, projects, kinds, and/or groups, but do not exclude the existence, occurrence or addition of one or more other features, steps, operations, elements, components, projects, kinds, and/or groups. The terms "or" and "and/or" used herein are interpreted as inclusive, or mean any one or any combination. Thus, “A, B, or C” or “A, B and/or C” means “any of the following: A; B; C; A and B; A and C; B and C; A, B, and C.” An exception to this definition will occur only when a combination of elements, functions, steps, or operations are inherently mutually exclusive in some manner.
应该理解的是,虽然本申请实施例中的流程图中的各个步骤按照箭头的指示依次显示,但是这些步骤并不是必然按照箭头指示的顺序依次执行。除非本文中有明确的说明,这些步骤的执行并没有严格的顺序限制,其可以以其他的顺序执行。而且,图中的至少一部分步骤可以包括多个子步骤或者多个阶段,这些子步骤或者阶段并不必然是在同一时刻执行完成,而是可以在不同的时刻执行,其执行顺序也不必然是依次进行,而是可以与其他步骤或者其他步骤的子步骤或者阶段的至少一部分轮流或者交替地执行。It should be understood that, although the various steps in the flowchart in the embodiment of the present application are displayed in sequence according to the indication of the arrows, these steps are not necessarily performed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and it can be performed in other orders. Moreover, at least a portion of the steps in the figure may include a plurality of sub-steps or a plurality of stages, and these sub-steps or stages are not necessarily performed at the same time, but can be performed at different times, and their execution order is not necessarily performed in sequence, but can be performed in turn or alternately with other steps or at least a portion of the sub-steps or stages of other steps.
需要说明的是,在本文中,采用了诸如S101、S102等步骤代号,其目的是为了更清楚简要地表述相应内容,不构成顺序上的实质性限制,本领域技术人员在具体实施时,可能会先执行S102后执行S101等,但这些均应在本申请的保护范围之内。It should be noted that, in this article, step codes such as S101, S102, etc. are used for the purpose of expressing the corresponding content more clearly and concisely, and do not constitute a substantial limitation on the sequence. When implementing the step, those skilled in the art may execute S102 first and then S101, etc., but these should all be within the scope of protection of this application.
应当理解,此处所描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
在后续的描述中,使用用于表示元件的诸如“模块”、“部件”或者“单元”的后缀仅为了有利于本申请的说明,其本身没有特定的意义。因此,“模块”、“部件”或者“单元”可以混合地使用。In the subsequent description, the suffixes such as "module", "component" or "unit" used to represent elements are only used to facilitate the description of the present application, and have no specific meanings. Therefore, "module", "component" or "unit" can be used in a mixed manner.
考虑到目前自移动设备在边界限定的工作区域中工作时,在工作区域边界处的处理覆盖率低。以自移动设备为自动割草机为例,自动割草机在切割时,在工作区域的边界处的切割覆盖率低,其原因主要包括三个方面:一个方面是边界的外侧可能是用户种植的花,也可能是篱笆、墙体、公路等障碍物,为了避免切割用于观赏的花,或者避免碰撞到障碍物,所以一般自动割草机在工作时,都在边界内侧切割,整个机身(包括壳体、刀盘的切割范围)都位于边界内侧,甚至与边界还有一定距离。另一个方面是基于视觉产品的自动割草机,需要依靠视觉摄像头来移动,而在通过摄像头识别边界、沿边界移动切割的场景中,通过视觉实时确定边界与机身之间的横向距离时,该距离一般有误差,导致机身与边界之间存在有距离。此外,为了安全性,一般自动割草机中刀盘的切割范围也不会超出机身,因此可能导致刀盘与边界之间有漏割区域。至少由于上述这三方面原因导致机器在完成工作区域的切割工作后,仍然会识别到工作区域中存在未被切割的草,这些未被切割的草大都集中在边界附近。Considering that the processing coverage rate at the boundary of the working area is low when the self-moving device is working in the working area defined by the boundary. Taking the self-moving device as an automatic lawn mower as an example, the cutting coverage rate at the boundary of the working area of the automatic lawn mower is low when cutting. The main reasons include three aspects: one is that the outside of the boundary may be flowers planted by the user, or obstacles such as fences, walls, and roads. In order to avoid cutting ornamental flowers or avoiding collisions with obstacles, the general automatic lawn mower cuts inside the boundary when working, and the entire body (including the shell and the cutting range of the blade) is located inside the boundary, and even has a certain distance from the boundary. Another aspect is that the automatic lawn mower based on visual products needs to rely on visual cameras to move. In the scene where the boundary is identified by the camera and the cutting is moved along the boundary, when the lateral distance between the boundary and the body is determined in real time by vision, the distance generally has an error, resulting in a distance between the body and the boundary. In addition, for safety reasons, the cutting range of the blade in the general automatic lawn mower will not exceed the body, which may cause missed cutting areas between the blade and the boundary. At least due to the above three reasons, after the machine completes the cutting work in the working area, it will still identify the existence of uncut grass in the working area, and most of the uncut grass is concentrated near the boundary.
然而,用户可能有以下需求:公路和草坪之间的边界希望能切割干净;或者,泥地和草坪之间的边界希望能切割干净;或者,由于视觉识别模型只把图像分成草、非草两类,草坪上的一堆黄色落叶会被识别为非草,草和非草之间为边界,导致自动割草机无法将落叶周围切割干净,但用户实际希望能切割干净。也就是说,需要解决现有自移动设备如何在兼顾安全性的前提下,对工作区域边界处的草进行处理的问题。另外,在实际应用过程中,会存在如公路、泥地、篱笆、墙体等多种场景,且用 户对于不同场景是否切割干净可能会存在不同需求。也就是说,还需要自移动设备能够快速识别出多种场景,且针对不同场景选取采取不同的工作策略。基于此,如图1所示,本申请提出一种自移动设备的控制方法。应该说明的是,虽然本公开提供了如下述实施例或附图所示的方法操作步骤,但基于常规或者无需创造性的劳动在所述方法中可以包括更多或者更少的操作步骤。在逻辑性上不存在必要因果关系的步骤中,这些步骤的执行顺序不限于本公开实施例提供的执行顺序。However, users may have the following requirements: they hope to cut the boundary between the road and the lawn cleanly; or, they hope to cut the boundary between the mud and the lawn cleanly; or, because the visual recognition model only divides the image into two categories: grass and non-grass, a pile of yellow fallen leaves on the lawn will be identified as non-grass, and the boundary between grass and non-grass will make the automatic lawn mower unable to cut the area around the fallen leaves cleanly, but the user actually hopes to cut it cleanly. In other words, it is necessary to solve the problem of how existing self-moving equipment can handle the grass at the boundary of the working area while taking safety into consideration. In addition, in actual application, there will be a variety of scenes such as roads, mud, fences, walls, etc., and the users Users may have different requirements for whether different scenes are cut cleanly. In other words, the self-moving device is also required to be able to quickly identify multiple scenes, and select different working strategies for different scenes. Based on this, as shown in Figure 1, the present application proposes a control method for a self-moving device. It should be noted that although the present disclosure provides method operation steps as shown in the following embodiments or drawings, more or fewer operation steps may be included in the method based on routine or no creative labor. In the steps where there is no necessary causal relationship logically, the execution order of these steps is not limited to the execution order provided in the embodiments of the present disclosure.
参阅图1,为本申请实施例提供的一种自移动设备的控制方法,自移动设备包括工作部且自移动设备被配置为在工作区域中行驶和/或工作为例,本实施例提供的方法包括:Referring to FIG. 1 , a control method of a self-moving device provided in an embodiment of the present application is shown. For example, the self-moving device includes a working part and the self-moving device is configured to travel and/or work in a working area. The method provided in this embodiment includes:
获取各个区域的区域类型,各个区域至少包括:待行驶区域以及目标区域,其中,目标区域为与所述工作区域相邻的区域。The area type of each area is obtained, and each area at least includes: a to-be-traveled area and a target area, wherein the target area is an area adjacent to the working area.
本实施例提供了一种自移动设备,如图1和图15、图16所示,自移动设备包括机身27、成像传感器200(下文也称为视觉传感器,或,图像采集装置28)、位置传感器500以及控制电路600。This embodiment provides a self-moving device, as shown in Figures 1, 15 and 16, the self-moving device includes a body 27, an imaging sensor 200 (hereinafter also referred to as a visual sensor, or an image acquisition device 28), a position sensor 500 and a control circuit 600.
具体地,机身27包括驱动装置700,驱动装置700用于根据接收到的驱动指令,带动机身27在工作面上移动,其通常包括滚轮和驱动滚轮转动的电机。滚轮可包括主动轮和从动轮。滚轮211、212可分布于机身27的两侧,每侧的滚轮的数量可以为一个或两个等。Specifically, the body 27 includes a driving device 700, which is used to drive the body 27 to move on the work surface according to the received driving instruction, and generally includes a roller and a motor that drives the roller to rotate. The roller may include a driving wheel and a driven wheel. The rollers 211 and 212 may be distributed on both sides of the body 27, and the number of rollers on each side may be one or two.
机身27还包括工作部,工作部用于执行具体的工作任务。例如自移动设备为自动割草机,则工作部包括割草刀盘221、切割马达222等,也可以包括割草高度调节机构等优化或调整割草效果的辅助部件;例如自移动设备为自动吸尘器,则工作部包括吸尘马达、吸尘口、吸尘管、真空室、集尘装置等用于执行吸尘任务的工作部件。The body 27 also includes a working part, which is used to perform specific work tasks. For example, if the self-moving device is an automatic lawn mower, the working part includes a mowing blade 221, a cutting motor 222, etc., and 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 part includes a vacuum motor, a vacuum port, a vacuum pipe, a vacuum chamber, a dust collection device, etc., which are used to perform vacuum tasks.
机身27还可以包括能量模块,能量模块用于对自移动设备的各项工作提供能量,其可以包括可充电电池和充电连接结构,其中,充电连接结构通常为充电电极片,该充电电极片可与设置于停靠站的充电电极片配套使用,以对自移动设备进行充电。The body 27 may also include an energy module, which is used to provide energy for various operations of the self-moving 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 the docking station to charge the self-moving device.
机身27还包括存储器400,存储器400用于存储传感器或控制电路产生的数据,或预先存储供控制电路使用的数据。The body 27 also 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.
机身27还包括位置传感器500,位置传感器500可以包括卫星定位传感器、惯性传感器IMU或安装于驱动装置700的里程计ODO等,用于根据机身27的移动情况获取相对位置。The fuselage 27 also includes a position sensor 500 , which may include a satellite positioning sensor, 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 fuselage 27 .
除了上述模块,机身27还可以包括容纳和安装各个模块的壳体、供使用者操作的控制面板等,还可以包括各种环境传感器,例如湿度传感器、温度传感器、加速度传感器、光线传感器等,上述传感器可以辅助自移动设备判断工作环境,以执行对应的程序。In addition to the above modules, the body 27 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 self-mobile device in determining the working environment so as to execute the corresponding program.
控制电路600(也可也称为控制器)是自移动设备的核心部件,用于控制自移动设备自动移动和工作,其执行的功能包括控制工作模块启动工作或停止、生成移动路径并控制驱动装置700依照路径移动,判断能量模块的电量并及时控制自移动设备返回停靠站自动对接充电,结合环境传感器的数据执行对应的程序等。The control circuit 600 (also known as the controller) 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 along the path, judging the power of the energy module and timely controlling the self-moving device to return to the docking station for automatic docking and charging, and executing corresponding programs in combination with the data of the environmental sensor.
参照图1和图15、图16,自移动设备包括成像传感器200,成像传感器200连接机身100,用于采集机身27前进方向上的图像,该图像至少部分是前进方向上的工作面的图像。采集到的图像位于成像传感器200的视场范围210内。成像传感器200可以为业内常用的摄像头或激光雷达等。1 and 15 and 16, the self-moving device includes an imaging sensor 200, which is connected to the fuselage 100 and is used to collect images in the forward direction of the fuselage 27, and the image is at least partially an image of the working surface in the forward direction. The collected image is located within the field of view 210 of the imaging sensor 200. The imaging sensor 200 can be a camera or a laser radar commonly used in the industry.
一般地,成像传感器200安装于机身27的前部靠上的位置,优选为居中设置,视角朝向前下方以采集工作面的图像。其视场范围的大小可以根据实际需求进行调节,视场范围210越大,采集到机身27前进方向上的图像越多,反之越少。机身27前进方向可以有多种,例如正常前行、后退、转向等,本实施例中,机身的前进方向指正常前行的方向,即机身的中轴线的方向,成像传感器200在本申请 中可以为摄像头。Generally, the imaging sensor 200 is installed at the upper front part of the fuselage 27, preferably in the center, with the viewing angle facing the front and bottom to collect images of the work surface. The size of its field of view can be adjusted according to actual needs. The larger the field of view 210, the more images collected in the forward direction of the fuselage 27, and vice versa. The forward direction of the fuselage 27 can have multiple directions, such as normal forward movement, backward movement, turning, etc. In this embodiment, the forward direction of the fuselage refers to the normal forward direction, that is, the direction of the central axis of the fuselage. The imaging sensor 200 in this application The middle one can be a camera.
在本实施例中,工作区域可以为自移动设备行驶和/或工作的区域,该工作区域由边界限定。当然,自移动设备也可以行驶至工作区域之外执行作业工作。待行驶区域可以为工作区域的一部分,例如:可以为自移动设备的运动方向前方指定范围内的工作区域,或自移动设备所在位置在工作区域上所标识的区域。例如,以自移动设备为自动割草机为例,工作区域可以为自移动设备的运动方向前方且距离自移动设备3米范围内的草地区域。可以理解,待行驶区域可以为工作区域中的部分区域,即,工作区域中的任一区域,而目标区域可以为位于工作区域外且与待行驶区域相邻的任一区域。In this embodiment, the working area may be an area where the self-moving device travels and/or works, and the working area is defined by a boundary. Of course, the self-moving device may also travel outside the working area to perform work. The area to be traveled may be a part of the working area, for example: it may be a working area within a specified range in front of the moving direction of the self-moving device, or an area marked on the working area where the self-moving device is located. For example, taking the self-moving device as an automatic lawn mower as an example, the working area may be a grass area in front of the moving direction of the self-moving device and within 3 meters of the self-moving device. It can be understood that the area to be traveled may be a partial area in the working area, that is, any area in the working area, and the target area may be any area outside the working area and adjacent to the area to be traveled.
可以理解,与待行驶区域相邻的区域可能只有一个,也可能有多个,即目标区域可能为一个或多个。需要说明的是,待行驶区域和目标区域可能都位于工作区域内,也可能只有待行驶区域位于工作区域内,而目标区域不在工作区域内。It is understandable that there may be only one area adjacent to the area to be driven, or there may be multiple areas, that is, there may be one or more target areas. It should be noted that the area to be driven and the target area may both be located in the working area, or only the area to be driven may be located in the working area, while the target area is not in the working area.
其中,区域类型可用于指示区域的属性。可选地,区域类型可以为区域的名称,如道路、石板路、硬质路面、井盖、土坑、粪便、落叶、泥土、墙体、树木、栅栏、花圃、石头、台阶、水池、松软土壤、灌溉设施区域、可移动生命体区域等;其中,松软土壤的土壤硬度小于硬度阈值,泥土的土壤硬度高于松软土壤;松软土壤例如颗粒状的土壤,当自移动设备行驶在松软土壤上时可能会陷入导致被困;灌溉设施区域可以为灌溉设施(如水龙头)所在的区域;可移动生命体可以是人或动物,可移动生命体可以自行移动;可移动生命体区域为可移动生命体所在的区域。Among them, the area type can be used to indicate the attributes of the area. Optionally, the area type can be the name of the area, such as road, stone road, hard road surface, manhole cover, earth pit, feces, fallen leaves, soil, wall, tree, fence, flower bed, stone, step, pool, soft soil, irrigation facility area, movable life area, etc.; wherein the soil hardness of soft soil is less than the hardness threshold, and the soil hardness of mud is higher than that of soft soil; soft soil, such as granular soil, may cause the self-moving device to sink and be trapped when driving on the soft soil; the irrigation facility area can be the area where the irrigation facilities (such as faucets) are located; the movable life can be a person or an animal, and the movable life can move by itself; the movable life area is the area where the movable life is located.
在一种可能的实现方式中,自移动设备包括图像采集装置,配置为采集自移动设备前方的图像,图像中包括待行驶区域对应的图像和目标区域对应的图像。通过对图像进行处理以确定图像中各个区域的区域类型。In a possible implementation, the self-moving device includes an image acquisition device configured to acquire images in front of the self-moving device, the images including images corresponding to the to-be-traveled area and images corresponding to the target area. The area type of each area in the image is determined by processing the image.
具体地,自移动设备可实时、不定时或周期性触发图像采集装置进行图像采集,以获取图像采集装置所采集的包括待行驶区域对应的图像和目标区域对应的图像,接着,对采集的图像进行预设处理,获得目标区域的区域类型。可以理解,自移动设备也可只在靠近待行驶区域的边界时触发图像采集装置进行图像采集,以节省能耗,而自移动设备可基于自身位置和待行驶区域的边界的位置之间的关系,判断自身是否靠近待行驶区域的边界。Specifically, the self-moving device can trigger the image acquisition device to acquire images in real time, irregularly or periodically to obtain images corresponding to the area to be driven and the target area acquired by the image acquisition device, and then perform preset processing on the acquired images to obtain the area type of the target area. It can be understood that the self-moving device can also trigger the image acquisition device to acquire images only when it is close to the boundary of the area to be driven to save energy consumption, and the self-moving device can determine whether it is close to the boundary of the area to be driven based on the relationship between its own position and the position of the boundary of the area to be driven.
其中,图像采集装置可具体为摄像头等装置,图像采集装置对应的图像采集范围可以根据实际情况需要进行设置,通常可包括自移动设备的运动方向正前方以及两侧的指定范围。以自移动设备为自动割草机为例,如图2所示,图2中的虚线框表示自动割草机的图像采集装置对应的图像采集范围,在自动割草机靠近草地的边界移动时,所采集的图像中既包括草地区域对应的图像,还包括非草地区域对应的图像,如水池或墙体对应的图像等。可以根据实际情况需要来执行步骤S101:获取图像中各个区域的区域类型,各个区域至少包括:待行驶区域以及目标区域,其中,待行驶区域为工作区域的一部分,目标区域为与所述待行驶区域相邻的区域。获取类型的方式包括但不限于语义分割处理、分类处理等,在此不作具体限定。Among them, the image acquisition device can be specifically a camera or other device, and the image acquisition range corresponding to the image acquisition device can be set according to the actual needs, and can usually include the designated range in front of the moving direction of the self-moving device and on both sides. Take the self-moving device as an automatic lawn mower as an example, as shown in Figure 2, the dotted box in Figure 2 represents the image acquisition range corresponding to the image acquisition device of the automatic lawn mower. When the automatic lawn mower moves close to the boundary of the lawn, the acquired image includes both images corresponding to the lawn area and images corresponding to the non-grass area, such as images corresponding to a pool or a wall. Step S101 can be performed according to the actual needs: obtaining the area type of each area in the image, each area at least includes: a to-be-traveled area and a target area, wherein the to-be-traveled area is a part of the working area, and the target area is an area adjacent to the to-be-traveled area. The method of obtaining the type includes but is not limited to semantic segmentation processing, classification processing, etc., which is not specifically limited here.
本公开实施例自移动设备通过图像采集装置采集包括待行驶区域对应的图像和目标区域对应的图像像,并对图像进行预设处理,以获得目标区域的区域类型,操作便捷且准确性高。In the disclosed embodiment, the mobile device collects images corresponding to the area to be driven and the target area through an image acquisition device, and performs preset processing on the images to obtain the area type of the target area. The operation is convenient and the accuracy is high.
在一种可能的实现方式中,图像可以包括二维图像,将所采集的图像输入提前训练得到的图像识别模型中,对图像中每一个像素点进行分类,确定每个像素点的类别(如属于草地、石板路或篱笆等),从而实现对图像进行语义分割处理(语义分割下文也称为图像分割)以识别各个区域的区域类型的目标。图像识别模型可以是多分类模型,即能识别出两种以上区域类型,如能识别区域类型是否为草地、公路、或墙体等。可以理解,可以预先通过训练样本对基于分类算法所建立的区域分类模型进行训练, 训练样本可包括不同区域的图像样本和对应的区域类型标签。例如:图像识别模型可以是:神经网络模型。通过对图像进行语义分割,相较于采用其他方式如深度信息只识别出存在障碍物的场景而言,本申请能够快速识别出公路、泥地、篱笆、墙体等多种更丰富的场景,从而便于后续用户对于不同场景设置不同的切割需求。In one possible implementation, the image may include a two-dimensional image. The captured image is input into an image recognition model trained in advance, and each pixel in the image is classified to determine the category of each pixel (such as grass, cobblestone road, or fence, etc.), thereby achieving the goal of semantic segmentation of the image (semantic segmentation is also referred to as image segmentation below) to identify the area type of each area. The image recognition model can be a multi-classification model, that is, it can identify more than two area types, such as whether the area type is grass, road, or wall. It can be understood that the regional classification model established based on the classification algorithm can be trained in advance with training samples, The training samples may include image samples of different regions and corresponding region type labels. For example, the image recognition model may be a neural network model. By performing semantic segmentation on the image, compared to other methods such as using depth information to only identify scenes with obstacles, the present application can quickly identify a variety of richer scenes such as roads, mud, fences, walls, etc., making it easier for subsequent users to set different cutting requirements for different scenes.
在本申请的一个实施例中,对图像进行语义分割得到待行驶区域的区域类型为草地类型,目标行驶区域的类型为第一区域类型或第二区域类型,也可以统称为目标类型。如上文所述,区域类型可用于指示区域的属性,图像中的草地区域表征草地所在空间映射到图像上的区域。草地区域的属性或区域类型可以称为草地属性、草地类型,也可以简称为草地。图像中的目标区域表征目标物体所在空间映射到图像上的区域,目标区域的属性或区域类型为目标类型,也可也是第一区域类型或第二区域类型。In one embodiment of the present application, semantic segmentation of an image results in that the area type of the area to be driven is a grassland type, and the type of the target driving area is a first area type or a second area type, which may also be collectively referred to as a target type. As described above, the area type may be used to indicate the attributes of an area, and the grassland area in the image represents the area where the space where the grassland is located is mapped onto the image. The attributes or area types of the grassland area may be referred to as grassland attributes, grassland types, or simply grassland. The target area in the image represents the area where the space where the target object is located is mapped onto the image, and the attributes or area types of the target area are the target type, which may also be the first area type or the second area type.
以自移动设备为自动割草机为例,继续参阅图2,自动割草机在获取任一虚拟框对应的图像后,对该图像进行语义分割处理,以确定图像中的存在墙体、水池、落叶等。Taking the self-mobile device as an automatic lawn mower as an example, referring to FIG2 , after obtaining an image corresponding to any virtual frame, the automatic lawn mower performs semantic segmentation processing on the image to determine the presence of walls, pools, fallen leaves, etc. in the image.
示例性地,用户还可以在各个区域设置与区域类型相对应的标识装置(如标识牌、标识线等),自移动设备可以基于图像检测并识别标识装置,确定标识装置对应的标识信息,基于标识信息对目标图像进行区域类型识别。Exemplarily, the user can also set identification devices (such as identification signs, identification lines, etc.) corresponding to the area type in each area. The mobile device can detect and identify the identification device based on the image, determine the identification information corresponding to the identification device, and identify the area type of the target image based on the identification information.
本公开实施例自移动设备通过对包括待行驶区域对应的图像和目标区域对应的图像进行语义分割处理,以获得相应的区域类型,无需用户参与设置,且处理速度快。In the disclosed embodiment, a mobile device performs semantic segmentation processing on an image corresponding to the area to be driven and an image corresponding to the target area to obtain a corresponding area type without user involvement in the setting and with a fast processing speed.
在一种可能的实现方式中,图像包括深度图像,对图像进行处理以确定图像中各个区域的区域类型,包括:对图像进行深度估计处理,确定目标区域对应的深度信息,深度信息用于表示目标区域的各位置与自移动设备之间的距离;根据深度信息,确定目标区域的区域类型。In one possible implementation, the image includes a depth image, and the image is processed to determine the area type of each area in the image, including: performing depth estimation processing on the image to determine depth information corresponding to the target area, the depth information is used to represent the distance between each position of the target area and the self-mobile device; based on the depth information, determining the area type of the target area.
具体地,对包括待行驶区域对应的图像和目标区域对应的图像的深度图像进行深度估计处理,确定目标区域对应的深度信息,而深度信息用于表示目标区域的各位置与自移动设备之间的距离,接着,根据深度信息的变化幅度信息,确定所述目标区域的区域类型。Specifically, depth estimation processing is performed on the depth image including the image corresponding to the area to be driven and the image corresponding to the target area to determine the depth information corresponding to the target area, and the depth information is used to represent the distance between each position of the target area and the self-moving device. Then, the area type of the target area is determined based on the change amplitude information of the depth information.
其中,对图像进行深度估计处理是指对图像中每个像素点表示的对象与自移动设备的距离进行估计处理,具体可以通过深度估计网络模型等进行处理。由于在同时对不同对象(即区域)进行拍摄时,不同对象在深度图像中的像素具有不同的变化特点,比如,距离自移动设备的图像采集装置越远,正常草地的相邻像素会逐渐增大,墙体的相邻像素不会变化,而洼地的相邻像素会骤增,因此,可以根据目标区域对应的深度信息的变化幅度信息,确定目标区域的区域类型。需要说明的是,对图像进行深度估计处理的具体过程可参考现有技术,在此不再赘述。此外,深度信息包括像素信息。Among them, performing depth estimation processing on an image refers to estimating the distance between the object represented by each pixel in the image and the self-mobile device, which can be specifically processed by a depth estimation network model or the like. Since different objects (i.e., areas) are photographed at the same time, the pixels of different objects in the depth image have different change characteristics. For example, the farther away from the image acquisition device of the self-mobile device, the adjacent pixels of normal grass will gradually increase, the adjacent pixels of the wall will not change, and the adjacent pixels of the depression will increase suddenly. Therefore, the area type of the target area can be determined based on the change amplitude information of the depth information corresponding to the target area. It should be noted that the specific process of performing depth estimation processing on an image can refer to the prior art and will not be repeated here. In addition, the depth information includes pixel information.
在一种可能的实现方式中,根据深度信息的变化幅度信息,确定目标区域的区域类型,包括:在变化幅度信息表征深度信息为连续变化的情况下,确定目标区域的区域类型为第一区域类型;和/或,在变化幅度信息表征深度信息为非连续变化的情况下,确定目标区域的区域类型为第二区域类型。In one possible implementation, the region type of the target region is determined based on the change amplitude information of the depth information, including: when the change amplitude information represents that the depth information is continuously changed, determining the region type of the target region as the first region type; and/or, when the change amplitude information represents that the depth information is discontinuously changed, determining the region type of the target region as the second region type.
可以理解,由于不同区域对应的深度信息的变化幅度信息具有不同特点,比如,平地等区域的相邻像素间将连续变化,而凹地、墙体等区域的相邻像素间将不连续变化,同时,相邻像素间连续变化的区域对于自移动设备来说可认为是安全的,而相邻像素间非连续变化的区域对于自移动设备来说可认为是危险的,因此,可根据深度信息的变化幅度信息,确定目标区域的区域类型,即在变化幅度信息表征深度信息为连续变化的情况下,确定目标区域的区域类型为第一区域类型,和/或,在变化幅度信息表征深度信息为非连续变化的情况下,确定目标区域的区域类型为第二区域类型。It can be understood that since the change amplitude information of the depth information corresponding to different areas has different characteristics, for example, adjacent pixels in areas such as flat ground will change continuously, while adjacent pixels in areas such as concave ground and walls will change discontinuously. At the same time, areas where adjacent pixels change continuously can be considered safe for self-equipped equipment, while areas where adjacent pixels change discontinuously can be considered dangerous for self-equipped equipment. Therefore, the area type of the target area can be determined based on the change amplitude information of the depth information, that is, when the change amplitude information represents that the depth information is continuously changed, the area type of the target area is determined to be the first area type, and/or, when the change amplitude information represents that the depth information is discontinuously changed, the area type of the target area is determined to be the second area type.
在一种可能的实现方式中,获取各个区域的区域类型,包括:检测边界信号并确定检测结果,边 界信号包括设置于待行驶区域的边界的边界线所生成的磁场信号;根据检测结果,确定各个区域的区域类型。In a possible implementation, obtaining the region type of each region includes: detecting a boundary signal and determining a detection result, The boundary signal includes a magnetic field signal generated by a boundary line set at the boundary of the area to be driven; and the area type of each area is determined according to the detection result.
可以理解,可以预先根据与待行驶区域相邻的目标区域的区域类型,确定在目标边界上是否设置边界线,以通过边界线产生边界信号,比如当与待行驶区域相邻的目标区域为危险区域如水池、墙体时,可在待行驶区域与目标区域的目标边界上设置边界线,以通过边界线产生用于指示目标区域为危险区域的边界信号;而当与待行驶区域相邻的目标区域为安全区域如泥土、落叶时,可不在待行驶区域与目标区域的目标边界上设置边界线,从而不产生边界信号。It can be understood that whether to set a boundary line on the target boundary can be determined in advance according to the area type of the target area adjacent to the area to be traveled, so as to generate a boundary signal through the boundary line. For example, when the target area adjacent to the area to be traveled is a dangerous area such as a pool or a wall, a boundary line can be set on the target boundary between the area to be traveled and the target area, so as to generate a boundary signal for indicating that the target area is a dangerous area through the boundary line; and when the target area adjacent to the area to be traveled is a safe area such as soil or fallen leaves, a boundary line may not be set on the target boundary between the area to be traveled and the target area, so as not to generate a boundary signal.
这里,边界线是一种通电后形成回路的导线,边界线内部通入恒定电流后,会在其周围产生一个环绕边界线的恒定磁场,而自移动设备在工作行走过程中,可以识别到该恒定磁场的磁场信号即边界信号。其中,边界线可以具体为地磁线等,且地磁线可具体为永磁体、通电导线等。Here, the boundary line is a conductor that forms a loop after being energized. When a constant current is passed through the boundary line, a constant magnetic field surrounding the boundary line is generated around it, and the self-moving device can identify the magnetic field signal of the constant magnetic field, i.e., the boundary signal, during the working and walking process. The boundary line can be specifically a geomagnetic line, etc., and the geomagnetic line can be specifically a permanent magnet, a energized conductor, etc.
其中,自移动设备上可设置有信号检测装置,用于检测边界信号。自移动设备可实时、不定时或周期性检测边界信号并确定检测结果,进而根据检测结果确定目标区域的区域类型。例如,若检测结果显示未检测到边界信号,说明目标区域的区域类型或目标边界的边界类型为安全的;若检测结果显示检测到边界信号,说明目标区域的区域类型或目标边界的边界类型为危险的等。可以理解,自移动设备也可只在靠近待行驶区域的边界时,触发检测边界信号,以节省能耗,而自移动设备可基于自身位置和待行驶区域的边界的位置等方式,判断自身是否靠近待行驶区域的边界。Among them, the self-moving device may be provided with a signal detection device for detecting boundary signals. The self-moving device may detect boundary signals in real time, irregularly or periodically and determine the detection results, and then determine the area type of the target area according to the detection results. For example, if the detection result shows that no boundary signal is detected, it means that the area type of the target area or the boundary type of the target boundary is safe; if the detection result shows that a boundary signal is detected, it means that the area type of the target area or the boundary type of the target boundary is dangerous, etc. It can be understood that the self-moving device may also trigger the detection boundary signal only when it is close to the boundary of the area to be driven to save energy consumption, and the self-moving device may judge whether it is close to the boundary of the area to be driven based on its own position and the position of the boundary of the area to be driven.
在一种可能的实现方式中,根据检测结果,确定目标区域的区域类型或目标边界的边界类型,包括:在未检测到边界信号的情况下,确定目标区域的区域类型为第一区域类型;在检测到边界信号的情况下,确定目标区域的区域类型为第二区域类型,或确定目标边界的边界类型为第二边界类型。具体地,根据检测结果确定未检测到边界信号的情况下,说明自移动设备或工作部在目标区域内或目标边界处移动和工作是安全的,则将目标区域的区域类型确定为第一区域类型。例如,若待行驶区域为草地,而目标区域为落叶,则可不在草地与落叶的边界处设置边界线,从而在自移动设备移动至草地与落叶的边界处附近时,无法检测到边界信号。根据检测结果确定检测到边界信号的情况下,说明自移动设备或工作部在目标区域内或目标边界处移动和工作是危险的,则将目标区域的区域类型确定为第二区域类型。例如,若待行驶区域为草地,而目标区域为水池,则可在草地与水池的边界处设置边界线,从而在自移动设备移动至草地与水池的边界处附近时,检测到边界信号。In a possible implementation, the region type of the target area or the boundary type of the target boundary is determined according to the detection result, including: when no boundary signal is detected, the region type of the target area is determined to be the first region type; when a boundary signal is detected, the region type of the target area is determined to be the second region type, or the boundary type of the target boundary is determined to be the second boundary type. Specifically, when it is determined according to the detection result that no boundary signal is detected, it means that it is safe for the self-moving device or the working part to move and work in the target area or at the target boundary, and the region type of the target area is determined to be the first region type. For example, if the area to be driven is a grassland, and the target area is fallen leaves, a boundary line may not be set at the boundary between the grassland and the fallen leaves, so that when the self-moving device moves to the vicinity of the boundary between the grassland and the fallen leaves, the boundary signal cannot be detected. When it is determined according to the detection result that a boundary signal is detected, it means that it is dangerous for the self-moving device or the working part to move and work in the target area or at the target boundary, and the region type of the target area is determined to be the second region type. For example, if the area to be driven is a grassland and the target area is a pond, a boundary line may be set at the boundary between the grassland and the pond, so that a boundary signal is detected when the mobile device moves near the boundary between the grassland and the pond.
以自移动设备为自动割草机为例,参阅图3,由于自动割草机移动至水坑上时,可能会造成自动割草机坠落,而在靠近墙体上工作时,可能会造成刀盘损坏,即水坑和墙体属于危险区域,因此,在草地与水坑、墙体之间的边界处分别设置地磁线,使得自动割草机运动靠近草地与水坑的边界处或者草地与墙体的边界处时,将检测到边界信号,从而确定目标区域的区域类型为危险类型。也就是说,只在草地区域与危险类型的区域的边界处设置边界线,若检测到边界信号,说明有危险,则自动割草机不可跨越边界,而若未检测到边界信号,说明没有危险,则自动割草机可跨越边界。Take the self-moving device as an automatic lawn mower as an example, refer to Figure 3. When the automatic lawn mower moves to a puddle, it may cause the automatic lawn mower to fall, and when it works close to a wall, the cutter disc may be damaged, that is, the puddle and the wall belong to the dangerous area. Therefore, geomagnetic lines are set at the boundaries between the grass and the puddle and the wall respectively, so that when the automatic lawn mower moves close to the boundary between the grass and the puddle or the boundary between the grass and the wall, a boundary signal will be detected, thereby determining that the area type of the target area is a dangerous type. In other words, a boundary line is set only at the boundary between the grass area and the dangerous type area. If a boundary signal is detected, it means there is danger, and the automatic lawn mower cannot cross the boundary. If no boundary signal is detected, it means there is no danger, and the automatic lawn mower can cross the boundary.
在一种可能的实现方式中,获取各个区域的区域类型,包括:In a possible implementation, the region type of each region is obtained, including:
获取边界信号,边界信号为设置于待行驶区域的边界的边界线所生成的磁场信号;Acquire a boundary signal, where the boundary signal is a magnetic field signal generated by a boundary line set at the boundary of the area to be driven;
获取预设映射信息,预设映射信息表征边界信号的强度与区域类型之间的对应关系;Acquire preset mapping information, where the preset mapping information represents a correspondence between the strength of the boundary signal and the area type;
根据边界信号的强度以及预设映射信息,确定各个区域的区域类型。The area type of each area is determined according to the strength of the boundary signal and the preset mapping information.
可以理解,针对与待行驶区域相邻的目标区域的区域类型,可以相应设置或控制待行驶区域与目标区域之间的边界的边界线的参数,以在目标区域的区域类型不同时,对应的边界线所生成的磁场信号的强度也相应不同,比如在目标区域的区域类型为安全区域时,可以控制对应的边界线所生成的磁 场信号的强度为第一预设阈值,而在目标区域的区域类型为危险区域时,可以控制对应的边界线所生成的磁场信号的强度为第二预设阈值,且第二预设阈值大于第一预设阈值等。自移动设备在获取设置于待行驶区域的边界的边界线所生成的边界信号后,可以根据边界信号的强度查询预先确定的边界信号的强度与区域类型或边界类型之间的对应关系,从而确定目标区域的区域类型或目标边界的边界类型。其中,对于与待行驶区域相邻的不同区域对应的不同区域类型,可以通过控制向待行驶区域与相邻的区域之间的边界的边界线的输入电流,使对应边界线所生成的磁场信号的强度大小不同。比如,当与待行驶区域相邻的目标区域为泥土时,可控制待行驶区域与泥土区域之间的边界的边界线的输入电流为第一电流值,而当与待行驶区域相邻的目标区域为石头时,可控制待行驶区域与石头区域之间的边界的边界线的输入电流为第二电流值,且第二电流值大于第一电流值,以增大边界线所生成的磁场信号的强度。It can be understood that, for the area type of the target area adjacent to the area to be driven, the parameters of the boundary line of the boundary between the area to be driven and the target area can be set or controlled accordingly, so that when the area type of the target area is different, the strength of the magnetic field signal generated by the corresponding boundary line is also different accordingly. For example, when the area type of the target area is a safe area, the magnetic field signal generated by the corresponding boundary line can be controlled. The intensity of the field signal is a first preset threshold, and when the area type of the target area is a dangerous area, the intensity of the magnetic field signal generated by the corresponding boundary line can be controlled to be a second preset threshold, and the second preset threshold is greater than the first preset threshold, etc. After the mobile device obtains the boundary signal generated by the boundary line set at the boundary of the area to be driven, the correspondence between the strength of the predetermined boundary signal and the area type or boundary type can be queried according to the strength of the boundary signal, thereby determining the area type of the target area or the boundary type of the target boundary. Among them, for different area types corresponding to different areas adjacent to the area to be driven, the intensity of the magnetic field signal generated by the corresponding boundary line can be different by controlling the input current to the boundary line of the boundary between the area to be driven and the adjacent area. For example, when the target area adjacent to the area to be driven is soil, the input current of the boundary line of the boundary between the area to be driven and the soil area can be controlled to be a first current value, and when the target area adjacent to the area to be driven is stone, the input current of the boundary line of the boundary between the area to be driven and the stone area can be controlled to be a second current value, and the second current value is greater than the first current value, so as to increase the intensity of the magnetic field signal generated by the boundary line.
在一种可能的实现方式中,获取各个区域的区域类型,包括:获取待行驶区域与目标区域之间边界的类型,根据边界的类型确定区域类型。具体的,获取地图信息,地图信息包括地图、地图中各边界的位置信息、地图中各边界的类型信息;确定各个边界的第一位置信息;根据各个边界的第一位置信息和地图信息,确定边界类型。In a possible implementation, obtaining the area type of each area includes: obtaining the type of the boundary between the area to be driven and the target area, and determining the area type according to the type of the boundary. Specifically, obtaining map information, the map information including the map, the position information of each boundary in the map, and the type information of each boundary in the map; determining the first position information of each boundary; and determining the boundary type according to the first position information of each boundary and the map information.
其中,地图信息可以是基于卫星定位传感器、惯性传感器和里程计传感器进行建图得到的。以自移动设备为自动割草机为例,参阅图4,在自动割草机首次沿着草地区域的边界行驶时,可根据卫星定位传感器、惯性传感器和里程计传感器记录草地区域的各边界(a、b、c、d、e)与起充站的偏移量,如图5所示;接着,用户可通过APP等设置各边界(a、b、c、d、e)的类型;最后,将草地区域的各边界与起充站的偏移量以及各边界的类型存储至地图中。或者,地图信息是基于视觉即时定位与地图构建技术进行建图得到的。Among them, the map information can be obtained by mapping based on satellite positioning sensors, inertial sensors and odometer sensors. Taking the self-mobile device as an automatic lawn mower as an example, refer to Figure 4. When the automatic lawn mower drives along the boundary of the grass area for the first time, the offset of each boundary (a, b, c, d, e) of the grass area and the charging station can be recorded according to the satellite positioning sensor, inertial sensor and odometer sensor, as shown in Figure 5; then, the user can set the type of each boundary (a, b, c, d, e) through APP, etc.; finally, the offset of each boundary of the grass area and the charging station and the type of each boundary are stored in the map. Alternatively, the map information is obtained by mapping based on visual real-time positioning and map construction technology.
可以理解,用户可以预先在地图上设置工作区域的各边界的属性,边界的属性包括边界的位置信息和类型信息等,并将各边界的属性信息在地图中标定并保存。例如,假设工作区域的形状为长方形,且与该工作区域相邻的区域分别为石头、马路、泥地和水池,则可在地图中设置该工作区域对应的边界的属性信息分别为石头、马路、泥地和水池,并在地图中标记各边界的位置信息。It is understandable that the user can set the attributes of each boundary of the work area on the map in advance, and the attributes of the boundary include the location information and type information of the boundary, and mark and save the attribute information of each boundary in the map. For example, assuming that the shape of the work area is a rectangle, and the areas adjacent to the work area are stone, road, mud and pool, respectively, the attribute information of the boundary corresponding to the work area can be set in the map as stone, road, mud and pool, and the location information of each boundary can be marked in the map.
在一种可能的实现方式中,用户可以预先在地图上对各区域进行划分,包括划分各区域的位置以及对应的区域类型,并将包含区域类型和对应位置的区域划分结果在地图中标定并保存。例如,假设地图中包括相邻的三个区域,分别为草地、泥地和水池,则可在地图中设置各区域对应的属性信息,分别为草地、泥地和水池,并在地图中标记各区域的位置信息,从而自移动设备在工作过程中可以根据地图中标注的区域类型获取待行驶区域以及目标区域的区域类型。In a possible implementation, the user can pre-divide the regions on the map, including the location of each region and the corresponding region type, and mark and save the region division results including the region type and the corresponding location in the map. For example, assuming that the map includes three adjacent regions, namely, grass, mud, and a pool, the attribute information corresponding to each region can be set in the map, namely, grass, mud, and a pool, and the location information of each region can be marked in the map, so that the mobile device can obtain the region type of the to-be-traveled region and the target region according to the region type marked in the map during operation.
在本实施例中,获取所采集的图像中各个区域的区域类型,自移动设备能够快速识别出如公路、泥地、篱笆、墙体等多种场景,从而针对不同场景选取采取不同的工作策略。In this embodiment, the area type of each area in the captured image is obtained, and the mobile device can quickly identify various scenes such as roads, mud, fences, walls, etc., so as to select different working strategies for different scenes.
步骤S102:当目标区域的区域类型为第一区域类型时,控制自移动设备改变行驶方式,以使得工作部的覆盖范围包括目标区域的一部分。Step S102: When the area type of the target area is the first area type, control the self-mobile device to change the driving mode so that the coverage of the working unit includes a part of the target area.
在本申请的一个实施例中,在获取所采集的图像中各个区域的区域类型之后,可以基于目标区域的区域类型控制自移动设备行驶和/或工作,以使得当目标区域的区域类型为第一区域类型时,控制自移动设备改变行驶方式,以使得工作部的覆盖范围包括目标区域的一部分;当识别到目标区域的区域类型为第二区域类型时,控制自移动设备沿着待行驶区域的边界行驶和/或工作。改变行驶方式可以包括:改变行驶路径或者改变行驶方向。In one embodiment of the present application, after obtaining the area type of each area in the captured image, the self-moving device can be controlled to travel and/or work based on the area type of the target area, so that when the area type of the target area is the first area type, the self-moving device is controlled to change the driving mode so that the coverage of the working part includes a part of the target area; when the area type of the target area is identified as the second area type, the self-moving device is controlled to travel and/or work along the boundary of the area to be driven. Changing the driving mode may include: changing the driving path or changing the driving direction.
为了使自移动设备能够在兼顾安全性的前提下,对工作区域的边界处进行处理,可以根据所获取 的区域类型调整工作部的位置,使得工作部的覆盖范围符合预设条件,以提高对工作区域边界处的处理覆盖率,提升了用户使用体验。可以理解,预设条件可以根据实际情况需要进行设置。例如,以自移动设备为自动割草机为例,若根据区域类型确定自动割草机可跨越边界或工作部可在边界处工作,则设置工作部的覆盖范围可以包括目标区域的一部分,即,可跨越边界,以使自动割草机能切割到工作区域的边界处的草;若根据区域类型确定自动割草机不可跨越边界,则设置工作部在工作区域内行驶,可以是沿着待行驶区域的边界行驶,即,工作部不可跨越边界。In order to enable the self-moving device to process the boundary of the working area while taking into account safety, The position of the working unit can be adjusted according to the area type so that the coverage of the working unit meets the preset conditions, so as to improve the processing coverage rate at the boundary of the working area and enhance the user experience. It can be understood that the preset conditions can be set according to actual needs. For example, taking the self-moving device as an automatic lawn mower as an example, if it is determined according to the area type that the automatic lawn mower can cross the boundary or the working unit can work at the boundary, then the coverage of the working unit is set to include a part of the target area, that is, it can cross the boundary, so that the automatic lawn mower can cut the grass at the boundary of the working area; if it is determined according to the area type that the automatic lawn mower cannot cross the boundary, then the working unit is set to travel within the working area, which can be along the boundary of the area to be traveled, that is, the working unit cannot cross the boundary.
在本申请的实施例中,若目标区域的区域类型为安全的或者用户期望机器行驶的第一区域类型时,可以控制工作部的覆盖范围包括目标区域的一部分,此时,不会发生碰撞、缠绕、卡顿、过度倾斜、坠落等阻碍自移动设备移动的情况,也不会发生伤害行人或动物安全的情况;若目标区域的区域类型为非安全或用户不期望机器行驶的第二区域类型时,可以控制机器行驶过程中不行驶至目标区域中,以保证机器的安全。示例性的,目标区域为石板路则自移动设备可以跨越石板路与工作区域的边界以在石板路上安全行驶和/或工作,若目标区域为水池则移动设备不可以跨越水池与工作区域之间的边界。需要说明的是,自移动设备可以在调整工作部的过程中保持工作,也可以在结束对工作部的调整后才工作,在此不作具体限定。In an embodiment of the present application, if the area type of the target area is safe or the user expects the machine to travel in the first area type, the coverage of the working part can be controlled to include a part of the target area. At this time, there will be no collision, entanglement, jamming, excessive tilting, falling, etc. that hinder the movement of the self-moving device, and there will be no harm to the safety of pedestrians or animals; if the area type of the target area is unsafe or the user does not expect the machine to travel in the second area type, the machine can be controlled not to travel to the target area during the driving process to ensure the safety of the machine. Exemplarily, if the target area is a cobblestone road, the self-moving device can cross the boundary between the cobblestone road and the working area to safely travel and/or work on the cobblestone road. If the target area is a pool, the mobile device cannot cross the boundary between the pool and the working area. It should be noted that the self-moving device can keep working during the adjustment of the working part, or it can work after the adjustment of the working part is completed, which is not specifically limited here.
在本申请中,当所述工作模式为预设工作模式时,执行当目标区域的区域类型为第一区域类型时,控制自移动设备改变行驶方式,以使得工作部的覆盖范围包括目标区域的一部分,预设工作模式为沿边工作模式或用户预先设置的工作模式,沿边工作模式为控制自移动设备沿着工作区域的边界移动和工作的模式。In the present application, when the working mode is a preset working mode, when the area type of the target area is the first area type, the self-moving device is controlled to change the driving mode so that the coverage of the working part includes a part of the target area. The preset working mode is an edge working mode or a working mode preset by the user. The edge working mode is a mode for controlling the self-moving device to move and work along the boundary of the working area.
具体的,自移动设备至少包括:随机工作模式、沿边工作模式。在随机工作模式下,自移动设备在工作区域内随机切割或按照规划路径行驶;在沿边工作模式下,自移动设备沿着工作区域的边界行驶,在沿着边界行驶的过程中,机器可以执行本申请所提出的获取所采集的图像中各个区域的区域类型,以及根据区域类型控制自移动设备移动的步骤,当满足第一区域类型的条件时,机器的工作部可以覆盖超出工作区域的目标区域部分,简称为执行跨边动作。即,沿边模式下,机器沿着边界行驶的过程中,机器可以执行跨边动作,例如:跨骑着工作区域的边界行驶。另外,可选的,自移动设备也可以包括跨边工作模式,在跨边工作模式下,自移动设备工作部的覆盖范围包括目标区域的一部分;此时,沿边工作模式可以只是控制机器在工作区域内部沿着边界行驶。另外,在随机工作模式下,当自移动设备在靠近工作区域的边界处工作时,为了使自移动设备能够覆盖到更多的工作范围,可以控制其在图像满足区域类型的情况下触发跨边动作。当然,本申请中可以只有在开启跨边工作模式的情况下,才触发跨边动作,提高了对自移动设备进行控制的灵活性和便利性。Specifically, the self-moving device at least includes: a random working mode and an edge working mode. In the random working mode, the self-moving device randomly cuts or drives along the planned path in the working area; in the edge working mode, the self-moving device drives along the boundary of the working area. In the process of driving along the boundary, the machine can execute the steps of obtaining the area type of each area in the collected image proposed in this application, and controlling the movement of the self-moving device according to the area type. When the conditions of the first area type are met, the working part of the machine can cover the part of the target area beyond the working area, which is referred to as performing a cross-edge action. That is, in the edge mode, the machine can perform a cross-edge action during the process of driving along the boundary, for example: driving astride the boundary of the working area. In addition, optionally, the self-moving device may also include a cross-edge working mode. In the cross-edge working mode, the coverage range of the working part of the self-moving device includes a part of the target area; at this time, the edge working mode may only control the machine to drive along the boundary inside the working area. In addition, in the random working mode, when the self-moving device works near the boundary of the working area, in order to enable the self-moving device to cover more working ranges, it can be controlled to trigger the cross-edge action when the image meets the area type. Of course, in the present application, the cross-border action can be triggered only when the cross-border working mode is turned on, thereby improving the flexibility and convenience of controlling the self-mobile device.
结合图9所示,自移动设备在工作区域内部沿着工作区域的边界行驶,自移动设备可以在边界10围成的工作区域中移动和工作,并且可以沿着边界10移动并工作。机器在沿边界10移动时,机器与边界10之间会有一定的距离d,从而避免机器出边界,避免机器受到损坏。机器可以基于图像确定机器与边界10之间的实际距离d。As shown in FIG9 , the self-moving device drives along the boundary of the working area inside the working area. The self-moving device can move and work in the working area surrounded by the boundary 10, and can move and work along the boundary 10. When the machine moves along the boundary 10, there will be a certain distance d between the machine and the boundary 10, so as to prevent the machine from going out of the boundary and preventing the machine from being damaged. The machine can determine the actual distance d between the machine and the boundary 10 based on the image.
结合图10为机器执行跨边动作的行驶示意图,目标区域70是可供自移动设备安全行驶的区域,例如石板区域、步行道区域、泥土区域等;当自移动设备位于目标区域70的侧方时,自移动设备拍摄的图像中存在目标区域,可以将目标区域的待标记区域标记为草地属性,从而改变草地属性区域和目标属性区域之间的界限,例如,结合图7所示,图7为自移动设备拍摄的第一图像,图8为将第一图像中的与待行驶区域相邻部分的区域类型标记为草地类型后的第二图像,可见第一图像中草地类型区域和第一区域类型之间的界限50、第二图像中草地类型区域和第一区域类型之间之间的界限60的位置 是不同;自移动设备根据第二图像中草地类型区域和第一区域类型所在区域之间的界限60进行沿边移动,从而可以跨着实际空间的边界10进行移动,实现切割到边,将工作区域和石板区域之间的草切割干净。FIG10 is a schematic diagram of the machine performing a crossing-edge action. The target area 70 is an area where the self-moving device can safely travel, such as a stone slab area, a sidewalk area, a dirt area, etc.; when the self-moving device is located on the side of the target area 70, the target area exists in the image taken by the self-moving device, and the to-be-marked area of the target area can be marked as grass attribute, thereby changing the boundary between the grass attribute area and the target attribute area. For example, FIG7 is a first image taken by the self-moving device, and FIG8 is a second image after the area type of the part adjacent to the to-be-traveled area in the first image is marked as grass type. It can be seen that the position of the boundary 50 between the grass type area and the first area type in the first image and the boundary 60 between the grass type area and the first area type in the second image. is different; the self-mobile device moves along the boundary 60 between the grass type area and the first area type in the second image, so that it can move across the boundary 10 of the actual space, achieve cutting to the edge, and cleanly cut the grass between the working area and the slate area.
在一种可能的实现方式中,自移动设备可提供多种工作模式以供用户选择,或者自移动设备工作过程中可自动选择所需的工作模式。机器可以根据用户选择的工作模式,当工作模式为沿边工作模式时,执行获取所采集的图像中各个区域的区域类型以及根据区域类型控制自移动设备移动的步骤。或者,根据机器内部规划的执行流程执行相应过程。例如,先执行随机工作模式,完成随机工作模式对应工作后,切换至沿边工作模式进行工作。In a possible implementation, the self-mobile device may provide multiple working modes for the user to choose from, or the self-mobile device may automatically select the desired working mode during operation. The machine may, according to the working mode selected by the user, execute the steps of obtaining the region type of each region in the acquired image and controlling the movement of the self-mobile device according to the region type when the working mode is the edge working mode. Alternatively, the corresponding process may be executed according to the execution flow planned within the machine. For example, the random working mode may be executed first, and after the work corresponding to the random working mode is completed, the machine may switch to the edge working mode for work.
在本申请的一个实施例中,当识别到目标区域的区域类型为第一区域类型时,控制自移动设备使其工作部的覆盖范围包括目标区域的一部分。在一种可能的实现方式中,第一区域类型包括道路、井盖、石板路、硬质路面、落叶和泥土中的一个或多个。其中,道路包括但不限于水泥地、沥青地、马路、人行道等。第一区域类型不以此为限制,只要自移动设备能在其上安全行驶和/或工作即可。也可以根据接收到的用户指令来设置第一区域类型,从而机器可以根据用户需求执行某些场景下的跨边。自移动设备可以基于图像识别模型识别图像中多种类型的对象或物体,例如可以同时识别草地、水沟、水坑、篱笆、石板、落叶、墙体和其他非草;用户可以选定一个或多个类型作为第一区域类型,例如用户可以选定石板和落叶作为第一区域类型。In one embodiment of the present application, when the area type of the target area is identified as the first area type, the self-moving device is controlled so that the coverage of its working part includes a part of the target area. In one possible implementation, the first area type includes one or more of roads, manhole covers, stone roads, hard roads, fallen leaves and soil. Among them, roads include but are not limited to cement ground, asphalt ground, roads, sidewalks, etc. The first area type is not limited to this, as long as the self-moving device can safely drive and/or work on it. The first area type can also be set according to the received user instructions, so that the machine can perform cross-edge in certain scenarios according to user needs. The self-moving device can identify multiple types of objects or objects in the image based on the image recognition model, for example, it can simultaneously identify grass, ditches, puddles, fences, stone slabs, fallen leaves, walls and other non-grass; the user can select one or more types as the first area type, for example, the user can select stone slabs and fallen leaves as the first area type.
在本申请的一个实施例中,当目标区域的区域类型为第二区域类型时,控制自移动设备沿着待行驶区域的边界行驶和/或工作。第二区域类型可以包括墙体、土坑、水池、栅栏、花圃、土壤硬度小于硬度阈值的土壤、灌溉设施区域和可移动生命体区域中的一个或多个。进一步的,在满足第二区域类型时,如果第二区域类型所在区域与待行驶区域之间的高度差等于或大于高度阈值(比如为10厘米),控制沿着待行驶区域的边界行驶,以保证机器的安全。当识别到目标区域的区域类型为第二区域类型或具有较高高度差的区域时,需要控制机器保持在工作区域内行驶,防止发生侧翻或坠毁,或者工作部发生碰撞的不安全现象。In one embodiment of the present application, when the area type of the target area is the second area type, the self-moving device is controlled to travel and/or work along the boundary of the area to be driven. The second area type may include one or more of a wall, a pit, a pool, a fence, a flower bed, soil with a soil hardness less than a hardness threshold, an irrigation facility area, and a movable life area. Further, when the second area type is met, if the height difference between the area where the second area type is located and the area to be driven is equal to or greater than the height threshold (for example, 10 cm), the machine is controlled to travel along the boundary of the area to be driven to ensure the safety of the machine. When it is identified that the area type of the target area is the second area type or an area with a higher height difference, it is necessary to control the machine to keep driving within the working area to prevent rollover or crash, or unsafe phenomena such as collision of the working part.
例如:结合图6所示,在一个实施例中,可以基于图像识别模型检测图像采集装置所采集的图像,在检测到障碍区域30(即为本申请中的第二区域类型所在区域)的情况下,控制自移动设备远离障碍区域30(如水池)和工作区域之间的界限,控制自移动设备与该界限保持安全距离f,在保持安全距离f的情况下移动并工作,避免对机器造成损伤。安全距离f的数值可以是固定的,也可以是可调的。安全距离f的数值可以由机器自动调整,也可以由用户设置或调整。For example: In combination with FIG6 , in one embodiment, the image captured by the image acquisition device can be detected based on the image recognition model. When an obstacle area 30 (i.e., the area where the second area type in the present application is located) is detected, the self-moving device is controlled to stay away from the boundary between the obstacle area 30 (such as a pool) and the working area, and the self-moving device is controlled to maintain a safety distance f from the boundary, and the machine moves and works while maintaining the safety distance f to avoid damage to the machine. The value of the safety distance f can be fixed or adjustable. The value of the safety distance f can be automatically adjusted by the machine, or it can be set or adjusted by the user.
在本申请的一个实施例中,如图7、图8所示,基于目标区域的区域类型控制自移动设备行驶和/或工作,以使得当目标区域的区域类型为第一区域类型时,工作部的覆盖范围包括目标区域的一部分,可以包括:将目标区域中与待行驶区域相邻部分的区域类型标记为草地类型;控制自移动设备沿着草地类型所确定的区域与第一区域类型所确定的区域之间的边界行驶和/或工作。In one embodiment of the present application, as shown in Figures 7 and 8, the self-moving device is controlled to travel and/or work based on the area type of the target area, so that when the area type of the target area is the first area type, the coverage of the working unit includes a part of the target area, which may include: marking the area type of the part of the target area adjacent to the area to be traveled as a grassland type; controlling the self-moving device to travel and/or work along the boundary between the area determined by the grassland type and the area determined by the first area type.
具体的,如图7所示,待行驶区域为草地类型,当目标区域的区域类型为第一区域类型时,可以对待行驶区域如图8所示进行膨胀处理,将膨胀后得到的草地区域与目标区域之间的交集区域标记为草地属性(即,草地类型),以得到第二图像。或者,也可以在目标区域中确定待标记区域,将目标区域中靠近草地区域的部分作为待标记区域,再将该待标记区域标记为草地属性得到标记后的草地区域,得到第二图像。由此,可以控制自移动设备沿着第二图像中草地区域和目标区域之间的界限移动。在本申请的实施例中,由于调整了草地区域和目标区域之间的界限位置,自移动设备可以沿着调整后的界限移动,而该界限与实际空间中的物理边界基本一致,因此自移动设备可以跨着实际空间中的物理 边界移动,并在移动过程中切割,从而把边界处的草切割干净,实现切割到边的效果,提高切割覆盖率和用户满意度。Specifically, as shown in FIG7 , the area to be traveled is a grassland type. When the area type of the target area is the first area type, the area to be traveled can be expanded as shown in FIG8 , and the intersection area between the grassland area obtained after the expansion and the target area is marked as a grassland attribute (i.e., a grassland type) to obtain a second image. Alternatively, the area to be marked can be determined in the target area, and the part of the target area close to the grassland area can be taken as the area to be marked, and then the area to be marked can be marked as a grassland attribute to obtain a marked grassland area to obtain a second image. In this way, the self-moving device can be controlled to move along the boundary between the grassland area and the target area in the second image. In an embodiment of the present application, since the boundary position between the grassland area and the target area is adjusted, the self-moving device can move along the adjusted boundary, and the boundary is basically consistent with the physical boundary in the actual space. Therefore, the self-moving device can move across the physical boundary in the actual space. The boundary moves and cuts during the movement, so that the grass at the boundary is cut cleanly, achieving the effect of cutting to the edge, improving the cutting coverage rate and user satisfaction.
进一步地,获取所采集的图像中各个区域的区域类型,还可以包括:对图像进行深度估计处理,以确定目标区域对应的深度信息,该深度信息用于表示目标区域的各位置与图像采集装置之间的距离;相应的,基于目标区域的区域类型控制自移动设备行驶和/或工作,可以包括:根据目标区域的区域类型以及深度信息控制自移动设备行驶和/或工作,以使得当目标区域的区域类型为第一区域类型,并且,目标区域与待行驶区域之间的高度差小于高度阈值时,工作部的覆盖范围包括所述目标区域的一部分。即,目标区域除了满足区域类型需求,还需要满足高度需求,当满足第一区域类型的目标区域与待行驶区域之间的高度差小于高度阈值时,比如高度阈值可以设置为3厘米、5厘米等,例如:目标区域为与工作区域之间的高度差为3cm的井盖,则可以控制自移动设备执行跨边动作。Furthermore, obtaining the area type of each area in the captured image may also include: performing depth estimation processing on the image to determine the depth information corresponding to the target area, the depth information is used to represent the distance between each position of the target area and the image acquisition device; accordingly, controlling the self-moving device to travel and/or work based on the area type of the target area may include: controlling the self-moving device to travel and/or work according to the area type and depth information of the target area, so that when the area type of the target area is the first area type, and the height difference between the target area and the area to be driven is less than the height threshold, the coverage of the working part includes a part of the target area. That is, in addition to meeting the area type requirement, the target area also needs to meet the height requirement. When the height difference between the target area that meets the first area type and the area to be driven is less than the height threshold, for example, the height threshold can be set to 3 cm, 5 cm, etc. For example: the target area is a manhole cover with a height difference of 3 cm with the working area, then the self-moving device can be controlled to perform a cross-edge action.
在本申请的一个实施例中,如图13、14所示,在自移动设备进入沿边工作模式,识别到石板70跨边的过程中,当检测到与石头81发生碰撞时,可以控制自移动设备改变行驶方向以向如图14所示的工作区域内部行驶。向工作区域内部行驶可以包括:沿工作区域边界行驶,也可以包括控制工作部在工作区域的投影在工作区域内部。例如:割草机在跨边行驶的过程中,当检测到摄像头发生位移时,可以控制其工作区域内行驶。In one embodiment of the present application, as shown in Figures 13 and 14, when the self-moving device enters the edge-along working mode and identifies the process of the stone slab 70 crossing the edge, when a collision with the stone 81 is detected, the self-moving device can be controlled to change the driving direction to drive inside the working area as shown in Figure 14. Driving inside the working area may include: driving along the boundary of the working area, and may also include controlling the projection of the working part in the working area to be inside the working area. For example: when the lawn mower is driving across the edge, when the camera is detected to be displaced, it can be controlled to drive within the working area.
进一步的,当检测到机器发生碰撞后,记录机器向工作区域内部行驶的时间或持续距离,如果超过5米,则可以控制机器重新启动识别是否存在第一区域类型,若存在则继续执行跨骑边界行驶。如果在沿边过程中,检测不到石板则控制机器向工作区域内行驶,如果行驶距离超过5米,则可以控制机器重新启动跨骑边界行驶。Furthermore, when a collision is detected, the time or continuous distance of the machine driving into the working area is recorded. If it exceeds 5 meters, the machine can be controlled to restart to identify whether the first area type exists. If it exists, the machine continues to drive across the boundary. If no stone slab is detected during the edge-traveling process, the machine is controlled to drive into the working area. If the driving distance exceeds 5 meters, the machine can be controlled to restart the driving across the boundary.
在本申请的一个应用场景中,沿边过程中,机器沿长条状的石板路走到末端时,图片中仅剩部分石板路,由于机器采用单帧识别,因此图像中块状的石板路会被认为是踏脚石,踏脚石指的是比较小有高度的机器无法通过的石板,因此由于识别错误机器会无法继续沿边。针对该问题,可以先判断机器是否已经处于稳定跨边状态。如果机器处于稳定跨边状态,则将脚踏石作为石板路,执行跨边动作;如果未处于稳定跨边状态,则执行避开脚踏石,即控制机器向工作区域内行驶的处理逻辑。其中,如果连续一段时间(如:2S内)看到石板路边界则进入稳定跨边状态,如果连续一段时间(如:5S内)没有看到石板路边界则退出稳定跨边状态。In an application scenario of the present application, during the process of moving along the edge, when the machine walks to the end of the long strip of stone road, only part of the stone road remains in the picture. Since the machine uses single-frame recognition, the blocky stone road in the image will be considered as a stepping stone. Stepping stones refer to stone slabs that are relatively small and high. Machines cannot pass through. Therefore, due to recognition errors, the machine will not be able to continue along the edge. In response to this problem, it can be determined whether the machine is already in a stable crossing state. If the machine is in a stable crossing state, the stepping stone is used as a stone road and the crossing action is performed; if it is not in a stable crossing state, the processing logic of avoiding the stepping stone, that is, controlling the machine to travel into the working area, is executed. Among them, if the stone road boundary is seen for a continuous period of time (such as: within 2S), the stable crossing state is entered, and if the stone road boundary is not seen for a continuous period of time (such as: within 5S), the stable crossing state is exited.
在一个实施例中,图像采集装置所采集的第一图像中可以存在草地区域、区域类型为第一区域类型的目标区域和区域类型为第二区域类型的目标区域(下文中也可以称为障碍区域)中的一种或多种。In one embodiment, the first image captured by the image acquisition device may contain one or more of a grass area, a target area of a first area type, and a target area of a second area type (hereinafter also referred to as an obstacle area).
在本申请的一个实施例中,当第一图像的目标区域中存在多种区域类型时,可以基于目标区域的区域类型控制自移动设备行驶和/或工作,以使得自移动设备在行驶过程中避开第二区域类型所在区域,防止自移动设备沿着草地类型所确定的区域与第一区域类型所确定的区域之间的边界行驶时,机器部分机身行驶至第二区域类型所在区域中,发生安全问题。其中,目标区域的区域类型包括第一区域类型以及第二区域类型,且第一区域类型所在区域以及第二区域类型所在区域均与待行驶区域相邻。In one embodiment of the present application, when there are multiple area types in the target area of the first image, the self-moving device can be controlled to travel and/or work based on the area type of the target area, so that the self-moving device avoids the area where the second area type is located during driving, and prevents the self-moving device from traveling along the boundary between the area determined by the grass type and the area determined by the first area type, and part of the machine body travels to the area where the second area type is located, which may cause safety problems. The area types of the target area include the first area type and the second area type, and the area where the first area type is located and the area where the second area type is located are both adjacent to the area to be driven.
在本申请的一个实施例中,基于目标区域的区域类型控制自移动设备行驶和/或工作,以使得工作部的行驶距离小于第一区域类型所在区域与待行驶区域之间的边界长度,其中,行驶距离为工作部的覆盖范围包括目标区域的一部分时自移动设备行驶的距离。即,自移动设备响应于识别到第一区域类型时的行驶距离小于实际与第一区域类型相邻的物理边界长度。对于目标区域类型中存在多种区域类型的情况下,控制机器仅执行部分跨边动作,防止出现安全问题。In one embodiment of the present application, the self-moving device is controlled to travel and/or work based on the area type of the target area so that the travel distance of the working unit is less than the boundary length between the area where the first area type is located and the area to be traveled, wherein the travel distance is the distance traveled by the self-moving device when the coverage of the working unit includes a part of the target area. That is, the travel distance of the self-moving device in response to identifying the first area type is less than the actual physical boundary length adjacent to the first area type. In the case where there are multiple area types in the target area type, the control machine only performs part of the cross-border action to prevent safety problems.
在本申请的一个实施例中,自移动设备沿着第一路径行驶的过程中采集图像,并获取图像中各个 区域的区域类型,控制自移动设备沿着第一路径继续行驶一段时间,在行驶一段时间之后,改变行驶路径以使得工作部的覆盖范围包括目标区域的一部分。也可以根据割草机机身长度,控制其行驶至与水池距离为机身长度的位置处,再控制器执行跨边动作。In one embodiment of the present application, an image is collected while the mobile device is traveling along the first path, and each The area type of the area controls the self-moving device to continue to travel along the first path for a period of time, and after traveling for a period of time, changes the travel path so that the coverage range of the working part includes a part of the target area. It can also be controlled to travel to a position where the distance from the pool is the length of the body of the lawn mower according to the length of the body, and then the controller performs the cross-edge action.
以如图11以及图12所示的场景进行说明,割草机在沿当前方向行驶的过程中,获取图像中各个区域的区域类型,该区域类型可以包括:草地90、石板路70和水池80。石板路与水池相邻,石板路以及水池的整体与工作区域相邻。控制割草机开启跨边模式,摄像头拍摄图像,通过语义识别图像中的草地、石板路和水池,膨胀图像中的草地,获取膨胀后的图像与石板路重叠的部分,将该部分修改为草地,非重叠部分的石板路以及水池标记为非草。如图所示,如果机器如果直接行驶至与水池相邻的石板位置PP,则其尾部可能会行驶至水池中,因此,可以控制机器沿着当前方向继续行驶一段时间,再控制割草机改变行驶方向以沿图像中草与非草的边界行驶。通过延迟响应图像识别结果,从而割草机驶向图像中草的区域时,不会掉落至水池中以保证割草机的安全。Taking the scenes shown in FIG. 11 and FIG. 12 as an example, when the lawn mower is driving in the current direction, the area type of each area in the image is obtained, and the area type may include: grass 90, stone road 70 and pool 80. The stone road is adjacent to the pool, and the stone road and the pool as a whole are adjacent to the working area. The lawn mower is controlled to start the cross-edge mode, the camera captures the image, and the grass, stone road and pool in the image are semantically identified, the grass in the image is expanded, and the part of the expanded image that overlaps with the stone road is obtained, and the part is modified to grass, and the stone road and the pool in the non-overlapping part are marked as non-grass. As shown in the figure, if the machine directly drives to the stone position PP adjacent to the pool, its tail may drive into the pool. Therefore, the machine can be controlled to continue driving in the current direction for a period of time, and then the lawn mower can be controlled to change the driving direction to drive along the boundary between grass and non-grass in the image. By delaying the response to the image recognition result, the lawn mower will not fall into the pool when driving to the grass area in the image to ensure the safety of the lawn mower.
在本申请中,获取所采集的图像中各个区域的区域类型,当目标区域的区域类型为第一区域类型时,控制自移动设备改变行驶方式,以使得工作部的覆盖范围包括目标区域的一部分。使自移动设备能够在兼顾安全性的前提下,对工作区域的边界处进行处理,提高了对工作区域的边界处的处理覆盖率,提升了用户使用体验。进一步的,自移动设备能够快速识别出图像中各个区域的区域类型,即,能够快速识别出多种场景,从而可以针对不同场景选取采取不同的工作策略。In the present application, the area type of each area in the captured image is obtained, and when the area type of the target area is the first area type, the self-moving device is controlled to change the driving mode so that the coverage of the working part includes a part of the target area. The self-moving device can process the boundary of the working area while taking safety into consideration, thereby improving the processing coverage rate of the boundary of the working area and enhancing the user experience. Furthermore, the self-moving device can quickly identify the area type of each area in the image, that is, it can quickly identify a variety of scenes, so that different working strategies can be selected for different scenes.
在本申请的另一个实施例中,自移动设备在行驶过程中采集图像并基于图像建立其附近区域的局部地图,当识别到第一区域类型所在区域以及第二区域类型所在区域均与待行驶区域相邻的场景时,可以根据该局部地图规划自移动设备的行驶路径,以控制在按照调整后的图像行驶后,避开第二区域类型所在区域。In another embodiment of the present application, the self-mobile device collects images during driving and establishes a local map of its surrounding area based on the images. When a scenario is identified in which the area where the first area type and the area where the second area type are located are adjacent to the area to be driven, the driving path of the self-mobile device can be planned according to the local map to control the vehicle to avoid the area where the second area type is located after driving according to the adjusted image.
在一个实施例中,在得到图像采集装置采集到的图像(下文也称第一图像),将所述目标区域中与待行驶区域相邻部分的区域类型标记为草地类型,以得到第二图像,包括:In one embodiment, after obtaining an image acquired by an image acquisition device (hereinafter also referred to as a first image), marking the area type of a portion of the target area adjacent to the area to be driven as a grass type to obtain a second image includes:
遍历第一图像中的全部像素,确定待标记区域的像素;Traversing all pixels in the first image to determine pixels in the area to be marked;
将待标记区域的像素标记为草地对应的像素,从而得到第二图像。The pixels in the area to be marked are marked as pixels corresponding to grass, thereby obtaining a second image.
示例性地,可以将待标记区域的像素的颜色修改为绿色,或者可以将待标记区域的图案形状修改为草的形状。Exemplarily, the color of the pixels in the area to be marked may be modified to green, or the pattern shape of the area to be marked may be modified to the shape of grass.
待标记区域可以是目标区域中,与草地区域相邻的预设宽度的部分区域。The area to be marked may be a partial area of the target area with a preset width adjacent to the grass area.
在一个实施例中,在得到图像采集装置采集到的图像(下文也称第一图像),将所述目标区域中与待行驶区域相邻部分的区域类型标记为草地类型,包括:In one embodiment, after obtaining an image acquired by the image acquisition device (hereinafter also referred to as the first image), marking the area type of a portion of the target area adjacent to the area to be driven as a grassland type includes:
对第一图像进行栅格化处理,生成栅格图像,栅格图像包括草地区域对应的草地栅格、目标区域对应的目标栅格,草地栅格的属性为草地属性,目标栅格的属性为第一区域类型或第二区域类型;rasterizing the first image to generate a raster image, wherein the raster image includes a grassland raster corresponding to the grassland area and a target raster corresponding to the target area, the attributes of the grassland raster are grassland attributes, and the attributes of the target raster are the first area type or the second area type;
对草地栅格进行膨胀处理,将膨胀处理后栅格的属性标记为草地属性;Perform expansion processing on the grassland raster, and mark the attributes of the expanded raster as grassland attributes;
获取目标栅格中与膨胀后的栅格重叠部分;Get the overlapping part of the target grid with the expanded grid;
若目标栅格中重叠栅格的属性为第一区域类型,则将该重叠栅格的属性修改为草地属性;If the attribute of the overlapping grid in the target grid is the first area type, the attribute of the overlapping grid is modified to the grassland attribute;
若目标栅格中重叠栅格的属性为第二区域类型,则将该重叠栅格的属性修改为非草地属性,得到第二图像。If the attribute of the overlapping grid in the target grid is the second area type, the attribute of the overlapping grid is modified to a non-grassland attribute to obtain a second image.
或者,在生成栅格图像后,也可以根据草地栅格的位置和目标栅格的位置,确定待标记栅格;将待标记栅格的属性标记为草地属性,得到第二图像。 Alternatively, after the grid image is generated, the grid to be marked may be determined according to the position of the grassland grid and the position of the target grid; the attributes of the grid to be marked are marked as grassland attributes to obtain the second image.
对图像进行栅格化处理的标准为:一个栅格中包含25个像素,每个像素均标记有相应属性,每个栅格属性以数目较多的像素属性为准。可以基于摄像头的内参、外参、畸变参数以及图像像素等,对第一图像进行栅格化处理,得到第一图像对应的栅格图像,在栅格化处理的过程中,可以将草地区域转换为草地栅格,草地栅格的属性为草地属性;可以将目标区域转换为目标栅格,目标栅格的属性为目标属性,即第一区域类型或第二区域类型。非草地属性包括第一区域类型或第二区域类型,本实施例中可以将待标记栅格的目标属性修改为草地属性,从而得到第二图像。The standard for rasterizing an image is: a grid contains 25 pixels, each pixel is marked with a corresponding attribute, and each grid attribute is based on the attribute of a larger number of pixels. The first image can be rasterized based on the camera's internal parameters, external parameters, distortion parameters, and image pixels to obtain a raster image corresponding to the first image. During the rasterization process, the grassland area can be converted into a grassland grid, and the attributes of the grassland grid are grassland attributes; the target area can be converted into a target grid, and the attributes of the target grid are target attributes, that is, the first region type or the second region type. Non-grass attributes include the first region type or the second region type. In this embodiment, the target attribute of the grid to be marked can be modified to the grassland attribute to obtain the second image.
在一个实施例中,待标记栅格的相邻栅格包括草地栅格。待标记栅格可以是与草地栅格相邻的栅格,示例性的,如果待标记栅格的周围的相邻栅格中的任意栅格为草地栅格,则可以将该待标记栅格作为草地栅格。In one embodiment, the neighboring grid of the grid to be marked includes a grassland grid. The grid to be marked may be a grid adjacent to the grassland grid. Exemplarily, if any grid among the neighboring grids around the grid to be marked is a grassland grid, the grid to be marked may be regarded as a grassland grid.
在一个实施例中,在自移动设备基于逆时针方向沿工作区域的边界移动的情况下,待标记栅格的左侧栅格是草地栅格。In one embodiment, when the self-moving device moves along the boundary of the working area based on a counterclockwise direction, the left grid of the grid to be marked is a grass grid.
自移动设备基于逆时针方向沿工作区域的边界移动的情况下,边界在自移动设备的右侧,草地在自移动设备的左侧,因此可以判断目标栅格的左侧栅格是否为草地栅格,如果是草地栅格则可以将该目标栅格作为待标记栅格。When the self-moving device moves along the boundary of the working area in a counterclockwise direction, the boundary is on the right side of the self-moving device and the grassland is on the left side of the self-moving device. Therefore, it can be determined whether the left grid of the target grid is a grassland grid. If it is a grassland grid, the target grid can be used as the grid to be marked.
自移动设备基于顺时针方向沿工作区域的边界移动的情况下,确定目标栅格的右侧栅格是否为草地栅格,如果是草地栅格则可以将该目标栅格作为待标记栅格。When the mobile device moves along the boundary of the working area in a clockwise direction, it is determined whether the right grid of the target grid is a grassland grid. If it is a grassland grid, the target grid can be used as a grid to be marked.
在一个实施例中,待标记栅格的下侧栅格是草地栅格。In one embodiment, the lower grid of the grid to be marked is a grass grid.
示例性地,石板可能位于机器的正前方,摄像头没有拍摄到石板中与机器前进方向相平行的侧边,只拍摄到石板中与机器的前进方向相垂直的侧边,在这种情况下,由于所有目标栅格的左侧栅格为目标区域,因此可以判断目标栅格的下方栅格是否为草地栅格,如果是草地栅格则可以将该目标栅格作为待标记栅格。或者,在另一个实施例中,当图像中不存在待行驶区域时,说明机器在边界的直角处,当机器为逆时针沿边界行驶时,控制机器左转或报警。For example, the stone slab may be located directly in front of the machine, and the camera does not capture the side of the stone slab parallel to the machine's forward direction, but only captures the side of the stone slab perpendicular to the machine's forward direction. In this case, since the left grid of all target grids is the target area, it can be determined whether the grid below the target grid is a grass grid. If it is a grass grid, the target grid can be used as a grid to be marked. Alternatively, in another embodiment, when there is no area to be driven in the image, it means that the machine is at a right angle to the boundary. When the machine is driving counterclockwise along the boundary, the machine is controlled to turn left or an alarm is issued.
由于机器的位置和边界的形状是多种多样的,因此机器拍摄到的图像中边界的位置、形状也是多样的。可以根据实际需求设置具体条件,将满足条件的目标栅格作为待标记栅格。Since the position and shape of the boundary of the machine are varied, the position and shape of the boundary in the image captured by the machine are also varied. You can set specific conditions according to actual needs and use the target grid that meets the conditions as the grid to be marked.
在一个实施例中,根据草地栅格和目标栅格的位置,确定待标记栅格,包括:In one embodiment, determining the grid to be marked according to the positions of the grassland grid and the target grid includes:
根据草地栅格的位置、目标栅格的位置和跨边距离条件,确定待标记栅格。The grid to be marked is determined according to the position of the grassland grid, the position of the target grid and the cross-edge distance conditions.
示例性地,跨边距离条件可以表征机器机身中超出实际边界的部分的宽度,或机器工作部中超出边界的部分的宽度。For example, the span distance condition may represent the width of a portion of a machine body that exceeds an actual boundary, or the width of a portion of a machine working portion that exceeds a boundary.
可以根据草地栅格的位置、目标栅格的位置,确定与草地栅格相邻的目标栅格,将其作为第一列待标记栅格,并进一步根据跨边距离条件,将位于第一列待标记栅格的侧方的X列目标栅格作为其他列待标记栅格。可以根据跨边距离条件确定X数值。According to the position of the grassland grid and the position of the target grid, the target grid adjacent to the grassland grid can be determined as the first column of grids to be marked, and further according to the cross-edge distance condition, the X columns of target grids located on the side of the first column of grids to be marked can be used as other columns of grids to be marked. The X value can be determined according to the cross-edge distance condition.
示例性地,如果要求机器机身中超出实际边界的部分的宽度为10cm,而一个栅格的宽度为5cm,则可以将两列目标栅格作为待标记栅格,X为1。For example, if the width of the portion of the machine body that exceeds the actual boundary is required to be 10 cm, and the width of a grid is 5 cm, two columns of target grids can be used as grids to be marked, and X is 1.
示例性地,如果机器的控制逻辑是机身与图像中界限对应位置需要保持一定距离,如10cm,而跨边距离条件要求机器机身中超出实际边界的部分的宽度为10cm,而一个栅格的宽度为5cm,则可以将符合条件的四列目标栅格作为待标记栅格,X为3。For example, if the control logic of the machine is that the fuselage and the corresponding position of the boundary in the image need to maintain a certain distance, such as 10 cm, and the cross-edge distance condition requires that the width of the part of the machine fuselage that exceeds the actual boundary is 10 cm, and the width of a grid is 5 cm, then the four-column target grid that meets the conditions can be used as the grid to be marked, and X is 3.
在一个实施例中,对第一图像进行转换得到第一栅格图像后,可以遍历第一栅格图像中的全部栅格,从而确定第一栅格图像中的待标记栅格,将其标记为草地属性,得到第二栅格图像;再确定第二栅格图像中的待标记栅格,将其标记为草地属性,得到第三栅格图像;再将第三栅格图像中的待标记 栅格标记为草地属性,得到第四栅格图像;再将第四栅格图像中的待标记栅格标记为草地属性,得到第五栅格图像,即第二图像。由此对图像中的全部栅格进行了四次遍历,实现将四列目标栅格作为待标记栅格。In one embodiment, after converting the first image to obtain the first raster image, all the raster in the first raster image can be traversed to determine the raster to be marked in the first raster image, mark it as grass attribute, and obtain a second raster image; then determine the raster to be marked in the second raster image, mark it as grass attribute, and obtain a third raster image; then mark the raster to be marked in the third raster image The grid is marked as grass attribute, and the fourth grid image is obtained; then the grids to be marked in the fourth grid image are marked as grass attribute, and the fifth grid image, i.e., the second image, is obtained. Thus, all grids in the image are traversed four times, and four columns of target grids are used as grids to be marked.
在一个实施例中,在遍历栅格的过程中,不会修改原本是草地属性的草地栅格,也不会修改原本是障碍属性的障碍栅格。In one embodiment, in the process of traversing the grids, the grass grid originally having grass attributes will not be modified, and the obstacle grid originally having obstacle attributes will not be modified.
在一个实施例中,根据第二图像,控制自移动设备行驶和/或工作,包括:In one embodiment, controlling the self-moving device to travel and/or work according to the second image includes:
根据第二图像,控制自移动设备在草地属性区域对应的空间中行驶和/或工作,避开非草地属性区域对应的空间,并控制自移动设备的工作部覆盖范围满足预设条件;预设条件包括工作部覆盖范围包括目标区域的一部分,或者工作部覆盖范围与工作区域的边界相交,或者工作部覆盖范围与工作区域的边界之间的距离小于第一阈值。According to the second image, the self-moving device is controlled to travel and/or work in the space corresponding to the grass attribute area, avoid the space corresponding to the non-grass attribute area, and control the coverage range of the working part of the self-moving device to meet preset conditions; the preset conditions include that the coverage range of the working part includes a part of the target area, or the coverage range of the working part intersects with the boundary of the working area, or the distance between the coverage range of the working part and the boundary of the working area is less than a first threshold.
示例性地,在基于逆时针方向沿边界移动的过程中,当自移动设备基于图像检测到目标区域后,可以根据处理后的第二图像,控制自移动设备向右转向并移动,直至自移动设备在第二图像的草地属性区域对应的空间中行驶和/或工作,并沿草地属性区域和目标属性区域的界限对应的位置行驶,从而实现跨边切割。Exemplarily, in the process of moving along the border in a counterclockwise direction, when the self-mobile device detects the target area based on the image, the self-mobile device can be controlled to turn right and move according to the processed second image until the self-mobile device drives and/or works in the space corresponding to the grass attribute area of the second image, and drives along the position corresponding to the boundary between the grass attribute area and the target attribute area, thereby achieving cross-edge cutting.
结合图10所示,在实际空间中,自移动设备是跨边行驶并切割的;但在自移动设备的内在控制逻辑中,它仍会认为自己正在沿着边界行驶并切割;这是由于第二图像中的草地属性区域和目标属性区域是在第一图像的基础上重新标记的。这种方式也更容易与机器的其他控制逻辑相兼容。As shown in Figure 10, in the actual space, the self-moving device is driving and cutting across the edge; but in the internal control logic of the self-moving device, it still thinks that it is driving and cutting along the boundary; this is because the grass attribute area and the target attribute area in the second image are re-marked based on the first image. This method is also more compatible with other control logics of the machine.
在一个实施例中,根据第二图像,控制自移动设备行驶和/或工作,包括:In one embodiment, controlling the self-moving device to travel and/or work according to the second image includes:
根据第二图像,生成工作区域的地图,地图包括可行驶区域和不可行驶区域,可行驶区域对应于第二图像的草地属性区域,不可行驶区域对应于第二图像的非草地属性区域;根据地图,控制自移动设备行驶和/或工作,以使自移动设备在可行驶区域对应的空间中行驶和/或工作,避开不可行驶区域对应的空间。Based on the second image, a map of the working area is generated, the map including a drivable area and a non-drivable area, the drivable area corresponds to the grass attribute area of the second image, and the non-drivable area corresponds to the non-grass attribute area of the second image; based on the map, the self-moving device is controlled to drive and/or work so that the self-moving device drives and/or works in the space corresponding to the drivable area and avoids the space corresponding to the non-drivable area.
根据第二图像生成工作区域中局部区域的地图,该地图可以体现自移动设备周围的环境,体现自移动设备周围的草地和非草地。可行驶区域对应于第二图像的草地属性区域,包括真正的草地区域和属性被更改为草地属性的目标区域。不可行驶区域对应于第二图像的非草地属性区域,包括真正的障碍区域、未被更改属性的目标区域和障碍区域。A map of a local area in the working area is generated based on the second image, and the map can reflect the environment around the mobile device, and reflect the grass and non-grass around the mobile device. The drivable area corresponds to the grass attribute area of the second image, including the real grass area and the target area whose attributes are changed to grass attributes. The non-drivable area corresponds to the non-grass attribute area of the second image, including the real obstacle area, the target area whose attributes are not changed, and the obstacle area.
自移动设备可以根据地图进行路径规划,从而沿可行驶区域和不可行驶区域之间的边界移动,实现在实际空间中的跨边切割。The self-moving device can plan the path according to the map, so as to move along the boundary between the drivable area and the non-drivable area, and realize cross-edge cutting in the actual space.
在一个实施例中,目标区域与草地区域之间的高度差小于第二阈值。In one embodiment, the height difference between the target area and the grass area is less than a second threshold.
本实施例中,目标区域是安全区域,因此两者的高度差不能过大。In this embodiment, the target area is a safe area, so the height difference between the two cannot be too large.
结合图9所示,在一个实施例中,方法还包括:As shown in FIG9 , in one embodiment, the method further includes:
在第一图像中目标区域的区域类型为第二区域类型的情况下,获取沿边距离信息;When the region type of the target region in the first image is the second region type, obtaining edge distance information;
根据沿边距离信息,控制自移动设备和工作区域的边界10之间的距离d。According to the edge distance information, the distance d between the mobile device and the boundary 10 of the working area is controlled.
如果自移动设备在沿边移动的过程中所采集的图像中只识别到第二区域类型时,说明此时待行驶区域与目标区域的边界外侧可能是危险的,因此不能跨边界移动。为了保证安全,在此时,机器与边界10之间可以保持一定的距离d,该距离可以是固定的,也可以可调整的。If only the second area type is identified in the image collected by the self-moving device during the movement along the edge, it means that the outside of the boundary between the to-be-traveled area and the target area may be dangerous, so it cannot move across the boundary. In order to ensure safety, at this time, a certain distance d can be maintained between the machine and the boundary 10, and the distance can be fixed or adjustable.
可以根据获取的沿边距离信息,调整实际的距离d,使实际距离d等于沿边距离信息表征的距离值。The actual distance d may be adjusted according to the acquired edge distance information so that the actual distance d is equal to the distance value represented by the edge distance information.
在一个实施例中,获取沿边距离信息,包括:获取用户指令信息;根据用户指令信息,确定沿边距离信息。沿边距离信息可以是根据用户指令确定的,示例性地,用户选择10cm,则沿边距离信息为 10cm,自移动设备可以调整移动方向,从而将自身与边界10之间的距离d调整为10cm。In one embodiment, obtaining the edge distance information includes: obtaining user instruction information; and determining the edge distance information according to the user instruction information. The edge distance information can be determined according to the user instruction. For example, if the user selects 10 cm, the edge distance information is 10cm, the self-moving device can adjust the moving direction, thereby adjusting the distance d between itself and the boundary 10 to 10cm.
在一个实施例中,将所述目标区域中与待行驶区域相邻部分的区域类型标记为草地类型,得到第二图像,包括:确定待标记区域;在未检测到碰撞的情况下,将第一图像中待标记区域的属性标记为草地属性,得到第二图像。In one embodiment, the area type of the portion of the target area adjacent to the area to be driven is marked as a grass type to obtain a second image, including: determining the area to be marked; and when no collision is detected, marking the attributes of the area to be marked in the first image as grass attributes to obtain a second image.
在一个实施例中,将第一图像中待标记区域的属性标记为草地属性,得到第二图像,包括:确定待标记区域;在检测到碰撞的情况下,确定待标记区域的第一区域和第二区域,第一区域与草地区域之间的距离小于第二区域与草地区域之间的距离;将第一区域的属性标记为草地属性,得到第二图像。In one embodiment, the attributes of the area to be marked in the first image are marked as grass attributes to obtain a second image, including: determining the area to be marked; in the case of a collision being detected, determining a first area and a second area of the area to be marked, the distance between the first area and the grass area being smaller than the distance between the second area and the grass area; marking the attributes of the first area as grass attributes to obtain a second image.
示例性地,机器设置有碰撞检测传感器。Exemplarily, the machine is provided with collision detection sensors.
示例性地,在机器没有开启跨边切割(也就是上文所述的跨边动作)功能时,机器的控制逻辑是机身与图像中界限对应位置需要保持一定距离,如15cm。在机器开启跨边切割功能,并且机器没有检测到碰撞的情况下,机器的控制逻辑是机身与图像中界限对应位置需要保持一定距离,如10cm,而跨边距离条件要求机器机身中超出实际边界的部分的宽度为10cm,而一个栅格的宽度为5cm,则可以将符合条件的四列目标栅格作为待标记栅格。For example, when the machine does not have the cross-edge cutting function (that is, the cross-edge action described above) turned on, the control logic of the machine is that the fuselage needs to maintain a certain distance from the position corresponding to the boundary in the image, such as 15 cm. When the machine turns on the cross-edge cutting function and the machine does not detect a collision, the control logic of the machine is that the fuselage needs to maintain a certain distance from the position corresponding to the boundary in the image, such as 10 cm. The cross-edge distance condition requires that the width of the part of the machine body that exceeds the actual boundary is 10 cm, and the width of a grid is 5 cm. In this case, the four-column target grid that meets the conditions can be used as the grid to be marked.
在机器的碰撞传感器检测到碰撞的情况下,可以控制机器向远离碰撞物体的方向移动,增大机器与碰撞物体之间的距离并移动。示例性地,在机器开启跨边切割功能,并且机器的碰撞传感器检测到碰撞的情况下,机器的控制逻辑是机身与图像中界限对应位置需要保持一定距离,如10cm,而可以将跨边距离条件改为要求机器机身中超出实际边界的部分的宽度为0cm,则可以将符合条件的两列目标栅格作为待标记栅格。也就是说,在开启跨边切割并且检测到碰撞的情况下,可以减少待标记栅格的列数,使列数小于在开启跨边切割并且未检测到碰撞的情况下待标记栅格的列数。When the collision sensor of the machine detects a collision, the machine can be controlled to move away from the collision object, increase the distance between the machine and the collision object, and move. For example, when the machine turns on the cross-edge cutting function and the collision sensor of the machine detects a collision, the control logic of the machine is that the fuselage and the corresponding position of the boundary in the image need to maintain a certain distance, such as 10cm, and the cross-edge distance condition can be changed to require that the width of the part of the machine body that exceeds the actual boundary is 0cm, and the two columns of target grids that meet the conditions can be used as grids to be marked. In other words, when cross-edge cutting is turned on and a collision is detected, the number of columns of grids to be marked can be reduced so that the number of columns is less than the number of columns of grids to be marked when cross-edge cutting is turned on and no collision is detected.
在一个实施例中,将目标区域中与待行驶区域相邻部分的区域类型标记为草地类型,包括:确定待标记区域;确定待标记区域的第一区域和第二区域,第一区域与草地区域之间的距离小于第二区域与草地区域之间的距离;将第一区域的属性和第二区域的属性标记为草地属性;在检测到碰撞的情况下,将第二区域的属性标记为目标属性,得到第二图像。In one embodiment, the area type of the portion of the target area adjacent to the area to be driven is marked as a grass type, including: determining the area to be marked; determining a first area and a second area of the area to be marked, wherein the distance between the first area and the grass area is smaller than the distance between the second area and the grass area; marking the attributes of the first area and the second area as grass attributes; and in the event of a collision being detected, marking the attributes of the second area as target attributes to obtain a second image.
在开启跨边切割并且检测到碰撞的情况下,可以将全部的待标记栅格标记为草地栅格,然后再将待标记栅格中的一部分栅格标记回目标属性,从而得到第二图像。When cross-edge cutting is enabled and a collision is detected, all grids to be marked may be marked as grass grids, and then a portion of the grids to be marked may be marked back to the target attribute, thereby obtaining a second image.
在一个实施例中,在自移动设备未检测到碰撞的情况下,执行将第一图像中待标记区域的属性标记为草地属性,得到第二图像的步骤;控制方法还包括:在自移动设备检测到碰撞的情况下,将第一图像中待选区域的属性标记为目标属性,得到第三图像,待选区域为草地区域中靠近目标区域的区域;根据第三图像,控制自移动设备行驶和/或工作。In one embodiment, when the self-moving device does not detect a collision, the step of marking the attributes of the area to be marked in the first image as grass attributes to obtain a second image is executed; the control method also includes: when the self-moving device detects a collision, marking the attributes of the area to be selected in the first image as target attributes to obtain a third image, and the area to be selected is an area in the grass area close to the target area; according to the third image, the self-moving device is controlled to travel and/or work.
在开启跨边切割功能后,如果没有检测到碰撞,可以直接将待标记区域的属性标记为草地属性,得到第二图像。After the cross-edge cutting function is turned on, if no collision is detected, the attribute of the area to be marked can be directly marked as a grass attribute to obtain a second image.
在开启跨边切割功能后,如果检测到碰撞,可以将草地区域中靠近目标区域的栅格标记为目标属性,得到第三图像,进而根据第三图像控制自移动设备行驶和/或工作,从而将边界向草地内缩,使自移动设备远离碰撞物体,避免碰撞。可以直接根据第三图像分析内缩后的边界位置,进而控制机器。也可以根据第三图像生成栅格地图,根据地图中的边界信息控制机器。After the cross-edge cutting function is turned on, if a collision is detected, the grid near the target area in the grass area can be marked as a target attribute to obtain a third image, and then the self-moving device can be controlled to travel and/or work according to the third image, so that the boundary is retracted toward the grass, and the self-moving device is away from the collision object to avoid collision. The position of the retracted boundary can be directly analyzed according to the third image, and then the machine can be controlled. A grid map can also be generated according to the third image, and the machine can be controlled according to the boundary information in the map.
在其中一种实施方式中,针对在检测到碰撞后预设时长内获取的第一图像,将第一图像中待选区域的属性标记为目标属性,得到第三图像。In one implementation manner, for a first image acquired within a preset time period after a collision is detected, an attribute of a to-be-selected area in the first image is marked as a target attribute to obtain a third image.
示例性地,在碰撞后的7秒内,执行将第一图像中待选区域的属性标记为目标属性,得到第三图像的步骤。碰撞后的7秒之后,执行将第一图像中待标记区域的属性标记为草地属性,得到第二图像 的步骤。For example, within 7 seconds after the collision, the step of marking the attributes of the area to be selected in the first image as the target attributes is performed to obtain the third image. After 7 seconds after the collision, the step of marking the attributes of the area to be marked in the first image as the grass attributes is performed to obtain the second image. steps.
示例性地,在机器没有开启跨边切割功能时,机器的控制逻辑是机身与图像中界限对应位置需要保持一定距离,如15cm。For example, when the cross-edge cutting function is not turned on, the control logic of the machine is that the machine body needs to maintain a certain distance from the position corresponding to the boundary in the image, such as 15 cm.
在机器开启跨边切割功能,并且机器没有检测到碰撞的情况下,机器的控制逻辑是机身与图像中界限对应位置需要保持一定距离,如10cm,而跨边距离条件要求机器机身中超出实际边界的部分的宽度为10cm,而一个栅格的宽度为5cm,则可以将符合条件的四列目标栅格作为待标记栅格。When the machine turns on the cross-edge cutting function and does not detect a collision, the machine's control logic is that the machine body needs to maintain a certain distance from the corresponding position of the boundary in the image, such as 10 cm. The cross-edge distance condition requires that the width of the part of the machine body that exceeds the actual boundary is 10 cm, and the width of a grid is 5 cm. In this case, the four-column target grid that meets the conditions can be used as the grid to be marked.
在机器开启跨边切割功能,并且机器的碰撞传感器检测到碰撞的情况下,机器的控制逻辑是机身与图像中界限对应位置需要保持一定距离,如10cm,并将跨边距离条件改为要求机器机身向实际边界内缩的宽度为10cm,则可以将草地区域中的两列目标栅格作为待选栅格。When the machine turns on the cross-edge cutting function and the machine's collision sensor detects a collision, the machine's control logic is that the machine body needs to maintain a certain distance from the corresponding position of the boundary in the image, such as 10 cm, and the cross-edge distance condition is changed to require the machine body to retract 10 cm inward from the actual boundary. In this way, the two columns of target grids in the grass area can be used as candidate grids.
也就是说,在开启跨边切割功能并且跨边时检测到碰撞的情况下,可以在碰撞后的一段时间内,控制自移动设备进行内缩式沿边移动,也就是控制自移动设备在草地的内部进行沿边移动,并适当增大自移动设备与边界之间的距离,避免碰撞。That is to say, when the cross-edge cutting function is turned on and a collision is detected when crossing the edge, the self-moving device can be controlled to move inward along the edge within a period of time after the collision, that is, the self-moving device can be controlled to move along the edge inside the grass, and the distance between the self-moving device and the boundary can be appropriately increased to avoid collision.
需要说明的是,本公开实施例提供的不同的实施例之间可以相互组合,但对于组合的方式不作具体限定。It should be noted that different embodiments provided in the embodiments of the present disclosure can be combined with each other, but the manner of combination is not specifically limited.
本公开实施例还提供了一种自移动设备,包括:处理器、存储器及存储在所述存储器上并可被所述处理器执行的计算机程序,所述计算机程序被所述处理器执行时实现根据本公开实施例任一项所述中所述的自移动设备的控制方法。An embodiment of the present disclosure also provides a self-moving device, comprising: a processor, a memory, and a computer program stored in the memory and executable by the processor, wherein when the computer program is executed by the processor, the control method of the self-moving device described in any one of the embodiments of the present disclosure is implemented.
基于前述实施例相同的发明构思,本实施例还提供了一种计算机存储介质,所述计算机存储介质中存储有计算机程序,计算机存储介质可以是磁性随机存取存储器(FRAM,ferromagnetic random access memory)、只读存储器(ROM,Read Only Memory)、可编程只读存储器(PROM,Programmable Read-Only Memory)、可擦除可编程只读存储器(EPROM,Erasable Programmable Read-Only Memory)、电可擦除可编程只读存储器(EEPROM,Electrically Erasable Programmable Read-Only Memory)、快闪存储器(Flash Memory)、磁表面存储器、光盘、或只读光盘(CD-ROM,Compact Disc Read-Only Memory)等存储器;也可以是包括上述存储器之一或任意组合的各种设备,如移动电话、计算机、平板设备、个人数字助理等。所述计算机存储介质中存储的计算机程序被处理器运行时,实现应用于上述装置的所述自移动设备的控制方法。所述计算机程序被处理器执行时实现的具体步骤流程请参考图1所示实施例的描述,在此不再赘述。Based on the same inventive concept as the above-mentioned embodiment, this embodiment further provides a computer storage medium, in which a computer program is stored. The computer storage medium may be a ferromagnetic random access memory (FRAM), a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a flash memory, a magnetic surface memory, an optical disc, or a compact disc read-only memory (CD-ROM); or various devices including one or any combination of the above memories, such as a mobile phone, a computer, a tablet device, a personal digital assistant, etc. When the computer program stored in the computer storage medium is executed by a processor, the control method of the self-moving device applied to the above-mentioned device is implemented. For the specific steps implemented when the computer program is executed by the processor, please refer to the description of the embodiment shown in Figure 1, which will not be repeated here.
以上所述实施例的各技术特征可以进行任意的组合,为使描述简洁,未对上述实施例中的各个技术特征所有可能的组合都进行描述,然而,只要这些技术特征的组合不存在矛盾,都应当认为是本说明书记载的范围。The technical features of the above-described embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above-described 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.
在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,除了包含所列的那些要素,而且还可包含没有明确列出的其他要素。In this document, the terms "comprises," "comprising," or any other variations thereof, are intended to cover a non-exclusive inclusion of elements other than those listed and may also include additional elements not expressly listed.
以上所述,仅为本发明的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应以所述权利要求的保护范围为准。 The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.

Claims (16)

  1. 一种自移动设备的控制方法,所述自移动设备包括工作部,所述工作部被配置为执行作业工作,所述自移动设备还包括:图像采集装置,所述图像采集装置被配置为采集所述自移动设备前方的图像,所述自移动设备被配置为在工作区域中行驶和/或工作,其特征在于,所述方法包括:A control method for a self-moving device, wherein the self-moving device comprises a working part, wherein the working part is configured to perform a work operation, and the self-moving device further comprises: an image acquisition device, wherein the image acquisition device is configured to acquire an image in front of the self-moving device, and the self-moving device is configured to travel and/or work in a working area, wherein the method comprises:
    获取所采集的图像中各个区域的区域类型,所述各个区域至少包括:待行驶区域以及目标区域,其中,所述待行驶区域为所述工作区域的一部分,所述目标区域为与所述待行驶区域相邻的区域;Acquire the area type of each area in the acquired image, wherein each area at least includes: an area to be driven and a target area, wherein the area to be driven is a part of the working area, and the target area is an area adjacent to the area to be driven;
    当所述目标区域的区域类型为第一区域类型时,控制所述自移动设备改变行驶方式,以使得所述工作部的覆盖范围包括所述目标区域的一部分。When the area type of the target area is the first area type, the self-moving device is controlled to change the driving mode so that the coverage range of the working unit includes a part of the target area.
  2. 根据权利要求1所述的方法,其特征在于,所述方法还包括:The method according to claim 1, characterized in that the method further comprises:
    将所采集的图像输入训练得到的图像识别模型,以对所述图像进行语义分割得到各个区域的区域类型。The collected image is input into the trained image recognition model to perform semantic segmentation on the image to obtain the region type of each region.
  3. 根据权利要求1至2中任一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 1 to 2, characterized in that the method further comprises:
    当所述工作模式为预设工作模式时,执行当所述目标区域的区域类型为第一区域类型时,控制所述自移动设备改变行驶方式,以使得所述工作部的覆盖范围包括所述目标区域的一部分的步骤,所述预设工作模式为沿边工作模式或用户预先设置的工作模式,所述沿边工作模式为控制所述自移动设备沿着所述工作区域的边界移动和工作的模式。When the working mode is a preset working mode, the step of controlling the self-moving device to change the driving mode so that the coverage range of the working unit includes a part of the target area is executed when the area type of the target area is the first area type. The preset working mode is an edge working mode or a working mode preset by the user. The edge working mode is a mode for controlling the self-moving device to move and work along the boundary of the working area.
  4. 根据权利要求1至3中任一项所述的方法,其特征在于,所述第一区域类型包括道路、井盖、石板路、硬质路面、落叶和泥土中的一个或多个,或,根据用户指令得到所述第一区域类型。The method according to any one of claims 1 to 3 is characterized in that the first area type includes one or more of roads, manhole covers, stone roads, hard pavement, fallen leaves and mud, or the first area type is obtained according to user instructions.
  5. 如权利要求1至4中任一项所述的控制方法,其特征在于,所述方法还包括:The control method according to any one of claims 1 to 4, characterized in that the method further comprises:
    在所述工作部覆盖所述目标区域的一部分的过程中,当检测到接触式碰撞时,控制所述自移动设备改变行驶路径以向所述工作区域内部行驶。When a contact collision is detected during the process in which the working part covers a portion of the target area, the self-moving device is controlled to change a driving path so as to drive toward the inside of the working area.
  6. 根据权利要求1至5中任一项所述的方法,其特征在于,获取所采集的图像中各个区域的区域类型,还包括:The method according to any one of claims 1 to 5, characterized in that obtaining the region type of each region in the acquired image further comprises:
    对所述图像进行深度估计处理,以确定所述目标区域对应的深度信息,所述深度信息用于表示所述目标区域的各位置与所述图像采集装置之间的距离;Performing depth estimation processing on the image to determine depth information corresponding to the target area, the depth information being used to represent the distance between each position of the target area and the image acquisition device;
    相应的,当所述目标区域的区域类型为第一区域类型时,控制所述自移动设备改变行驶方式,包括:Correspondingly, when the area type of the target area is the first area type, controlling the self-moving device to change the driving mode includes:
    根据所述目标区域的区域类型以及所述深度信息控制所述自移动设备改变行驶方式,以使得当所述目标区域的区域类型为第一区域类型,并且,所述目标区域与所述待行驶区域之间的高度差小于高度阈值时,所述工作部的覆盖范围包括所述目标区域的一部分。The self-moving device is controlled to change the driving mode according to the area type of the target area and the depth information, so that when the area type of the target area is the first area type and the height difference between the target area and the area to be driven is less than a height threshold, the coverage range of the working unit includes a part of the target area.
  7. 根据权利要求1至6中任一项所述的方法,其特征在于,对所述图像进行语义分割得到各个区域的区域类型,所述待行驶区域的区域类型为:草地类型,所述目标区域的区域类型为:第一区域类型;相应的, The method according to any one of claims 1 to 6 is characterized in that semantic segmentation is performed on the image to obtain the region type of each region, the region type of the to-be-traveled region is a grassland type, and the region type of the target region is a first region type; accordingly,
    控制所述工作部的覆盖范围包括所述目标区域的一部分,包括:Controlling the coverage of the working portion to include a portion of the target area comprises:
    将所述目标区域中与所述待行驶区域相邻部分的区域类型标记为草地类型;Marking the area type of the portion of the target area adjacent to the area to be driven as a grassland type;
    控制所述自移动设备沿着所述草地类型所确定的区域与所述第一区域类型所确定的区域之间的边界行驶和/或工作。The self-moving device is controlled to travel and/or operate along a boundary between an area defined by the grass type and an area defined by the first area type.
  8. 根据权利要求1所述的方法,其特征在于,当所述目标区域的区域类型为第二区域类型时,控制所述自移动设备在所述工作区域内行驶和/或工作。The method according to claim 1 is characterized in that when the area type of the target area is the second area type, the self-moving device is controlled to travel and/or work in the working area.
  9. 根据权利要求8所述的方法,所述的方法,其特征在于,所述第二区域类型包括墙体、土坑、水池、栅栏、花圃、土壤硬度小于硬度阈值的土壤、灌溉设施区域和可移动生命体区域中的一个或多个。The method according to claim 8, wherein the second area type includes one or more of a wall, a pit, a pool, a fence, a flower bed, soil with a hardness less than a hardness threshold, an irrigation facility area, and an area of movable life.
  10. 如权利要求8或9所述的控制方法,其特征在于,控制所述自移动设备在所述工作区域内行驶和/或工作,包括:The control method according to claim 8 or 9, characterized in that controlling the self-moving device to travel and/or work in the working area comprises:
    获取沿边距离信息;Get the distance information along the edge;
    根据所述沿边距离信息,控制所述自移动设备在所述工作区域内行驶和/或工作。The self-moving device is controlled to travel and/or work in the working area according to the edge distance information.
  11. 如权利要求10所述的控制方法,其特征在于,获取沿边距离信息,包括:The control method according to claim 10, wherein obtaining the edge distance information comprises:
    获取用户指令信息;Get user command information;
    根据所述用户指令信息,确定所述沿边距离信息。The edge distance information is determined according to the user instruction information.
  12. 如权利要求1-11中任一项所述的控制方法,其特征在于,所述方法还包括:The control method according to any one of claims 1 to 11, characterized in that the method further comprises:
    当所述目标区域的区域类型为第一区域类型时,控制所述自移动设备改变行驶方式,以使得所述自移动设备避开所述第二区域类型所在区域,其中,所述目标区域的区域类型包括第一区域类型以及第二区域类型,且所述第一区域类型所在区域以及所述第二区域类型所在区域均与所述待行驶区域相邻。When the area type of the target area is the first area type, the self-moving device is controlled to change the driving mode so that the self-moving device avoids the area where the second area type is located, wherein the area type of the target area includes the first area type and the second area type, and the area where the first area type is located and the area where the second area type is located are both adjacent to the area to be driven.
  13. 如权利要求1-12中任一项所述的控制方法,其特征在于,所述方法还包括:The control method according to any one of claims 1 to 12, characterized in that the method further comprises:
    当所述目标区域的区域类型为第一区域类型时,控制所述自移动设备改变行驶方式,以使得所述工作部的行驶距离小于第一区域类型所在区域与所述待行驶区域之间的边界长度,其中,所述行驶距离为所述工作部的覆盖范围包括所述目标区域的一部分时所述自移动设备行驶的距离。When the area type of the target area is the first area type, the self-moving device is controlled to change the driving mode so that the driving distance of the working unit is less than the boundary length between the area where the first area type is located and the area to be driven, wherein the driving distance is the distance traveled by the self-moving device when the coverage range of the working unit includes a part of the target area.
  14. 如权利要求1-13中任一项所述的控制方法,其特征在于,获取所采集的图像中各个区域的区域类型之前,所述自移动设备沿着第一路径行驶;The control method according to any one of claims 1 to 13, characterized in that before obtaining the area type of each area in the acquired image, the self-moving device travels along a first path;
    当所述目标区域的区域类型为第一区域类型时,控制所述自移动设备改变行驶方式,包括:When the area type of the target area is the first area type, controlling the self-moving device to change the driving mode includes:
    控制所述自移动设备沿着第一路径继续行驶一段时间,在行驶一段时间之后,改变行驶路径以使得所述工作部的覆盖范围包括所述目标区域的一部分。The self-moving device is controlled to continue traveling along the first path for a period of time, and after traveling for a period of time, the traveling path is changed so that the coverage range of the working unit includes a part of the target area.
  15. 一种自移动设备,所述自移动设备包括: A self-moving device, the self-moving device comprising:
    工作部,所述工作部被配置为执行作业工作;A working unit configured to perform a work operation;
    图像采集装置,所述图像采集装置被配置为采集所述自移动设备前方的图像;An image acquisition device, wherein the image acquisition device is configured to acquire an image in front of the mobile device;
    控制器,与所述工作部与所述图像采集装置信号相连,所述控制器被配置为控制所述自移动设备在工作区域中行驶和/或工作,a controller, connected to the working part and the image acquisition device by signal, the controller being configured to control the self-moving device to travel and/or work in a working area,
    其特征在于,包括:The invention is characterized by comprising:
    所述控制器获取所采集的图像中各个区域的区域类型,所述各个区域至少包括:待行驶区域以及目标区域,其中,所述待行驶区域为所述工作区域的一部分,所述目标区域为与所述待行驶区域相邻的区域;The controller acquires the area type of each area in the acquired image, wherein each area at least includes: an area to be driven and a target area, wherein the area to be driven is a part of the working area, and the target area is an area adjacent to the area to be driven;
    当所述目标区域的区域类型为第一区域类型时,控制所述自移动设备改变行驶方式,以使得所述工作部的覆盖范围包括所述目标区域的一部分。When the area type of the target area is the first area type, the self-moving device is controlled to change the driving mode so that the coverage range of the working unit includes a part of the target area.
  16. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质中存储有计算机程序,所述计算机程序被处理器加载并执行以实现如权利要求1至14中任一项所述的自移动设备的控制方法。 A computer-readable storage medium, characterized in that a computer program is stored in the computer-readable storage medium, and the computer program is loaded and executed by a processor to implement the control method of a self-moving device as described in any one of claims 1 to 14.
PCT/CN2024/087292 2023-04-11 2024-04-11 Control method for autonomous mobile device, autonomous mobile device, and storage medium WO2024213062A1 (en)

Applications Claiming Priority (6)

Application Number Priority Date Filing Date Title
CN202310383011 2023-04-11
CN202310383011.1 2023-04-11
CN202310745686.6 2023-06-21
CN202310745686 2023-06-21
CN202311337920 2023-10-16
CN202311337920.8 2023-10-16

Publications (1)

Publication Number Publication Date
WO2024213062A1 true WO2024213062A1 (en) 2024-10-17

Family

ID=93058812

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2024/087292 WO2024213062A1 (en) 2023-04-11 2024-04-11 Control method for autonomous mobile device, autonomous mobile device, and storage medium

Country Status (1)

Country Link
WO (1) WO2024213062A1 (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105785986A (en) * 2014-12-23 2016-07-20 苏州宝时得电动工具有限公司 Automatic working equipment
CN109634285A (en) * 2019-01-14 2019-04-16 深圳市傲基电子商务股份有限公司 mowing robot and control method thereof
US20210019536A1 (en) * 2018-03-29 2021-01-21 Sony Corporation Signal processing device and signal processing method, program, and mobile body
US20220137632A1 (en) * 2019-07-23 2022-05-05 Honda Motor Co., Ltd. Autonomous work machine, autonomous work machine control method, and storage medium
CN114937258A (en) * 2022-04-22 2022-08-23 未岚大陆(北京)科技有限公司 Control method for mowing robot, and computer storage medium
CN115061471A (en) * 2022-06-30 2022-09-16 未岚大陆(北京)科技有限公司 Construction method and device for working area boundary of mower and mower
CN115202344A (en) * 2022-06-30 2022-10-18 未岚大陆(北京)科技有限公司 Mowing method and device for working boundary of mower, storage medium and mower

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105785986A (en) * 2014-12-23 2016-07-20 苏州宝时得电动工具有限公司 Automatic working equipment
US20210019536A1 (en) * 2018-03-29 2021-01-21 Sony Corporation Signal processing device and signal processing method, program, and mobile body
CN109634285A (en) * 2019-01-14 2019-04-16 深圳市傲基电子商务股份有限公司 mowing robot and control method thereof
US20220137632A1 (en) * 2019-07-23 2022-05-05 Honda Motor Co., Ltd. Autonomous work machine, autonomous work machine control method, and storage medium
CN114937258A (en) * 2022-04-22 2022-08-23 未岚大陆(北京)科技有限公司 Control method for mowing robot, and computer storage medium
CN115061471A (en) * 2022-06-30 2022-09-16 未岚大陆(北京)科技有限公司 Construction method and device for working area boundary of mower and mower
CN115202344A (en) * 2022-06-30 2022-10-18 未岚大陆(北京)科技有限公司 Mowing method and device for working boundary of mower, storage medium and mower

Similar Documents

Publication Publication Date Title
CN112584697B (en) Autonomous machine navigation and training using vision system
US8989972B2 (en) Leader-follower fully-autonomous vehicle with operator on side
US8392065B2 (en) Leader-follower semi-autonomous vehicle with operator on side
US8229618B2 (en) Leader-follower fully autonomous vehicle with operator on side
US8996171B2 (en) Pheromone for robotic boundary
EP2169503B1 (en) Multi-vehicle high intensity perception
US9188980B2 (en) Vehicle with high integrity perception system
US8818567B2 (en) High integrity perception for machine localization and safeguarding
US20210373562A1 (en) System and method for improved boundary detection for robotic mower system
CN114721385A (en) Virtual boundary establishing method and device, intelligent terminal and computer storage medium
CN114019956A (en) Method and system for determining region boundary, autonomous traveling equipment and mowing robot
CN115384546B (en) Vehicle running control method, device, control equipment, vehicle and storage medium
WO2024213062A1 (en) Control method for autonomous mobile device, autonomous mobile device, and storage medium
CN113156929B (en) Self-moving equipment
WO2021139683A1 (en) Self-moving device
CN117130368B (en) Control method and mowing robot
CN211698708U (en) Automatic working system
EP4002985B1 (en) Robotic lawn mower control
CN113147789A (en) Control method and control device for unmanned vehicle and unmanned vehicle
CN116088533B (en) Information determination method, remote terminal, device, mower and storage medium
CA3194391A1 (en) Method for determining information, remote terminal, and mower
CN117437772A (en) System and method for determining and providing parking facility entry characteristics
CN116149337B (en) Mowing control method, mowing machine, mowing device and electronic equipment
EP4332716A2 (en) Mapping objects encountered by a robotic garden tool
CN113848872B (en) Automatic walking device, control method thereof and readable storage medium