Disclosure of Invention
Aiming at the defects of the prior art, the application provides a narrow channel traversing method based on visual detection, which identifies a narrow channel type working area based on visual detection technology, and can ensure the operation effect of equipment on the narrow channel type special area through a special driving mode of traversing paths of the narrow channel area. The application adopts the following technical scheme.
Firstly, in order to achieve the above purpose, a narrow channel traversing method based on visual detection is provided, which comprises the steps of marking the current position of a self-walking device as a narrow channel starting point when the distribution state of the operation area boundary meets the narrow channel judging standard based on the operation area boundary obtained by the visual detection, driving the self-walking device to run along a single operation area boundary from the narrow channel starting point until the distribution state of the operation area boundary obtained by the visual detection does not meet the narrow channel judging standard any more, driving the self-walking device to turn around and translating along the last running path for a preset distance to run until the distribution state of the operation area boundary obtained by the visual detection does not meet the narrow channel judging standard any more, and repeating the previous step until the distance between the self-walking device and the other operation area boundary reaches a safe distance.
Optionally, according to any one of the above narrow-channel traversing methods based on visual detection, the narrow-channel determination criteria is that the operation area boundaries obtained based on visual detection are respectively located at the left and right sides of the field of view of the self-walking device. Therefore, when the left side or the right side of the mower passes through a lawn narrow channel, the mower can rotate and advance according to a normal random mowing scheme, and only when the left side and the right side in front of the mower simultaneously show a lawn boundary and the mower can enter a lawn area machine in the middle through the image judgment, the mower can meet the narrow channel judgment standard, and then the mower can move forwards to enter the area. After entering the area, when the machine runs for a certain distance in the narrow channel and the end point of the narrow channel can be detected, the area which is just walked through is determined to be the narrow channel range, and a traversing mechanism can be triggered at the moment to run back and forth to perform safe mowing operation on the special area.
Optionally, the narrow-channel traversing method based on visual detection as described in any one of the above, wherein the narrow-channel judging criteria further comprises that the spacing distance between the boundaries of the working areas on the left and right sides of the field of view of the self-walking device is not less than 1.5 times the width or length of the body of the self-walking device.
Optionally, according to any one of the above narrow-channel traversing methods based on visual detection, when the self-walking device is driven to run along a single operation area boundary from a narrow-channel starting point, the walking direction of the self-walking device is adjusted first, so that the distance between the self-walking device and any one of the left or right operation area boundaries reaches a safe distance, and the self-walking device is kept to advance along any one of the operation area boundaries at the safe distance.
Optionally, the narrow-channel traversing method based on visual inspection according to any one of the above, wherein the preset distance translated along the last travel path is any one of a width of a body of the self-walking device, a distance between traveling wheels of the self-walking device, a working width of a working device in the self-walking device, 0.5m or any other preset fixed width.
Optionally, the narrow-channel traversing method based on visual detection as described in any one of the above, wherein at least the self-walking device is driven to run more than 2 times of the preset distance along the boundary of the single working area before the self-walking device is driven to turn around.
Optionally, the narrow-channel traversing method based on visual detection as described in any one of the above, wherein the safety distance between the self-walking device and the boundary of the working area is a distance that the front wheel of the self-walking device cannot exceed the boundary of the working area when the self-walking device moves forward or rotates leftwards and rightwards.
Optionally, the narrow-channel traversing method based on visual detection as described in any one of the above, wherein the self-walking device is verified by acquiring pixel coordinates of the distance detected by a monocular camera, a binocular camera or a depth camera in the self-walking device for the interval distance, the preset distance and the safety distance, verifying each distance according to a view angle range corresponding to each pixel in the self-walking device for the pixel coordinates of the monocular camera, calculating a disparity map according to a stereo matching algorithm for the pixel coordinates of the binocular camera, determining depth information corresponding to the pixel coordinates according to the disparity map, registering each pixel according to the depth information to verify each distance, and verifying each distance according to a registration relation between a depth camera detection point and a pixel for the pixel coordinates of the depth camera.
Meanwhile, in order to achieve the above purpose, the application also provides an automatic walking device, which comprises a working device and a walking driving device, wherein the automatic walking device drives the walking driving device to traverse a working area in a narrow channel based on visual detection according to any one of the method steps, and synchronously drives the working device to operate.
The application further provides a computer-readable storage medium, which is provided in a self-walking device and is used for controlling the self-walking device to execute traversing operation in a narrow-channel region according to the method steps in the working process of the self-walking device.
Advantageous effects
The application provides a narrow channel traversing method based on visual detection. The application executes the algorithm step of traversing the narrow channel when more than one boundary line appears in different areas of the field of view of the self-walking equipment based on the distribution condition of the boundary line of the operation area in the field of view of the self-walking equipment, which is obtained by visual detection. The application can directly determine the relative position of the self-walking device relative to the boundary line of the narrow channel based on the pixel information provided by the vision module, and drive the self-walking device to sequentially traverse the area in a mode of being parallel to the side edge of the narrow channel based on the relative position of the boundary line so as to realize uniform operation in the narrow channel. According to the application, sensing equipment is not required to be added, and the operation flatness and trimming effect of the self-walking equipment in the narrow channel area are improved through regulating and controlling the traversing mode of the self-walking equipment in a software algorithm mode.
Additional features and advantages of the application will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the application.
Detailed Description
In order to make the purpose and technical solutions of the embodiments of the present application more clear, the technical solutions of the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present application. It will be apparent that the described embodiments are some, but not all, embodiments of the application. All other embodiments, which can be made by a person skilled in the art without creative efforts, based on the described embodiments of the present application fall within the protection scope of the present application.
It will be understood by those skilled in the art that, unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. It will be further understood that terms, such as those defined in commonly used dictionaries, should be interpreted as having a meaning that is consistent with their meaning in the context of the prior art and will not be interpreted in an idealized or overly formal sense unless expressly so defined herein.
The meaning of "and/or" in the present application means that each exists alone or both exist.
The terms "inner" and "outer" as used herein refer to the direction toward the interior of the work area relative to the work area itself, and vice versa, and are not intended to be limiting of the apparatus mechanism of the present application.
The meaning of "left and right" in the present application means that when the user is facing the advancing direction of the self-walking device, the left side of the user is the left side, and the right side of the user is the right side, but is not a specific limitation to the mechanism of the device of the present application.
"Connected" as used herein means either a direct connection between components or an indirect connection between components via other components.
The meaning of "up and down" in the present application means that when the user is facing the advancing direction of the self-walking device, the direction from the working ground to the top of the body of the self-walking device is up, and vice versa, but not the specific limitation of the device mechanism of the present application.
The application provides a lawn narrow-channel traversing method of a lawn mower based on a camera. The application mainly realizes random traversal mowing based on the visual RGB camera. Referring to fig. 1, in the prior art, there is a problem that narrow-channel recognition is difficult or mowing cannot be traversed in a narrow channel based on the scheme. According to the intelligent lawn mower, the camera is arranged on the intelligent lawn mower, boundary recognition is carried out based on the view field image of the operation area acquired by the camera, and calculation of the machine pose is achieved by matching with the real-time wheel speed meter of the intelligent lawn mower, the inertial navigation system and the like, so that the intelligent lawn mower can complete the local lawn traversal mowing operation in the narrow channel through the intelligent control machine of the fusion algorithm based on the judgment of the narrow channel in the lawn in the view field.
With particular reference to fig. 3, a visual inspection device is fixedly mounted on the upper part of the body of the self-walking equipment, and can be optionally arranged as a monocular camera, a binocular camera or a depth camera. Because the installation position of the visual detection device on the machine body is fixed, the actual position of the corresponding self-walking equipment relative to each pixel position in the photographed view field image is also relatively fixed. Therefore, the narrow channel can be judged according to the visual angle of the camera, the installation height of the camera and the corresponding position of the lawn boundary in the visual field image by utilizing the visual field image, so that the starting equipment enters a narrow channel traversing mode based on the operation area boundary in the visual field image which is clear by visual detection and according to the position relation of each pixel point in the visual field image relative to the equipment body, when the distribution state of the operation area boundary relative to the equipment body accords with the narrow channel judging standard, the current position of the self-walking device is marked as the narrow channel starting point, and the equipment is started to enter the narrow channel traversing mode. In the mode, a control unit of the equipment drives the self-walking device to run along the operation area boundary of an independent side in the channel from the starting point of the narrow channel until the equipment passes through the narrow channel so that the distribution state of the operation area boundary obtained by visual detection does not meet the narrow channel judgment standard any more, then drives the self-walking device to turn around and translate a certain preset distance along the last running path to run back until the equipment returns to the side of the starting point in the narrow channel from the opposite direction, so that the equipment starts to turn around continuously according to the distribution state of the operation area boundary obtained by visual detection does not meet the narrow channel judgment standard any more, and the narrow channel is traversed continuously along the other direction. The previous step is repeated until the distance from the travelling device to the boundary of another working area reaches a safe distance, the equipment can be considered to finish the traversing operation of all the narrow-channel areas under the precondition of the safe operation, the apparatus can thereby be driven out of the narrow-channel region and continue traversing the successively larger job regions.
In the visual scheme, an RGB camera is most commonly used for realizing the acquisition of market images of an operation area, and in a more advanced model, the RGB camera can be matched with a depth camera to comprehensively obtain grassland boundary information through two sensor detection means.
According to the single RGB scheme, an RGB camera is generally installed at the head position of a mower, the shooting angle of the camera is set to be inclined downwards from the head of the mower, the distance between the ground position corresponding to each pixel point and the mower body is calibrated in advance according to the installation height of the camera and the actual imaging position of the pixel point in an RGB image, and the approximate distance between the ground position corresponding to each pixel point and the mower body can be estimated through the calibration. Thus, by the conventional image processing method, for example, after the boundary between the grassland and the non-grassland is identified by the information such as the image texture and the color, the approximate positional relationship between the boundary line and the machine body can be estimated by the pixel position corresponding to the boundary. In the model with sufficient calculation power, different pixel areas in the image can be identified and segmented through a deep learning scheme, so that the boundary of the grassland can be identified. So that the distance information from the machine body of the device is determined according to the pixel positions of the grassland boundaries detected by RGB.
For the scheme of adding a depth camera to an RGB camera, the RGB camera and pixels obtained by the depth camera can be registered, each depth sampling point in the depth camera corresponds to a pixel area of a pixel image, and after the pixel position of a boundary line of a working area is judged according to RGB information, the depth distance of the boundary of the grassland, which is obtained by recognition in the RGB camera, relative to the machine body of the equipment is provided in real time through the depth camera.
The RGB camera may be a monocular camera or a binocular camera. If a monocular camera is used, the position of the lawn boundary relative to the mower body camera can be estimated through the information of the height, the angle and the like of the camera installation, the distance of the pixels in the camera picture in the actual space and the like. As shown in fig. one, the camera mounting position is 101, and the distance between the grass and the head is L1 recently, so that the depth distance estimation of different pixels in the range of viewing angle can be achieved under the condition that the height of the camera is determined.
If a binocular camera is used, a parallax image is calculated through a stereo matching algorithm, a depth image is further obtained, and the position of a lawn boundary relative to a mower body camera can be obtained through registering with a lawn boundary detection image.
Referring to fig. 2, the typical situation of a relatively narrow grass path in grass is divided into the following:
1. Two large lawn connecting channels
2. A narrow passage is formed between a large object in a large lawn and the lawn or the large object.
3. Limited by the terrain, a narrow grass formed by a portion of the grass;
For these cases, the automatic walking device can determine that the boundary line of the work area corresponding to the grass is a pale green portion appearing on both the left and right sides of the detected image through the RGB color range, or the texture characteristics of the grass area.
Considering that the machine camera is on the premise of recognizing the narrow grassland channel, the requirement is that the grassland boundaries on two sides can be observed simultaneously when entering the narrow channel. Therefore, the narrow channel judgment standard in the driving strategy can be that the operation area boundaries obtained based on visual detection are respectively positioned at the left side and the right side of the view field range of the self-walking device. The device can now be worked into the narrow passage area along the boundary line on either side thereof.
In contrast, when the left or right side of the mower passes through a narrow lawn path, the mower can rotate and advance according to a normal random mowing scheme, and the mower can only move forward to enter the area when the left and right sides in front of the mower simultaneously present a lawn boundary and the mower judges that the middle lawn area machine can enter through a view image. When the machine runs for a certain distance in the narrow channel and the end point of the narrow channel can be detected, the area is judged to be the narrow channel, then a traversing mechanism is triggered, and the automatic walking equipment is triggered to return backwards so as to work on other positions of the narrow channel. Therefore, the path distance in the reciprocating operation process of the automatic walking equipment can be regulated and controlled, and the automatic walking equipment is driven to gradually complete the traversing operation of the whole channel area in the reciprocating traversing process.
Considering the limitations of the mounting height of the camera and the angle of view of the camera lens on the mower, the narrow channel can be generally defined as an area which is as narrow as 1.5 times the length of the mower body and as wide as 2m, or as long as 2 times or more than 2 times the width. For example, one mower length is 0.5m, the minimum width of the narrow channel is 0.75m, and the minimum length is 1m.
Therefore, in the running process of the self-walking equipment, when the left side and the right side of the camera view angle of the self-walking equipment detect the grassland boundary at the same time and the grassland width in the middle can pass through the mower, the position can be judged as the starting point of the narrow channel. At this time, the machine can be driven to adjust the walking direction of the self-walking device first, so that the distance between the self-walking device and the boundary of any one of the left side or the right side of the self-walking device reaches a safe distance, the self-walking device is kept to advance along the boundary of any one of the working areas according to the safe distance shown in fig. 4, and the running track of the machine is estimated according to the wheel speed meter of the machine and the IMU. When the camera moves forwards for a certain distance, the two sides cannot be met in the view angle of the camera, and the grassland boundary is detected at the same time, so that the terminal point is determined. At this time, the mower judges that the area is a narrow channel when at least the self-walking device is driven to move along the boundary of the single working area by more than 2 times of the preset distance according to the moving distance from the starting point to the end point.
When the distance accords with the narrow channel judgment logic, the machine starts the traversing mowing control logic in the narrow channel, and the working area boundary line position determined by the image sensing device is utilized in a mode of referring to fig. 4, a preset translation distance is increased along the last running path, and the path is taken as the path for the next passage through the narrow channel. Therefore, the narrow channels are paved with the running track of the automatic walking equipment through successive translation of the narrow channel passing paths, and the grasslands in the narrow channels are trimmed. In the traversing process of the reciprocating translation, the reciprocating operation can be performed in the narrow channel area according to any width until the operation path of the equipment cannot meet the safety distance requirement, namely the width of the machine body of the self-walking device, the distance between the walking wheels of the self-walking device, the operation width of the operation device in the self-walking device, 0.5m or any other preset fixed width.
When the distance does not meet the narrow channel determination logic, the machine will delete the narrow channel start marker and continue to perform the walk-through mowing task.
In the process of the operation, the safe distance between the self-walking device and the boundary of the operation area in the narrow passage refers to the distance that the front wheel of the machine cannot go out of the boundary of the grassland when the machine runs forwards or rotates leftwards and rightwards. Which can generally be based on the length of the body of the automatic walking equipment the width, the minimum turning radius and other factors are comprehensively determined.
In order to accurately control the safe operation of the equipment, in the operation process, the equipment can verify the interval distance, the preset distance and the safe distance in the following manner:
For self-walking equipment provided with a monocular camera, a binocular camera or a depth camera, firstly acquiring pixel coordinates, detected by the monocular camera, the binocular camera or the depth camera, of the self-walking equipment aiming at the distance;
then, verifying the distances according to the view angle range corresponding to each pixel in the self-walking equipment for the pixel coordinates of the monocular camera;
or for the pixel coordinates of the binocular camera, calculating a parallax image according to a stereo matching algorithm, determining depth information corresponding to the pixel coordinates according to the parallax image, and registering pixels according to the depth information to verify the distances;
Or for the pixel coordinates of the depth camera, the distances can be verified according to the registration relation between the detection point of the depth camera and the pixels.
Take fig. 5 as an example. When the machine is identified as passing through the narrow passage by the above method, the machine initiates a narrow passage walk-through mowing mode at a location determined to be the end point of the narrow passage. In this mode, the machine may turn around into a narrow channel and maintain the distance of the mower from one of the lawn boundaries via the camera. Assuming that the grass sides of the narrow channel are A and B respectively, the control can set the machine to start the mowing operation from one side A close to the narrow channel, when the mower reaches the other end, the distance between the mower and the grass side A is increased to be the cutting width of a cutter disc, the mowing operation of the next path is started, the machine circulates in sequence, and after the mower reaches the set safe distance between the mower and the grass side B, the machine exits the mowing operation of the narrow channel and enters the random traversal mower operation.
In order to prevent the mower from repeatedly traversing mowing in the narrow passage, the application can finish the traversing mowing operation of the narrow passage when the mower passes through the narrow passage for the first time based on the setting.
The narrow passage area may also be accessed multiple times as the machine traverses the mowing operation at random. At this time, whether the mowing operation is needed or not can be judged by visual sense or mower cutter load on the narrow passage.
For example, when the cutter head load is used for judging, when the mower enters a narrow channel which is cut completely, the cutter head is judged to be in an idle running state, the area does not need to be continuously mowed, and the mower can be controlled to directly pass through the narrow channel in a centering mode, enter a lawn at the other end of the channel or exit the narrow grassland area. When in visual judgment, the judgment of the finishing area can be realized according to the color range or the texture characteristics of the mowed lawn or by combining with a machine learning identification module. When the narrow passage is judged to be in need of mowing, the mower can be controlled to directly pass through the narrow passage and enter the lawn at the other end of the passage, or the mower can be controlled to exit the narrow grassland area.
Therefore, the area range of the narrow channel needing to independently plan the working path can be rapidly determined based on the distribution condition of the boundary of the working area relative to the view field range of the self-walking device, the guiding and positioning of the device are realized based on the boundary line of the narrow channel area, the lawn traversal in the narrow channel is completed, and the lawn maintenance efficiency of the mower is improved. The traversing operation method for the narrow-channel area provided by the application can be compatible with the mower vision schemes of the monocular camera, the binocular camera and the depth camera which are currently used by the equipment.
The foregoing is a description of embodiments of the application, which are specific and detailed, but are not to be construed as limiting the scope of the application. It should be noted that it will be apparent to those skilled in the art that several variations and modifications can be made without departing from the spirit of the application, which are all within the scope of the application.