Summary of the invention
The objective of the invention is in order to overcome weak point of the prior art, judge local narrow and small zone according to the length of cleaning path distance, and calculate the outlet orientation, with shortest path above water, avoid reducing whole sweeping efficiency at the regional area repeated work.
The technical solution adopted for the present invention to solve the technical problems is:
Automatic cleaner predicament identification and the method broken away from, described automatic cleaner comprises two driving wheels, two drive motors that are connected with described driving wheel, on described driving wheel, encoder is installed, 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, with controller, be connected, the freely-movable that the speed of described controller by two described driving wheels are set respectively and direction realize described automatic cleaner, and can calculate relative movement distance and detect the place ahead barrier situation, described controller arranges predicament identification and breaks away from algorithm, described predicament identification and disengaging algorithm comprise the following steps:
(1), described automatic cleaner starts working, record start point P
icoordinate (X
i, Y
i), then with rectilinear motion mode, advance, and constantly detect barrier; After barrier being detected, record end point P
jcoordinate (X
j, Y
j);
(2), according to described starting point P
iwith end point P
jcoordinate calculate displacement S, if described displacement S is less than predefined threshold value D, i.e. S<D, counter C adds 1, and by described end point P
jcoordinate (X
j, Y
j) added up, i.e. aggregate-value ∑ X=∑ X+X
j, aggregate-value ∑ Y=∑ Y+Y
j; Otherwise counter C is set to zero, aggregate-value ∑ X and aggregate-value ∑ Y zero clearing, and by 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
i; Described threshold value D sets the area size of predicament;
(3) if, the described counter C of judgement is less than predefined threshold k, returns to step (1); Otherwise judge that described automatic cleaner enters 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
cdetermine straight line L; Calculate end point P
jposition relationship with straight line L: as end point P
jbe positioned at the top of straight line L,
execution step (6), as end point P
jbe positioned at the below of straight line L,
execution step (7);
(6), as external point P
ocoordinate X
obe greater than end point P
jcoordinate X
jthe time, execution step (8); As external point P
ocoordinate X
obe less than end point P
jcoordinate X
jthe time, execution step (9);
(7), as external point P
ocoordinate X
obe greater than end point P
jcoordinate X
jthe time, execution step (9); As external point P
ocoordinate X
obe less than end point P
jcoordinate X
jthe time, execution step (8);
(8), described automatic cleaner flicker 90 degree, then with revolver speed V
lbe less than the right speed V that takes turns
rmode advance, after running into barrier, repeat this step; Record t running time, when described running time, t is greater than predefined threshold value T simultaneously, finishes and returns to step (1), and described threshold value T sets described automatic cleaner needed time above water;
(9), described automatic cleaner flicker 90 degree, then with revolver speed V
lbe greater than the right speed V that takes turns
rmode advance, after running into barrier, repeat this step; Record t running time, when described running time, t is greater than predefined threshold value T simultaneously, finishes and returns to step (1).
In described step (2), described displacement S equals
Implementing good effect of the present invention is: 1, the predicament in the narrow and small zone of automatic decision; 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
Now the invention will be further described by reference to the accompanying drawings:
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 the speed of described controller by two described driving wheels 1 are set respectively and direction realize described automatic cleaner, and, according to the signal of described encoder output, can determine the relative movement distance of described automatic cleaner.
Also comprise obstacle detection system, be connected with described controller equally.Described obstacle detection system can adopt the set of the sensors such as ultrasonic wave, infrared or impingement plate or two kinds or more of 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 High Rotation Speed under the control of described controller, form certain vacuum, the dust box ground rubbish absorbed by described suction inlet 4.
Described automatic cleaner in the process of walking, has carried out cleaning simultaneously, so walking path has determined the height of sweeping efficiency to the coverage rate on ground.But in complicated home environment, often have some areas little, enter young, the zone that Yi Jinnan goes out, once described automatic cleaner enters such predicament, will be therein long-time repeated work, reduce overall sweeping efficiency greatly.
Therefore, predicament identification is set in described controller and breaks away from algorithm, described predicament identification and disengaging algorithm comprise the following steps:
(1), described automatic cleaner starts working, record start point P
icoordinate (X
i, Y
i), then with rectilinear motion mode, advance, and constantly detect barrier; After barrier being detected, record end point P
jcoordinate (X
j, Y
j);
(2), according to described starting point P
iwith end point P
jcoordinate calculate displacement S, if described displacement S is less than predefined threshold value D, i.e. S<D, counter C adds 1, and by described end point P
jcoordinate (X
j, Y
j) added up, i.e. aggregate-value ∑ X=∑ X+X
j, aggregate-value ∑ Y=∑ Y+Y
j; Otherwise counter C is set to zero, aggregate-value ∑ X and aggregate-value ∑ Y zero clearing, and by 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
i; Described 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 predefined threshold k, returns to step (1); Otherwise judge that described automatic cleaner enters 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
cdetermine straight line L; Calculate end point P
jposition relationship with straight line L: as end point P
jbe positioned at the top of straight line L,
execution step (6), as end point P
jbe positioned at the below of straight line L,
execution step (7);
(6), as external point P
ocoordinate X
obe greater than end point P
jcoordinate X
jthe time, execution step (8); As external point P
ocoordinate X
obe less than end point P
jcoordinate X
jthe time, execution step (9);
(7), as external point P
ocoordinate X
obe greater than end point P
jcoordinate X
jthe time, execution step (9); As external point P
ocoordinate X
obe less than end point P
jcoordinate X
jthe time, execution step (8);
(8), described automatic cleaner flicker 90 degree, then with revolver speed V
lbe less than the right speed V that takes turns
rmode advance, after running into barrier, repeat this step; Record t running time, when described running time, t is greater than predefined threshold value T simultaneously, finishes and returns to step (1);
(9), described automatic cleaner flicker 90 degree, then with revolver speed V
lbe greater than the right speed V that takes turns
rmode advance, after running into barrier, repeat this step; Record t running time, when described running time, t is greater than predefined threshold value T simultaneously, finishes and returns to 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 skidding, the reason such as the error of calculation, have cumulative errors, but within a short period of time, and its locator data provided 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 dilemma zone size, if be less than calculator C is added to 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, added up, calculate aggregate-value ∑ X=∑ X+X
j, aggregate-value ∑ Y=∑ Y+Y
j, can be for calculating the geometric parameter of predicament after adding up; Otherwise, think that current automatic cleaner is working properly, by 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 is greater than predefined threshold k, that is to say that automatic cleaner cleaning path repeatedly all is less than threshold value D, judges that automatic cleaner has entered narrow and small predicament, is then processed for such environment.
In step (4), the aggregate-value ∑ X obtained according to step (2) and aggregate-value ∑ Y calculate the geometric center P of predicament
c, can from which direction, be broken away from for instructing automatic cleaner like this.
In order to obtain shortest path or optimal path above water, need to determine current point, namely clean for the last time the end point P in path
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
jcoordinate along the subpoint of X-axis on straight line L is
then obtain end point P
jupper and lower position relation with straight line L; Next, determine again end point P in step (6,7)
jwith external point P
oleft and right relation, thereby determining that automatic cleaner is kept right or kept left from current location is broken away from along barrier, thereby obtain a nearest path.
In step (7,8), a kind of path of circular arc walking has been described, as the curve 5 in Fig. 2.If adopt the mode of being close to barrier to walk, can spend the much time in the place of tiny water caltrop, thereby lower efficiency; If directly walk from predicament breach direction with linear fashion, can, because the deviation of directivity, from can not directly breaking away from from breach, again gets into a difficult position and recalculates disengaging, so also reduce efficiency.Therefore, step (7,8) even the circular arc walking path be not that single is nearest, be also the nearest path on the average meaning repeatedly broken away from basis.
In sum, automatic cleaner judges local narrow and small zone according to the length of cleaning path distance, and calculates the outlet orientation, with shortest path above water, therefore avoid reducing whole sweeping efficiency at the regional area repeated work, there are the characteristics of intelligent, high efficiency and practicality.