WO2022000878A1 - Automatic walking device and control method therefor, and readable storage medium - Google Patents

Automatic walking device and control method therefor, and readable storage medium Download PDF

Info

Publication number
WO2022000878A1
WO2022000878A1 PCT/CN2020/123199 CN2020123199W WO2022000878A1 WO 2022000878 A1 WO2022000878 A1 WO 2022000878A1 CN 2020123199 W CN2020123199 W CN 2020123199W WO 2022000878 A1 WO2022000878 A1 WO 2022000878A1
Authority
WO
WIPO (PCT)
Prior art keywords
walking device
automatic walking
rotate
automatic
control
Prior art date
Application number
PCT/CN2020/123199
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 WO2022000878A1 publication Critical patent/WO2022000878A1/en

Links

Images

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05DSYSTEMS FOR CONTROLLING OR REGULATING NON-ELECTRIC VARIABLES
    • G05D1/00Control of position, course or altitude of land, water, air, or space vehicles, e.g. automatic pilot
    • G05D1/02Control of position or course in two dimensions
    • G05D1/021Control of position or course in two dimensions specially adapted to land vehicles
    • G05D1/0231Control of position or course in two dimensions specially adapted to land vehicles using optical position detecting means
    • G05D1/0246Control of position or course in two dimensions specially adapted to land vehicles using optical position detecting means using a video camera in combination with image processing means
    • G05D1/0253Control of position or course in two dimensions specially adapted to land vehicles using optical position detecting means using a video camera in combination with image processing means extracting relative motion information from a plurality of images taken successively, e.g. visual odometry, optical flow
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05DSYSTEMS FOR CONTROLLING OR REGULATING NON-ELECTRIC VARIABLES
    • G05D1/00Control of position, course or altitude of land, water, air, or space vehicles, e.g. automatic pilot
    • G05D1/02Control of position or course in two dimensions
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05DSYSTEMS FOR CONTROLLING OR REGULATING NON-ELECTRIC VARIABLES
    • G05D1/00Control of position, course or altitude of land, water, air, or space vehicles, e.g. automatic pilot
    • G05D1/02Control of position or course in two dimensions
    • G05D1/021Control of position or course in two dimensions specially adapted to land vehicles
    • G05D1/0212Control of position or course in two dimensions specially adapted to land vehicles with means for defining a desired trajectory
    • G05D1/0223Control of position or course in two dimensions specially adapted to land vehicles with means for defining a desired trajectory involving speed control of the vehicle
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05DSYSTEMS FOR CONTROLLING OR REGULATING NON-ELECTRIC VARIABLES
    • G05D1/00Control of position, course or altitude of land, water, air, or space vehicles, e.g. automatic pilot
    • G05D1/02Control of position or course in two dimensions
    • G05D1/021Control of position or course in two dimensions specially adapted to land vehicles
    • G05D1/0276Control of position or course in two dimensions specially adapted to land vehicles using signals provided by a source external to the vehicle

Definitions

  • the invention relates to the field of intelligent control, in particular to an automatic walking device, a control method thereof and a readable storage medium.
  • intelligent robots With the continuous progress of computer technology and artificial intelligence technology, the automatic walking equipment and automatic working system of intelligent robots have gradually entered people's lives, such as intelligent sweeping robots, intelligent lawn mowing robots, etc.
  • intelligent robots are small in size, and are integrated with sensing devices, driving devices, batteries, etc., without manual manipulation, and can travel and work in a specified area.
  • the battery power when the battery power is insufficient, it can automatically return to the charging station, dock with the charging station and charge, and continue to travel and work after charging is complete.
  • the working areas of the existing automatic working systems are all large lawns, and most of the boundaries are energized equipment buried under the ground, which can be sensed by the intelligent lawn mowing robot. Moreover, when the robot reaches the boundary, it generally adopts a random turn or a method of retreating and then turning randomly, so that the robot can return to the boundary and continue to mow the grass.
  • a lawn mowing robot with a camera can be used to judge whether it has reached the boundary and turn it through image recognition.
  • the blades of lawnmower robots with cameras usually determine that they have reached the boundary in advance when they have not fully reached the boundary, so there will be a certain area of grass near the boundary that cannot be cut.
  • the above-mentioned lawn mowing robot using an energized device as a boundary usually cuts grass in an area near the boundary through a special edge-cutting function, such as a laser sensor to achieve the edge-edge function.
  • a special edge-cutting function such as a laser sensor
  • the invention provides a kind of control method of automatic traveling equipment, and described control method comprises:
  • Contour detection is performed on the captured image to obtain a boundary, wherein the center position O of the automatic walking device is located at one edge of the captured image;
  • the method before the step of "performing contour detection on the acquired captured image to obtain a boundary", the method further includes:
  • Contour detection is performed on the segmented image, and the pixel ratio pix of the lawn area or non-lawn area is counted;
  • the method also includes:
  • takes an acute angle.
  • "depending on the size and the l l l r automatically control the rotation direction and the rotation angle of the mobile equipment” includes: if l r> l l, automatic travel control apparatus to the right or left-handed rotation angle ⁇ Turn 180°- ⁇ ;
  • step of the present invention "and l l l r according to the size of the control rotation direction and the rotation angle of the self-propelled device" comprises:
  • the step "controlling the automatic walking device to rotate the included angle ⁇ to the right or 180°- ⁇ to the left" includes:
  • step "controlling the automatic walking device to rotate the included angle ⁇ to the left or 180°- ⁇ to the right” includes:
  • Control the automatic walking device to continue to rotate the included angle 90° to the left or right.
  • the step "controlling the automatic walking device to rotate the included angle ⁇ to the right or 180°- ⁇ to the left" specifically includes:
  • the step "controlling the automatic walking device to rotate the included angle ⁇ to the left or 180°- ⁇ to the right" specifically includes:
  • the autonomous walking device is controlled to rotate left or right one or more times to rotate the ⁇ angle or 180°- ⁇ angle.
  • the present invention also provides a kind of automatic traveling equipment, including a main body, a walking module, a power supply module, a memory and a processor arranged in the main body, and the memory stores a computer that can run on the processor.
  • the self-propelled equipment further comprises a camera set on the body, and the shooting direction of the camera faces the front side of the self-propelled equipment along the travel direction; when the processor executes the computer program, it can realize the above-mentioned The steps of the control method of the automatic walking device.
  • the present invention also provides a computer-readable storage medium, which stores a computer program, which can realize the steps in the control method of the above-mentioned automatic traveling equipment when the computer program is executed by the processor. .
  • the function of automatic traveling equipment walking and working along the edge can be realized, and the function of working according to a prescribed path in the working area can be realized.
  • the present invention provides two rotation modes of the automatic traveling equipment after encountering the boundary, both of which can completely cover the working area and improve the working efficiency.
  • the lawn mowing robots can not only mow along the edge, but also plan mowing internally, so as to achieve complete coverage of the working area and improve the overall lawn mowing efficiency.
  • the cost is lower and the efficiency is higher.
  • Fig. 1 is the top view schematic diagram of the automatic working system of the present invention
  • FIG. 2 is a schematic diagram of a captured image in the control method of the present invention.
  • Fig. 3 is the schematic diagram of the path of the automatic traveling equipment in the control method of the present invention.
  • FIG. 4 is a schematic structural diagram of the second embodiment of the automatic working system of the present invention.
  • FIG. 5 is a schematic flowchart of the control method of the present invention.
  • the automatic traveling device 1 of the present invention may be an automatic lawn mower, or an automatic vacuum cleaner, etc., which automatically travels in the work area to perform lawn mowing and vacuuming work.
  • the automatic traveling device 1 is taken as an example of a lawn mower for specific description.
  • the working area is a lawn.
  • the self-propelled equipment 1 is not limited to lawn mowers and vacuum cleaners, but can also be other equipment, such as spraying equipment, snow removal equipment, monitoring equipment and other equipment suitable for unattended operation.
  • the present invention provides a control method of the automatic traveling equipment 1, and the control method includes:
  • Contour detection is carried out to the captured image to obtain boundary 2, and wherein, the center position 0 of the automatic running device is positioned at one edge of the captured image;
  • the automatic walking device 1 After the automatic walking device 1 reaches the boundary 2, first obtain the position of the automatic walking device 1 in the captured image and record it as the center position O, and control the automatic walking device 1 to rotate according to the specified angle according to l r and l l so as to control it according to any regulations. Therefore, the function of the automatic traveling device 1 walking along the edge and working can be realized, and the function of working according to the specified path in the working area can be realized.
  • the lawn mowing robot can cut grass along the edge and plan the lawn internally, so as to achieve complete coverage of the working area and improve the overall lawn mowing efficiency. Moreover, by combining image recognition with computing, the cost is lower and the efficiency is higher.
  • the method further includes:
  • Contour detection is performed on the segmented image, and the pixel ratio pix of the lawn area or non-lawn area is counted;
  • the captured image captured by the camera is usually in RGB format, and the binarized image needs to be performed in the captured image in HSV format, so the captured image in RGB format needs to be converted into a captured image in HSV format in advance.
  • a morphological image may also be used, so that P 1 (x r , y r ), P 2 (x l , y l ) is more precise.
  • the automatic walking device 1 may still be far away from the boundary 2, then the automatic walking device 1 continues acquired walking forward until P 1 (x r, y r ) and P 2 (x l, y l ) of the captured image located on both sides of the center position, such as P 1 (x r, y r ) is located in the center position O the right side, P 2 (x l, y l) at the left of the center position O.
  • the shooting direction of the camera of the automatic walking device 1 faces the front side. Obviously, the grass in the captured image is located in the lower half of the captured image, and the non-grass is located in the upper half of the captured image.
  • the solution in the present invention can output a binarized image with obvious border 2.
  • performing morphological operations on the binarized image includes removing noise and smoothing the image, such as dilation and erosion, so that the boundary 2 is more obvious and tends to be a straight line.
  • inverse operations are performed on the morphological image to obtain a segmented image.
  • the pattern portion of the grass is black
  • the pattern portion of the non-working area or border 2 is white.
  • the pixel ratio pix of the non-lawn area is calculated; in this embodiment, the pixel ratio pix of the non-lawn area is actually counted. If the pix is within the threshold range, it is determined that the autonomous walking device 1 has reached the boundary 2 .
  • the pixel ratio pix of the non-lawn area can represent the distance between the automatic walking device 1 and the boundary 2. When the pix is large enough, it can be judged that the automatic walking device 1 has reached the boundary 2, and the arrival information is sent.
  • the above step provides a method for judging whether to send the arrival information.
  • other methods can also be used to judge whether the automatic walking device 1 has reached the boundary 2 .
  • the step "obtaining the angle ⁇ between the line connecting the intersection points P 1 (x r , y r ) and P 2 (x l , y l ) and the center line" includes:
  • can be calculated in a variety of ways, such as using the vector angle formula.
  • the above calculation formula can calculate the included angle ⁇ between the connection line of the intersection points P 1 (x r , y r ) and P 2 (x l , y l ) and the center line, and the included angle ⁇ is related to the angle at which the automatic traveling device 1 needs to turn .
  • only takes an acute angle; if ⁇ takes an obtuse angle, the best way is to make the automatic walking device 1 rotate in the opposite direction. 180°-theta.
  • two steering methods of the automatic walking device 1 are provided.
  • the steps "according to the The size of l r and l l controls the rotation direction and rotation angle of the automatic walking device 1" including:
  • the distances l r and l l between P 1 (x r , y r ) and P 2 (x l , y l ) and the center position O in the direction of the center line can be used to determine the rotation angle of the automatic walking device 1 . If l r ⁇ l l , it means that the intersection point P 1 (x r , y r ) is closer to the center position O. As shown in FIG. 2b , in order to prevent the automatic traveling equipment from touching the outside of the boundary or the free turning time is too long, The work efficiency is low.
  • the automatic traveling device 1 can rotate the included angle 90° to the right or left.
  • step "controlling the automatic walking device 1 to rotate the included angle ⁇ to the right or 180°- ⁇ to the left" includes:
  • Control the automatic walking device 1 to continue to rotate the included angle to the right or left by 90°;
  • the step "controlling the automatic walking device 1 to rotate the included angle ⁇ to the left or 180°- ⁇ to the right" includes:
  • Control the automatic walking device 1 to continue to rotate the included angle 90° to the left or right.
  • the traveling route of the automatic walking device 1 is parallel to the boundary 2.
  • the automatic walking device 1 1 After traveling for t1 time, it can continue to be rotated by 90° to make it travel in a direction perpendicular to the edge, so that the automatic traveling device 1 can completely cover the working area. Then the automatic walking device can be controlled to walk according to the planned path, such as the walking path in Figure 3.
  • the automatic walking device can be rotated to the right or left by any given ⁇ plus any given angle to control it to walk along the planned path.
  • the included angle ⁇ can be achieved by multiple rotations or one-time rotation.
  • the step "controlling the automatic walking device 1 to rotate the included angle ⁇ to the right or 180°- ⁇ to the left” specifically includes: controlling the automatic walking device 1. Rotate the ⁇ or 180°- ⁇ angle to the right at one time or several times to make the final total rotation angle reach the ⁇ or 180°- ⁇ angle;
  • step "Control the automatic walking device 1 to rotate the included angle ⁇ to the left or right or “180°- ⁇ angle” specifically includes: controlling the automatic walking device 1 to rotate to the left by one-time rotation ⁇ or 180°- ⁇ angle or multiple rotations so that the final total rotation angle reaches ⁇ or 180°- ⁇ angle.
  • the automatic walking device 1 may not walk along the boundary 2 after encountering the boundary 2, but walk along the direction perpendicular to the boundary 2, then at this time, the steps " According to the size of l r and l l , control the rotation direction and rotation angle of the automatic walking device 1" including:
  • the self-propelled device 1 moves in a direction perpendicular to the boundary 2 after encountering the boundary 2 .
  • the present invention also provides an automatic working system, and has two specific embodiments.
  • the automatic working system includes:
  • the automatic traveling equipment 1 can work according to the control method as described above;
  • a non-working area is provided at the outer edge of the working area, and the color of the working area and the non-working area are different and form a boundary 2 .
  • the grass field is the working area.
  • the non-working area can be bare soil, floor, cement board, etc., and its geology is larger than that of the grass field. The color is also quite different from that of the grass.
  • a border 2 is naturally formed between the working area and the non-working area due to the apparent difference in color.
  • the control method in the present invention can still be applied to judge the steering direction of the automatic traveling device 1 .
  • the automatic working system includes:
  • the self-propelled equipment 1 can work according to the above-mentioned control method; the boundary 2 is formed in a ring shape and forms a working area for limiting the self-propelled equipment 1, the boundary 2 extends upward from the ground, and the boundary 2 Different from the color of the work area.
  • the automatic traveling device 1 obtains the captured image, and then processes and analyzes the captured image to obtain the area where the automatic traveling device 1 travels. Therefore, the boundary 2 of the automatic working system of the present invention can extend upward from the ground, Therefore, it is photographed and recognized by the automatic walking device 1 .
  • the color of the border 2 is also different from the color of the lawn, and is a color other than green.
  • the present invention also provides an automatic traveling device 1, which includes a body, a traveling module, a power supply module, a memory and a processor arranged in the body, the memory stores a computer program that can be run on the processor, and the automatic The walking device 1 also includes a camera arranged on the body, and the shooting direction of the camera is toward the front side of the automatic walking device 1 along the traveling direction; when the processor executes the computer program, the automatic walking as described above can be realized The steps of the control method of the device 1. That is to say, when the processor executes the computer program, the steps of the control method of any one of the embodiments of the automatic walking device 1 described above can be implemented.
  • a camera is provided on the main body of the automatic traveling device 1 in the present invention, so that a photographed image can be photographed and acquired.
  • the shooting direction of the camera is toward the front side of the automatic traveling device 1 along the traveling direction, so that the camera captures the scene of the front side of the automatic traveling device 1 . Therefore, the following motion trajectory of the autonomous running device 1 can be analyzed according to the captured images captured by the autonomous running device 1 .
  • the present invention also provides a computer-readable storage medium, which stores a computer program, and when the computer program is executed by the processor, can realize the steps in the control method of the automatic walking device 1 as described above. That is to say, when the processor executes the computer program, the steps of the control method of any one of the embodiments of the automatic walking device 1 described above can be implemented.
  • the present invention provides a self-propelled device 1, a control method thereof, and a computer-readable storage medium.
  • the captured image since the self-propelled device 1 reaches the boundary 2, the captured image must have The lawn area and the non-lawn area, and the chromaticity of the pixels belonging to the lawn area and the pixels of the non-lawn area are different, so the captured image can be processed such as contour detection and the rotation direction and rotation angle of the automatic walking device 1 can be obtained; More efficient and easier.
  • the automatic working system of the present invention does not need to lay out additional boundary lines underground, which reduces the cost of manpower and material resources, the shape of the working area is flexible and unrestricted, the recognition speed is fast, and the accuracy is high, and the automatic walking equipment in the present invention can also be improved. 1 Especially the working efficiency of automatic lawn mowing robots.

Abstract

An automatic walking device (1) and a control method therefor, and a computer-readable storage medium. The control method comprises: performing contour detection on an acquired photographed image to obtain a boundary (2), the center position O of the automatic walking device (1) being located on one edge of the photographed image; obtaining intersection points P1(xr, Yr) and P2(xl, yl) between the boundary (2) and the edge of the photographed image; respectively obtaining the shortest distances lr and ll between P1(xr, Yr) and P2(xl, yl) and the edge where the center position O of the automatic walking device (1) is located; and controlling the rotation direction and the rotation angle of the automatic walking device (1) according to the values of lr and ll. The present invention can not only achieve the function of walking and operating the automatic walking device (1) along the edge, but also achieve the function of operating same according to a predetermined path inside a working area. The two rotation modes of the automatic walking device after encountering the boundary can completely cover the working area, which improves the efficiency.

Description

自动行走设备及其控制方法及可读存储介质Automatic walking device, control method thereof, and readable storage medium 技术领域technical field
本发明涉及智能控制领域,特别是涉及一种自动行走设备及其控制方法及可读存储介质。The invention relates to the field of intelligent control, in particular to an automatic walking device, a control method thereof and a readable storage medium.
背景技术Background technique
随着计算机技术和人工智能技术的不断进步,智能机器人的自动行走设备、自动工作系统已经慢慢进入人们的生活,例如智能扫地机器人、智能割草机器人等。通常的,此类智能机器人体积较小,且集成有传感装置、驱动装置、电池等,无需人工操控,并可在规定的区域内行进并工作。并且,在电池电量不够时,可自动返回充电站,与充电站对接并充电,充电完成后继续行进和工作。With the continuous progress of computer technology and artificial intelligence technology, the automatic walking equipment and automatic working system of intelligent robots have gradually entered people's lives, such as intelligent sweeping robots, intelligent lawn mowing robots, etc. Generally, such intelligent robots are small in size, and are integrated with sensing devices, driving devices, batteries, etc., without manual manipulation, and can travel and work in a specified area. Moreover, when the battery power is insufficient, it can automatically return to the charging station, dock with the charging station and charge, and continue to travel and work after charging is complete.
针对现有的智能割草机器人来说,现有的自动工作系统的工作区域均为较大的草坪,并且边界大多是为埋设在地面下的可通电设备,可使得智能割草机器人感应到。并且,当机器人到达边界后,一般是采用随机转向或是先后退再随机转向的方式,以让机器人回到边界内继续割草。For the existing intelligent lawn mowing robots, the working areas of the existing automatic working systems are all large lawns, and most of the boundaries are energized equipment buried under the ground, which can be sensed by the intelligent lawn mowing robot. Moreover, when the robot reaches the boundary, it generally adopts a random turn or a method of retreating and then turning randomly, so that the robot can return to the boundary and continue to mow the grass.
因而,可采用带摄像头的割草机器人,通过图像识别的方式来判断是否到达边界并进行转向。但是,带摄像头的割草机器人的刀片通常会在未完全到达边界时提前判定已到达边界,因而边界附近会有一定区域的草无法割除。现有技术中,上述采用可通电设备作为边界的割草机器人通常通过专门的沿边割草功能割除边界附近区域的草,例如通过激光传感器来实现沿边功能。但是,这种方案不仅成本较高,而且沿边工作的效率较低。Therefore, a lawn mowing robot with a camera can be used to judge whether it has reached the boundary and turn it through image recognition. However, the blades of lawnmower robots with cameras usually determine that they have reached the boundary in advance when they have not fully reached the boundary, so there will be a certain area of grass near the boundary that cannot be cut. In the prior art, the above-mentioned lawn mowing robot using an energized device as a boundary usually cuts grass in an area near the boundary through a special edge-cutting function, such as a laser sensor to achieve the edge-edge function. However, this solution is not only costly, but also inefficient along the edge.
因此,必须设计一种可根据视觉进行效率更高的割草路径规划的自动行走设备及其控制方法及可读存储介质。Therefore, it is necessary to design a self-propelled device, a control method and a readable storage medium that can plan a mowing path more efficiently based on vision.
发明内容SUMMARY OF THE INVENTION
为解决上述问题之一,本发明提供了一种自动行走设备的控制方法,所述 控制方法包括:For solving one of the above-mentioned problems, the invention provides a kind of control method of automatic traveling equipment, and described control method comprises:
对获取的拍摄图像进行轮廓检测以获得边界,其中,自动行走设备的中心位置O位于所述拍摄图像的一边沿;Contour detection is performed on the captured image to obtain a boundary, wherein the center position O of the automatic walking device is located at one edge of the captured image;
获取边界在拍摄图像的边沿的交点P 1(x r,y r),P 2(x l,y l); Obtain the intersection P 1 (x r , y r ), P 2 (x l , y l ) where the boundary is at the edge of the captured image;
分别获得P 1(x r,y r)和P 2(x l,y l)与自动行走设备的中心位置O所在边沿的最短距离l r、l lObtain the shortest distances l r and l l between P 1 (x r , y r ) and P 2 (x l , y l ) and the edge where the center position O of the automatic walking device is located;
根据l r和l l的大小控制自动行走设备的旋转方向及旋转角度。 Control the rotation direction and rotation angle of the automatic walking device according to the size of l r and l l.
作为本发明的进一步改进,在步骤“对获取的拍摄图像进行轮廓检测以获得边界”之前,所述方法还包括:As a further improvement of the present invention, before the step of "performing contour detection on the acquired captured image to obtain a boundary", the method further includes:
获得拍摄图像;obtain captured images;
对拍摄图像进行二值化处理输出二值化图像;Perform binarization processing on the captured image to output a binarized image;
对二值化图像进行形态学操作获得形态图像;Perform morphological operations on the binarized image to obtain a morphological image;
对形态图像进行反操作,获得分割图像;Perform inverse operations on the morphological image to obtain a segmented image;
对分割图像进行轮廓检测,统计草坪区域或非草坪区域的像素占比pix;Contour detection is performed on the segmented image, and the pixel ratio pix of the lawn area or non-lawn area is counted;
若pix在阈值范围内,则判定自动行走设备到达边界。If pix is within the threshold range, it is determined that the automatic walking device has reached the boundary.
作为本发明的进一步改进,所述方法还包括:As a further improvement of the present invention, the method also includes:
获取交点P 1(x r,y r)和P 2(x l,y l)的连线与中心线的夹角θ,其中,所述中心线为垂直于所述中心位置O所在边沿并且通过所述中心位置O的直线。 Obtain the angle θ between the line connecting the intersection points P 1 (x r , y r ) and P 2 (x l , y l ) and the center line, where the center line is perpendicular to the edge where the center position O is located and passes through The straight line of the center position O.
作为本发明的进一步改进,θ取锐角。As a further improvement of the present invention, θ takes an acute angle.
作为本发明的进一步改进,“根据l r和l l的大小控制自动行走设备的旋转方向及旋转角度”包括:若l r>l l,则控制自动行走设备向右旋转夹角θ或向左旋转180°-θ; As a further improvement of the present invention, "depending on the size and the l l l r automatically control the rotation direction and the rotation angle of the mobile equipment" includes: if l r> l l, automatic travel control apparatus to the right or left-handed rotation angle θ Turn 180°-θ;
若l r<l l,则控制自动行走设备向左旋转夹角θ或向右旋转180°-θ; If l r <l l , control the automatic walking device to rotate the included angle θ to the left or 180°-θ to the right;
若l r=l l,则控制自动行走设备向右或向左旋转夹角θ或180°-θ。 If l r =l l , control the automatic walking device to rotate the included angle θ or 180°-θ to the right or left.
作为本发明的进一步改进,步骤“根据l r和l l的大小控制自动行走设备的旋转方向及旋转角度”包括: As a further improvement step of the present invention "and l l l r according to the size of the control rotation direction and the rotation angle of the self-propelled device" comprises:
若l r>l l,则控制自动行走设备向右旋转夹角θ+90°; If l r > l l , control the automatic walking device to rotate the included angle θ+90° to the right;
若l r<l l,则控制自动行走设备向左旋转夹角θ+90°; If l r <l l , control the automatic walking equipment to rotate the included angle θ+90° to the left;
若l r=l l,则控制自动行走设备向右或向左旋转夹角θ+90°。 If l r =l l , control the automatic walking device to rotate the included angle θ+90° to the right or left.
作为本发明的进一步改进,步骤“控制自动行走设备向右旋转夹角θ或向左旋转180°-θ”之后包括:As a further improvement of the present invention, the step "controlling the automatic walking device to rotate the included angle θ to the right or 180°-θ to the left" includes:
控制自动行走设备行进t1时间;Control the travel time t1 of the automatic walking equipment;
控制自动行走设备继续向右或向左旋转夹角90°;Control the automatic walking device to continue to rotate the included angle 90° to the right or left;
步骤“控制自动行走设备向左旋转夹角θ或向右旋转180°-θ”之后包括:After the step "controlling the automatic walking device to rotate the included angle θ to the left or 180°-θ to the right" includes:
控制自动行走设备行进t1时间;Control the travel time t1 of the automatic walking equipment;
控制自动行走设备继续向左或向右旋转夹角90°。Control the automatic walking device to continue to rotate the included angle 90° to the left or right.
作为本发明的进一步改进,步骤“控制自动行走设备向右旋转夹角θ或向左旋转180°-θ”具体包括:As a further improvement of the present invention, the step "controlling the automatic walking device to rotate the included angle θ to the right or 180°-θ to the left" specifically includes:
控制自动行走设备向右或向左一次性或多次旋转以旋转了θ角度或180°-θ角度;Controlling the automatic walking device to rotate right or left one or more times to rotate the θ angle or 180°-θ angle;
步骤“控制自动行走设备向左旋转夹角θ或向右旋转180°-θ”具体包括:The step "controlling the automatic walking device to rotate the included angle θ to the left or 180°-θ to the right" specifically includes:
控制自动行走设备向左或向右一次性或多次旋转以旋转了θ角度或180°-θ角度。The autonomous walking device is controlled to rotate left or right one or more times to rotate the θ angle or 180°-θ angle.
为解决上述问题之一,本发明还提供了一种自动行走设备,包括本体、行走模块、电源模块及设置于本体内的存储器和处理器,所述存储器存储有可在处理器上运行的计算机程序,所述自动行走设备还包括设置于本体上的摄像头,所述摄像头的拍摄方向朝向该自动行走设备沿行进方向的前侧;所述处理器执行所述计算机程序时可实现如上述所述的自动行走设备的控制方法的步骤。In order to solve one of the above-mentioned problems, the present invention also provides a kind of automatic traveling equipment, including a main body, a walking module, a power supply module, a memory and a processor arranged in the main body, and the memory stores a computer that can run on the processor. program, the self-propelled equipment further comprises a camera set on the body, and the shooting direction of the camera faces the front side of the self-propelled equipment along the travel direction; when the processor executes the computer program, it can realize the above-mentioned The steps of the control method of the automatic walking device.
为解决上述问题之一,本发明还提供了一种计算机可读存储介质,其存储有计算机程序,该计算机程序被处理器执行时可实现如上述所述的自动行走设备的控制方法中的步骤。In order to solve one of the above problems, the present invention also provides a computer-readable storage medium, which stores a computer program, which can realize the steps in the control method of the above-mentioned automatic traveling equipment when the computer program is executed by the processor. .
与现有技术相比,本发明中,既可以实现自动行走设备沿边沿行走并工作的功能,又可以实现在工作区域内部按规定路径工作的功能。并且,本发明中提供了两种自动行走设备的在遇到边界后的旋转方式,均可将工作区域完全覆 盖,提高了工作效率。在割草机器人中,该割草机器人既可沿边沿进行割草又可以在内部有规划的割草,实现对工作区域的完全覆盖,提高整体草坪的割草效率。并且,通过图像识别结合计算的方法,成本较低同时效率较高。Compared with the prior art, in the present invention, the function of automatic traveling equipment walking and working along the edge can be realized, and the function of working according to a prescribed path in the working area can be realized. In addition, the present invention provides two rotation modes of the automatic traveling equipment after encountering the boundary, both of which can completely cover the working area and improve the working efficiency. Among the lawn mowing robots, the lawn mowing robot can not only mow along the edge, but also plan mowing internally, so as to achieve complete coverage of the working area and improve the overall lawn mowing efficiency. Moreover, by combining image recognition with computing, the cost is lower and the efficiency is higher.
附图说明Description of drawings
图1为本发明自动工作系统的俯视示意图;Fig. 1 is the top view schematic diagram of the automatic working system of the present invention;
图2为本发明的控制方法中拍摄图像的示意图;2 is a schematic diagram of a captured image in the control method of the present invention;
图3为本发明的控制方法中自动行走设备的路径的示意图;Fig. 3 is the schematic diagram of the path of the automatic traveling equipment in the control method of the present invention;
图4为本发明自动工作系统中第二种实施例中的结构示意图;4 is a schematic structural diagram of the second embodiment of the automatic working system of the present invention;
图5为本发明控制方法的流程示意图。FIG. 5 is a schematic flowchart of the control method of the present invention.
具体实施例specific embodiment
为了使本技术领域的人员更好地理解本发明中的技术方案,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都应当属于本发明保护的范围。In order to make those skilled in the art better understand the technical solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described The embodiments are only some of the embodiments of the present invention, but not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
在本申请的各个图示中,为了便于图示,结构或部分的某些尺寸会相对于其它结构或部分夸大,因此,仅用于图示本申请的主题的基本结构。In various figures of the present application, some dimensions of structures or parts are exaggerated relative to other structures or parts for convenience of illustration, and thus, are only used to illustrate the basic structure of the subject matter of the present application.
本发明的自动行走设备1可以是自动割草机,或者自动吸尘器等,其自动行走于工作区域以进行割草、吸尘工作。本发明具体示例中,以自动行走设备1为割草机为例做具体说明,相应的,所述工作区域为草坪。当然,自动行走设备1不限于割草机和吸尘器,也可以为其它设备,如喷洒设备、除雪设备、监视设备等等适合无人值守的设备。The automatic traveling device 1 of the present invention may be an automatic lawn mower, or an automatic vacuum cleaner, etc., which automatically travels in the work area to perform lawn mowing and vacuuming work. In the specific example of the present invention, the automatic traveling device 1 is taken as an example of a lawn mower for specific description. Correspondingly, the working area is a lawn. Of course, the self-propelled equipment 1 is not limited to lawn mowers and vacuum cleaners, but can also be other equipment, such as spraying equipment, snow removal equipment, monitoring equipment and other equipment suitable for unattended operation.
如图1至图5所示,本发明中提供了一种自动行走设备1的控制方法,所述控制方法包括:As shown in FIG. 1 to FIG. 5 , the present invention provides a control method of the automatic traveling equipment 1, and the control method includes:
对获取的拍摄图像进行轮廓检测以获得边界2,其中,自动行走设备的中心 位置O位于所述拍摄图像的一边沿;Contour detection is carried out to the captured image to obtain boundary 2, and wherein, the center position 0 of the automatic running device is positioned at one edge of the captured image;
获取边界2在拍摄图像的边沿的交点P 1(x r,y r),P 2(x l,y l); Obtain the intersection P 1 (x r , y r ), P 2 (x l , y l ) of boundary 2 at the edge of the captured image;
分别获得P 1(x r,y r)和P 2(x l,y l)与自动行走设备的中心位置O所在边沿的最短距离l r、l lObtain the shortest distances l r and l l between P 1 (x r , y r ) and P 2 (x l , y l ) and the edge where the center position O of the automatic walking device is located;
根据l r和l l的大小控制自动行走设备的旋转方向及旋转角度。 Control the rotation direction and rotation angle of the automatic walking device according to the size of l r and l l.
自动行走设备1到达边界2后,首先获取拍摄图像中自动行走设备1的位置并记为中心位置O,并根据l r、l l控制自动行走设备1按规定的角度旋转从而控制其按照任意规定的路径的行走,从而,可以实现自动行走设备1沿边沿行走并工作的功能,又可以实现在在工作区域内按规定路径工作的功能。在割草机器人中,该割草机器人既可沿边沿进行割草又可以在内部有规划的割草,实现对工作区域的完全覆盖,提高整体草坪的割草效率。并且,通过图像识别结合计算的方法,成本较低同时效率较高。 After the automatic walking device 1 reaches the boundary 2, first obtain the position of the automatic walking device 1 in the captured image and record it as the center position O, and control the automatic walking device 1 to rotate according to the specified angle according to l r and l l so as to control it according to any regulations. Therefore, the function of the automatic traveling device 1 walking along the edge and working can be realized, and the function of working according to the specified path in the working area can be realized. Among the lawn mowing robots, the lawn mowing robot can cut grass along the edge and plan the lawn internally, so as to achieve complete coverage of the working area and improve the overall lawn mowing efficiency. Moreover, by combining image recognition with computing, the cost is lower and the efficiency is higher.
其中,在步骤“对获取的拍摄图像进行轮廓检测以获得边界2”之前,所述方法还包括:Wherein, before the step of "performing contour detection on the acquired captured image to obtain boundary 2", the method further includes:
获得拍摄图像;obtain captured images;
对拍摄图像进行二值化处理输出二值化图像;Perform binarization processing on the captured image to output a binarized image;
对二值化图像进行形态学操作获得形态图像;Perform morphological operations on the binarized image to obtain a morphological image;
对形态图像进行反操作,获得分割图像;Perform inverse operations on the morphological image to obtain a segmented image;
对分割图像进行轮廓检测,统计草坪区域或非草坪区域的像素占比pix;Contour detection is performed on the segmented image, and the pixel ratio pix of the lawn area or non-lawn area is counted;
若pix在阈值范围内,则判定发出自动行走设备1到达边界2。If the pix is within the threshold range, it is determined that the automatic walking device 1 has reached the boundary 2 .
其中,通常来说,采用摄像头拍摄的拍摄图像通常为RGB格式,而二值化图像需要在HSV格式的拍摄图像中进行,因而预先需要将RGB格式的拍摄图像转换为HSV格式的拍摄图像。Among them, generally speaking, the captured image captured by the camera is usually in RGB format, and the binarized image needs to be performed in the captured image in HSV format, so the captured image in RGB format needs to be converted into a captured image in HSV format in advance.
并且,本发明中,步骤“对获取的拍摄图像进行轮廓检测以获得边界2”中即也可以也采用形态图像,从而使得P 1(x r,y r)、P 2(x l,y l)的位置更加精准。若P 1(x r,y r)和P 2(x l,y l)均位于中心位置一侧,此时自动行走设备1可能 距离边界2还有较远的距离,则自动行走设备1继续向前行走直至获取到拍摄图像中的P 1(x r,y r)和P 2(x l,y l)位于中心位置的两侧,比如P 1(x r,y r)位于中心位置O的右侧,P 2(x l,y l)位于中心位置O的左侧。 In addition, in the present invention, in the step "contour detection on the captured image to obtain boundary 2", a morphological image may also be used, so that P 1 (x r , y r ), P 2 (x l , y l ) is more precise. If both P 1 (x r , y r ) and P 2 (x l , y l ) are located on one side of the center position, at this time, the automatic walking device 1 may still be far away from the boundary 2, then the automatic walking device 1 continues acquired walking forward until P 1 (x r, y r ) and P 2 (x l, y l ) of the captured image located on both sides of the center position, such as P 1 (x r, y r ) is located in the center position O the right side, P 2 (x l, y l) at the left of the center position O.
摄像头所拍摄的拍摄图像中,必然会有部分草地和非草地区域,且草地和非草地区域的色度差距较大。并且,自动行走设备1的摄像头的拍摄方向朝向前侧,显然的,拍摄图像中草地位于拍摄图像的下半部分区域,非草地位于拍摄图像的上半部分区域。In the image captured by the camera, there must be some grass and non-grass areas, and the chromaticity difference between the grass and non-grass areas is large. Moreover, the shooting direction of the camera of the automatic walking device 1 faces the front side. Obviously, the grass in the captured image is located in the lower half of the captured image, and the non-grass is located in the upper half of the captured image.
进一步的,步骤“对拍摄图像进行二值化处理输出二值化图像”中,需要预先在二值化处理之前预设阈值范围,确保能将拍摄图像中边界2或非草地与草地区分开。由于边界2或非草地与草地的颜色不同,而二值化处理时通常是通过像素的色度进行二值化处理,因而本发明中的该方案可以输出边界2明显的二值化图像。Further, in the step of "binarizing the captured image to output a binarized image", it is necessary to preset a threshold range before the binarization process to ensure that the captured image can be separated from border 2 or non-grassland and grass. Since the colors of border 2 or non-grass and grass are different, and binarization is usually performed by pixel chromaticity, the solution in the present invention can output a binarized image with obvious border 2.
并且,对二值化图像进行形态学操作包括消除噪点和平滑图像,例如膨胀腐蚀等,从而使得边界2更加明显,更加趋于为一条直线。Moreover, performing morphological operations on the binarized image includes removing noise and smoothing the image, such as dilation and erosion, so that the boundary 2 is more obvious and tends to be a straight line.
进一步的,再对形态图像进行反操作,获得分割图像,分割图像中,通常,草地的图案部分为黑色,非工作区域或边界2的图案部分为白色。Further, inverse operations are performed on the morphological image to obtain a segmented image. In the segmented image, generally, the pattern portion of the grass is black, and the pattern portion of the non-working area or border 2 is white.
最后,对分割图像进行轮廓检测,统计草坪区域或非草坪区域的像素占比,判断像素占比是否在阈值范围内从而判断是否到达边界,计算像素占比可以有多种方式,在本实施例中通过计算非草坪区域的像素占比pix;在本实施方式中,实际为统计非草坪区域的像素占比pix。若pix在阈值范围内,则判定自动行走设备1到达边界2。非草坪区域的像素占比pix可表示自动行走设备1距离边界2的距离,当pix足够大时,即可判断为自动行走设备1到达边界2,且发出到达信息。Finally, perform contour detection on the segmented image, count the proportion of pixels in the lawn area or non-lawn area, and determine whether the proportion of pixels is within the threshold range to determine whether the boundary has been reached. There are many ways to calculate the proportion of pixels. In this embodiment In this embodiment, the pixel ratio pix of the non-lawn area is calculated; in this embodiment, the pixel ratio pix of the non-lawn area is actually counted. If the pix is within the threshold range, it is determined that the autonomous walking device 1 has reached the boundary 2 . The pixel ratio pix of the non-lawn area can represent the distance between the automatic walking device 1 and the boundary 2. When the pix is large enough, it can be judged that the automatic walking device 1 has reached the boundary 2, and the arrival information is sent.
以上该步骤提供了一种判断是否发出到达信息的方法,当然,还可以采用其他的方式判断自动行走设备1是否到达边界2。The above step provides a method for judging whether to send the arrival information. Of course, other methods can also be used to judge whether the automatic walking device 1 has reached the boundary 2 .
其中,步骤“获取交点P 1(x r,y r)和P 2(x l,y l)的连线与中心线的夹角θ” 包括: Wherein, the step "obtaining the angle θ between the line connecting the intersection points P 1 (x r , y r ) and P 2 (x l , y l ) and the center line" includes:
Figure PCTCN2020123199-appb-000001
且θ仅取锐角。
Figure PCTCN2020123199-appb-000001
And θ only takes acute angles.
当然θ的计算方式可以有多种,比如用向量夹角公式等方式计算。Of course, θ can be calculated in a variety of ways, such as using the vector angle formula.
上述计算公式可计算交点P 1(x r,y r)和P 2(x l,y l)的连线与中心线的夹角θ,该夹角θ与自动行走设备1需要转向的角度相关。且当然,若为了让自动行走设备触碰到边界2后可以沿边界2行走,为了运动方便,θ仅取锐角;若θ取钝角,则最佳的方式需要让自动行走设备1朝相反方向旋转180°-θ。 The above calculation formula can calculate the included angle θ between the connection line of the intersection points P 1 (x r , y r ) and P 2 (x l , y l ) and the center line, and the included angle θ is related to the angle at which the automatic traveling device 1 needs to turn . And of course, if the automatic walking device can walk along the boundary 2 after touching the boundary 2, for the convenience of movement, θ only takes an acute angle; if θ takes an obtuse angle, the best way is to make the automatic walking device 1 rotate in the opposite direction. 180°-theta.
在本发明的优选实施方式中,提供了两种自动行走设备1的转向方法,第一种实施例中,若需要让自动行走设备1触碰到边界2后沿边界2行走,则步骤“根据l r和l l的大小控制自动行走设备1的旋转方向及旋转角度”包括: In the preferred embodiment of the present invention, two steering methods of the automatic walking device 1 are provided. In the first embodiment, if the automatic walking device 1 needs to touch the boundary 2 and then walk along the boundary 2, the steps "according to the The size of l r and l l controls the rotation direction and rotation angle of the automatic walking device 1" including:
若l r>l l,则控制自动行走设备1向右旋转夹角θ或向左旋转180°-θ; If l r > l l , control the automatic traveling device 1 to rotate the included angle θ to the right or 180°-θ to the left;
若l r<l l,则控制自动行走设备1向左旋转夹角θ或向右旋转180°-θ; If l r <l l , control the automatic walking device 1 to rotate the included angle θ to the left or 180°-θ to the right;
若l r=l l,则控制自动行走设备1向右或向左旋转夹角θ或180°-θ。 If l r =l l , control the automatic traveling device 1 to rotate the included angle θ or 180°-θ to the right or left.
P 1(x r,y r)和P 2(x l,y l)与中心位置O在中心线方向上的距离l r、l l可以用以判断自动行走设备1的旋转角度。若l r<l l,则说明交点P 1(x r,y r)更加靠近中心位置O,则如图2b中所示,为了防止自动行走设备触碰到边界外侧或自由转向时间过长导致工作效率低,此时控制自动行走设备1最好向左旋转;若l r>l l,则说明交点P 2(x l,y l)更加靠近中心位置O,则如图2a中所示,同理,控制自动行走设备1最好向右旋转。 The distances l r and l l between P 1 (x r , y r ) and P 2 (x l , y l ) and the center position O in the direction of the center line can be used to determine the rotation angle of the automatic walking device 1 . If l r <l l , it means that the intersection point P 1 (x r , y r ) is closer to the center position O. As shown in FIG. 2b , in order to prevent the automatic traveling equipment from touching the outside of the boundary or the free turning time is too long, The work efficiency is low. At this time, it is better to control the automatic traveling device 1 to rotate to the left; if l r > l l , it means that the intersection point P 2 (x l , y l ) is closer to the center position O, as shown in Figure 2a, Similarly, it is better to control the automatic walking device 1 to rotate to the right.
当然,若l r=l l,则说明自动行走设备1的行进方向已经与边界2相垂直,θ为90°,则自动行走设备1可向右或向左旋转夹角90°。 Of course, if l r = l l , it means that the traveling direction of the automatic traveling device 1 is already perpendicular to the boundary 2, and θ is 90°, then the automatic traveling device 1 can rotate the included angle 90° to the right or left.
另外,步骤“控制自动行走设备1向右旋转夹角θ或向左旋转180°-θ”之后包括:In addition, the step "controlling the automatic walking device 1 to rotate the included angle θ to the right or 180°-θ to the left" includes:
控制自动行走设备1行进t1时间;Control the automatic traveling equipment 1 to travel for t1 time;
控制自动行走设备1继续向右或向左旋转夹角90°;Control the automatic walking device 1 to continue to rotate the included angle to the right or left by 90°;
步骤“控制自动行走设备1向左旋转夹角θ或向右旋转180°-θ”之后包括:The step "controlling the automatic walking device 1 to rotate the included angle θ to the left or 180°-θ to the right" includes:
控制自动行走设备1行进t1时间;Control the automatic traveling equipment 1 to travel for t1 time;
控制自动行走设备1继续向左或向右旋转夹角90°。Control the automatic walking device 1 to continue to rotate the included angle 90° to the left or right.
由于,如图3中所示,自动行走设备1在向右或向左旋转夹角θ或180°-θ之后,自动行走设备1的行进路线即与边界2相平行,此时,自动行走设备1在行进t1时间后,可继续让其旋转90°,使其沿垂直于边沿的方向的行进,从而可以让自动行走设备1完全覆盖掉工作区域。则可以控制自动行走设备按规划的路径行走,如图3中的行走路径。Because, as shown in FIG. 3 , after the automatic walking device 1 rotates the included angle θ or 180°-θ to the right or left, the traveling route of the automatic walking device 1 is parallel to the boundary 2. At this time, the automatic walking device 1 1 After traveling for t1 time, it can continue to be rotated by 90° to make it travel in a direction perpendicular to the edge, so that the automatic traveling device 1 can completely cover the working area. Then the automatic walking device can be controlled to walk according to the planned path, such as the walking path in Figure 3.
或者,在其他实施方式中,计算出θ后,就可以使自动行走设备向右或向左旋转任意给定的θ加上任一给定的角度以控制其按规划好的路径行走。Or, in other embodiments, after calculating θ, the automatic walking device can be rotated to the right or left by any given θ plus any given angle to control it to walk along the planned path.
当然,夹角θ可以通过多次旋转达成也可以一次性旋转达成,具体的,步骤“控制自动行走设备1向右旋转夹角θ或向左旋转180°-θ”具体包括:控制自动行走设备1向右一次性旋转θ或180°-θ角度或多次旋转以使最终总的旋转角度达到θ或180°-θ角度;步骤“控制自动行走设备1向左或向右旋转夹角θ或180°-θ角度”具体包括:控制自动行走设备1向左一次性旋转旋转θ或180°-θ角度或多次旋转以使最终总的旋转角度达到了θ或180°-θ角度。Of course, the included angle θ can be achieved by multiple rotations or one-time rotation. Specifically, the step "controlling the automatic walking device 1 to rotate the included angle θ to the right or 180°-θ to the left" specifically includes: controlling the automatic walking device 1. Rotate the θ or 180°-θ angle to the right at one time or several times to make the final total rotation angle reach the θ or 180°-θ angle; step "Control the automatic walking device 1 to rotate the included angle θ to the left or right or “180°-θ angle” specifically includes: controlling the automatic walking device 1 to rotate to the left by one-time rotation θ or 180°-θ angle or multiple rotations so that the final total rotation angle reaches θ or 180°-θ angle.
当然,在本发明的第二种实施例中,所述自动行走设备1在遇到边界2后也可以不沿边界2行走,而是沿垂直于边界2的方向行走,则此时,步骤“根据l r和l l的大小控制自动行走设备1的旋转方向及旋转角度”包括: Of course, in the second embodiment of the present invention, the automatic walking device 1 may not walk along the boundary 2 after encountering the boundary 2, but walk along the direction perpendicular to the boundary 2, then at this time, the steps " According to the size of l r and l l , control the rotation direction and rotation angle of the automatic walking device 1" including:
若l r>l l,则控制自动行走设备1向右旋转夹角θ+90°; If l r > l l , control the automatic traveling device 1 to rotate the included angle θ+90° to the right;
若l r<l l,则控制自动行走设备1向左旋转夹角θ+90°; If l r <l l , control the automatic walking device 1 to rotate the included angle θ+90° to the left;
若l r=l l,则控制自动行走设备1向右或向左旋转夹角θ+90°。 If l r =l l , control the automatic traveling device 1 to rotate the included angle θ+90° to the right or left.
在这种情况下,所述自动行走设备1在遇到边界2后,沿垂直于边界2的方向移动。In this case, the self-propelled device 1 moves in a direction perpendicular to the boundary 2 after encountering the boundary 2 .
另外,本发明中还提供了一种自动工作系统,并且,具有两种具体实施例。In addition, the present invention also provides an automatic working system, and has two specific embodiments.
在第一种实施例中,所述自动工作系统包括:In a first embodiment, the automatic working system includes:
自动行走设备1,可按照如上述所述的控制方法工作;The automatic traveling equipment 1 can work according to the control method as described above;
工作区域,所述工作区域边沿外侧设置有非工作区域,所述工作区域和非工作区域的颜色不同且形成边界2。In the working area, a non-working area is provided at the outer edge of the working area, and the color of the working area and the non-working area are different and form a boundary 2 .
由于本发明中的自动行走设备1应用于割草机中,则草地即为工作区域,显然的,非工作区域中可为裸露土壤、地板、水泥板等等,其地质均和草地有较大的不同,其颜色也和草地有较大的不同。因而,由于颜色的明显差距会自然的在工作区域和非工作区域之间形成边界2。但是,由于工作区域和非工作区域之间明显的颜色差别及边界2的形成,也还是可以应用本发明中的控制方法,并对自动行走设备1的转向方向进行判断。Since the automatic traveling device 1 of the present invention is applied to a lawn mower, the grass field is the working area. Obviously, the non-working area can be bare soil, floor, cement board, etc., and its geology is larger than that of the grass field. The color is also quite different from that of the grass. Thus, a border 2 is naturally formed between the working area and the non-working area due to the apparent difference in color. However, due to the obvious color difference between the working area and the non-working area and the formation of the boundary 2 , the control method in the present invention can still be applied to judge the steering direction of the automatic traveling device 1 .
或者,在第二种实施例中,如图4所示,所述自动工作系统包括:Or, in the second embodiment, as shown in FIG. 4 , the automatic working system includes:
自动行走设备1,可按照如上述所述的控制方法工作;边界2,围设呈环状并形成用以限定自动行走设备1的工作区域,所述边界2自地面向上延伸,所述边界2和工作区域的颜色不同。The self-propelled equipment 1 can work according to the above-mentioned control method; the boundary 2 is formed in a ring shape and forms a working area for limiting the self-propelled equipment 1, the boundary 2 extends upward from the ground, and the boundary 2 Different from the color of the work area.
在本实施例中,所述自动行走设备1通过获取拍摄图像,再对拍摄图像进行处理分析后获得自动行走设备1行进的区域,因而,本发明自动工作系统的边界2可自地面向上延伸,从而被自动行走设备1拍摄并识别到。当然,显然的,该边界2的颜色也与草坪的颜色不同,为除了绿色以外的其他颜色。In this embodiment, the automatic traveling device 1 obtains the captured image, and then processes and analyzes the captured image to obtain the area where the automatic traveling device 1 travels. Therefore, the boundary 2 of the automatic working system of the present invention can extend upward from the ground, Therefore, it is photographed and recognized by the automatic walking device 1 . Of course, obviously, the color of the border 2 is also different from the color of the lawn, and is a color other than green.
本发明中还提供了一种自动行走设备1,包括本体、行走模块、电源模块及设置于本体内的存储器和处理器,所述存储器存储有可在处理器上运行的计算机程序,所述自动行走设备1还包括设置于本体上的摄像头,所述摄像头的拍摄方向朝向该自动行走设备1沿行进方向的前侧;所述处理器执行所述计算机程序时可实现如上述所述的自动行走设备1的控制方法的步骤。也就是说,所述处理器执行所述计算机程序时可实现如上述所述的自动行走设备1的任何一种实施例的控制方法的步骤。The present invention also provides an automatic traveling device 1, which includes a body, a traveling module, a power supply module, a memory and a processor arranged in the body, the memory stores a computer program that can be run on the processor, and the automatic The walking device 1 also includes a camera arranged on the body, and the shooting direction of the camera is toward the front side of the automatic walking device 1 along the traveling direction; when the processor executes the computer program, the automatic walking as described above can be realized The steps of the control method of the device 1. That is to say, when the processor executes the computer program, the steps of the control method of any one of the embodiments of the automatic walking device 1 described above can be implemented.
如上述所述,本发明中的自动行走设备1的本体上设置有摄像头,从而可以拍摄并获取拍摄图像。并且,摄像头的拍摄方向朝向自动行走设备1沿行进方向的前侧,从而所述摄像头拍摄获得的是自动行走设备1前侧的景象。因而,可以根据自动行走设备1所拍摄获得的拍摄图像来分析自动行走设备1接下来 的运动轨迹。As mentioned above, a camera is provided on the main body of the automatic traveling device 1 in the present invention, so that a photographed image can be photographed and acquired. Moreover, the shooting direction of the camera is toward the front side of the automatic traveling device 1 along the traveling direction, so that the camera captures the scene of the front side of the automatic traveling device 1 . Therefore, the following motion trajectory of the autonomous running device 1 can be analyzed according to the captured images captured by the autonomous running device 1 .
同样的,本发明中还提供了一种计算机可读存储介质,其存储有计算机程序,该计算机程序被处理器执行时可实现如上述所述的自动行走设备1的控制方法中的步骤。也就是说,所述处理器执行所述计算机程序时可实现如上述所述的自动行走设备1的任何一种实施例的控制方法的步骤。Similarly, the present invention also provides a computer-readable storage medium, which stores a computer program, and when the computer program is executed by the processor, can realize the steps in the control method of the automatic walking device 1 as described above. That is to say, when the processor executes the computer program, the steps of the control method of any one of the embodiments of the automatic walking device 1 described above can be implemented.
综上所述,本发明中提供了一种自动行走设备1及其控制方法及计算机可读存储介质,本发明中,由于自动行走设备1到达边界2后,所拍摄的拍摄图像必然是会有草坪区域和非草坪区域,并且属于草坪区域的像素点和非草坪区域的像素点的色度不同,因而可以对拍摄图像进行轮廓检测等处理并获取自动行走设备1的旋转方向及旋转夹角;效率更高,且较为容易。To sum up, the present invention provides a self-propelled device 1, a control method thereof, and a computer-readable storage medium. In the present invention, since the self-propelled device 1 reaches the boundary 2, the captured image must have The lawn area and the non-lawn area, and the chromaticity of the pixels belonging to the lawn area and the pixels of the non-lawn area are different, so the captured image can be processed such as contour detection and the rotation direction and rotation angle of the automatic walking device 1 can be obtained; More efficient and easier.
另外,本发明中的自动工作系统中不需要在地底下另外布局边界线,减少了人力物力成本,工作区域形状灵活不受限制,识别速度快,精度高,也可以提高本发明中自动行走设备1特别是自动割草机器人的工作效率。In addition, the automatic working system of the present invention does not need to lay out additional boundary lines underground, which reduces the cost of manpower and material resources, the shape of the working area is flexible and unrestricted, the recognition speed is fast, and the accuracy is high, and the automatic walking equipment in the present invention can also be improved. 1 Especially the working efficiency of automatic lawn mowing robots.
此外,应当理解,虽然本说明书按照实施方式加以描述,但并非每个实施方式仅包含一个独立的技术方案,说明书的这种叙述方式仅仅是为清楚起见,本领域技术人员应当将说明书作为一个整体,各实施方式中的技术方案也可以经适当组合,形成本领域技术人员可以理解的其他实施方式。In addition, it should be understood that although this specification is described in terms of embodiments, not each embodiment only includes an independent technical solution, and this description in the specification is only for the sake of clarity, and those skilled in the art should take the specification as a whole , the technical solutions in each embodiment can also be appropriately combined to form other embodiments that can be understood by those skilled in the art.
上文所列出的一系列的详细说明仅仅是针对本发明的可行性实施方式的具体说明,并非用以限制本发明的保护范围,凡未脱离本发明技艺精神所作的等效实施方式或变更均应包含在本发明的保护范围之内。The series of detailed descriptions listed above are only specific descriptions for the feasible embodiments of the present invention, and are not intended to limit the protection scope of the present invention. Any equivalent embodiments or changes made without departing from the technical spirit of the present invention All should be included within the protection scope of the present invention.

Claims (10)

  1. 一种自动行走设备的控制方法,其特征在于,所述控制方法包括:A control method for automatic traveling equipment, characterized in that the control method comprises:
    对获取的拍摄图像进行轮廓检测以获得边界,其中,自动行走设备的中心位置O位于所述拍摄图像的一边沿;Contour detection is performed on the captured image to obtain a boundary, wherein the center position O of the automatic walking device is located at one edge of the captured image;
    获取边界在拍摄图像的边沿的交点P 1(x r,y r),P 2(x l,y l); Obtain the intersection P 1 (x r , y r ), P 2 (x l , y l ) where the boundary is at the edge of the captured image;
    分别获得P 1(x r,y r)和P 2(x l,y l)与自动行走设备的中心位置O所在边沿的最短距离l r、l lObtain the shortest distances l r and l l between P 1 (x r , y r ) and P 2 (x l , y l ) and the edge where the center position O of the automatic walking device is located;
    根据l r和l l的大小控制自动行走设备的旋转方向及旋转角度。 Control the rotation direction and rotation angle of the automatic walking device according to the size of l r and l l.
  2. 根据权利要求1所述的控制方法,其特征在于,在步骤“对获取的拍摄图像进行轮廓检测以获得边界”之前,所述方法还包括:The control method according to claim 1, characterized in that, before the step of "performing contour detection on the acquired captured image to obtain a boundary", the method further comprises:
    获得拍摄图像;obtain captured images;
    对拍摄图像进行二值化处理输出二值化图像;Perform binarization processing on the captured image to output a binarized image;
    对二值化图像进行形态学操作获得形态图像;Perform morphological operations on the binarized image to obtain a morphological image;
    对形态图像进行反操作,获得分割图像;Perform inverse operations on the morphological image to obtain a segmented image;
    对分割图像进行轮廓检测,统计草坪区域或非草坪区域的像素占比pix;Contour detection is performed on the segmented image, and the pixel ratio pix of the lawn area or non-lawn area is counted;
    若pix在阈值范围内,则判定自动行走设备到达边界。If pix is within the threshold range, it is determined that the automatic walking device has reached the boundary.
  3. 根据权利要求1或2所述的控制方法,其特征在于,所述方法还包括:The control method according to claim 1 or 2, wherein the method further comprises:
    获取交点P 1(x r,y r)和P 2(x l,y l)的连线与中心线的夹角θ,其中,所述中心线为垂直于所述中心位置O所在边沿并且通过所述中心位置O的直线。 Obtain the angle θ between the line connecting the intersection points P 1 (x r , y r ) and P 2 (x l , y l ) and the center line, where the center line is perpendicular to the edge where the center position O is located and passes through The straight line of the center position O.
  4. 根据权利要求3所述的控制方法,其特征在于,θ为锐角。The control method according to claim 3, wherein θ is an acute angle.
  5. 根据权利要求4所述的控制方法,其特征在于,“根据l r和l l的大小控制自动行走设备的旋转方向及旋转角度”包括: The control method according to claim 4, characterized in that the "self-propelled rotating direction and the rotation angle of the device according to the l l l r and size control" comprises:
    若l r>l l,则控制自动行走设备向右旋转夹角θ或向左旋转180°-θ; If l r > l l , control the automatic walking device to rotate the included angle θ to the right or 180°-θ to the left;
    若l r<l l,则控制自动行走设备向左旋转夹角θ或向右旋转180°-θ; If l r <l l , control the automatic walking device to rotate the included angle θ to the left or 180°-θ to the right;
    若l r=l l,则控制自动行走设备向右或向左旋转夹角θ或180°-θ。 If l r =l l , control the automatic walking device to rotate the included angle θ or 180°-θ to the right or left.
  6. 根据权利要求4所述的控制方法,其特征在于,步骤“根据l r和l l的大小控制 自动行走设备的旋转方向及旋转角度”包括: control method according to claim 4, is characterized in that, step " according to the size of 1 r and 1 l to control the rotation direction and rotation angle of automatic traveling equipment " comprises:
    若l r>l l,则控制自动行走设备向右旋转夹角θ+90°; If l r > l l , control the automatic walking device to rotate the included angle θ+90° to the right;
    若l r<l l,则控制自动行走设备向左旋转夹角θ+90°; If l r <l l , control the automatic walking equipment to rotate the included angle θ+90° to the left;
    若l r=l l,则控制自动行走设备向右或向左旋转夹角θ+90°。 If l r =l l , control the automatic walking device to rotate the included angle θ+90° to the right or left.
  7. 根据权利要求5所述的控制方法,其特征在于,The control method according to claim 5, characterized in that:
    步骤“控制自动行走设备向右旋转夹角θ或向左旋转180°-θ”之后包括:The step "controlling the automatic walking device to rotate the included angle θ to the right or 180°-θ to the left" includes:
    控制自动行走设备行进t1时间;Control the travel time t1 of the automatic walking equipment;
    控制自动行走设备继续向右或向左旋转夹角90°;Control the automatic walking device to continue to rotate the included angle 90° to the right or left;
    步骤“控制自动行走设备向左旋转夹角θ或向右旋转180°-θ”之后包括:After the step "controlling the automatic walking device to rotate the included angle θ to the left or 180°-θ to the right" includes:
    控制自动行走设备行进t1时间;Control the travel time t1 of the automatic walking equipment;
    控制自动行走设备继续向左或向右旋转夹角90°。Control the automatic walking device to continue to rotate the included angle 90° to the left or right.
  8. 根据权利要求5所述的控制方法,其特征在于,步骤“控制自动行走设备向右旋转夹角θ或向左旋转180°-θ”具体包括:The control method according to claim 5, wherein the step "controlling the automatic walking device to rotate the included angle θ to the right or 180°-θ to the left" specifically includes:
    控制自动行走设备向右或向左一次性或多次旋转以旋转了θ角度或180°-θ角度;Controlling the automatic walking device to rotate right or left one or more times to rotate the θ angle or 180°-θ angle;
    步骤“控制自动行走设备向左旋转夹角θ或向右旋转180°-θ”具体包括:The step "controlling the automatic walking device to rotate the included angle θ to the left or 180°-θ to the right" specifically includes:
    控制自动行走设备向左或向右一次性或多次旋转以旋转了θ角度或180°-θ角度。The autonomous walking device is controlled to rotate left or right one or more times to rotate the θ angle or 180°-θ angle.
  9. 一种自动行走设备,包括本体、行走模块、电源模块及设置于本体内的存储器和处理器,所述存储器存储有可在处理器上运行的计算机程序,其特征在于,所述自动行走设备还包括设置于本体上的摄像头,所述摄像头的拍摄方向朝向该自动行走设备沿行进方向的前侧;所述处理器执行所述计算机程序时可实现权利要求1至8中任意一项所述的自动行走设备的控制方法的步骤。An automatic walking device, comprising a main body, a walking module, a power supply module, a memory and a processor arranged in the main body, the memory storing a computer program that can be run on the processor, and characterized in that the automatic walking device also Including a camera set on the main body, the shooting direction of the camera is toward the front side of the automatic walking device along the traveling direction; when the processor executes the computer program, it can realize any one of claims 1 to 8. The steps of the control method of the automatic walking device.
  10. 一种计算机可读存储介质,其存储有计算机程序,其特征在于,该计算机程序被处理器执行时可实现权利要求1至8中任意一项所述的自动行走设备的控制方法中的步骤。A computer-readable storage medium storing a computer program, characterized in that, when the computer program is executed by a processor, the steps in the control method for an automatic traveling device according to any one of claims 1 to 8 can be implemented.
PCT/CN2020/123199 2020-06-28 2020-10-23 Automatic walking device and control method therefor, and readable storage medium WO2022000878A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010597256.0A CN113848872B (en) 2020-06-28 2020-06-28 Automatic walking device, control method thereof and readable storage medium
CN202010597256.0 2020-06-28

Publications (1)

Publication Number Publication Date
WO2022000878A1 true WO2022000878A1 (en) 2022-01-06

Family

ID=78972617

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/123199 WO2022000878A1 (en) 2020-06-28 2020-10-23 Automatic walking device and control method therefor, and readable storage medium

Country Status (2)

Country Link
CN (1) CN113848872B (en)
WO (1) WO2022000878A1 (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080201014A1 (en) * 2007-02-16 2008-08-21 Kabushiki Kaisha Toshiba Robot and method for controlling the same
US20100070125A1 (en) * 2008-09-12 2010-03-18 Samsung Electronics Co., Ltd. Apparatus and method for localizing mobile robot
CN102771246A (en) * 2012-07-05 2012-11-14 芜湖鸿宇智能科技有限公司 Intelligent mower system and intelligent mowing method thereof
CN106155053A (en) * 2016-06-24 2016-11-23 桑斌修 A kind of mowing method, device and system
CN109063575A (en) * 2018-07-05 2018-12-21 中国计量大学 A kind of intelligent grass-removing based on monocular vision is independently orderly mowed method
CN111324122A (en) * 2020-02-28 2020-06-23 苏州科瓴精密机械科技有限公司 Automatic work system, automatic walking device, control method thereof, and computer-readable storage medium

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2540855B2 (en) * 1987-04-28 1996-10-09 株式会社豊田自動織機製作所 Running course creation device
JPH069011B2 (en) * 1987-08-04 1994-02-02 株式会社クボタ Travel control system for automated guided vehicles
JP2510660B2 (en) * 1988-03-14 1996-06-26 株式会社クボタ Image-capturing type traveling control device for automated guided vehicles
CN105911981A (en) * 2012-04-28 2016-08-31 苏州宝时得电动工具有限公司 Automatic work system, and automatic walking device and steering method thereof
JP7007078B2 (en) * 2015-10-08 2022-01-24 東芝ライフスタイル株式会社 Vacuum cleaner
CN105651286B (en) * 2016-02-26 2019-06-18 中国科学院宁波材料技术与工程研究所 A kind of vision navigation method of mobile robot and system and warehouse system
CN109797691B (en) * 2019-01-29 2021-10-01 浙江联运知慧科技有限公司 Unmanned sweeper and driving method thereof
CN110032186A (en) * 2019-03-27 2019-07-19 上海大学 A kind of labyrinth feature identification of anthropomorphic robot and traveling method
CN110703777B (en) * 2019-09-25 2023-03-24 江苏大学 Combined navigation method and system of combine harvester based on Beidou and vision

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080201014A1 (en) * 2007-02-16 2008-08-21 Kabushiki Kaisha Toshiba Robot and method for controlling the same
US20100070125A1 (en) * 2008-09-12 2010-03-18 Samsung Electronics Co., Ltd. Apparatus and method for localizing mobile robot
CN102771246A (en) * 2012-07-05 2012-11-14 芜湖鸿宇智能科技有限公司 Intelligent mower system and intelligent mowing method thereof
CN106155053A (en) * 2016-06-24 2016-11-23 桑斌修 A kind of mowing method, device and system
CN109063575A (en) * 2018-07-05 2018-12-21 中国计量大学 A kind of intelligent grass-removing based on monocular vision is independently orderly mowed method
CN111324122A (en) * 2020-02-28 2020-06-23 苏州科瓴精密机械科技有限公司 Automatic work system, automatic walking device, control method thereof, and computer-readable storage medium

Also Published As

Publication number Publication date
CN113848872B (en) 2024-03-15
CN113848872A (en) 2021-12-28

Similar Documents

Publication Publication Date Title
CN109063575B (en) Intelligent mower autonomous and orderly mowing method based on monocular vision
US20220253063A1 (en) Autonomous machine navigation and training using vision system
WO2022021630A1 (en) Autonomous walking device and control method and system therefor, and readable storage medium
WO2017198222A1 (en) Automatic work system, self-moving device and control method therefor
WO2021169193A1 (en) Automatic working system, automatic locomotion device and control method therefor, and computer readable storage medium
WO2021169190A1 (en) Automatic working system, automatic travelling device and control method therefor, and computer readable storage medium
WO2021169192A1 (en) Automatic working system, automatic walking device and control method therefor, and computer-readable storage medium
US20230236604A1 (en) Autonomous machine navigation using reflections from subsurface objects
WO2021238001A1 (en) Robot travelling control method and system, robot, and readable storage medium
CN111413977A (en) Path planning system and method of mowing robot based on machine vision
WO2022000878A1 (en) Automatic walking device and control method therefor, and readable storage medium
WO2021042487A1 (en) Automatic working system, automatic travelling device and control method therefor, and computer readable storage medium
EP4123406A1 (en) Automatic working system, automatic walking device and method for controlling same, and computer-readable storage medium
CN114937258A (en) Control method for mowing robot, and computer storage medium
WO2021238000A1 (en) Boundary-following working method and system of robot, robot, and readable storage medium
WO2021184663A1 (en) Automatic working system, automatic walking device and control method therefor, and computer-readable storage medium
WO2021162840A1 (en) Autonomous machine navigation with object detection and 3d point cloud
WO2021184664A1 (en) Automatic working system, automatic walking device and control method therefor, and computer-readable storage medium
WO2021042486A1 (en) Automatic working system, automatic walking device and control method therefor, and computer readable storage medium
WO2021031406A1 (en) Automatic working system, and automatic walking device and control method therefor
US20230206647A1 (en) Automatic Robotic Lawn Mowing Boundary Detection Using 3D Semantic Segmentation
CN115328112A (en) Self-moving apparatus, moving trajectory adjusting method, and computer-readable storage medium
WO2021047063A1 (en) Automatic work system and turning method therefor, and self-moving device
CN115147714A (en) Method and system for identifying non-working area based on image

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20943027

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20943027

Country of ref document: EP

Kind code of ref document: A1

122 Ep: pct application non-entry in european phase

Ref document number: 20943027

Country of ref document: EP

Kind code of ref document: A1

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205 DATED 14.09.2023)