A kind of sweeping robot automatic obstacle-avoiding moving device and mode of progressionTechnical field
The present invention relates to robot traveling control fields, and in particular to a kind of sweeping robot automatic obstacle-avoiding moving device andMode of progression.
Background technology
With the development of science and technology, artificial intelligence robot is increasingly used in all trades and professions, to substitute systemLabour.Robot needs the avoiding obstacles, currently used Obstacle Avoidance to include during traveling:DetectionRobot is at a distance from barrier, and when the distance detected is less than pre-determined distance, control robot stops movement.Especially sweepFloor-washing robot can mitigate the housework burden of people as a kind of intelligent robot of automated cleaning.But family in home environmentThe covered region of tool becomes the furniture such as the difficult point, such as bed, sofa that sweeping robot cleans and suffers from ground in the presence of heightPoor (hole), and this is highly with the whole height of current sweeper very close to during the panel of existing sweeper is general in additionBetween protrusion, cause in some cases sweeper drilling sofa under and block, or by raised support rise can not advance the phenomenon thatOccur, there is an urgent need to be improved.
Invention content
To solve the above problems, the present invention provides a kind of sweeping robot automatic obstacle-avoiding moving devices.The present invention's sweepsFloor-washing robot automatic obstacle-avoiding moving device has the advantages that simple in structure and setting is reasonable, and sweeping robot of the invention is kept away automaticallyHindering mode of progression has operand small, efficient, obstacle and hole accuracy of judgement, is conducive to improve sweeping robot traveling efficiencyThe advantages of with sweeping robot sweeping efficiency.
To realize the technical purpose, the technical scheme is that:A kind of sweeping robot automatic obstacle-avoiding moving device,Including GPU processor modules, depth camera head module, sonar contact apparatus module;
The depth camera head module includes depth camera and its depth camera head drive circuit and depth camera letterNumber processing circuit, wherein depth camera signal processing circuit are electrically connected to the I/O mouths of the GPU processor modules;
The sonar contact apparatus module includes at sonar contact device and its sonar contact driving circuit and Sonar SignalCircuit is managed, wherein Signal processing of sonar circuit is electrically connected to the I/O mouths of the GPU processor modules.
Further, on sweeping robot, the position of the depth camera is used respectively higher than the sonar detection deviceIn high-order and low level ranging.
Further, further include infrared sensor module,
Infrared sensor module includes two infrared sensors and its infrared driver circuit and infrared signal processing circuit,Wherein infrared signal processing circuit is electrically connected to the I/O mouths of the GPU processor modules, and two infrared sensors are set to and sweep the floorRobot side.
A kind of sweeping robot automatic obstacle-avoiding mode of progression, includes the following steps:
S1:High-order ranging is carried out to environment in front of sweeping robot using depth camera, utilizes sonar detection device pairEnvironment carries out low level ranging in front of sweeping robot, completes non-collision scanning;
S2:High-order and low level obstacle in sweeping robot direction of advance is judged respectively, if barrier is not present in high-order and low levelHinder, carry out step S3, if a high position, there are obstacle and low levels there is no carrying out step S4 if obstacle, if low level there are obstacle intoRow step S5;
S3:Sweeping robot maintains current route constant, and repeats the high-low-position obstacle inspection of step S1 and S2Survey determination step;
S4:Sweeping robot carries out limit for height detection, judges whether high-order obstacle is higher than sweeping robot height, influences to sweep the floorRobot advances, and step S5 is carried out if influencing, if not influencing to carry out step S3;
S5:Sweeping robot obstacle edge is walked, and repeats the high-low-position obstacle detection judgement of step S1 and S2Step.
Further, high-order ranging is carried out to environment in front of sweeping robot using depth camera in the step S1, sentencedIt whether there is obstacle in m centimetres of broken height position, meanwhile, low level survey is carried out to environment in front of sweeping robot using sonar detection deviceAway from judging to whether there is obstacle, and n < m in n centimetres of low level;
In the step S2, the step S3 is carried out if obstacle is not present in high-order m centimetres and n centimetres of low level, if highThere are there is no obstacles then to carry out the step S4 in obstacle, n centimetres of low level in m centimetres of position, if there are obstacles in n centimetres of low levelThen carry out the step S5.
Further, the method for sweeping robot traveling limit for height detection includes the following steps:
T1:So that depth camera is worked in the capture of standard static pixel screen, it is quiet in standard to calculate sweeping robot apical marginShared pixel coverage in state pixel screen;
T2:Using the depth information in pixel coverage in depth camera scanning step T1, if depth is small in pixel coverageIt is less than sweeping robot height in the height that m centimetres then judges high-order obstacle, and carries out the step S5, otherwise carries out stepT3;
T3:Depth camera pixel coverage from T1 scans downwards, if being found in scanning process, depth is less than m centimetres of barrierHinder, then judge that the height of high-order obstacle is less than sweeping robot height, otherwise judges that the height of high-order obstacle is more than machine of sweeping the floorPeople's height simultaneously carries out the step S3.
As a kind of preferred embodiment of the present invention, it is based on the above, unlike, with 480*640 resolution ratioDepth camera for, in the step T1, depth camera works in 480*640 static pixels picture catchings, sweeperDevice people apical margin pixel coverage shared by the m centimeters of front is 160-170 rows;Depth camera is from 160-170 in the step T3Row pixel coverage scans downwards.
Further, the method that sweeping robot obstacle edge is walked in the step S5 includes the following steps:
E1:For sweeping robot forward in walking process, two infrared sensors of sweeping robot side carry out obstacleRanging carries out step E2 until after single or two infrared sensors return to the distance signal less than L1 centimetres;Preferably, existRobot is in outside obstacle L1 cm ranges, can select to advance to right front or left front, with quickly so that single infrared biographySensor returns to the distance signal less than L2 centimetres, and L2 < L1.
E2:Sweeping robot rotation is controlled, is believed until single or two infrared sensors return to the distance less than L2 centimetresAfter number, step E3 is carried out;Single wheel rotation under sweeping robot can be specifically driven, the rotation of entire sweeping robot is completedRotation is made.
E3:Sweeping robot automatic obstacle-avoiding traveling PID is adjusted so that two infrared sensors return to L2 centimetres of distanceAfter signal, control sweeping robot is walked forward, and constantly carries out step E2.The present invention uses the survey of two infrared sensorsAway from so that after robot is moved in obstacle L1 cm ranges, by PID closed loop control algorithms, sweeping robot posture is adjusted,After the distance signal that two infrared sensors return to L2 centimetres, after judgement sweeping robot is parallel with obstacle, realization is sweptFloor-washing robot is walked along side.
As a kind of preferred embodiment of the present invention, it is based on the above, unlike, further include what hole markedStep:Sweeping robot traveling limit for height detects in the step S4, judges that high-order obstacle is above sweeping robot height and goes forward side by sideWhile row step S3, it is demarcated as hole.
Further, sweeping robot is marked according to history hole, is advanced from trend hole.
The beneficial effects of the present invention are:
The sonar contact device of high-order depth camera and low level is respectively set in the sweeping robot of the present invention up and down,A high position can be measured at a distance judge whether to carry out high-order detection after, then judge whether the low level of short distance allows to pass through, greatlyReduce collision probability greatly, it is ensured that the accuracy at hole and obstacle detection, meanwhile, the present invention utilizes three kinds of distance measuring sensors,It allows three to cooperate, so that high-order ranging, limit for height detection, low level ranging three is carried out successively according to sequential, substantially reduceOperand, improves sweeping robot traveling efficiency and sweeping robot sweeping efficiency.
To sum up, sweeping robot automatic obstacle-avoiding moving device of the invention has the advantages that simple in structure and setting is reasonable,The sweeping robot automatic obstacle-avoiding mode of progression of the present invention has operand small, and efficient, obstacle and hole accuracy of judgement haveThe advantages of conducive to sweeping robot traveling efficiency and sweeping robot sweeping efficiency is improved.
Description of the drawings
Fig. 1 is the module map of sweeping robot automatic obstacle-avoiding moving device of the present invention;
Fig. 2 is position one of of two infrared sensors of the present invention on sweeping robot;
Fig. 3 is the two of position of two infrared sensors of the present invention on sweeping robot;
Fig. 4 is the flow chart of sweeping robot automatic obstacle-avoiding mode of progression of the present invention;
Fig. 5 is sweeping robot automatic obstacle-avoiding mode of progression position view of the present invention;
Fig. 6 is the method schematic diagram of limit for height detection of the present invention.
Specific implementation mode
Technical scheme of the present invention will be clearly and completely described below.
As shown in Figure 1, a kind of sweeping robot automatic obstacle-avoiding moving device, including GPU processor modules, depth cameraModule, sonar contact apparatus module;
The depth camera head module includes depth camera 3 and its depth camera head drive circuit and depth cameraSignal processing circuit, wherein depth camera signal processing circuit are electrically connected to the I/O mouths of the GPU processor modules;
The sonar contact apparatus module includes at sonar contact device and its sonar contact driving circuit and Sonar SignalCircuit is managed, wherein Signal processing of sonar circuit is electrically connected to the I/O mouths of the GPU processor modules.
Further, on sweeping robot, the position of the depth camera is used respectively higher than the sonar detection deviceIn high-order and low level ranging.The present invention utilizes the performance characteristics of depth camera and sonar detection device, respectively in machine of sweeping the floorPeople carries out high-order and low level ranging up and down, and carries out data processing by GPU, and further fast accurate detects obstacle, completeIt advances at sweeping robot automatic obstacle-avoiding.
Further, further include infrared sensor module,
Infrared sensor module includes two infrared sensors 2 and its infrared driver circuit and infrared signal processing circuit,Wherein infrared signal processing circuit is electrically connected to the I/O mouths of the GPU processor modules, and two infrared sensors are set to and sweep the floorRobot side.The sweeping robot 1 of two kinds of shapes as shown in Figures 2 and 3,2 Relatively centralized of infrared sensor and horizontal directionOn be symmetrical set in sweeping robot side.
A kind of sweeping robot automatic obstacle-avoiding mode of progression, as shown in figure 4, including the following steps:
S1:High-order ranging is carried out to environment in front of sweeping robot using depth camera, utilizes sonar detection device pairEnvironment carries out low level ranging in front of sweeping robot, completes non-collision scanning;
S2:High-order and low level obstacle in sweeping robot direction of advance is judged respectively, if barrier is not present in high-order and low levelHinder, carry out step S3, if a high position, there are obstacle and low levels there is no carrying out step S4 if obstacle, if low level there are obstacle intoRow step S5;
S3:Sweeping robot maintains current route constant, and repeats the high-low-position obstacle inspection of step S1 and S2Survey determination step;
S4:Sweeping robot carries out limit for height detection, judges whether high-order obstacle is higher than sweeping robot height, influences to sweep the floorRobot advances, and step S5 is carried out if influencing, if not influencing to carry out step S3;
S5:Sweeping robot obstacle edge is walked, and repeats the high-low-position obstacle detection judgement of step S1 and S2Step.That is, if there are obstacles for low level, directly judge that robot can not pass through, if low level can be needed if intoRow limit for height detects, and the present invention utilizes two distance measuring sensors of depth camera and sonar detection device, carries out high-low-position survey respectivelyAway from, and two distance measuring sensors is made to cooperate, the judgement of obstacle or hole (detect and realize by limit for height) is completed, is further drivenDynamic sweeping robot advances along barrier rims or to advancing inside hole.
Preferably, as shown in figure 4, carrying out height to environment in front of sweeping robot using depth camera in the step S1Position ranging judges to whether there is obstacle in high-order m centimetres, meanwhile, using sonar detection device to environment in front of sweeping robotLow level ranging is carried out, judges to whether there is obstacle in n centimetres of low level, and n < m, preferred m values are that 50, n values are 20;
In the step S2, the step S3 is carried out if obstacle is not present in high position 50cm and low level 20cm, if high-orderThere are obstacle, in low level 20cm, there is no obstacles then to carry out the step S4 in 50cm, if in low level 20cm there are obstacle if intoThe row step S5.Using this preferred embodiment, technology the above, advantage is, a high position can be remoteIt measures after judging whether to carry out high-order detection, then judges whether the low level of short distance allows to pass through, it is general to greatly reduce collisionRate, it is ensured that the accuracy at hole and obstacle detection, meanwhile, high-order ranging, limit for height detection, low level ranging three successively according to whenSequence carries out, and greatly reduces operand, improves sweeping robot traveling efficiency.
Further, the method for sweeping robot traveling limit for height detection includes the following steps:
T1:So that depth camera is worked in the capture of standard static pixel screen, it is quiet in standard to calculate sweeping robot apical marginShared pixel coverage in state pixel screen;
T2:Using the depth information in pixel coverage in depth camera scanning step T1, if depth is small in pixel coverageThen judge that the height of high-order obstacle is less than sweeping robot height in 50cm, and carry out the step S5, otherwise carries out step T3;
T3:Depth camera pixel coverage from T1 scans downwards, if being found in scanning process, depth is less than the barrier of 50cmHinder, then judge that the height of high-order obstacle is less than sweeping robot height, otherwise judges that the height of high-order obstacle is more than machine of sweeping the floorPeople's height simultaneously carries out the step S3.That is, the present invention calculates 50cm in front of sweeping robot by comparison calculationLocate, in the picture that depth camera captures, corresponding machine apical margin pixel coverage of sweeping the floor obtains each below this pixel coverageThe depth information of row pixel judges that front stops sweeping robot with the presence or absence of obstacle and advances forward.It should be noted that forThe depth camera of one 480*640 resolution ratio, standard static pixel refer to that it captures out the picture of 480*640 pixels alwaysFace.
As a kind of preferred embodiment of the present invention, it is based on the above, unlike, as shown in figure 5, with 480*For the depth camera of 640 resolution ratio, in the step T1, depth camera works in 480*640 static pixels pictures and catchesIt catches, sweeping robot apical margin accounted for pixel coverage at the 50cm of front is 160-170 rows 4;Depth camera in the step T3It is scanned downwards from 160-170 rows pixel coverage.Since the data volume for carrying out depth scan to each row pixel is big, therefore the present invention usesThe method that high-order and low level ranging combines reduces limit for height detection come when reducing the walking of sweeping robot obstacle edge as far as possibleOperand, to improve the speed of travel and efficiency.
Further, the method that sweeping robot obstacle edge is walked in the step S5 includes the following steps:
E1:For sweeping robot forward in walking process, two infrared sensors of sweeping robot side carry out obstacleRanging carries out step E2 until after single or two infrared sensors return to the distance signal less than L1 centimetres;
E2:Sweeping robot rotation is controlled, is believed until single or two infrared sensors return to the distance less than L2 centimetresAfter number, step E3 is carried out;Single wheel rotation under sweeping robot can be specifically driven, the rotation of entire sweeping robot is completedRotation is made, and L2 < L1, and preferred L1 values are 10cm, and L2 values are 5cm.
E3:Sweeping robot automatic obstacle-avoiding traveling PID is adjusted so that two infrared sensors return to the distance letter of 5cmAfter number, control sweeping robot is walked forward, and constantly carries out step E2.The present invention uses the ranging of two infrared sensors,So that after robot is moved within the scope of obstacle 10cm, by PID closed loop control algorithms, sweeping robot posture is adjusted, untilAfter two infrared sensors return to the distance signal of 5cm, after judgement sweeping robot is parallel with obstacle, sweeping robot is realizedAlong side walk.
As a kind of preferred embodiment of the present invention, it is based on the above, unlike, further include what hole markedStep:Sweeping robot traveling limit for height detects in the step S4, judges that high-order obstacle is above sweeping robot height and goes forward side by sideWhile row step S3, it is demarcated as hole.
Further, sweeping robot is marked according to history hole, is advanced from trend hole.The present invention passes through the mark to holeNote so that when next sweeping robot needs this position to be swept, without carrying out limit for height detection, high-low-position ranging etc. again,Substantially increase the working efficiency of sweeping robot.
For those of ordinary skill in the art, without departing from the concept of the premise of the invention, it can also doGo out several modifications and improvements, these are all within the scope of protection of the present invention.