Summary of the invention
The objective of the invention is in order to overcome weak point of the prior art; Length according to the cleaning path distance is judged local narrow and small zone; And calculate the outlet orientation, with shortest path above water, avoid repeating work and reducing whole sweeping efficiency at regional area.
The technical solution adopted for the present invention to solve the technical problems is:
Automatic cleaner predicament identification and the method that breaks away from; Two drive motors that described automatic cleaner comprises two driving wheels, is connected with said driving wheel are installed encoder on the described driving wheel, also comprise a support wheel; Obstacle detection system; Vacuum cleaning motor and bar shaped suction inlet, described drive motors, encoder, obstacle detection system and vacuum cleaning motor are connected with controller; The freely-movable that speed and the direction of described controller through two described driving wheels are set respectively realizes described automatic cleaner; And can calculate relative movement distance and detect the place ahead barrier situation, described controller is provided with predicament identification and breaks away from algorithm, and described predicament is discerned and broken away from algorithm and may further comprise the steps:
(1), described automatic cleaner is started working record start point P
iCoordinate (X
i, Y
i), advance with rectilinear motion mode then, and constantly detect barrier; Detect after the barrier record end point P
jCoordinate (X
j, Y
j);
(2), according to described starting point P
iWith end point P
jCoordinate Calculation displacement S, if described displacement S less than pre-set threshold D, i.e. S<D, then counter C adds 1, and with described end point P
jCoordinate (X
j, Y
j) add up i.e. aggregate-value ∑ X=∑ X+X
j, aggregate-value ∑ Y=∑ Y+Y
jOtherwise counter C is changed to zero, aggregate-value ∑ X and aggregate-value ∑ Y zero clearing, and with the starting point P of step (1)
iCoordinate (X
i, Y
i) save as external point P
o(X
o, Y
o), i.e. X
o=X
i, Y
o=Y
iDescribed threshold value D sets the area size of predicament;
(3) if, the described counter C of judgement is less than preset threshold value K, then returns step (1); Otherwise judge that described automatic cleaner gets into predicament, continue to carry out following steps; Described threshold k is set described automatic cleaner and is confirmed predicament short walk number of times before;
(4), according to aggregate-value ∑ X and aggregate-value ∑ Y, center, zoning
(5), through external point P
oWith regional center P
cConfirm straight line L; Calculate end point P
jPosition relation with straight line L: as end point P
jBe positioned at the top of straight line L, promptly
Execution in step (6) is as end point P
jBe positioned at the below of straight line L, promptly
Execution in step (7);
(6), as external point P
oCoordinate X
oGreater than end point P
jCoordinate X
jThe time, execution in step (8); As external point P
oCoordinate X
oLess than end point P
jCoordinate X
jThe time, execution in step (9);
(7), as external point P
oCoordinate X
oGreater than end point P
jCoordinate X
jThe time, execution in step (9); As external point P
oCoordinate X
oLess than end point P
jCoordinate X
jThe time, execution in step (8);
(8), described automatic cleaner flicker 90 degree, then with revolver speed V
LLess than right side wheel speed V
RMode advance, run into after the barrier, repeat this step; Write down t running time simultaneously, when described running time t greater than pre-set threshold T, finish and return step (1), described threshold value T sets described automatic cleaner needed time above water;
(9), described automatic cleaner flicker 90 degree, then with revolver speed V
LGreater than right side wheel speed V
RMode advance, run into after the barrier, repeat this step; Write down t running time simultaneously, when described running time t greater than pre-set threshold T, finish and return step (1).
In described step (2), described displacement S equals
The good effect of embodiment of the present invention is: 1, judge the predicament in narrow and small zone automatically; 2, can calculate the general orientation of predicament outlet, adopt shortest path to break away from; 3, adopt reliable mode to break away from, success rate is high.
The specific embodiment
Combine accompanying drawing that the present invention is described further at present:
With reference to Fig. 1, described automatic cleaner comprises two driving wheels 1, two drive motors 2 that are connected with described driving wheel 1, on each driving wheel 1 encoder is installed, a support wheel 3, and wherein, described drive motors 2 is connected with controller with encoder.Described support wheel 3 plays the effect of support, is not used in driving.The freely-movable that speed and the direction of described controller through two described driving wheels 1 are set respectively realizes described automatic cleaner, and, can confirm the relative movement distance of described automatic cleaner according to the signal of described encoder output.
Also comprise obstacle detection system, be connected with described controller equally.Described obstacle detection system can adopt the set of sensor such as ultrasonic wave, infrared or impingement plate or two kinds or multiple sensors.
Also comprise, vacuum cleaning motor and bar shaped suction inlet 4, described vacuum cleaning motor is connected with described controller.Described vacuum cleaning motor is at a high speed rotation under the control of described controller, forms certain vacuum, the dust box that ground rubbish is absorbed through described suction inlet 4.
Said automatic cleaner has carried out cleaning in the process of walking simultaneously, so walking path has determined the height of sweeping efficiency to the coverage rate on ground.But in the home environment of complicacy, it is little often to have some areas, goes into youngly, and work in case described automatic cleaner gets into such predicament, will be repeated therein for a long time in the zone that Yi Jinnan goes out, and reduces overall sweeping efficiency greatly.
Therefore, predicament identification is set in the described controller and breaks away from algorithm, described predicament identification and disengaging algorithm may further comprise the steps:
(1), described automatic cleaner is started working record start point P
iCoordinate (X
i, Y
i), advance with rectilinear motion mode then, and constantly detect barrier; Detect after the barrier record end point P
jCoordinate (X
j, Y
j);
(2), according to described starting point P
iWith end point P
jCoordinate Calculation displacement S, if described displacement S less than pre-set threshold D, i.e. S<D, then counter C adds 1, and with described end point P
jCoordinate (X
j, Y
j) add up i.e. aggregate-value ∑ X=∑ X+X
j, aggregate-value ∑ Y=∑ Y+Y
jOtherwise counter C is changed to zero, aggregate-value ∑ X and aggregate-value ∑ Y zero clearing, and with the starting point P of step (1)
iCoordinate (X
i, Y
i) save as external point P
o(X
o, Y
o), i.e. X
o=X
i, Y
o=Y
iDescribed threshold value D sets the area size of predicament.Wherein, described displacement S equals
(3) if, the described counter C of judgement is less than preset threshold value K, then returns step (1); Otherwise judge that described automatic cleaner gets into predicament, continue to carry out following steps; Described threshold k is set described automatic cleaner and is confirmed predicament short walk number of times before;
(4), according to aggregate-value ∑ X and aggregate-value ∑ Y, center, zoning
(5), through external point P
oWith regional center P
cConfirm straight line L; Calculate end point P
jPosition relation with straight line L: as end point P
jBe positioned at the top of straight line L, promptly
Execution in step (6) is as end point P
jBe positioned at the below of straight line L, promptly
Execution in step (7);
(6), as external point P
oCoordinate X
oGreater than end point P
jCoordinate X
jThe time, execution in step (8); As external point P
oCoordinate X
oLess than end point P
jCoordinate X
jThe time, execution in step (9);
(7), as external point P
oCoordinate X
oGreater than end point P
jCoordinate X
jThe time, execution in step (9); As external point P
oCoordinate X
oLess than end point P
jCoordinate X
jThe time, execution in step (8);
(8), described automatic cleaner flicker 90 degree, then with revolver speed V
LLess than right side wheel speed V
RMode advance, run into after the barrier, repeat this step; Write down t running time simultaneously, when described running time t greater than pre-set threshold T, finish and return step (1);
(9), described automatic cleaner flicker 90 degree, then with revolver speed V
LGreater than right side wheel speed V
RMode advance, run into after the barrier, repeat this step; Write down t running time simultaneously, when described running time t greater than pre-set threshold T, finish and return step (1); Described threshold value T sets described automatic cleaner needed time above water.
In step (1), starting point P
iWith end point P
jCoordinate to be described controller calculate gained according to the pulse signal of described encoder output.This localization method, owing to skid, reason such as the error of calculation, have cumulative errors, but within a short period of time, its locator data that provides has use value.
In step (2), the starting point P in one section cleaning path
iWith end point P
jJust can calculate the length in this section cleaning path: displacement
And compare with the threshold value D that characterizes the predicament area size, if less than calculator C would be added 1, stored count is in order to leach some accidentalia, to avoid false judgment, so end point P
jJust temporarily confirm as the internal point of predicament, add up, calculate aggregate-value ∑ X=∑ X+X
j, aggregate-value ∑ Y=∑ Y+Y
j, can be used to calculate the geometric parameter of predicament after adding up; Otherwise, think that current automatic cleaner is in proper working order, with the starting point P in this section cleaning path
iCoordinate save as external point P
o(X
o, Y
o).
In step (3); Carried out the predicament judgement: when counter C greater than preset threshold value K; That is to say that automatic cleaner cleaning path repeatedly all less than threshold value D, judges that then automatic cleaner has got into narrow and small predicament, handle to such environment then.
In step (4), the aggregate-value ∑ X and the aggregate-value ∑ Y that obtain according to step (2) calculate the geometric center P of predicament
c, can be used to like this instruct automatic cleaner to break away from from which direction.
In order to obtain shortest path or optimal path above water, need to confirm current point, just clean the end point P in path for the last time
jWith external point P
oWith regional center P
cRelative position relation.At first, in step (5), external point P
oWith regional center P
c2 definite straight line L, according to the principle of 2 definite straight lines,
Can try to achieve P
jThe coordinate of the subpoint of X axle does in straight line L upper edge
Obtain end point P then
jUpper and lower position relation with straight line L; Next, in step (6,7), confirm end point P again
jWith external point P
oLeft and right relation, thereby confirm automatic cleaner from current location be keep right, still keeping left breaks away from along barrier, thereby obtain a nearest path.
In step (7,8), a kind of path of circular arc walking has been described, like the curve among Fig. 25.If adopt the mode of being close to barrier to walk, can spend many times in the place of tiny water caltrop, thereby lower efficiency; If directly walk from predicament breach direction, can so also reduce efficient because the deviation of directivity from can not directly breaking away from from breach, gets into a difficult position once more and recomputates disengaging with linear fashion.Therefore, step (7,8) even the circular arc walking path be not that single is nearest, also be the nearest path on the average meaning that repeatedly breaks away from the basis.
In sum; Automatic cleaner is judged local narrow and small zone according to the length of cleaning path distance, and calculates the outlet orientation, with shortest path above water; Avoid repeating work and reducing whole sweeping efficiency, therefore have the characteristics of intelligent, high efficiency and practicality at regional area.