From the avoidance obstacle method of mobile device and from mobile device
Technical field
The invention belongs to intelligent robot technology field, it is related to setting from the avoidance obstacle method of mobile device and from movement
It is standby.
Background technology
It is existing from mobile device be mostly from mobile intelligent robot, because of its automatic mode for executing wipe clean work
And it is widely used in family.However, barrier is inevitably collided in moving process from mobile device,
Such as:Other motive objects touched in wall, furniture or movement would generally be arranged to identify these barriers from mobile device
Contactless or contact sensor.
Wherein, contactless sensor can utilize infrared ray or laser, by actively send signals to detection and barrier
Hinder the distance between object.The sensor of contact, such as buffer (Bumper), when self-propelled electronic device is collided by buffer
When to barrier, moving direction can be automatically stopped or changed.
The limit in the prior art for having blind area to barrier from contactless or contact the sensor of mobile device
System possibly can not make identification and avoidant disorder for the position of some barriers or barrier from mobile device
The control of object.It even walks at the ground of out-of-flatness, it also can not be instant according to the terrain environment contacted from mobile device
Execute corresponding adjustment.
Therefore, it is necessary to invent it is a kind of new from mobile device and its from avoidance obstacle method, to solve in the prior art
Missing.
Invention content
It is an object of the present invention to overcoming the defects of background technology, a kind of avoidance obstacle from mobile device is provided
Method and from mobile device, concrete scheme is as follows:
A kind of avoidance obstacle method from mobile device, avoidance obstacle method include:
S1:N number of action will be divided into from the walking path of mobile device, and default from each action institute of mobile device completion
Need duration threshold;And N > 1;
S2:It is moved from mobile device by current action of any action;
S3:Judge whether current action is in abnormality, if thening follow the steps S4 in abnormality;If being not in different
Normal state then return to step S2;
S4:Whether the detection current action duration meets the time threshold of respective action, if it is from mobile device
Execute step S5;If otherwise return to step S2;
S5:Execute next action, and return to step S2;
S6:Step S2 to S5 is repeated, until completing walking path from mobile device or being stopped.
Further, whether the method in exception is electric current testing to the current action that judges in the step S2:
S01:It is obtained from mobile device and executes current action in moment T0, the current value I of its driving mechanism0;
S02:It is obtained from mobile device and executes current action in moment T1, the current value I of its driving mechanism1;
S03:Calculate I0With I1Difference , Ruo ∣ I0-I1∣≤I0, then it is normal condition from mobile device;Ruo ∣ I0-I1∣ > I0,
It is then abnormality from mobile device.
Further, whether the method in exception is Rotating speed measring method to the current action that judges in the step S2:
S21:It is obtained from mobile device and executes current action in moment T0, the tachometer value V of its driving mechanism0;
S22:It is obtained from mobile device and executes current action in moment T1, the tachometer value V of its driving mechanism1;
S23:Calculate V0With V1Difference , Ruo ∣ V0-V1∣≥V0, then it is normal condition from mobile device;Ruo ∣ V0-V1∣ < V0,
It is then abnormality from mobile device.
Further, the step S3 is recycled with preset interval time and is executed.
Further, in the step S5 next action direction of travel deviate current action direction of travel.
Further, the step S3 and the commutative sequences of step S4.
One kind from mobile device, including:
Memory module, for storing the operating instruction from mobile device;
Processing module is moved according to above-mentioned avoidance obstacle method so as to execute operating instruction from mobile device and complete avoidance
Make.
Further, the memory module stores above-mentioned avoidance obstacle method.
Further, it is described from mobile device be sweeping robot, window wiping robot or grass-removing robot.
Compared with prior art, technical solution of the present invention:Time-based controllability, tests disorder detection method
Card realizes the avoidance obstacle from mobile device to improve the accuracy of robot barrier judgement.
Description of the drawings
In order to illustrate the technical solution of the embodiments of the present invention more clearly, below will be to needed in the embodiment attached
Figure is briefly described, it should be apparent that, drawings in the following description are some embodiments of the invention, common for this field
For technical staff, without creative efforts, other drawings may also be obtained based on these drawings.
Fig. 1 is the present invention from mobile device structure diagram;
Fig. 2 is the movement decomposition schematic diagram from mobile device of the present invention
Fig. 3 is the mobile route schematic diagram from mobile device of the present invention;
Fig. 4 is the present invention from mobile device from avoidance obstacle method flow diagram;
Fig. 5 is the electric current testing flow chart of the disorder detection method from mobile device of the present invention;
Fig. 6 is the Rotating speed measring method flow chart of the disorder detection method from mobile device of the present invention;
Fig. 7 is the avoidance mobile route schematic diagram from mobile device of the present invention.
Specific implementation mode
Technical solution of the present invention is clearly and completely described below in conjunction with the drawings and specific embodiments, it is clear that this
In described embodiment be only invent a part of the embodiment, instead of all the embodiments.It is described based on the present invention
Specific embodiment, every other implementation obtained by those of ordinary skill in the art without making creative efforts
Example, should all belong in protection domain defined by the claims in the present invention.
In the method for the present invention embodiment from mobile device include the robot moved on face or line, especially on the whole
The robot of energy autonomous is common window wiping robot, sweeping robot, grass-removing robot etc., these robots include processing
Module, mobile module, sensor assembly, memory module, power module and function module etc., are no longer described in detail here.
As shown in Figure 1, including from mobile device in the present embodiment:Processing module, sensor assembly, is deposited mobile module
Store up module, power module and function module.Wherein, mobile module includes that the wheel group of driving mechanism driving carries from mobile device
Main body working face move, by sensor assembly can know where working face environmental information, processing module can root
Map is established according to environmental information so that is obtained the mobile route planned from mobile device, is stored with driving in a storage module
From the operating instruction of mobile device autonomous, operating instruction includes walking, locally walking, row of getting rid of poverty along side from mobile device
It walks, and function module can be dismountable setting from mobile device, power module is from mobile device and each module
The power source of work is provided.
As shown in Fig. 2, from mobile device 100 and can be executed on working face (glass window, ground, lawn) advance,
The action turn to, stepped back, so as to cover working face derived from mobile device, completion cleaning, dust suction, purification, humidification etc. are appointed one or more
Kind function.
As shown in figure 3, at one using wire frame as in the working environment that boundary obstacles indicate, along arrow A, B, C direction
Path be from the mobile route ABC of mobile device 100, wherein can encounter boundary in the directions A are advanced from mobile device and hinder
Hinder, when boundary obstacles are determined, from mobile device to B directional steerings, and after moving a certain distance, is restored to and the directions A phase
The anti-directions C, until covering entire working environment from mobile device.It should be clear that from mobile device 100 when executing any action,
It is required to certain time, this time can be carried out by the length of travel distance or the size of direction of travel angular deflection
It measures.
Specifically, as shown in figure 4, avoidance obstacle method includes:
S1:N number of action will be divided into from the walking path of mobile device, and default from each action institute of mobile device completion
Need duration threshold;And N > 1;
S2:It is moved from mobile device by current action of any action;
S3:Judge whether current action is in abnormality, if thening follow the steps S4 in abnormality;If being not in different
Normal state then return to step S2;
S4:Whether the detection current action duration meets the time threshold of respective action, if it is from mobile device
Execute step S5;If otherwise return to step S2;
S5:Execute next action, and return to step S2;
S6:Step S2 to S5 is repeated, until completing walking path from mobile device or being stopped.
Wherein, current action abnormality is based on the electricity exported at work from the wheel group of mobile device in step s3
Flow valuve or tachometer value change the obstacle judgment method to be formed.
Embodiment one
When disorder detection method is electric current testing, as shown in figure 5,:
S01:It is obtained from mobile device and executes current action in moment T0Driving mechanism current value I0;
S02:It is obtained from mobile device and executes current action in moment T1Driving mechanism current value I1;
S03:Calculate I0With I1Difference , Ruo ∣ I0-I1∣≤I0, then it is normal condition from mobile device;Ruo ∣ I0-I1∣ > I0,
It is then abnormality from mobile device.
As shown in fig. 7, have the presence on barrier (boundary) when executing the forward motion in the directions A from mobile device 100,
Because of the obstacle or different from the friction coefficient of working face suffered from, the front and back practical electricity exported of barrier is being met in persistently same action
Flow valuve has differences with specified value, this difference can show as the abnormal phenomenon of overcurrent.
By record forward motion previous moment T is completed from mobile device0Current value IO, it is complete to re-record forward motion
At moment T1Current value I1, pass through processing module comparative analysis I0With IIDifference , Ruo ∣ I0-I1∣≤I0, then from mobile device
For normal condition;Ruo ∣ I0-I1∣ > I0, then the abnormality that overcurrent is in from mobile device can be confirmed.When from mobile device
100 in abnormality, can be determined that the completion in forward motion with the presence of barrier from mobile device 100, needs to change and work as
Preceding action behavior, execute the directions D steps back action so that changes from the current behavior of mobile device 100.
Embodiment two
When disorder detection method is Rotating speed measring method, as shown in Figure 6:
When being moved due to the different working environments from mobile device, it is based on the identical principle of electric current testing, driving machine
The wheel group of structure is because of obstacle or different from the friction coefficient that working face generates, and there is also differences for the tachometer value of output, so:
S21:It is obtained from mobile device and executes current action in moment T0Driving mechanism tachometer value V0;
S22:It is obtained from mobile device and executes current action in moment T1Driving mechanism tachometer value V1;
S23:Calculate V0With V1Difference , Ruo ∣ V0-V1∣≥V0, then it is normal condition from mobile device;Ruo ∣ V0-V1∣ < V0,
It is then abnormality from mobile device.
In the above two embodiments, there are obstacles in practical walking process for electric current detecting method and Rotating speed measring method
The possibility of erroneous judgement, that is, cause from mobile device when occurring by barrier dieback or stuck phenomenon, current value and tachometer value
It is not in apparent variation.So it can be microcontroller from mobile device that the application, which proposes a kind of processing module, from moving
After dynamic equipment walking a period of time, microcontroller, using Interruption method, can also be obtained from movement and set in lasting current action
Standby duration variable of any action within a certain duration executes avoidance obstacle side by the control loop of variable
Method.
The round-robin method of step S3:Preset time threshold is variable in step sl, if variable is T, it will be appreciated that for profit
Used time interval of delta t does subtraction to T, as T≤0, indicates that current action is completed, is then judged as from the obstacle detection side of mobile device
Method fails, and front of walking encounters obstacle, and next action is then executed from mobile device and carries out avoidance, and continues step S3 and judge from shifting
Whether dynamic equipment is in abnormality when executing current action.Wherein, after Δ t is defined as k Millisecond interruption of microcontroller
Temporal summation, k is defined as interruption times.
Successively decreasing for T among the above realizes that every millisecond of interruption of microcontroller once goes to hold by the way of microcontroller Interruption
Row interrupt processing function, in interrupt processing function, k=k+1, i.e. interruption times are cumulative, when microcontroller executes 100 interruptions
Afterwards, k=100, t=k=100 milliseconds of time interval Δ, corresponding time control variable T=T-1.That is, microcontroller control
System processed executes a time control variable every 100 milliseconds and subtracts 1.If time control variable T starts to be set as 100, when T is kept to
When 0, then the control time of corresponding walking motion is 100*100 milliseconds=10000 milliseconds=10 seconds.
Based on said program, there is the presence on barrier (boundary) from the moving range of mobile device 100, presets before completing
It is 5s into duration, is stopped by obstacle when executing the forward motion duration 3s in the directions A, then illustrate forward motion
Duration is less than 5s, can execute next action from mobile device 100, or when the forward motion time continueing to 5s, from shifting
Dynamic equipment 100 executes next action, is stepped back to the directions D.
In conclusion obstacle detection side can be improved only in conjunction with electric current detecting method or Rotating speed measring method from mobile device
The accuracy of method, and allow the disorder detection method for cancelling complicated mechanical collision contact from mobile device, or it is raw
It produces with high costs such as by infrared, ultrasonic wave, the contactless disorder detection method of laser optical signal, reduction production cost.
It should be noted that when changing current action behavior, certain steering angle can be preset from mobile device so that current dynamic
Make direction when direction of travel deviates upper action completion.
Above disclosed is only the embodiment of technical solution of the present invention, and the right of the present invention cannot be limited with this
Range, therefore equivalent changes made in accordance with the claims of the present invention, are still within the scope of the present invention.