Disclosure of Invention
An object of the present invention is to provide a control method for a self-moving robot capable of rapidly recognizing a work area.
Another object of the present invention is to provide a self-moving robot system that can rapidly identify a work area.
In order to achieve one of the above objects, the present invention provides a control method of a self-moving robot, including the steps of:
s1, the self-moving robot walks to a boundary line and adjusts the posture of walking along the boundary line;
s2, walking along the boundary line, and recording the current position point as a first point when a preset condition is reached;
s3, repeatedly executing the step S2 until the times of reaching the preset condition are more than the preset value, and recording the current position point as a second point;
s4, calculating the distance between the first point and the second point which reach the preset condition at least once;
and S5, determining whether the current boundary line is the target boundary line according to whether the calculated distance is smaller than a threshold value.
As a preferable embodiment of the present invention, the recording of the current position point as the first point and the start of the time counting in step S2, and the recording of the second point and the interruption of the time counting in step S3.
As a preferable embodiment of the present invention, if the calculated distance is greater than or equal to the threshold, the steps S2 to S5 are repeated, and in the process of repeating the steps S2 to S5, if the self-moving robot detects a preset event, an interrupt is triggered, and the loop of the steps S2 to S5 is skipped.
As a preferable embodiment of the present invention, in the steps S3 and S4, the number of times that the self-moving robot reaches the preset condition reaches the preset value is recorded as the first point, the plurality of first points are obtained, and the distance between each first point and the second point is calculated.
As a preferable aspect of one embodiment of the present invention, the distance between any first point and any second point is smaller than the threshold, and the current boundary line is determined as the target boundary line.
As a preferable solution of one embodiment of the present invention, the distance between the preset number of first points and the preset number of second points is smaller than the threshold, and the current boundary line is determined as the target boundary line.
As a preferable aspect of one embodiment of the present invention, the average of the sums of the distances between the plurality of first points and the second points is smaller than a threshold, and the current boundary line is determined as the target boundary line.
As a preferred embodiment of the present invention, if the calculated distance is greater than the threshold, the mobile robot rotates in place by a predetermined angle and then moves straight forward, leaves the current boundary line, and reaches another part of the boundary line, and the above steps S1 to S5 are performed in a loop.
As a preferable aspect of one embodiment of the present invention, the preset condition is a preset time interval.
As a preferable mode of one embodiment of the present invention, the preset condition is that wheel speeds of driving wheels from both sides of the mobile robot are different.
As a preferable mode of one embodiment of the present invention, the self-moving robot is in a regression charging mode, and the adjusting to the posture of walking along the boundary line in step S1 includes turning the heading of the self-moving robot toward the direction of the regression base station, and making the front-back direction of the self-moving robot parallel to the extending direction of the boundary line.
As a preferable embodiment of the present invention, the self-moving robot is in the working mode, and the self-moving robot walks along the boundary line for one circle and executes the working task at the same time according to the determination result in the step S5, if the target boundary line is the preset working boundary line.
As a preferable mode of the embodiment of the present invention, in the step S1, the adjusting to the posture of walking along the boundary line includes turning the heading of the self-moving robot toward the side having the larger angle with the boundary line in the current traveling direction.
As a preferable aspect of one embodiment of the present invention, the calculating the distance between the first point and the second point includes:
s41, calculating parameters of a second point;
and S42, calculating the distance between the first point and the second point.
As a preferable aspect of one embodiment of the present invention, the calculating the parameter of the second point includes:
s411, calculating wheel speed difference, angular speed, mass center linear speed and track radius of driving wheels at two sides of the self-moving robot from a first point to a second point;
s412, judging whether the wheel speed difference of the driving wheels on the two sides is equal to zero or not;
and S413, calculating the parameter of the second point by using the parameter of the first point when the wheel speed difference is equal to zero.
As a preferable aspect of one embodiment of the present invention, the calculating the parameter of the second point further includes:
s414, calculating the angular velocity, the mass center linear velocity and the track radius from the first point to the second point when the wheel speed difference is not equal to zero;
s415, calculating a parameter of a reference circle center according to the parameter of the first point;
and S416, calculating parameters of the second point according to the parameters of the circle center.
As a preferred embodiment of the present invention, if the wheel speed difference between the driving wheels on the two sides is not equal to zero, the calculation formula of the parameter of the reference circle center and the parameter of the current position point is as follows:
if the wheel speed difference of the driving wheels on the two sides is equal to zero, the calculation formula of the parameters of the current position point is as follows:
the distance between the second point and the first point is calculated as follows:
in the above-mentioned formula,
is the first point x-direction parameter,
is a first point y-direction parameter, theta
i Is a first point angle parameter, R
i Radius of track of self-moving robot, dir
i Is the track direction, omega, of a self-moving robot
i Is the angular velocity of the self-moving robot; Δ t
i For the time interval from the mobile robot traveling from the first point to the second point,
for reference to the x-direction parameter of the circle center,
for reference to the y-direction parameter of the circle center,
in order to refer to the parameter of the angle of the circle center,
for the x-direction parameter of the current location point,
for the y-direction parameter of the current position point, θ
i+1 Δ d is the distance between the first point and the second point, which is the second point angle parameter.
The invention also relates to a self-moving robot system, which comprises a self-moving robot and a boundary line defining a working area, wherein the self-moving robot is provided with a walking module for driving the self-moving robot and a control module connected with the walking module, the walking module comprises a driving wheel moving in a range limited by the boundary line, the control module is used for controlling the walking module to enable the self-moving robot to walk, and the control module comprises:
the inspection unit is used for controlling the self-moving robot to reach the boundary line and adjusting the self-moving robot to a pose of walking along the boundary line, then controlling the self-moving robot to walk along the boundary line, recording a current position point reaching a preset condition within preset times as a first point, and recording the current position point as a second point when the times of reaching the preset condition are greater than a preset value;
the calculating unit is used for calculating parameters of a second point according to the parameters of the first point reaching a preset condition at least once and the walking parameters of the self-moving robot, and calculating the distance between the first point and the second point based on the parameters of the first point and the parameters of the second point;
and the pushing unit is used for controlling whether the self-moving robot leaves the current boundary line or not according to whether the calculated distance is smaller than a threshold value or not.
As a preferable mode of one embodiment of the present invention, the control module further includes a timing unit for timing the self-moving robot from the first point to the second point.
As a preferable mode of one embodiment of the present invention, the preset condition is a preset time interval.
As a preferable mode of one embodiment of the present invention, the driving wheels include two driving wheels, and the two driving wheels are respectively located at two sides of the self-moving robot, and the preset condition is that wheel speeds of the two driving wheels are different.
The invention has the beneficial effects that: the distance between the first point and the second point is calculated, and the self-moving robot is controlled to walk according to the comparison result of the calculated distance and the threshold value, so that the self-moving robot is prevented from walking along an island boundary line in a circulating mode, and the self-moving robot is ensured to work more reliably automatically.
Detailed Description
The present invention will be described in detail below with reference to embodiments shown in the drawings. This embodiment is not intended to limit the invention, and structural, methodical, or functional changes that may be made by one of ordinary skill in the art in view of this embodiment are intended to be within the scope of the invention.
The self-moving robot of the present invention may be an automatic lawn mower or an automatic vacuum cleaner, which automatically travels in a working area to perform lawn mowing and dust suction. Of course, the self-moving robot is not limited to the lawn mower and the dust collector, but may be other devices such as a spraying device, a snow removing device, a monitoring device, and the like suitable for unattended operation.
As shown in fig. 1 and 2, in a preferred embodiment of the present invention, the self-moving robot is alawn mower 100, and thelawn mower 100 includes: the device comprises a machine body, a walking module arranged on the machine body, a boundary detection module, an energy module and a control module. In addition, the mower also comprises a working module which is used for executing specific working tasks of the mower, and the working module comprises a mowing blade, a cutting motor and the like, and also can comprise a mowing height adjusting mechanism and other components for optimizing or adjusting mowing effect.
The walking module is used for driving the mower to walk and steer in a working area and generally comprises a wheel set arranged on the mower and a driving motor for driving the wheel set to walk. In this embodiment, the walking module includes two drivingwheels 21 located at two sides of the rear portion of the body and twouniversal wheels 31 located at the front portion of the body.
The boundary detection module is used for detecting the relative position relationship between the mower and the boundary line, and the relative position relationship may specifically include one or more of a distance, an angle, and an inside and outside direction of the boundary line. The boundary detection module can be of various compositions and principles, such as infrared type, ultrasonic type, collision detection type, magnetic induction type and the like, and the arrangement positions and the number of the sensors and the corresponding signal generating devices are also various.
The energy module is used for providing energy for various operations of the mower and comprises a rechargeable battery and a charging connection structure, wherein the charging connection structure is usually a charging electrode slice which can be exposed out of the mower.
The control module is used for controlling the automatic walking and working of the mower, is electrically connected with the walking module and the boundary detection module, is a core component of the mower, and performs the functions of controlling the working module to start or stop, generating a walking path, controlling the walking module to judge the electric quantity of the energy module according to the walking, and timely instructing the mower to return to a base station for automatic butt joint charging and the like. The control module typically includes a single chip microcomputer and memory as well as other peripheral circuits.
The lawn mower further comprises various sensors for sensing the walking state of the lawn mower, such as: the sensors for tilting, lifting off the ground, collision, etc. are not described in detail herein.
Therein, thelawn mower 100 and the boundary line defining the working area thereof constitute a self-moving robot system, which further comprises abase station 200. The base station may be located inside or outside the work area and connected to the utility or other power supply system for recharging the mower. The base station can transmit pulse coding signals along the boundary line to form electromagnetic signals near the boundary line, and the control module can control the driving motor to operate according to the change of the electromagnetic signals near the boundary line and the difference of the signals inside and outside the boundary line acquired by the state sensor, so that the mower can timely turn to avoid and smoothly return to the base station along the boundary line for charging when detecting the boundary line. The boundary line comprises aperipheral boundary line 310 for limiting an internal working area and anisland boundary line 320 for limiting anobstacle 330, the boundary detection module comprises twoboundary line sensors 40 positioned at the front part of the machine body, when the distance S between the two lines of the island is smaller than a certain value, a machine cannot correctly identify boundary signals, and the certain value is related to the characteristics of the boundary signals, the characteristics of the boundary line sensors and the like. As a specific example, when S is smaller than the distance L between two boundary line sensors, the machine cannot correctly recognize the boundary signal. Therefore, when the machine starts to run along the boundary with a certain point on the island as a starting point, the machine cannot leave the island. The following is a detailed description of a control method of a lawn mower according to an embodiment of the present invention, and more particularly, a method for quickly identifying a work area when the lawn mower travels.
As shown in fig. 3 to 7, in the present embodiment, the method for identifying the working area of the lawn mower includes the following steps:
s1, the mower walks to the boundary line and adjusts the posture of walking along the boundary line;
s2, recording the current position point as a first point;
s3, walking along the boundary line, and recording the current position point as a second point when a preset condition is reached;
s4, calculating the distance delta d between the first point and the second point;
and S5, determining whether the current boundary line is the target boundary line or not according to whether the calculated distance delta d is smaller than a threshold value or not.
The steps are used for the mower to execute the border mode, whether the current walking boundary line is the target boundary line or not can be judged quickly, the target boundary line is the island boundary line in the embodiment, and therefore the situation that the mower walks all the time along the island boundary line is avoided.
In order to facilitate the calculation of the distance between the first point and the second point, the current position point may be recorded as the first point and timing may be started, and when a preset condition is reached, timing may be interrupted and the current position point may be recorded as the second point.
That is, the step S2 specifically includes the following substeps:
s21, recording the current position point as a first point;
s22, setting parameters of the first point;
and S23, starting timing.
The step S3 specifically includes the following substeps:
s31, the mower walks along the boundary line;
s32, judging whether a preset condition is reached, and if the preset condition is not reached, continuing to execute the step S31;
and S33, when the preset condition is met and the time is interrupted, recording the current position point as a second point.
The step S5 specifically includes the following substeps:
s51, judging whether the calculated distance delta d is smaller than a threshold value, and if not, repeatedly executing the steps S3 to S5;
and S52, if the calculated distance delta d is smaller than the threshold value, confirming that the current boundary line is the target boundary line.
According to the above sub-steps, in the process of repeating steps S3 to S5, the distance between the first point and the second point in each of the processes of steps S3 to S5 is calculated, and as long as the calculated distance Δ d is smaller than the threshold value, the current boundary line is confirmed as the target boundary line.
When the mower is in different control modes, the mower can be controlled differently according to the judgment result of the steps. And when the mower meets the regression charging condition, if the battery power is detected to be lower than a preset value or the current working plan is finished, entering a regression charging mode along the boundary. When the mower executes the side grass cutting work, the boundary line of the current walking is determined to be the boundary line needing the work execution, and the mower starts to walk for a circle along the boundary line and cut grass.
Specifically, the lawn mower executes a regression charging mode along the boundary, and at this time, the closest boundary line needs to be found quickly, and the method for the lawn mower to walk to the boundary line in the step S1 may be to execute a straight walking until the boundary line is reached. When the mower reaches the boundary line, the front and back directions of the mower body may form an angle with the boundary line, and the pose of the mower needs to be adjusted, wherein the pose adjustment in the step S1 is to enable the heading of the robot to turn towards the direction of the returning base station, and the direction of the returning base station is to be in butt joint with the base station. For example, in fig. 2, the charging direction is shown above thebase station 200, and when the lawnmower reaches the boundary line, the lawnmower turns to the left, and the front-rear direction of the main body is made substantially parallel to the boundary line, so that the lawnmower turns in any direction regardless of the angle at which the lawnmower reaches the boundary line.
The following is a detailed description of the process of the mower identifying theisland boundary line 320 and finding theperipheral boundary line 310.
The mower receives an instruction for executing the border mode, and step S1 is executed, namely the mower walks to the border line; the step specifically comprises straight line walking and/or curve walking, and in the implementation, the step S1 specifically comprises the following steps: s11, the mower walks to a boundary line, preferably walks along a straight line, and can quickly find the boundary line; s12, judging whether the mower reaches the boundary line, and continuing to perform the step S11 if the mower does not reach the boundary line; and S13, if the boundary line is reached, adjusting the pose, namely adjusting the front and back directions of the mower body to be approximately parallel to the boundary line. In this embodiment, the lawn mower requires the return charging, and therefore, the adjustment of the posture thereof includes turning the lawn mower in the return charging direction, the front and rear of the body of the lawn mower being substantially parallel to the boundary line, forming a posture of walking along the boundary line, so that the heading thereof is directed in the return direction,
after the pose is adjusted, in the next step S2, the boundary line is initially reachedIs a first point Pi (i = 0), or the current position point is the first point Pi (i = 0), setting a corresponding parameter (0,0,0) and starting timing, that is, recording the current position point as P in step S2i Setting Pi Start timing.
In this embodiment, step S31 is specifically to walk along the boundary line and record the linear speed of the left wheel and the linear speed of the right wheel; correspondingly, the preset condition in step S32 is that the linear speed of the left wheel is different from the linear speed of the right wheel, and in step S33, if the linear speed of the left wheel is detected to be different from the linear speed of the right wheel, the timing is interrupted and the current position point is recorded as the second point Pi+1 。
Specifically, the robot travels along the boundary line and records the linear velocity of the left wheel
And right wheel linear velocity
If it is
Or
If the current position point is changed, the current position point is recorded as P
i+1 (i is a positive integer), and interrupting timing; if it is
And
none of the points is changed, meaning that the curvature of the track is not changed, and no new point is recorded.
In step S4, the step of calculating the distance Δ d between the first point and the second point specifically includes the following substeps: s41, calculating a second point Pi+1 The parameters of (a); s42, calculating a point Pi And point Pi+1 In the next step S51, it is determined whether or not Δ d is smaller than a threshold, and if Δ d is smaller than the threshold, it is determined that the current boundary line is an island sideFurther, step S53 is executed to control the mower to move forward after rotating at a predetermined angle on the spot until the mower moves away from the current boundary line and reaches another part of the boundary line, and preferably, the mower moves forward along a straight line, and the steps S1 to S5 are repeated. If Δ d is equal to or greater than the threshold value, step S54 is performed, i = i +1 is set, and the above steps S3 to S5 are repeated.
In the process of repeating the above steps S3 to S5, when the robot detects a preset event, i.e. triggers an interrupt, the judgment loop of the above steps S3 to S5 is skipped. As a specific example, the predetermined event may be the detection of docking with the base station for charging. As another specific example, the predetermined event may be that a return signal is detected, and the determination cycle is skipped when the return signal is confirmed to reach the vicinity of the base station; in another specific example, when the signal sent by the base station is detected, the decision cycle can be skipped; in another specific example, the decision loop can be skipped when the default identifier of the base station is detected. In this embodiment, until the robot detects that the robot is docked with the base station for charging, an interrupt is triggered to execute a charging action.
In the process of repeating steps S3 to S5, a first point P is calculatedi And the distance Δ d from the second point in each of the processes of steps S3 to S5, so that the calculation of Δ d is not accumulated, and the accuracy of the calculation result is ensured, wherein the threshold may be a fixed value.
According to the above steps, the preset condition in step S3 is that the wheel speeds of the driving wheels on both sides of the lawn mower are different, and of course, in other embodiments, the preset condition may also be a preset time interval.
In addition, by the method, the edgewise work mode of the mowing robot can be controlled, namely the robot walks for a circle along the boundary line and mows grass at the same time. When the mower is in the working mode, the mower walks for a circle along the island boundary line and mows the grass simultaneously if the current boundary line is a preset working boundary line, for example, the preset working boundary line is the island boundary line, according to the judgment result in the step S5; and if the preset working boundary line is the peripheral boundary line, the mower walks for a circle along the peripheral boundary line and mows the grass at the same time. Certainly, when mowing along the boundary line, the mower does not need to steer towards the direction of the returning base station when reaching the boundary line and turns, and can steer towards the side with the larger included angle between the current advancing direction and the boundary line, so that the turning angle of the mower is prevented from being too large, and the turning time is saved.
In order to avoid the erroneous determination caused by the too close distance between the first point and the second point in the initial stage of the determination, in step S3, it may be determined whether the predetermined condition is reached after the predetermined time of walking along the boundary line, for example, the predetermined condition is reached after the predetermined time of walking along the boundary line is recorded for 10 to 30 seconds after the first point is recorded.
Certainly, the misjudgment may also be avoided in other ways, for example, in the above steps S3 and S4, it may be defined that the number of times that the mower reaches the preset condition needs to reach the preset value, where the preset value is an integer greater than 1, that is, the mower needs to reach the preset condition multiple times, the current position point when the preset condition is reached each time is recorded as the second point, multiple second points are obtained, the distance between the first point and each second point is calculated, the calculation may be performed every time one second point is recorded, or the calculation may be performed after all the second points are recorded, the cases may be divided into multiple cases according to whether the calculated distance is smaller than the threshold, as long as the distance Δ d between any second point and the first point is smaller than the distance Δ d between any second point and the first point
i If the boundary line is smaller than the threshold value, determining that the current boundary line is the target boundary line; in other embodiments, a predetermined number of second points are spaced from the first point by less than a threshold, and the current boundary line is determined to be the target boundary line, e.g., a critical ratio (or a specified critical value) exists, as long as Δ d is greater than the predetermined number
i If the threshold is less than the threshold, islanding is determined, for example, if the critical ratio is 100% (or the critical value is 30), all Δ d are required
i When all are smaller than the threshold value, the islanding is determined. In other embodiments, an average of sums of distances between the plurality of second points and the first point is smaller than a threshold, and the current boundary line is determined as the target boundary line, that is, the average
And if the current is less than the threshold value, determining the island is judged. Distance calculated by the two misjudgment avoiding modesWhen the distance is less than the threshold value, the control of the mower is the same as the scheme, and the detailed description is omitted.
Referring to fig. 8, a specific process of calculating the distance Δ d between the first point and the second point in step S4 is shown, wherein the second point P is calculated in step S41i+1 The parameters of (2) can adopt different calculation modes according to the judgment result of the wheel speed difference. Specifically, step S41 includes: s411, calculating the first point Pi To a second point Pi+1 Wheel speed difference, angular velocity, mass center linear velocity and track radius; s412, judging whether the wheel speed difference is equal to zero or not; s413, when the wheel speed difference is equal to zero, using a first point Pi Is calculated as a second point Pi+1 The parameters of (a); s414, calculating the wheel speed difference not equal to zero from the first point Pi To a second point Pi+1 Angular velocity, linear velocity of mass center, track radius; s415, according to the first point Pi Is calculated as a reference circle center Oi The parameters of (a); s416, according to the reference circle center Oi Is calculated as a second point Pi+1 The parameter (c) of (c).
The calculation of the second point P will be explained in detail belowi+1 And a first point Pi The distance between Δ d.
It is known that: from a first point P
i Travels to a second point P
i+1 Has a time interval of Δ t
i (ii) a The mower is in the first point P
i Travels to a second point P
i+1 In the process, the linear velocity of the left wheel is
The right wheel linear velocity is
The width between the left driving wheel and the right driving wheel of the mower is W
car These can be considered as walking parameters of the mower,
if it is
I.e. the track of the mower is not a straight line, then:
linear speed of grass cutter barycenter (midpoint of left and right wheel connecting line)
Angular velocity of mower
Radius of track
Track direction parameter
Knowing the first point P
i Parameter (d) of
Wherein
In order to know the parameters of the x-direction of the point,
for the known y-direction parameter of the point, θ
i The point angle parameter is known.
By knowing the first point P
i Calculating a reference center point O
i Parameter (d) of
Wherein
For reference to the x-direction parameter of the center point,
to reference the y-direction parameter of the center point,
is a reference center point angle parameter. Then:
by reference to the centre point O
i Calculating a second point P
i+1 Parameter (d) of
Then:
if it is
Namely, the track of the robot is a straight line, then:
according to the calculated second point P
i+1 Parameter (d) of
It is possible to obtain:
according to the calculation mode, whether the current boundary line is the island boundary line can be quickly determined, and the algorithm can be used no matter the island boundary line is in any shape, so that the requirements of different users are met, the setting operation is convenient, the occupied memory is small, and the processing speed is higher.
Based on the foregoing method, the present invention further provides a self-moving robot system, including a self-moving robot and a boundary line defining a working area, where the self-moving robot is a lawn mower in this embodiment, and has a walking module for driving the lawn mower to walk and turn in the working area, and a control module connected to the walking module, where the walking module includes a driving wheel moving within a range defined by the boundary line, and the control module is configured to control the walking module to enable the self-moving robot to walk, and the control module includes:
the inspection unit is used for controlling the self-moving robot to reach the boundary line and adjusting the self-moving robot to the pose of walking along the boundary line, repeatedly executing control on the self-moving robot to walk along the boundary line and recording the current position as a first point when preset conditions are reached until the number of times of reaching the preset conditions reaches the preset value, and recording the current position as a second point;
a timing unit for timing the mower from a first point to a second point;
the calculating unit is used for calculating parameters of a second point according to the parameters of the first point and the walking parameters of the self-moving robot, and calculating the distance between the first point and the second point reaching preset conditions at least once based on the parameters of the first point and the parameters of the second point;
and the pushing unit is used for controlling whether the mower leaves the current boundary line or not according to whether the calculated distance is smaller than the threshold value or not.
When the mower is in a low power state and needs to go home, if the calculated distance is smaller than the threshold value, the mower is controlled to leave the current boundary line, the mower can rotate on site by a preset angle and then linearly move forward to leave the current boundary line until the other part of the boundary line is reached, so that the mower can be identified to be in an island boundary line as soon as possible, too long time does not need to be consumed, and the electric quantity is saved.
When the mower is in a working mode, if the calculated distance is smaller than the threshold value, the current boundary line is an island boundary line, and the mower walks for a circle along the island boundary line and executes a working task, such as mowing. And if the current boundary line is the peripheral boundary line, the self-moving robot walks for a circle along the peripheral boundary line and simultaneously executes the work task. When the grass cutter is in a boundary line working mode, grass on the island boundary can be cut, and excessive grass cutting on the island boundary is avoided.
The distance between the first point and the second point is calculated, and the walking of the mower is controlled according to the comparison result of the calculated distance and the threshold value, so that the mower is prevented from walking along an island boundary line in a circulating mode, and the automatic work of the mower is ensured to be more reliable.
Referring to fig. 9, another control method of the lawn mower can also realize the quick identification of the working area when the lawn mower travels. In this embodiment, the method for identifying the working area of the lawn mower includes the following steps:
s1', the mower walks to the boundary line and adjusts the posture of walking along the boundary line;
s2', walking along the boundary line, and recording the current position point as a first point when a preset condition is met;
s3', repeatedly executing the step S2' until the times of reaching the preset condition reach a preset value, and recording the current position point as a second point;
s4', calculating the distance between the first point and the second point which reach the preset condition at least once;
and S5', determining whether the current boundary line is the target boundary line according to whether the calculated distance is smaller than the threshold value.
The steps are used for the mower to execute the border mode, whether the current walking boundary line is the target boundary line or not can be judged quickly and accurately, the target boundary line is the island boundary line in the embodiment, and therefore the situation that the mower walks along the island boundary line all the time is avoided.
To facilitate the calculation of the distance between the first point and the second point, the timing may be interrupted when the current position point is recorded as the first point and the timing is started, and the second point is recorded in step S3'. Similarly, if the calculated distance is greater than or equal to the threshold, repeating the steps S2 'to S5', and in the process of repeating the steps S2 'to S5', if the mower detects a preset event, triggering an interrupt, and skipping the cycle of the steps S2 'to S5'. The preset event may be the same as the preset event in the control method of the first lawn mower, or may be another event.
In the above steps S3 'and S4', the number of times that the mower reaches the preset condition reaches the preset value is recorded as the first point each time the current position point reaches the preset condition, a plurality of first points are obtained, and the distance between each first point and the second point is calculated. In this embodiment, the preset value k may be set to 30, that is, the lawn mower needs to recordThe 30 first points and the second point are the 31 st recorded points. In the present embodiment, it is preferable to calculate the distance { Δ d } between each first point and the second point separately1 ,Δd2 ,...,Δdk In step S5', the { Δ d } values are compared1 ,Δd2 ,...,Δdk Determining whether the current boundary is an island boundary line or not according to the relation between the current boundary and a threshold; if yes, leaving the current boundary line; if not, returning to execute S2'.
In the actual control process, any delta d is only needed
i And if the current is less than the threshold value, determining the island is judged. In other aspects, it may be that the distance between a predetermined number of first points and second points is less than the threshold, i.e., there is a critical ratio (or specified critical value) as long as Δ d is greater than the number
i If the threshold is less than the threshold, islanding is determined, for example, if the critical ratio is 100% (or the critical value is 30), all Δ d are required
i When all are smaller than the threshold value, the islanding is determined. In other embodiments, the average value
And if the sum of the distances between the first points and the second points is smaller than the threshold value, the island is judged.
In the above control method, if the calculated distance is greater than the threshold value, the control is the same as the control method of the first mower, the predetermined condition may be a predetermined time interval, or the wheel speeds of the driving wheels on both sides of the mower are different. Further, the specific method of adjusting the posture of walking along the boundary line may refer to the control method of the first lawnmower. In addition, the calculation of the distance between the first point and the second point may also refer to the calculation step in the first lawn mower control method, and will not be described herein again.
The embodiment also relates to a mower system, which comprises a mower and a boundary line defining a working area, wherein the mower is provided with a walking module for driving the mower and a control module connected with the walking module, the walking module comprises a driving wheel moving in a range limited by the boundary line, the control module is used for controlling the walking module to enable the mower to walk, and the control module comprises: the inspection unit is used for controlling the self-moving robot to reach the boundary line and adjusting the self-moving robot to a pose of walking along the boundary line, then controlling the self-moving robot to walk along the boundary line, recording a current position point reaching a preset condition within preset times as a first point, and recording the current position point as a second point when the times of reaching the preset condition are greater than a preset value; the calculating unit is used for calculating parameters of a second point according to the parameters of the first point reaching a preset condition at least once and the walking parameters of the self-moving robot, and calculating the distance between the first point and the second point based on the parameters of the first point and the parameters of the second point; and the pushing unit is used for controlling whether the self-moving robot leaves the current boundary line or not according to whether the calculated distance is smaller than a threshold value or not.
The control module further comprises a timing unit for timing the mower from the first point to the second point.
According to the control method and the mower system, the distance between the at least one first point and the second point is calculated, and the mower is controlled to walk according to the comparison result of the calculated distance and the threshold value, so that the mower is prevented from walking along an island boundary line in a circulating mode, and the mower is ensured to work more reliably automatically.
It should be understood that although the present description refers to embodiments, not every embodiment contains only a single technical solution, and such description is for clarity only, and those skilled in the art should make the description as a whole, and the technical solutions in the embodiments can also be combined appropriately to form other embodiments understood by those skilled in the art.
The above-listed detailed description is merely a detailed description of possible embodiments of the present invention, and it is not intended to limit the scope of the invention, and equivalent embodiments or modifications made without departing from the technical spirit of the present invention are intended to be included within the scope of the present invention.