The content of the invention
It is low, whole the present invention provides a kind of cost to overcome problem present in correlation technique at least to a certain extentBody task completes efficient sweeping robot and its cleans paths planning method.
On the one hand, the present invention provides a kind of sweeping robot to clean paths planning method, comprises the following steps:
Plane coordinate system is established as coordinate origin using the initial position of sweeping robot;
The blank map that initial size is fixed is built in plane coordinate system, and blank map is divided into some blocks, respectivelyThe size of block is fixed;Wherein, blank map can extend;
Sweeping robot prestores the guideline figure made, and the route map is by the countless parallel vertical curves infinitely extendedForm, robot initial is located therein on straight line when starting.
Edge instructs path to be cleaned after sweeping robot receives cleaning instruction, if encountering obstacle in cleaning processThing, then walk along the edge of barrier and cleaned (robot can leave the straight line instructed on path at this time), until encounteringUntill instructing the straight line on path;
In cleaning process, actual swept region is mapped with the blank map built, updates or extend groundFigure.
Further, the initial position using sweeping robot is established plane coordinate system as coordinate origin and is included:To sweepFloor-washing robot currently towards the positive direction that forward direction is X-axis, overlooks sweeping robot, its left is the positive direction of Y-axis;PlaneEach point is represented using X-axis coordinate, Y-axis coordinate and rotation angle in coordinate system.
Further, the scope of the rotation angle is:(- π, π], the corresponding rotation angle of positive direction of X-axis is 0.
Further, the cleaning function provided a user on the control panel for cleaning instruction and passing through sweeping robotThe selection key for the cleaning function that selection key is transmitted or is provided a user by remote controler or cell phone application client carries outSend.
Further, edge instructs path to be cleaned after the sweeping robot receives cleaning instruction, in cleaning processIn if encountering barrier, walk and cleaned along the edge of barrier, untill encountering the straight line instructed on path,It specifically includes following steps:
When starting to clean, judge whether sweeping robot is connected with charging base station, if sweeping robot and charging base stationIt is connected, then comes and reverse end for end from charging base station reversed, and further determines whether to come out from charging base station for the first time, if so,The region in front of charging base station is then cleaned, otherwise sweeping robot is to front straight line moving;If sweeping robot not withCharging base station is connected, and sweeping robot is also to front straight line moving;
Sweeping robot judges whether there is barrier in front of sweeping robot, if obstacle to front straight line movingThing, then walk along barrier edge;Otherwise edge instructs path to walk.
Further, whether the step sweeping robot judges sweeping robot front to front straight line movingThere is barrier, if barrier, then walk along barrier edge;Otherwise along instructing path to walk, it includes:
Sweeping robot is walked, by the positive direction of Y-axis to front straight line moving after running into barrier along barrier edgeOr the negative direction of Y-axis is as direction of advance, wherein, the preferential direction of advance of the positive direction of Y-axis as sweeping robot;
First, it is corresponding according to the positive direction of the map currently updated along Y-axis to search for its region for sweeping robotWhether the adjacent block of the block in figure, which is marked as, has been swept, if the adjacent block in the positive direction of Y-axis is unmarked forSweep, then sweeping robot is walked along the positive direction of Y-axis;Otherwise, the corresponding map in its region is searched for along the negative direction of Y-axisIn the adjacent block of block whether be marked as having swept, if the adjacent block in the negative direction of Y-axis is unmarked to have beatenSweep, then sweeping robot is walked along the negative direction of Y-axis;
Secondly, right side is selected close to barrier side in conjunction with the relative position where sweeping robot before encountering barrierEdge is walked or left side is walked close to barrier edge, until the position where sweeping robot is instructed on path positioned at correspondingWhen, sweeping robot stops walking close to barrier edge;
Sweeping robot rotates in place, until the direction that sweeping robot advances is towards the direction of X-axis or parallel to X-axisDirection, sweeping robot is to front straight line moving.
It is further, described to be mapped in actual swept region with the blank map built in cleaning process,Renewal map includes:Actual swept region and practical obstacle thing, charging base station or wall side are corresponded in blank mapBlock be marked.Extension map includes the scope that can be represented beyond current map when sweeping robot regionWhen, expand the border of map, increase it and represent scope so that sweeping robot region is included in.
Further, it is further comprising the steps of to clean paths planning method for sweeping robot:If sweeping robot pair withActual area and its adjacent block where the corresponding sweeping robot of blank map of structure have all been cleaned and finished, then sweeperIt is non-conterminous on device people's searching map not clean block, and cleaned to not cleaning block.
Further, it is non-conterminous on the sweeping robot searching map not clean block, and to not cleaning blockCleaning is carried out to comprise the following steps:
Sweeping robot utilizes non-conterminous on A* algorithms or BFS algorithms or greedy algorithm or other searching algorithm searching mapsDo not clean block, if non-conterminous range searching is not to block is cleaned on map, this is not cleaned to block and is labeled asTarget block, is calculated current location to the path of target block, and robot reaches target block along the path calculated,Then the direction of advance of robot is adjusted, to the positive direction straight line moving of X-axis, edge instructs path to be cleaned;Otherwise, sweeperDevice people terminates to clean.
On the other hand, present invention also offers a kind of sweeping robot, it includes establishment of coordinate system module, blank map structureModel block, clean module and map rejuvenation module;Establishment of coordinate system module is used for using the initial position of sweeping robot as coordinateOrigin, establishes plane coordinate system;Blank map structure module is used for the structure initial size in plane coordinate system and fixes but canWith the blank map of expansion, and blank map is divided into some blocks, the size of block is fixed;Clean module and instruct road for edgeFootpath or the edge of barrier are cleaned, and map rejuvenation module is used to be mapped blank map and actual purging zone, andRenewal or extension map.
The technical solution that embodiments herein provides can include the following benefits:The present invention can be opened cleaning oneBeginning is directly entered efficient cleaning modes, updates map therewith in cleaning process, can avoid most repeated work, reducesRepetitive rate is cleaned, improves and cleans coverage rate, ensures to clean effect so that sweeping robot is more intelligent, improves user experience.And after cleaning, sweeping robot can return to charging base station according to the map updated in cleaning process and charge.ThisInvention is using the sensor in low-grade sweeping robot, it is not necessary to increases extra sensor hardware, can ensure to sweep the floorThe performance of sweeping robot is improved while robot is inexpensive.The present invention during path planning is cleaned using maturation,Cheap sensors for data, the data volume of acquisition is small, in addition, the amount of storage of data can be reduced using grating map, andAnd the judgement of a large amount of repeat modes can reduce data calculation amount, therefore present invention processing analysis data hour operation quantity is few, is not required toWant the processor of high cost to support, can be achieved using the processor of low cost.
It should be appreciated that the general description and following detailed description of the above are only exemplary and explanatory, notThe application can be limited.
Embodiment
Here exemplary embodiment will be illustrated in detail, its example is illustrated in the accompanying drawings.Following description is related toDuring attached drawing, unless otherwise indicated, the same numbers in different attached drawings represent the same or similar key element.Following exemplary embodimentDescribed in embodiment do not represent all embodiments consistent with the application.On the contrary, they be only with it is such as appendedThe example of the consistent apparatus and method of some aspects be described in detail in claims, the application.
Existing sweeping robot has random cleaning modes, along side cleaning modes, spiral cleaning modes and intersects clearPattern etc. is swept, cleaning works can be completed by existing cleaning modes in the case where environmental information is totally unknown.
As shown in Figure 1, the present invention provides a kind of sweeping robot to clean paths planning method, it comprises the following steps:
S1, using the initial position of sweeping robot establish plane coordinate system as coordinate origin.
In plane coordinate system, using the current positive direction towards forward direction as X-axis of sweeping robot, vertical view is swept the floor machineIts left of people is the positive direction of Y-axis.Each point is represented using following three parameters in coordinate system:X-axis coordinate, Y-axis coordinate andRotation angle θ.The scope of rotation angle θ is:(- π, π], the corresponding rotation angle θ of positive direction of X-axis is 0.
S2, build the blank map that initial size is fixed in plane coordinate system, and blank map is divided into some blocks,The size of each block is fixed.Wherein, blank map can extend.Specifically, in plane coordinate system centered on originPoint, builds the blank map of a 5m*5m.Blank map is divided into the block that the 25*25 length of side is 20cm.When real space exceedesDuring 5m*5m, when robot goes to the border of 5m*5m, map can be extended.
Edge instructs path to be cleaned after S3, sweeping robot receive cleaning instruction, in cleaning process, if encounteredWall side, then continue edge and instruct path to be cleaned after being cleaned along wall;If encountering barrier, carried out along the edge of barrier clearContinuing edge after sweeping instructs path to be cleaned.Wherein, instruct path include without several it is parallel with X-axis infinitely extend it is verticalLine, when sweeping robot initial start, are located therein on a vertical curve.Specifically, vertical curve and each block in X-directionCenter line is located on the same line.
It can be sent and cleaned by the selection key of the cleaning function provided a user on the control panel of sweeping robotInstruction, the selection key for the cleaning function that can also be provided a user by remote controler or cell phone application client send cleaning and refer toOrder, can also be because not enough power supply charges in sweeping robot cleaning process, and clear before continuation after charging completeSweep task.
S4, in cleaning process, actual swept region and the blank map of structure are mapped, sweeping robotRespectively to actual swept region and practical obstacle thing, charging base station or wall side etc. in blank map corresponding block intoThe blank map of line flag, continuous updating or extension structure.
Specifically, by actual swept region, corresponding block is labeled as having swept in blank map, by actual barrierThing corresponding block in blank map is hindered to be labeled as barrier.Wherein, remembered by the gyroscope on sweeping robot and code-discRecord rotation angle and the displacement of sweeping robot.
Sweeping robot of the present invention clean paths planning method cause sweeping robot before barrier is encountered first byInstruct path to treat purging zone to be cleaned according to predetermined, be further continued for after being cleaned when running into wall side along wall along instruct path intoRow cleans, and edge is further continued for after being cleaned when running into barrier along the edge of barrier and instructs path to be cleaned, sweeperDevice people updates map therewith in cleaning process, can reduce cleaning repetitive rate, improves and cleans coverage rate, ensures to clean effect,So that sweeping robot is more intelligent, user experience is improved.
It is further comprising the steps of that sweeping robot of the present invention cleans paths planning method:
If S5, sweeping robot pair and the actual area where the corresponding sweeping robot of blank map built and itsAdjacent block has all been cleaned and finished, then non-conterminous with the actual area where sweeping robot on sweeping robot searching mapBlock is not cleaned, and is cleaned to not cleaning block, it specifically includes following steps:
S51, sweeping robot using on A* algorithms or BFS algorithms or greedy algorithm searching map with where sweeping robotActual area it is non-conterminous do not clean block, do not clean block if searched on map in non-conterminous block, willThis does not clean block and is labeled as target block, enters step S52;Otherwise, sweeping robot terminates to clean.
S52, sweeping robot calculate according to the map to be calculated from one of current location arrival target block compared with shortest path, edgeWalk to target block in the path gone out;After reaching target block, sweeping robot rotates in place, until the advance of sweeping robotDirection is directed at the positive direction of X-axis, and to front straight line moving, edge instructs path to be cleaned.Wherein, compared with shortest path can be away fromFrom path short enough and used time short enough path.
On the basis of embodiment illustrated in fig. 1, to a kind of possible implementation of step S3 in embodiment illustrated in fig. 1 intoRow is described in detail, it comprises the following steps:
S31, start clean when, judge sweeping robot whether with charging base station be connected, if sweeping robot with chargingBase station is connected, then comes and reverse end for end from charging base station reversed, and further determines whether to come out from charging base station for the first time, ifIt is then to clean the region in front of charging base station, otherwise enter step S32;If sweeping robot is not connected with charging base station,Also S32 is entered step, it specifically includes following steps:
S311, to sweeping robot start clean when whether detect charging base station signal judge, if it is,Enter step S312;Otherwise S32 is entered step.
S312, sweeping robot retreat L distances, and rotate 180 °, change into the direction identical with the negative direction of X-axis, judgeWhether sweeping robot comes out from charging base station for the first time, if it is, entering step S313;Otherwise S32 is entered step.
S313, sweeping robot rotate 180 °, and direction of advance changes into the direction identical with the positive direction of X-axis, and along straightLine is walked, and cleans the region immediately ahead of charging base station, the cleaning border before sweeping robot reaches default charging base station,Sweeping robot rotates 180 ° again, and direction of advance is changed into the direction identical with the negative direction of X-axis, enters step S32.
Sweeping robot whether reach it is default charging base station before cleaning border according to the infrared biography on sweeping robotThe data that sensor returns are judged.
S32, sweeping robot judge whether there is barrier in front of sweeping robot to front straight line moving, ifBarrier, then walk along barrier edge;Otherwise along instructing path to walk, it specifically includes following steps:
S321, sweeping robot enter step S322 to front straight line moving after receiving collision alarm.
S322, sweeping robot are walked along barrier edge, regard the negative direction of the positive direction of Y-axis or Y-axis as advance sideTo, wherein, the preferential direction of advance of the positive direction of Y-axis as sweeping robot.
First, it is corresponding according to the positive direction of the map currently updated along Y-axis to search for its region for sweeping robotWhether the adjacent block of the block in figure, which is marked as, has been swept, if the adjacent block in the positive direction of Y-axis is unmarked forSweep, then sweeping robot is walked along the positive direction of Y-axis;Otherwise, the corresponding map in its region is searched for along the negative direction of Y-axisIn the adjacent block of block whether be marked as having swept, if the adjacent block in the negative direction of Y-axis is unmarked to have beatenSweep, then sweeping robot is walked along the negative direction of Y-axis.
Secondly, S323 is entered step in conjunction with the relative position selection where sweeping robot before entering step S322.If the lower section of position correspondence Obstacle Position in plane coordinate system before into this step S322 where sweeping robotAnd have selected to walk along the positive direction of Y-axis before this step S322, or the position correspondence where sweeping robot is in plane coordinatesHave selected to walk along the negative direction of Y-axis before the top of barrier and this step S322 in system, then the right side of sweeping robot close toBarrier edge is walked, and enters step S323;If the position correspondence before S322 where sweeping robot is entered step flatIt has selected to walk along the negative direction of Y-axis before the lower section of Obstacle Position and this step S322 in areal coordinate system, or machine of sweeping the floorPosition correspondence where people have selected the positive direction along Y-axis in plane coordinate system before the top of barrier and this step S322Walk, then the left side of sweeping robot is walked close to barrier edge, enters step S323.
Finally, if block in the corresponding map in sweeping robot region is along the adjacent of X-direction and Y directionBlock is collectively labeled as having swept, then on searching map with the actual area where sweeping robot is non-conterminous does not clean block,Enter step S5.
S323, sweeping robot right side close to barrier edge walk when, first, sweeping robot is according to being triggeredThe position of crash sensor selects corresponding rotation angle, rotates the rotation angle counterclockwise;Secondly, sweeping robot is with currentState is original state along curved path walking, until crash sensor be triggered again or sweeping robot return to currently with X-axis weightThe vertical curve or sweeping robot of conjunction have encountered the vertical curve parallel with X-axis.
When crash sensor is triggered again, repeat step S323.When sweeping robot returns to what is currently overlapped with X-axisDuring vertical curve, S324 is entered step.When sweeping robot has encountered the vertical curve parallel with X-axis, S325 is entered step.
Specifically, sweeping robot along using current state as original state along curved path walking when, -0.25 arc of angular speed useDegrees second, linear velocity make choice according to the data that right side infrared sensor returns.
The left side of sweeping robot close to barrier edge walk when, first, sweeping robot is according to the collision being triggeredThe position of sensor selects corresponding rotation angle, rotates clockwise the rotation angle;Secondly, sweeping robot is with current stateIt is original state along curved path walking, until crash sensor is triggered again or sweeping robot returns to what is currently overlapped with X-axisVertical curve or sweeping robot have encountered the vertical curve parallel with X-axis.
When crash sensor is triggered again, repeat step S323.When sweeping robot returns to what is currently overlapped with X-axisDuring vertical curve, S324 is entered step.When sweeping robot has encountered the vertical curve parallel with X-axis, S325 is entered step.
Specifically, sweeping robot using current state as original state along curved path walking when, angular speed using 0.25 radian/Second, linear velocity makes choice according to the numerical value that left side infrared sensor returns.
S324, sweeping robot rotate in place, until sweeping robot advance direction towards the direction of X-axis or parallel toThe direction of X-axis, enters step S321.
S325, sweeping robot rotate in place, until sweeping robot advance direction towards the direction of X-axis or parallel toThe direction of X-axis, enters step S326.
S326, sweeping robot are to front straight line moving, until colliding sensor receives collision alarm, machine of sweeping the floorPeople rotates in place 360 °, enters step S321.
In addition, sweeping robot is in cleaning process, if not enough power supply, record current location, and enter base station intoRow charging, comes back to the cleaning works before the position continuation of record after charging complete.
As shown in Fig. 2, present invention also offers a kind of sweeping robot, it is set on the basis of existing sweeping robotThere are establishment of coordinate system module 1, blank map structure module 2, clean module 3 and map rejuvenation module 4.Establishment of coordinate system module 1For using the initial position of sweeping robot as coordinate origin, establishing plane coordinate system.Blank map structure module 2 is used for flatThe blank map that initial size is fixed but can expanded is built in areal coordinate system, and blank map is divided into some blocks, areaThe size of block is fixed.Clean module 3 instructs the edge in path or barrier or wall side to be cleaned for edge, map rejuvenation module4 are used to be mapped blank map and actual purging zone, and according to actual swept region and reality in cleaning processBorder barrier, the renewal of charging base station or wall side etc. or extension map.
Sweeping robot uses cylindrical structure, and an infrared sensor is respectively set on its front end face, left surface and right flank,Three infrared sensors are located on same level section, and the angle between each infrared sensor is 90 °.The side of sweeping robotOn be additionally provided with four crash sensors, two of which crash sensor is arranged on the infrared sensor and front end face of left surfaceBetween infrared sensor, two other crash sensor is arranged on the infrared sensor of right flank and the infrared sensor of front end faceBetween.
Robot of the present invention can task at the beginning when be directly entered efficient cleaning modes, can be therewith in cleaning processMap is updated, most repeated work can be avoided, reduces and cleans repetitive rate, improves and cleans coverage rate.And clean and finishAfterwards, sweeping robot can return to charging base station according to the map updated in cleaning process and charge.
Sweeping robot according to Fig. 3 cleans the flow of paths planning method, sweeps the floor with reference to Fig. 3 to the present invention machineThe flow that people cleans paths planning method is described in detail.
Sweeping robot is in an irregular region to be cleaned.
Plane coordinate system is established as coordinate origin using the initial position of sweeping robot.In plane coordinate system, to sweep the floorThe positive direction that its left of sweeping robot is Y-axis currently towards the positive direction that forward direction is X-axis, is overlooked by robot.In planeThe blank map that initial size is fixed is built in coordinate system, and blank map is divided into some blocks, the size of each block is fixed.The a plurality of vertical curve that infinitely extends parallel with X-axis is set in plane coordinate system, these vertical curves form and instruct path.
Edge instructs a vertical curve in path to walk and cleaned forward after sweeping robot receives cleaning instruction,When sweeping robot reaches the corresponding border with the border of the blank map of structure in region to be cleaned, barrier is not encountered yetOr during wall side, into plane coordinate system, X is just and Y is positive region extension blank map.Sweeping robot continues edge and instructs roadA vertical curve in footpath is walked and is cleaned forward, and until encountering wall side, sweeping robot is cleaned along wall, until return toDuring the parallel vertical curve of X-axis, adjustment direction, until the positive direction for being oriented parallel to X-axis that sweeping robot advances, then sweeps the floorRobot is directly walked forward, if encountering wall again, rotates in place 180 °, sweeping robot is to front straight line moving and carries outClean.
Sweeping robot according to Fig. 4 cleans the flow of paths planning method, sweeps the floor with reference to Fig. 4 to the present invention machineThe flow that people cleans paths planning method is described in detail.
Edge instructs a vertical curve in path to walk and cleaned forward after sweeping robot receives cleaning instruction,When sweeping robot encounters barrier in cleaning process, according to sweeping robot and the relative position relation of barrier, sweepThe right side or left side of floor-washing robot are walked close to barrier edge.Until sweeping robot returns to the vertical curve overlapped with X-axis, sweepFloor-washing robot rotates in place, until the direction for the direction alignment X-axis that sweeping robot advances, sweeping robot is to front straight lineWalk and cleaned.
On the device in above-described embodiment, wherein modules perform the concrete mode of operation in related this methodEmbodiment in be described in detail, explanation will be not set forth in detail herein.
It is understood that same or similar part can mutually refer in the various embodiments described above, in certain embodimentsUnspecified content may refer to the same or similar content in other embodiment.
It should be noted that in the description of the present application, term " first ", " second " etc. are only used for description purpose, withoutIt is understood that to indicate or implying relative importance.In addition, in the description of the present application, unless otherwise indicated, the implication of " multiple "Refer at least two.
Any process or method described otherwise above description in flow chart or herein is construed as, and represents to includeModule, fragment or the portion of the code of the executable instruction of one or more the step of being used for realization specific logical function or processPoint, and the scope of the preferred embodiment of the application includes other realization, wherein can not press shown or discuss suitableSequence, including according to involved function by it is basic at the same time in the way of or in the opposite order, carry out perform function, this should be by the applicationEmbodiment person of ordinary skill in the field understood.
It should be appreciated that each several part of the application can be realized with hardware, software, firmware or combinations thereof.Above-mentionedIn embodiment, software that multiple steps or method can be performed in memory and by suitable instruction execution system with storageOr firmware is realized.If, and in another embodiment, can be with well known in the art for example, realized with hardwareAny one of row technology or combinations thereof are realized:With the logic gates for realizing logic function to data-signalDiscrete logic, have suitable combinational logic gate circuit application-specific integrated circuit, programmable gate array (PGA), sceneProgrammable gate array (FPGA) etc..
Those skilled in the art are appreciated that to realize all or part of step that above-described embodiment method carriesSuddenly it is that relevant hardware can be instructed to complete by program, the program can be stored in a kind of computer-readable storage mediumIn matter, the program upon execution, including one or a combination set of the step of embodiment of the method.
In addition, each functional unit in each embodiment of the application can be integrated in a processing module, can alsoThat unit is individually physically present, can also two or more units be integrated in a module.Above-mentioned integrated mouldBlock can both be realized in the form of hardware, can also be realized in the form of software function module.The integrated module is such asFruit is realized in the form of software function module and as independent production marketing or in use, can also be stored in a computerIn read/write memory medium.
Storage medium mentioned above can be read-only storage, disk or CD etc..
In the description of this specification, reference term " one embodiment ", " some embodiments ", " example ", " specifically showThe description of example " or " some examples " etc. means specific features, structure, material or the spy for combining the embodiment or example descriptionPoint is contained at least one embodiment or example of the application.In the present specification, schematic expression of the above terms is notNecessarily refer to identical embodiment or example.Moreover, particular features, structures, materials, or characteristics described can be anyOne or more embodiments or example in combine in an appropriate manner.
Although embodiments herein has been shown and described above, it is to be understood that above-described embodiment is exampleProperty, it is impossible to the limitation to the application is interpreted as, those of ordinary skill in the art within the scope of application can be to above-mentionedEmbodiment is changed, changes, replacing and modification.