A kind of automatic dust absorption machine people's optimum path planning method based on historical data analysis
Technical field
Automatic dust absorption machine people's optimum path planning method based on historical data analysis that the present invention relates to a kind of, belongs to intelligence
It can household appliance control technology field.
Background technology
It with people's the accelerating rhythm of life, and requires life content more and more abundant, intelligent appliance is promoted to come into
Our life.Wherein, automatic dust absorption machine people has given us prodigious help.The cleaning of family is very heavy, and
Very frequently.Automatic dust absorption machine people can clean Domestic floor automatically.It utilizes self-contained rechargeable battery
To various electric power supplies, wherein dust sucting motor forms enough vacuum inside automatic dust absorption machine people, will by bar shaped suction inlet
Dust box inside the rubbish sucking on ground, and the free walker of automatic dust absorption machine people may be implemented in driving motor and driving wheel
It walks.Automatic dust absorption machine people is achieved that the cleaning to ground by the walking process of itself.
Because current automatic dust absorption machine people does not have point-device positioning and planning ability also, therefore it cleans path
Efficiency just become project very urgently to be resolved hurrily.Currently used strategy is random path, and automatic dust absorption machine people is on ground
Face random walk, abandons any planing method, and this strategy leads to very low sweeping efficiency.In order to carry out speed control, automatically
Dust-collecting robot all carries encoder on driving motor, relative movement distance and rotation angle can be calculated, to realize position
Calculating is set, calculates error although existing, the factors such as mechanical clearance and skidding lead to cumulative errors, in limited time range
Interior, location data also has and has certain utility value.So from the position data that recent automatic dust absorption machine people records,
It is that can analyze the case where cleaning path, to provide foundation for next optimal cleaning path planning.
Invention content
Place that purpose of the invention is to overcome the shortcomings in the prior art, using the analysis to historical position data,
The direction that most probable is not cleaned is obtained, to obtain optimal cleaning path, while not increasing any hardware cost.
The technical solution adopted by the present invention to solve the technical problems is:
A kind of automatic dust absorption machine people's optimum path planning method based on historical data analysis, the automatic dust absorption machine people
Including two driving wheels, two driving motors being connect with the driving wheel, encoder is installed on the driving motor, is also wrapped
A support wheel is included, with mounted on the obstacle detector of the automatic dust absorption machine people front, the driving motor,
Encoder and obstacle detector are connect with controller, and the controller is by being respectively set the driving wheel described in two
The free movement of the automatic dust absorption machine people is realized in speed and direction, and can be with according to the signal of the encoder
The relative movement distance and direction of rotation for calculating the automatic dust absorption machine people can be calculated using initial position as coordinate origin
The coordinate of current location(X, y), optimum path planning method, the optimum path planning side is arranged in the controller inside
Method includes the following steps:
(1), setting data link table L0={Pi(xi,yi), wherein i=0,1,2......N-1, xiAnd yiFor coordinate value, N is data
Chained list L0Length, data link table L0The coordinate of stop position after barrier is detected for the automatic dust absorption machine people described in the recent period
Data;
(2), the automatic dust absorption machine people is advanced with rectilinear motion mode, and constantly detects barrier;Hinder when detecting
When hindering object, the automatic dust absorption machine people stops, and records the coordinate of current location(X, y), deposit data link table L0, then
Enter step 3;
(3), data link table L is sought0Central point O (xo, yo), data link table L is extracted centered on central point O0In contour line
Section Sj(m, n), and it is stored in data link table L1, wherein m=0,1,2......N-1, n=0,1,2......N-1, j=0,1,
And M 2......M-1,<N, the profile line segment Sj(m, n) represents data link table L0In point Pm(xm,ym) and Pn(xn,yn)
The line segment of composition;
(4), central point O and data link table L1In profile line segment Sj(m, n) forms Delta Region, calculates OPmDeflection θ1=, OPnDeflection θ2=And data link table L0In point Pi(xi,yi) in
The deflection θ that heart point O is formed3=If for data link table L0In all point Pi(xi,yi),SimultaneouslyIt all sets up, is then pointed out without any in the Delta Region
It is existing, show profile line segment SjThe corresponding direction (m, n) do not have it is swept, then in data link table L1Retain profile line segment Sj(m,
n);On the contrary, then in data link table L1Delete profile line segment Sj(m,n);
(5), data link table L is calculated1In profile line segment SjThe length W of (m, n)j=,
Comparative silhouette line segment SjThe length W of (m, n)jSize, take the maximum profile line segment S of lengthmax(m, n), profile line segment Smax(m,
N) direction angle alpha of opposite central point O=;It is following that the automatic dust absorption machine person, which selects direction angle alpha,
Cleaning direction.
In step 2, the coordinate of current location(X, y)It is stored in data link table L0, in accordance with the following steps:
Enable Pi(xi,yi)=Pi-1(xi-1,yi-1), i=1,2,3.....N-1;
Then P0(x0,y0)=(x, y), complete chain table handling.
In step 3, data link table L0Central point O (xo, yo) Coordinate calculation method be:
Search for data link table L0The maximin of middle coordinate data:xmax, xmin, ymax, ymin;
Calculate xo=, yo=。
In step 3, the profile line segment S in data link table L0 is extracted centered on central point Oj(m, n), using following step
Suddenly:
Calculate data link table L0In point Pi(xi,yi) and central point O (xo, yo) distance Di=
, ask apart from maximum point PM(xM,yM);
With PM(xM,yM) it is vertex, calculate data link table L0In point Pi(xi,yi) and central point O (xo, yo) formed angle beta=, it is profile point to take the maximum point of angle beta, is denoted as PN(xN,yN), therefore formed
Data S0(M, N), and it is stored in data link table L1;
Again with PN(xN,yN) it is vertex, continuous hunting profile point, and be stored in data link table L1, until reentry point PM(xM,yM), knot
Beam returns.
Implementing the positive effect of the present invention is:1, optimal cleaning path is selected, sweeping efficiency is improved;2, working method can
It leans on, it is easy to accomplish, do not increase system cost.
Description of the drawings
Fig. 1 is the structural schematic diagram of automatic dust absorption machine people;
Fig. 2 is optimum path planning method one;
Fig. 3 is optimum path planning method two;
Fig. 4 is optimum path planning method three.
Specific implementation mode
In conjunction with attached drawing, the invention will be further described:
Referring to Fig.1, a kind of stochastic path planning method of automatic dust absorption machine people, the automatic dust absorption machine people include two
Driving wheel 1, two driving motors 2 being connect with the driving wheel 1 install encoder on the driving motor 2, further include one
A support wheel 3, the support wheel 3 play the role of support, are not used in driving.Wherein, the driving motor 2 and encoder with
Controller connects.The controller realized by the way that speed and the direction of the driving wheel 1 described in two is respectively set it is described from
The free movement of dynamic dust-collecting robot, and the automatic dust absorption machine people can be calculated according to the signal of the encoder
Relative movement distance and direction of rotation can calculate the coordinate of current location using initial position as coordinate origin(X, y).Due to
Mechanical clearance calculates the factors such as error and ground skidding, coordinate(X, y)There can be cumulative errors, that is to say, that with the time
Passage, error can be increasing, but within a period of time, coordinate(X, y)Or there is utility value.
Further include the obstacle detector mounted on the automatic dust absorption machine people front, equally with the controller
Connection.The obstacle detector may be used the sensors such as ultrasonic wave, infrared or laser radar or two kinds or
The set of person's multiple sensors.
The automatic dust absorption machine people in the process of walking, has been carried out at the same time cleaning, therefore the selection of walking path
The height for directly determining cleaning efficiency, is in very important status.
Optimum path planning method is set inside the controller, and the optimum path planning method includes following step
Suddenly:
(1), setting data link table L0={Pi(xi,yi), wherein i=0,1,2......N-1, xiAnd yiFor coordinate value, N is data
Chained list L0Length, data link table L0The coordinate of stop position after barrier is detected for the automatic dust absorption machine people described in the recent period
Data;
Data link table L0Length N should not be too large, otherwise error cause greatly very much plan effect be deteriorated.
(2), the automatic dust absorption machine people is advanced with rectilinear motion mode, and constantly detects barrier;Work as detection
When to barrier, the automatic dust absorption machine people stops, and records the coordinate of current location(X, y), deposit data link table L0,
Subsequently into step 3;
In step 2, the coordinate of current location(X, y)It is stored in data link table L0, in accordance with the following steps:
Enable Pi(xi,yi)=Pi-1(xi-1,yi-1), i=1,2,3.....N-1;
Then P0(x0,y0)=(x, y), complete chain table handling.
(3), data link table L is sought0Central point O (xo, yo), data link table L is extracted centered on central point O0In wheel
Profile section Sj(m, n), and it is stored in data link table L1, wherein m=0,1,2......N-1, n=0,1,2......N-1, j=0,1,
And M 2......M-1,<N, the profile line segment Sj(m, n) represents data link table L0In point Pm(xm,ym) and Pn(xn,yn)
The line segment of composition;
In step 3, data link table L0Central point O (xo, yo) Coordinate calculation method be:
Search for data link table L0The maximin of middle coordinate data:xmax, xmin, ymax, ymin;
Calculate xo=, yo=。
With reference to Fig. 2-3, in step 3, the profile line segment S in data link table L0 is extracted centered on central point Oj(m, n),
Using following steps:
Calculate data link table L0In point Pi(xi,yi) and central point O (xo, yo) distance Di=
, ask apart from maximum point PM(xM,yM);
With PM(xM,yM) it is vertex, calculate data link table L0In point Pi(xi,yi) and central point O (xo, yo) formed angle beta=, it is profile point to take the maximum point of angle beta, is denoted as PN(xN,yN), therefore formed
Data S0(M, N), and it is stored in data link table L1;
Again with PN(xN,yN) it is vertex, continuous hunting profile point, and be stored in data link table L1, until reentry point PM(xM,yM), knot
Beam returns.
(4), central point O and data link table L1In profile line segment Sj(m, n) forms Delta Region, calculates OPmDeflection θ1
=, OPnDeflection θ2=And data link table L0In point Pi(xi,yi) in
The deflection θ that heart point O is formed3=If for data link table L0In all point Pi(xi,yi),SimultaneouslyIt all sets up, then occurs without any point in the Delta Region, show
Profile line segment SjThe corresponding direction (m, n) do not have it is swept, then in data link table L1Retain profile line segment Sj(m,n);On the contrary,
Then in data link table L1Delete profile line segment Sj(m,n);
Referring again to Fig. 3, for data link table L0In all the points Pi(xi,yi) all meet conditionSimultaneously, then illustrate PiPositioned at triangle OPmPnExcept, profile line segment Sj(m, n) is with respect to central point O
One direction not cleaned.
(5), data link table L is calculated1In profile line segment SjThe length W of (m, n)j=,
Comparative silhouette line segment SjThe length W of (m, n)jSize, take the maximum profile line segment S of lengthmax(m, n), profile line segment Smax(m,
N) direction angle alpha of opposite central point O=;It is next that the automatic dust absorption machine person, which selects direction angle alpha,
Clean direction.
With reference to Fig. 4, in all directions not cleaned, the maximum direction of angle is chosen.
In conclusion automatic dust absorption machine people by the analysis to historical data, selects non-purging zone as connecing a step
Cleaning direction reduce path to increase the probability into non-purging zone and repeat, should to effectively improve sweeping efficiency
Scheme need not increase any hardware cost, and flexible working mode and it is reliable, it is easy to accomplish.Meanwhile the program is equally suitable
The path planning of cradle is found together in automatic dust absorption machine people.