The barrier-avoiding method of dust-collecting robot and the method for establishing grating map
Technical field
The present invention relates to a kind of barrier-avoiding method of dust-collecting robot and the methods for establishing grating map, belong to smart home
Field.
Background technique
Existing dust-collecting robot barrier-avoiding method mainly includes accurate avoidance and fuzzy avoidance.《Mobile robot path rule
It draws》(Northeast Electric Power University's master thesis, Meng Xiangfu) discloses the method for fuzzy avoidance, is adopted as fuzzy logic calculation
Method, system-computed amount is larger, is not suitable for the dust-collecting robot of low cost.And《The Intellectual Autonomous Cleaning Robot of base nonyl neural network
Mix sensory perceptual system design and avoidance planning》(Zhejiang University's master thesis, Xu Yong) discloses suction neural network based
Dirt intelligent robot obstacle avoidance algorithm, the algorithm are incomplete, it is difficult to use in practical dust-collecting robot.《Based on circumstances not known
Under robot ergodic algorithm》(Kunming University of Science and Technology's master thesis, Wang Yu) discloses the multiple avoidance of dust-collecting robot
Method, but as described in the case, barrier-avoiding method is suitable for right angle obstacle more.
Summary of the invention
The invention proposes a kind of barrier-avoiding method of dust-collecting robot, oblique angle barrier can be evaded and can be oblique according to barrier
The size at angle detours.
The technical proposal of the invention is realized in this way:
A kind of barrier-avoiding method of dust-collecting robot, which is characterized in that include the following steps:
step331:Along track walk, measure s2, s3, s4, s5 value, according to measurement result enter step332 or
Step333,
step332:If s2, s3, s4, s5 are all larger than d, step334, step335 or step336 are entered according to the value of s2,
step333:If s2, s3, s4, s5 any one are less than or equal to d, discovery can not enter boundary, rotate in place to s1
Step334, step335 or step336 are entered according to the value of s2 after=d,
step334:If s2 is less thanIt was found that entity boundary, executes the first cornering mode, untilIt returns
Step331,
First cornering mode
The side C1 angular speed of wheel ω1, the side C2 angular speed of wheel ω2,
step335:If s2 is greater thanIt was found that working region, executes the second cornering mode, untilIt returns
Step331,
Second cornering mode
Outboard wheels angular velocity omega1, inboard wheel angular velocity omega2,
ω1=ωp′=,
step336:IfReturn to step331.
A method of establishing grating map, which is characterized in that including systemic presupposition, establish maximum functional region, interior follow
Ring traverses and establishes work grid network, wherein establishing maximum functional region, executing the vacuum cleaner in interior searching loop
The barrier-avoiding method of device people.
In the method for establishing grating map of the invention, the systemic presupposition includes:
step11:Absolute reference point O1, the O2 of setting at least two in the side of purging zone,
step12:Setting walking sensor C1, C2, C3, C4, C5, adjacent walking sensor angle are on the outside of car body
The 45 ° and C3 fronts for being arranged in dust catcher advance, C1 and C5 are located on wheel axis, each sensor and entity away from
It is defined as s1, s2, s3, s4, s5 from the sum of car body radius,
step13:Define dust catcher diameter B, dust catcher wheel distance D, C1 side vehicle wheel rotational speed ω1, the side C2 vehicle wheel rotational speed
ω2,
step14:C1 be car body reference point O3, C5 be car body reference point O4, systemic presupposition safe distance d,
step15:Dust catcher is walked to s1, s2, s3, s4, s5 any one to be equal to d along when front direction linear rows, executes levelling
Mode is established coordinate system (xoy) by origin of the position of O3 at this time, and x is car body conduct direction,
step16:The origin and O1 are detected, the distance (a, b) of O2 reference point simultaneously stores.
In the method for establishing grating map of the invention, the maximum functional region of establishing includes:
step21:WithAnd s1=d walking, avoidance, it records the track O3 (x, y) and the track O4 (x ', y '),
step22:If (x, y)=(0,0), maximum functional region y=F (x) is generated according to O3 trajectory line, according to the track O4
Line generates virtual boundary line y '=gi(x '), t=0.
It is established in the method for dust-collecting robot grating map in of the invention, the interior searching loop includes:
step31:T=t+1, according to y '=gt-1(x ') establishes the t times O3 default route (xt, yt), xt, ytFor coordinate value,
yt=gt-1(xt),
step32:Demarcate O3 starting point (xmin, ymin) walk along default route, record O3 trajectory line (x, y) and the track O4
(x ', y '),
step33:Walking, avoidance,
step34:If current track (x, y)=(xt, yt), it is travelled again along default route,
step35:(if x, y)=(xmin, ymin), t subslot line y=f is generated according to the track O3t(x), according to O4 rail
Mark generates the t times virtual boundary line y '=gt (x '),
step36:If this time trajectory line is overlapped with the trajectory line of any previous storage, into step40, otherwise it is back to
step31。
In the method for establishing grating map of the invention, the interior searching loop includes:
step31:T=t+1, according to y '=gt-1(x ') establishes the t times O3 default route (xt, yt, θt), xt, ytFor coordinate
Value, θtFor corner, yt=gt-1(xt), θt=gt-1′(xt), gt-1' it is gt-1In xtThe derivative at place,
step32:Demarcate O3 starting point (xmin, ymin) along default route walking, avoidance, record O3 trajectory line (x, y) and O4
Track (x ', y '),
step33:If current track (x, y)=(xt, yt), it is travelled again along default route,
step34:(if x, y)=(xmin, ymin), t subslot line y=f is generated according to the track O3t(x), according to O4 rail
Mark generates the t times virtual boundary line y '=gt(x '),
step35:If this time trajectory line is overlapped with the trajectory line of any previous storage, completion is traversed, is otherwise back to
step31。
This barrier-avoiding method of the invention can evade oblique angle barrier and can be detoured according to the size at barrier oblique angle.
Detailed description of the invention
Fig. 1 is that the right-hand bend of dust-collecting robot of the invention is detoured a kind of barrier schematic diagram;
Fig. 2 is another barrier schematic diagram of right-hand bend detour of dust-collecting robot of the invention;
Fig. 3 is that the right-hand bend of dust-collecting robot of the invention is detoured another barrier schematic diagram;
Fig. 4 is that the left-hand bend of dust-collecting robot of the invention is detoured a kind of barrier schematic diagram;
Fig. 5 is another barrier schematic diagram of left-hand bend detour of dust-collecting robot of the invention;
Fig. 6 is that the left-hand bend of dust-collecting robot of the invention is detoured another barrier schematic diagram;
Fig. 7 is the flow chart of the method for establishing dust-collecting robot grating map of the invention;
Fig. 8 is dust-collecting robot systemic presupposition schematic diagram of the invention;
Fig. 9 is the schematic diagram of the working region of dust-collecting robot of the invention;
Figure 10 is the track schematic diagram that dust-collecting robot of the invention traverses working region;
Figure 11 is the schematic diagram of rasterizing working region of the invention;
Figure 12 is two sub-slot map of dust-collecting robot of the invention, and main presentation establishes next rail according to upper subslot
Mark;
Figure 13 is the schematic diagram of dust-collecting robot detour barrier of the invention;
Figure 14 is the schematic diagram that dust-collecting robot of the invention finds initial point close to wall.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete
Site preparation description.
Prior art summary
Existing dust-collecting robot barrier-avoiding method mainly includes accurate avoidance and fuzzy avoidance.《Mobile robot path rule
It draws》(Northeast Electric Power University's master thesis, Meng Xiangfu) discloses the method for fuzzy avoidance, is adopted as fuzzy logic calculation
Method, system-computed amount is larger, is not suitable for the dust-collecting robot of low cost.And《The Intellectual Autonomous Cleaning Robot of base nonyl neural network
Mix sensory perceptual system design and avoidance planning》(Zhejiang University's master thesis, Xu Yong) discloses suction neural network based
Dirt intelligent robot obstacle avoidance algorithm, the algorithm are incomplete, it is difficult to use in practical dust-collecting robot.《Based on circumstances not known
Under robot ergodic algorithm》(Kunming University of Science and Technology's master thesis, Wang Yu) discloses the multiple avoidance of dust-collecting robot
Method, but as described in the case, barrier-avoiding method are suitable for right angle obstacle more, and the obstacle of detour oblique angle obstacle or wall can generate
More can not enter space (omitting grid).
In the prior art, the map component of dust-collecting robot mostly uses Grid Method, and Grid Method can reduce system data amount simultaneously
Easy to maintain and path planning.The premise of Grid Method is the reading of operation interval, and the prior art is mostly used walks along side, the application
It also is such.Along side, walking obtains the premise that maximum functional environment is interior searching loop.《Intelligence based on ultrasonic sensor is inhaled
The research of dirt Algorithms of Robots Navigation System》(Zhejiang University's master thesis, Wang Huoliang) discloses the mode that this map is read.
《The design and realization of family's sweeping robot path covering system》(Harbin Institute of Technology's master thesis, Zhou Yanan) exists
Grid assignment is carried out while searching loop, does not pay attention to the amendment of traversal route.Meanwhile it can not during searching loop
Avoid there are path overlap, the document does not pay attention to eliminating the part that computes repeatedly.《Dust-collecting robot based on three-dimensionalreconstruction
Location navigation》(Jilin University's master thesis, Zhang Shuming) discloses the gridding method read based on camera data.It should
Method determines the content of grid whether passing through predetermined grid according to route.This route is defined as the path at car body center.
In practical map, even if the grid that the path of car body Road passes through, grid itself also not necessarily can all enter.It will not
Enterable grid, which is defined as work grid, can cause robot work chaotic.The document also discloses the positioning of dust-collecting robot
Technology can be used as the reference of the application.
There are many interior searching loops of operation interval, and the prior art is concentrated mainly on region segmentation, dressing traversal and spiral shell
In rotation three kinds of methods of traversal.Dressing traversal is prior art one of the most common type, and system operations are simple, but if working region
There are barrier, system is that the working region at covering barrier rear can generate many duplicate paths at middle part.Region segmentation can solve
Certainly there are path planning when barrier, this method references for operation interval《The research of clean robot complete coverage path planning》(weight
Celebrate university's master thesis, Zhang Yue).For having the wall and barrier on long inclined-plane, region segmentation efficiency is lower.《Based on ARM
The research of the clean robot of controller》(Institutes Of Technology Of Jiangxi's master thesis, Wang Zhongfeng) is adopted when selecting path planning
The mode that broken line approaches walking can detour oblique barrier, also as the reference of the application.Spiral traversal can be coped with oblique
Wall, but how to select prior art when reference still unsolved after being detached from wall when internal circulation.
Such as Fig. 1 to 6, barrier-avoiding method of the invention can be used for avoiding the fixed obstacle of regular shape, be particularly suitable for advising
Keep away wall or cabinet body with oblique angle.This barrier-avoiding method includes the following steps:step01:Along track walk, measurement s2, s3, s4,
S5 value enters step02 or step03 according to measurement result.Measurement result surface dust-collecting robot faces the obstacle of different conditions
Object.If s2, s3, s4, s5 be all larger than d andReferring to Fig.1 1.Dust-collecting robot enters the working region of increase, inhales
Dirt device is executed and is flipped outward along preceding barrier.If s2, s3, s4, s5 be all larger than d andIt is right referring to Fig. 8 to 9
Side finds oblique entity.Dust catcher turning is simultaneously kept straight on along new route.If s2, s3, s4, s5 any one are less than or equal to d, reference
Figure 10, front or left side find oblique entity, and front can not enter, and original place big angle rotary is simultaneously returned along new route.
The present invention realizes the turning of different angle, the motion state reference of dust-collecting robot using vehicle wheel rotational speed difference《It is indoor
The region-wide path planning of clean robot and avoidance research》(Southern Yangtze University, Zeng Cen) is described.Specifically, step02:If
S2, s3, s4, s5 are all larger than d, enter step04, step05 or step06 according to the value of s2.step03:If s2, s3, s4, s5 appoint
Meaning one is less than or equal to d, and discovery can not enter boundary, enter step04, step05 according to the value of s2 after rotating in place to s1=d
Or step06.step04:If s2 is less thanIt was found that entity boundary, executes the first cornering mode, untilIt returns
Return step01.step05:If s2 is greater thanIt was found that working region, executes the second cornering mode, untilIt returns
Return step01.step06:IfReturn to step01.In the present invention, the rotating manner of dust-collecting robot is divided into three
Kind:There is the right-hand bend of working region in right side, and the left-hand bend of physical obstacles and front occurs in right side or left side hinders
Hinder rotating in place for object.Rotate in place the rotation for referring to the rotation center substantially about dust-collecting robot, ω1=ωp, ω2=-
ωp.For the travel region for improving dust-collecting robot, the region that can not be traversed is reduced as far as possible, it is necessary to so that dust-collecting robot leans on
Side walking, one of feasible method are exactly the turning radius that limitation turns right and turns left.It turns right and uses the first cornering mode:
Turn left to use the second cornering mode:
ω1=ωp,
Such as Fig. 7 to 14, the invention discloses a kind of method for establishing dust-collecting robot grating map, including systemic presupposition,
It establishes maximum functional region, interior searching loop, establish work grid network.This method can be in the sensor of installation predetermined quantity
On the basis of be embedded in existing dust-collecting robot hardware system.Hardware system may include microprocessor unit, and sensor unit drives
Dynamic execution unit.Sensor unit is primarily referred to as being mounted on five ultrasonic sensors of surrounding on front side of dust-collecting robot and touches
Hit sensor and Hall sensor.Driving execution unit includes step motor control module and left and right sides stepper motor.Micro process
Device unit includes master control, display and communication module etc..Specific structure can refer to《Clean robot based on ARM controller is ground
Study carefully》Described in (Institutes Of Technology Of Jiangxi's master thesis, Wang Zhongfeng) etc..
Systemic presupposition refers to the bulk of setting robot and the designated position placement sensor in dust-collecting robot.Its
Generally comprise following steps.step11:Absolute reference the point O1, O2 of setting at least two in the side of purging zone.Absolutely ginseng
Examination point is set to the side of wall, and two absolute reference points can determine the current absolute location of dust-collecting robot.Working map is built
After vertical, the dust-collecting robot of anywhere booting can determine the location information of its locating working map.step12:Outside car body
Side setting walking sensor C1, C2, C3, C4, C5, adjacent walking sensor angle be 45 ° and C3 be arranged in dust catcher before
Into front, C1 and C5 be located on wheel axis, and each sensor is defined as at a distance from entity with the sum of car body radius
s1,s2,s3,s4,s5.Dust-collecting robot according to the position of each sensor determine car body and wall and other barriers away from
From.The sum of the distance and car body radius indicate at a distance from car body geometric circular and barrier (s1, s2, s3, s4, s5).Sensor
E.g.《The Intellectual Autonomous Cleaning Robot development of Driven by Ultrasonic Motors》(Nanjing Aero-Space University, Wang Hongjian),《Based on ultrasonic wave
The Autonomous mobile robot navigation system research of ranging technology》Ultrasonic wave used by (Wuhan University of Technology, Hu Jingcao) etc.
Distance measuring sensor.step13:Define dust catcher diameter B, dust catcher wheel distance D, C1 side vehicle wheel rotational speed ω1, the side C2 wheel turn
Fast ω2.Wheel rated speed ωp.In general, the driving motor of dust-collecting robot is encoded using angular speed, it is more advantageous to define angular speed
In measurement car body state.
step14:C1 is car body reference point O3, and C5 is car body reference point O4, systemic presupposition safe distance d.O3 is used for O4
Record the position in outside in car body.D is greater thanAbout 50mm.The distance can prevent any position of car body
Collision obstacle.Step15 and step16 is used to find initial point close to wall.step15:Dust-collecting robot is straight along front direction is worked as
Line runs to s1, s2, s3, s4, s5 any one equal to d.After the completion of avoidance, coordinate system is established as origin using the position of O3 at this time
(xoy), x is car body direction of travel.step16:The origin and O1 are detected, the distance (a, b) of O2 reference point simultaneously stores.The present invention
Wheel pulse positioning mode can be used, such as in the method for not limiting dust-collecting robot coordinate setting《Under dust-collecting robot non-structure environment
The research of autonomous paths planning method》(Zhejiang University's master thesis, Feng Shenkun) is described.Dust-collecting robot command range side
The distance of edge, welt walking change fine tuning direction of travel according to wall.To avoid measurement caused by the improper transformation of barrier
Software for jitters elimination filtering can be used in error (accidental error), the present invention, and such mode mainly utilizes in the compiling procedure of program
Time delays detection, is detected after detecting the ultrasonic signal met the requirements after delay 30 to 50ms, again if error model
Data in enclosing still are detected, then it is assumed that the data-signal is correct believable.Kalman filtering drop can be used in simultaneity factor
Error (systematic error) on low measurement method.Kalman filtering mode is as it is known to those skilled in the art that does not do herein
It repeats, specific structure principle can refer to《Intelligent sweeping machine device people design and its research of path planning》(Harbin industry is big
Learn, Zhang Chao) it is described.
It establishes maximum functional region and refers to and take a round along indoor lateral wallflow, record room maximum coordinates position, be subsequent
It traverses working region and outer non-economic is provided.The step is also referred to as walked along side, and feasible realization has been disclosed in the prior art
Algorithm, such as《Intelligent sweeping machine device people design and its research of path planning》(Harbin Institute of Technology, Zhang Chao),《Vacuum cleaner
The research of autonomous paths planning method under device people's non-structure environment》Described in (Zhejiang University's master thesis, Feng Shenkun) etc..
step21:WithAnd s1=d walking, avoidance, it records the track O3 (x, y) and the track O4 (x ', y ').step22:If
(x, y)=(0,0), generates maximum functional region y=F (x) according to O3 trajectory line, generates virtual boundary line y ' according to O4 trajectory line
=gi(x '), t=0.Virtual boundary line is the expected trajectory of O3 next time.
Interior searching loop, which refers to, traverses entire working region in maximum functional region inside spin, and unapproachable space is remembered
Barrier is recorded into, the whole region that can be walked is determined with this.In the prior art, interior searching loop mostly uses reciprocal row of turning back
Mode is walked, which is easy to produce blind area.The application reduces the presence of blind area by the way of spiral traversal.step31:T=t
+ 1, according to y '=gt-1(x ') establishes the t times O3 default route (xt, yt, θt), xt, ytFor coordinate value, θtFor corner, yt=gt-1
(xt), θt=gt-1′(xt), gt-1' it is gt-1In xtThe derivative at place.Limit seat of the coordinate in addition to calibration point of dust-collecting robot state
It can also include direction coordinate that mark is outer.To keep body movement smooth, the application determines direction of travel by the derivative of default route.
step32:Demarcate O3 starting point (xmin, ymin), which is generally in default route near the position of last time final on trajectory
It sets.Dust-collecting robot records O3 trajectory line (x, y) and the track O4 (x ', y ') along default route walking, avoidance.In practical walking
In the process, due to the presence of barrier, O3 trajectory line (x, y) and default route (xt, yt, θt) not quite identical.step33:If
Current track (x, y)=(xt, yt), show dust-collecting robot cut-through object, is travelled again along default route.step34:
(if x, y)=(xmin, ymin), indicate that dust-collecting robot has been returned to the initial point of this track route.System is according to O3 rail
Mark generates t subslot line y=ft(x), the t times virtual boundary line y '=g is generated according to the track O4t(x′).step35:If this
Subslot line is overlapped with the trajectory line of any previous storage, shows that dust-collecting robot comes into circulation route, traversal is completed.It is no
It is then back to step31, it is interior again to loop through.Dust-collecting robot running center there are when minimum irregular barrier,
The efficiency of the interior searching loop is lower.It is contemplated that indoor environment is mostly the space of rule, barrier is just at vacuum cleaner
Again lower a possibility that circulation center in device people, the method for this interior searching loop of the application has feasibility.
It establishes work grid network to refer to after dust-collecting robot traverses working region, working region is divided into grid screen
The method of network.step41:Define rectangular area (Hwidth, Hlen) and rectangular area is divided into multiple grids (i, j), HwidthFor
Maximum x value in y=F (x), HlenFor maximum y value, i=x/B, j=y/B.Relative to absolute reference point O1, O2 to grid (i, j)
Coordinate make definitions, no matter when dust-collecting robot is switched on operation, as long as measuring it relative to reference point O1, the position of O2,
It can determine the position of this grating map, so that the dust-collecting robot moment be avoided to record self-position.step42:Definition
CellValue [i] [j], y=F (x) or y=ft(x) when grid (i, j) for only having one group or zero group of track to pass through in,
CellValue [i] [j]=0, otherwise CellValue [i] [j]=1, stores grating map.Grid is passed through in two groups of tracks simultaneously
Indicate that dust-collecting robot traversal working map is to enter the grid when (i, j), the grid is generally in can enter state.Only one
Group track enters grid or enters grid without track, indicates grid generally in can not enter state.Although the storage is sentenced
Disconnected mode can regard as cell portion domain (being less than dust-collecting robot size) that can not enter grid, but relative to entirely to clear
For sweeping space, abandon segment space and improve storage efficiency and path planning efficiency to be worth.
The foregoing is merely illustrative of the preferred embodiments of the present invention, is not intended to limit the invention, all in essence of the invention
Within mind and principle, any modification, equivalent replacement, improvement and so on be should all be included in the protection scope of the present invention.