The content of the invention
The purpose of embodiment of the present invention is to provide a kind of paths planning method and robot, to solve outdoor complicated ring
The path planning problem of Jing Xia robots.
In order to solve the above technical problems, embodiments of the present invention provide a kind of paths planning method, including:Obtain ring
Condition figure, and block division is carried out to the map according to current cartographic information;According to the information of each block to the area
Block is classified;Target location is determined, according to route of the rank planning robot of each block from current location to target location.
Embodiments of the present invention additionally provide a kind of robot, including:At least one processor;And with it is described at least
The memory of one processor communication connection;Wherein, have can be by least one computing device for the memory storage
Instruction, the instruction is by least one described computing device, so that at least one described processor is able to carry out above-mentioned road
Footpath planing method.
Embodiments of the present invention additionally provide a kind of computer-readable recording medium, and be stored with computer program, described
Above-mentioned paths planning method is realized when computer program is executed by processor.
Embodiment of the present invention in terms of existing technologies, carries out block division to map and obtains the level of each block
Not, according to these ranks, robot can be understood which place can be walked in surrounding environment, which place cannot
Walk, which place is more unobstructed etc..After being had gained some understanding to surrounding environment, robot is planned from current location to target location again
Route.This way can make robot avoiding obstacles, the region for forbidding robot ambulation etc., the route for contributing to enhancing to plan
Reliability, and can ensure that robot quickly and smoothly reaches target location.
Further, after the information of each block of the basis is classified to the block, the path planning
Method also includes:The information of block described in real-time update, and according to the rank of the information adjustment block after renewal.This causes
Robot can adjust the track route of oneself, this can ensure the optimality of route in real time in real time according to current environmental aspect, from
And target location can quickly be reached by further ensureing machine.
Further, the determination target location, is specifically included:The current level of block is with presetting where calculating robot
In the range of block to be selected current level between difference;Difference according to obtained by calculating, is selected full from the block to be selected
The block of sufficient preparatory condition is used as target location.A kind of method of determination target location is provided.
Further, the route according to the rank planning robot of each block from current location to target location, tool
Body includes:Compare the rank size of each adjacent block of block where robot, and select in each adjacent block rank most
High block as robot next step traveling target.A kind of method for determining route is provided.
Further, before the acquisition environmental map, the paths planning method also includes:Pre-set and store
Corresponding relation between different blocks and each rank;The information of each block of basis is classified to the block, tool
Body includes:The block is matched with the block stored;When the match is successful, deposited from the corresponding relation described in lookup
The corresponding rank of block of storage, and using the rank as the block rank.A kind of side for obtaining each difference rank is provided
Method.
Further, it is described by the block with store block matched after, the paths planning method is also
Including:If matching is unsuccessful, the information of the block is sent to server;Receiving the block of server return
Rank when, using the rank of return is as the rank of the block and updates the corresponding relation.Pass through the side of this self study
Formula, is conducive to further improving cognition of the robot to surrounding environment.
Embodiment
To make the purpose, technical scheme and advantage of the embodiment of the present invention clearer, below in conjunction with accompanying drawing to the present invention
Each embodiment be explained in detail.However, it will be understood by those skilled in the art that in each embodiment party of the invention
In formula, in order that reader more fully understands the application and proposes many ins and outs.But, even if without these ins and outs
With many variations based on following embodiment and modification, the application technical scheme claimed can also be realized.
The first embodiment of the present invention is related to a kind of paths planning method.Idiographic flow is as shown in Figure 1;
Step 101:Environmental map is obtained, and block division is carried out to map according to current cartographic information.
The information of the map may include the identification information of every part, such as residential quarter, road, office block, river.According to
These information can be by map partitioning into block one by one.One block can be a residential quarter, a building office block,
School or a road.For the road with multiple tracks, also specifically each track can be regard as a block.In this reality
Apply in application, the division of block can be carried out according to actual conditions, present embodiment is without limitation.
Step 102:Block is classified according to the information of each block.
The information of the block may include identification information, whether allow to pass through, the degree of crowding, the maximal rate for allowing to advance,
Quantity of current robot etc..Specifically, if some block is a residential quarter, its identification information is exactly residential quarter;If should
Block is bar road, and its identification information is road.Which area can be substantially judged according to these identification information robots
Block can cannot be used as track route as track route, which block.Whether robot can also allow according to block is passed through
To further determine that whether it can be as track route.For road, it is also contemplated that current crowded in its each track
The information such as degree, the maximal rate for allowing traveling.
All information of a block can be integrated in actual applications, to assess it as the feasible of robot course
Property, so as to be classified to it.Feasibility is bigger, and the rank to its distribution is higher.(can be bright for some forbidden blocks
The place that the robots such as place or river, the building of the entrance of non-working person can not pass through is forbidden in order) can be straight
Connect distribution lowest level.And for the current block of other permission robots, the degree that can be freely walked according to robot come
Distribute rank.Such as a road with multiple tracks, the degree of crowding in every track may be otherwise varied, and this is just
Cause degree that robot can freely walk difference, so that the rank in different tracks is different.
Step 103:Determine target location.
Present embodiment can be preset when the block to be selected in the rank and preset range of the block where robot
When difference between rank meets preparatory condition, robot will be using block to be selected as target location;If difference is unsatisfactory for presetting
Condition, then the position being currently located robot is as target location, even if robot stays in original place.
In actual applications, when needing robot to go to block to be selected, and the rank of block is to be selected with this where robot
, can also be by adjusting the rank or the block to be selected of block where robot when the difference of the rank of block is unsatisfactory for preparatory condition
Rank so that both difference meets preparatory condition.For example, the robot quantity of the block where robot is excessive, and treat
When the robot quantity of constituency block is again very few, for the robot quantity of two blocks of reasonable distribution, so that it may by adjusting machine
The rank or the rank of the block to be selected of block where people, so that both differences meet preparatory condition.
Present embodiment, can determine target location in the following manner:
Step 1031:In the current level and preset range of block where calculating robot the current level of block to be selected it
Between difference.
It is noted that the quantity of block to be selected can have multiple, multiple blocks to be selected are distributed in different areas.Example
Such as, the block where robot is A, and block to be selected is respectively B, C, D, and wherein B, C, D is distributed in different areas.
Step 1032:Difference according to obtained by calculating, selects the block for meeting preparatory condition as mesh from block to be selected
Cursor position.
After the difference for obtaining rank between A and B, A and C, A and D, these differences can be compared with default threshold value,
After some difference reaches the default threshold value, so that it may regard the corresponding block to be selected of the difference as target location.
In actual applications, when expect robot reach B when, so that it may adjust A or B rank so that both rank it
Difference reaches the default threshold value.Meanwhile, also to ensure the difference of the rank between A and C, A and D can not reach the default threshold value.
Step 104:According to route of the rank planning robot of each block from current location to target location.
, can be by the rank of each adjacent block for comparing the block that robot is currently located in real time it is determined that behind target location
Size, to select the next step traveling target of robot.When selecting next step traveling target, it may be selected in each adjacent block
Highest-ranking block is used as the traveling target.
Or, it is determined that behind target location, also can first be searched out according to the rank currently respectively distinguished from current location to mesh
All routes of cursor position.Then the rank sum for all blocks that every route includes is calculated, and rank sum is maximum
Route as robot course.At the same time, in addition it is also necessary to consider the length of distance, preferably rank sum is larger and road
Route shorter Cheng Changdu.Course can be selected according to the length of the rank sums of all blocks and total distance.
Fig. 2 shows the course that robot is cooked up according to the rank of each block.The each area of digitized representation in figure
The rank of block, wherein, 1 represents maximum level, and 10 represent minimal level.Here " rank sum is maximum ", is digital sum
It is minimum.
It should be noted that after the rank that step 102 determines each block, the rank of each block not immobilizes
, but can constantly update over time.It is appreciated that a road different time points its congestion level be it is different,
For example, during peak time on and off duty morning and evening, its congestion level is shown higher than other time point.This information change of road, makes
The rank that it is obtained in the different time is different.In order to grasp in time these change information, can each block of real-time update letter
Breath, and according to the rank of the information adjustment block after renewal, so that its rank can more react reality.
Present embodiment in terms of existing technologies, carries out block division to map and obtains the rank of each block,
According to these ranks, robot can be understood which place can be walked in surrounding environment, which place cannot be walked, which
A little places are more unobstructed etc..After being had gained some understanding to surrounding environment, robot plans the route from current location to target location again.
This way can make robot avoiding obstacles, the region for forbidding robot ambulation etc., contribute to enhancing plan route can
By property, and it can ensure that robot quickly and smoothly reaches target location.
Second embodiment of the present invention is related to a kind of paths planning method.Second embodiment is big with first embodiment
Cause is identical, is in place of the main distinction:It is the rank and preset range of the block according to where robot in first embodiment
Difference between the rank of interior block to be selected, to determine target location.And be then according to robot in second embodiment
Difference between rank after the block adjustment of place and the rank before adjustment, to determine target location.
Difference between rank after predeterminable multiple threshold values, and the block adjustment according to where robot and the rank before adjustment
Relation between value and the plurality of threshold value, to determine target location.The quantity of threshold value can be set according to the quantity of block to be selected.
For example, block where robot is A, there are two blocks to be selected of B, C, then two threshold values can be set, respectively the
One threshold value and Second Threshold.
After adjustment A rank, the difference of the rank after A adjustment and the rank before adjustment is calculated.If difference is less than default
First threshold, then the position being currently located robot allows robot to stay in original place as target location.If difference is more than
Or equal to the first threshold and less than Second Threshold, then using B as target location, even if robot is moved to B from A.If poor
Value is more than Second Threshold, then regard C as target location.
In addition, present embodiment can also be pre-set before environmental map is obtained and store different block and rank
Between corresponding relation.So when the information according to each block is classified to the block marked off, so that it may will first divide
The block gone out is matched with the block stored, when the match is successful, then the storage can be searched from the corresponding relation of storage
The corresponding rank of block, and using the rank found out as block rank., can be by the letter of the block if matching is unsuccessful
Breath is sent to server, and the rank of the block is distributed by server.The rank of distribution can be returned to machine by server afterwards
People, robot using the rank of return as the block rank.At the same time, robot can also store by the block with it is corresponding
Rank, to update corresponding relation.
The step of various methods are divided above, be intended merely to description it is clear, can be merged into when realizing a step or
Some steps are split, multiple steps are decomposed into, as long as including identical logical relation, all protection domain in this patent
It is interior;To adding inessential modification in algorithm or in flow or introducing inessential design, but its algorithm is not changed
Core design with flow is all in the protection domain of the patent.
Third embodiment of the present invention is related to a kind of robot.The robot includes:At least one processor;And with
The memory of at least one processor communication connection;Wherein, the memory storage have can by it is described at least one processing
The instruction that device is performed, the instruction is by least one described computing device, so that at least one described processor is able to carry out
Paths planning method described in above-mentioned embodiment.
Wherein, memory and processor are connected using bus mode, and bus can include the bus of any number of interconnection
And bridge, one or more processors and the various of memory are electrically connected to together by bus.Bus can also will be such as peripheral
The various other of equipment, voltage-stablizer and management circuit or the like are electrically connected to together, and these are all well known in the art
, therefore, no longer it is described further herein.EBI provides interface between bus and transceiver.Transceiver
Can be an element or multiple element, such as multiple receivers and transmitter there is provided for over a transmission medium with
The unit of various other device communications.The data handled through processor are transmitted on the radio medium by antenna, further,
Antenna also receives data and transfers data to processor.
Processor is responsible for bus and common processing, can also provide various functions, including regularly, peripheral interface,
Voltage-regulation, power management and other control functions.And memory can be used for storage processor and perform operation when institute
The data used.
Four embodiment of the invention is related to a kind of computer-readable recording medium, and be stored with computer program.Computer
Above method embodiment is realized when program is executed by processor.
That is, it will be understood by those skilled in the art that realize that all or part of step in above-described embodiment method is can be with
The hardware of correlation is instructed to complete by program, the program storage is in a storage medium, including some instructions are to make
An equipment (can be single-chip microcomputer, chip etc.) or processor (processor) perform side described in the application each embodiment
The all or part of step of method.And foregoing storage medium includes:USB flash disk, mobile hard disk, read-only storage (ROM, Read-Only
Memory), random access memory (RAM, Random Access Memory), magnetic disc or CD etc. are various can store journey
The medium of sequence code.
It will be understood by those skilled in the art that the respective embodiments described above are to realize the specific embodiment of the present invention,
And in actual applications, can to it, various changes can be made in the form and details, without departing from the spirit and scope of the present invention.