CN107065872B - Grid map creation method of intelligent robot - Google Patents
Grid map creation method of intelligent robot Download PDFInfo
- Publication number
- CN107065872B CN107065872B CN201710234045.9A CN201710234045A CN107065872B CN 107065872 B CN107065872 B CN 107065872B CN 201710234045 A CN201710234045 A CN 201710234045A CN 107065872 B CN107065872 B CN 107065872B
- Authority
- CN
- China
- Prior art keywords
- grid
- map
- offset
- entering
- obstacle
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 94
- 238000013519 translation Methods 0.000 claims description 24
- 230000006870 function Effects 0.000 claims description 12
- 241001417527 Pempheridae Species 0.000 claims description 7
- 230000033001 locomotion Effects 0.000 claims description 6
- 230000006399 behavior Effects 0.000 claims description 4
- 230000003139 buffering effect Effects 0.000 claims description 4
- 230000004888 barrier function Effects 0.000 claims description 3
- 230000009191 jumping Effects 0.000 claims description 2
- 238000001514 detection method Methods 0.000 description 16
- 238000004140 cleaning Methods 0.000 description 6
- 238000004422 calculation algorithm Methods 0.000 description 5
- 238000013473 artificial intelligence Methods 0.000 description 3
- 238000004519 manufacturing process Methods 0.000 description 3
- 238000010408 sweeping Methods 0.000 description 3
- 239000000428 dust Substances 0.000 description 2
- 230000007613 environmental effect Effects 0.000 description 2
- 230000002093 peripheral effect Effects 0.000 description 2
- 238000003860 storage Methods 0.000 description 2
- 230000001133 acceleration Effects 0.000 description 1
- 238000013459 approach Methods 0.000 description 1
- 238000013528 artificial neural network Methods 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000002068 genetic effect Effects 0.000 description 1
- 230000001788 irregular Effects 0.000 description 1
- 238000012423 maintenance Methods 0.000 description 1
- 238000005259 measurement Methods 0.000 description 1
- 238000005381 potential energy Methods 0.000 description 1
- 230000002265 prevention Effects 0.000 description 1
- 238000011160 research Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G05—CONTROLLING; REGULATING
- G05D—SYSTEMS FOR CONTROLLING OR REGULATING NON-ELECTRIC VARIABLES
- G05D1/00—Control of position, course, altitude or attitude of land, water, air or space vehicles, e.g. using automatic pilots
- G05D1/02—Control of position or course in two dimensions
- G05D1/021—Control of position or course in two dimensions specially adapted to land vehicles
-
- G—PHYSICS
- G05—CONTROLLING; REGULATING
- G05D—SYSTEMS FOR CONTROLLING OR REGULATING NON-ELECTRIC VARIABLES
- G05D1/00—Control of position, course, altitude or attitude of land, water, air or space vehicles, e.g. using automatic pilots
- G05D1/02—Control of position or course in two dimensions
- G05D1/021—Control of position or course in two dimensions specially adapted to land vehicles
- G05D1/0231—Control of position or course in two dimensions specially adapted to land vehicles using optical position detecting means
- G05D1/0238—Control of position or course in two dimensions specially adapted to land vehicles using optical position detecting means using obstacle or wall sensors
-
- G—PHYSICS
- G05—CONTROLLING; REGULATING
- G05D—SYSTEMS FOR CONTROLLING OR REGULATING NON-ELECTRIC VARIABLES
- G05D1/00—Control of position, course, altitude or attitude of land, water, air or space vehicles, e.g. using automatic pilots
- G05D1/02—Control of position or course in two dimensions
- G05D1/021—Control of position or course in two dimensions specially adapted to land vehicles
- G05D1/0231—Control of position or course in two dimensions specially adapted to land vehicles using optical position detecting means
- G05D1/0242—Control of position or course in two dimensions specially adapted to land vehicles using optical position detecting means using non-visible light signals, e.g. IR or UV signals
-
- G—PHYSICS
- G05—CONTROLLING; REGULATING
- G05D—SYSTEMS FOR CONTROLLING OR REGULATING NON-ELECTRIC VARIABLES
- G05D1/00—Control of position, course, altitude or attitude of land, water, air or space vehicles, e.g. using automatic pilots
- G05D1/02—Control of position or course in two dimensions
- G05D1/021—Control of position or course in two dimensions specially adapted to land vehicles
- G05D1/0268—Control of position or course in two dimensions specially adapted to land vehicles using internal positioning means
- G05D1/027—Control of position or course in two dimensions specially adapted to land vehicles using internal positioning means comprising intertial navigation means, e.g. azimuth detector
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/29—Geographical information databases
-
- G—PHYSICS
- G09—EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
- G09B—EDUCATIONAL OR DEMONSTRATION APPLIANCES; APPLIANCES FOR TEACHING, OR COMMUNICATING WITH, THE BLIND, DEAF OR MUTE; MODELS; PLANETARIA; GLOBES; MAPS; DIAGRAMS
- G09B29/00—Maps; Plans; Charts; Diagrams, e.g. route diagram
- G09B29/003—Maps
- G09B29/005—Map projections or methods associated specifically therewith
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Remote Sensing (AREA)
- Radar, Positioning & Navigation (AREA)
- Aviation & Aerospace Engineering (AREA)
- Theoretical Computer Science (AREA)
- Automation & Control Theory (AREA)
- Databases & Information Systems (AREA)
- Electromagnetism (AREA)
- General Engineering & Computer Science (AREA)
- Mathematical Physics (AREA)
- Business, Economics & Management (AREA)
- Educational Administration (AREA)
- Educational Technology (AREA)
- Data Mining & Analysis (AREA)
- Control Of Position, Course, Altitude, Or Attitude Of Moving Bodies (AREA)
Abstract
A grid map creation method of an intelligent robot comprises the following steps: (1) controlling the robot to move; (2) detecting whether the current position of the robot is a side-following behavior and whether an obstacle is detected, wherein the side-following behavior is performed without the obstacle entering (3a), the side-following behavior is performed with the obstacle entering (3b), the side-following behavior is not performed with the obstacle entering (3c), and the side-following behavior is not performed with the obstacle entering (3 d); (3a) marking the grid of the current position on the map as an edge action point and returning to the step (1); (3b) marking the grid of the current position on the map as an edge behavior point, calculating the grid coordinate of the obstacle, marking the corresponding grid on the map as an obstacle point, and returning to the step (1); (3c) marking the grid of the current position on the map as a normal passing point, calculating the grid coordinate of the obstacle, marking the corresponding grid as an obstacle point, and returning to the step (1); (3d) the grid for the current location on the map is marked as a normal pass point and returns to (1).
Description
All as the field of technology
The invention relates to the technical field of intelligent control, in particular to a grid map creating method of an intelligent robot.
All the above-mentioned background techniques
The intelligent robot is entering a new development stage as a key factor in the process of changing the world economic and industrial growth modes. The intelligent robot is a manufacturing equipment, equipment tool and service consumer product with sensing, decision-making and execution functions, the manufacturing equipment intelligent robot used in production processes and environments is called an industrial robot, the consumer product intelligent robot used for personal or household service is called a household service robot, and the equipment tool intelligent robot used for operation and maintenance in special environments is called a special service robot.
Taking a household floor sweeping robot as an example, the robot is also called an automatic cleaning machine, intelligent dust collection, a robot dust collector and the like, is one of intelligent household appliances, and can automatically complete floor cleaning work in a room by means of certain artificial intelligence.
The sweeping robot needs to cover the whole room area according to a certain path plan to complete the purpose of traversing. The path planning includes two types of random traversal and planning traversal.
And random traversal, namely the robot tries to cover the working area according to a certain moving algorithm, such as a triangular track and a pentagonal track, and if an obstacle is encountered, a corresponding steering function is executed. This approach is a low cost strategy to trade time for space, e.g., 100% coverage can be achieved regardless of time. The random overlay method does not use positioning, does not have an environment map, and cannot plan a path. It is this method that most sweeping robots of iRobots currently employ.
And planning and traversing means that an environment map is established in the walking process of the robot, the map is analyzed in real time, new path planning is completed, and all rooms are cleaned. The method has high efficiency, and can finish cleaning at the highest speed on the premise of ensuring the coverage rate.
Where planning a sweep requires three problems to be solved:
1. a map is built and can be located (the position of the robot is determined).
2. Navigation, navigation from the starting position to the target position, and can realize automatic obstacle avoidance in the navigation process.
3 method of traversing the whole room.
There are various solutions to the problem 1, such as a grid method, an artificial potential field method, a template model method, and an artificial intelligence method.
The artificial potential field method designs the motion of a robot in the surrounding environment into the motion in a potential field, and potential energy sources are two types: repulsive and attractive poles. The areas where entry is not desired and the obstacles belong to repulsive poles, and the areas proposed to pass are attractive poles. And the resultant force of the attraction force and the repulsion force is used as the acceleration force of the robot to control the motion direction of the robot and calculate the position of the robot. However, this method usually has the problems of local minimum points and excessive calculation amount.
The template model method is based on the prior knowledge and the environmental information obtained by traversing the robot through the prior environmental map to match with a template defined in advance. It requires the memory of the environment model and template defined in advance, so it is not easy to deal with the changing environment, such as suddenly appearing an obstacle in the course of traversing the robot.
The artificial intelligence method comprises a fuzzy control algorithm, a neural network path planning, a genetic algorithm and the like. These algorithms are computationally intensive, and are mostly still in the laboratory research phase, with relatively few practical applications.
The grid method divides the working space of the robot by grids with the same size, and represents the environment by a grid array, wherein each grid is one of two states, namely in a free space or an obstacle space. The method has the characteristics of simplicity and easy realization, thereby bringing great convenience for realizing path planning and having the capability of representing irregular obstacles; the disadvantage is that the representation efficiency is not high, and the contradiction between space-time overhead and precision exists. The grid division is large, the storage capacity of environment information is small, the planning time is short, the resolution ratio is reduced, and the capability of finding a path in a dense environment is weakened; the grid division is small, the environment resolution is high, the capability of finding the path under the dense environment is strong, but the storage capacity of the environment is large. The size of the grid directly affects the performance of the control algorithm.
All the contents of the invention
The invention aims to provide a method for utilizing the maximum efficiency of a grid map, so that the method can meet the precision requirement of an intelligent robot and the cleaning range requirement of the intelligent robot. The purpose of the invention is realized by the following technical scheme:
a grid map creating method of an intelligent robot is based on the intelligent robot and comprises a mobile body, a main control module, a sensor set, a power supply module and a regional operation assembly; the grid map creation method comprises the following steps:
(1) controlling the robot to move;
(2) detecting whether the action of the current position of the robot is edge action and whether the current position detects an obstacle, entering a step (3a) if the action of the current position is edge action but the obstacle is not detected, entering a step (3b) if the action of the current position is edge action and the obstacle is detected at the same time, entering a step (3c) if the action of the current position is not edge action but the obstacle is detected, and entering a step (3d) if the action of the current position is not edge action but the obstacle is not detected;
(3a) marking the grid of the current position on the map as an edge action point and returning to the step (1);
(3b) marking the grid of the current position on the map as an edge behavior point, simultaneously calculating the grid coordinate of the obstacle and marking the grid corresponding to the obstacle on the grid map as an obstacle point, and then returning to the step (1);
(3c) marking the grid of the current position on the map as a normal passing point, simultaneously calculating the grid coordinate of the obstacle and marking the grid corresponding to the obstacle on the grid map as an obstacle point, and then returning to the step (1);
(3d) and (4) marking the grid of the current position on the map as a normal passing point and returning to the step (1).
As a specific technical solution, when the grid map is created, the grid of the starting point of the robot movement on the map is directly marked as a normal passing point.
As a specific technical solution, each grid in the grid map is represented by a numerical sequence, which includes: a digital segment indicating which area the grid is located in, a digital segment indicating whether the intelligent robot has reached the grid, a digital segment indicating whether the grid has an obstacle, and a digital segment indicating that the intelligent robot has passed the grid along the edge.
As a specific technical solution, the method for calculating the grid coordinate of the obstacle specifically includes:
A. calculating the distance between the obstacle and the central point of the robot;
B. calculating the actual angle between the obstacle and the center of the robot;
C. calling a trigonometric function, and calculating the coordinates of the barrier point relative to the central point of the robot;
D. and adding the calculated coordinates to the coordinates of the center point of the robot to obtain the coordinates of the obstacle.
As a specific technical solution, in the step (1), each time the robot is controlled to move, a map translation sub-process is first executed, where the sub-process includes:
a. whether the whole grid map needs to be translated or not is detected, and the method specifically comprises the following steps: when the actually used grid in one direction of the x axis or the y axis of the grid map reaches the boundary of the whole grid map and the other direction of the grid map has the condition that the rest grid is not used, the step b is carried out, otherwise, the sub-process is skipped;
b. determining the actual grid number to be translated at this time according to the offset grid numbers of the x axis and the y axis at the last time and the difference value of the offset grid numbers of the x axis and the y axis at this time;
c. and translating the whole grid map according to the number of the grids to be translated actually at this time.
As a specific technical scheme, when a translation function is started, a small segment of memory is opened up to be used as a buffer, grid map data which are out of range are stored, and after the whole grid map is translated, the buffered grid data are written into the grid map.
The grid map creation method of the intelligent robot can utilize the grid map with the maximum efficiency, so that the grid map can meet the precision requirement of the intelligent robot and the cleaning range requirement of the intelligent robot.
Description of the drawings
Fig. 1 is a block configuration diagram of an intelligent robot on which a grid map creation method according to an embodiment of the present invention is based.
Fig. 2 is a main flowchart of a grid map creation method according to an embodiment of the present invention.
Fig. 3 is a flowchart of a method for calculating grid coordinates of an obstacle in a grid map creation method according to an embodiment of the present invention.
Fig. 4 is a flowchart of starting map translation in the grid map creation method according to the embodiment of the present invention.
Fig. 5 is a flowchart of determining the number of translated grids of a map in the grid map creation method according to the embodiment of the present invention.
Fig. 6 is a flowchart of implementing a map translation operation in the grid map creation method provided in the embodiment of the present invention.
Fig. 7 is a data reading flow chart of a buffer operation in a process of implementing map translation in the grid map creation method according to the embodiment of the present invention.
Fig. 8 is a data writing flow chart of a buffer operation in a process of implementing map translation in the raster map creation method according to the embodiment of the present invention.
(specific embodiments) in all cases
The following further describes embodiments of the present invention with reference to the accompanying drawings:
as shown in fig. 1, the grid map creation method for an intelligent robot according to the present embodiment is based on an intelligent robot that includes a mobile body 1, a main control module 4, a sensor set 5, a power module, and a regional operation component. Wherein, the mobile machine body 1 comprises a machine shell and mobile wheels 2 and 3. The sensor set 5 comprises a collision detection sensor, an obstacle detection sensor, a distance information sensor and an angle information sensor which are all electrically connected with the main control module.
Specifically, the collision detection sensor is used for judging whether a current collision with an obstacle occurs when the intelligent robot collides with the obstacle in front and informing the main control module 4 of the current collision with the obstacle. The falling-prevention detection sensor is used for judging the current dangerous state and informing the main control module 4 when the lower part of the intelligent robot is in a suspended state. The obstacle detection sensor is used for detecting whether obstacles appear around the robot and informing the main control module 4, and comprises a falling prevention detection sensor and a peripheral detection sensor, wherein the peripheral detection sensor consists of front, front left, front right, left, right and five infrared distance measurement sensors. The distance information sensor is a wheel encoder, and the angle information sensor is a gyroscope. The area operation component refers to a component for performing some functional operations on an area where the robot is located, and may be one or more of a cleaning component, a camera component, a humidifying component, a dehumidifying component, and a deinsectization component.
In the method for creating a grid map of an intelligent robot provided by this embodiment, a grid map is used when the map is constructed. And constructing a grid map by using the distance information acquired by the distance information sensor, the angle information acquired by the angle information sensor, the collision information acquired by the collision detection sensor and the obstacle information acquired by the obstacle detection sensor, and recording normal passing points, obstacle points and edge points. The intelligent robot updates the map while moving, and the state of the intelligent robot can be updated on the grid map as long as the intelligent robot moves by the intelligent robot. It can be understood that the smaller the grid, the higher the precision, but limited by the memory and the operation speed, we select a square with the side length of the grid being one third of the diameter of the intelligent robot.
Referring to fig. 2, the method for creating a grid map of an intelligent robot according to this embodiment includes:
(1) controlling the robot to move;
(2) detecting whether the action of the current position of the robot is edge action and whether the current position detects an obstacle, entering a step (3a) if the action of the current position is edge action but the obstacle is not detected, entering a step (3b) if the action of the current position is edge action and the obstacle is detected at the same time, entering a step (3c) if the action of the current position is not edge action but the obstacle is detected, and entering a step (3d) if the action of the current position is not edge action but the obstacle is not detected;
(3a) marking the grid of the current position on the map as an edge action point and returning to the step (1);
(3b) marking the grid of the current position on the map as an edge behavior point, simultaneously calculating the grid coordinate of the obstacle and marking the grid corresponding to the obstacle on the grid map as an obstacle point, and then returning to the step (1);
(3c) marking the grid of the current position on the map as a normal passing point, simultaneously calculating the grid coordinate of the obstacle and marking the grid corresponding to the obstacle on the grid map as an obstacle point, and then returning to the step (1);
(3d) and (4) marking the grid of the current position on the map as a normal passing point and returning to the step (1).
For better performance, only part of the contents in the method are shown in the flow chart of fig. 2, and the edgewise behavior judgment and the obstacle judgment are performed in sequence, and actually, the two judgments are partially sequential.
The established grid map is stored in the main control module 4 and managed by the main control module 4. The representation of the grid map may be: the black grid represents that the intelligent robot does not mark the grid, the green grid represents a normal passing point of the intelligent robot, the red grid represents an obstacle point sensed by the obstacle detection sensor, the blue grid represents an obstacle point detected by the collision detection sensor and collided, and the white grid represents a point where the intelligent robot performs an edge action.
Where each grid is represented by an 8bit number. The upper four bits of which record area information indicating in which area this grid is located, thus supporting 16 areas at most. The lower four bits are used to represent the actual information of the map: the 0 th bit represents whether the intelligent robot reaches the grid, 0 represents that the intelligent robot does not reach the grid, and 1 represents that the intelligent robot reaches the grid; the 1 st bit indicates whether an obstacle exists in the grid, 0 indicates absence, and 1 indicates presence; bit 2, when indicating that the robot is along the edge, a1 indicates that the robot passes through the grid, and a 0 indicates that the robot does not pass through the grid; and 3, reserving.
As shown in fig. 3, in the method for creating a grid map of an intelligent robot provided in this embodiment, the method for calculating the grid coordinates of the obstacle specifically includes:
A. calculating the distance between the obstacle and the central point of the robot;
B. calculating the actual angle between the obstacle and the center of the robot;
C. calling a trigonometric function, and calculating the coordinates of the barrier point relative to the central point of the robot;
D. and adding the calculated coordinates to the coordinates of the center point of the robot to obtain the coordinates of the obstacle.
Wherein, the obstacle point detected by the collision detection sensor and the obstacle point sensed by the obstacle detection sensor are treated differently (labeled differently) in the map; as described above, the red grids represent the obstacle points sensed by the obstacle detection sensors, and the blue grids represent the obstacle points detected by the collision detection sensors at which the collision occurs, but they may be uniformly labeled (for example, they are all labeled in red). However, regardless of the obstacle sensed by the sensor, the distance and angle may be calculated according to the following formulas:
the distance between the obstacle and the center point of the sweeper is the distance detected by the sensor plus the radius of the robot;
the angle between the obstacle and the center of the sweeper is equal to the angle between the right front of the sweeper and the angle difference between the position of the sensor and the right front of the robot.
In the method for creating a grid map of an intelligent robot provided by this embodiment, the starting point of the robot is generally located at the central point of the grid map. The grid map is fixed in size, and if the prototype is always swept in one direction, the map is easily out of range. So that an out-of-range map appears in one direction, while a map in the opposite direction to this direction is left unused.
The method is introduced below, and the whole grid map is translated in real time according to the border-crossing condition of the actually used map, so that the actually used map is always positioned at the central position of the whole grid map until the length or width of the actually used map really reaches the limit of the whole grid map.
In step (1) of the method for creating a grid map of an intelligent robot, each time the robot is controlled to move to update the grid map, a map translation sub-process is first performed, where the sub-process includes:
a. whether the whole grid map needs to be translated or not is detected, and the method specifically comprises the following steps: when the actually used grid in one direction of the x axis or the y axis of the grid map reaches the boundary of the whole grid map and the other direction of the grid map has the unused residual grid, the step b is started to translate the whole grid map, otherwise, the sub-process is skipped;
b. determining the actual grid number to be translated at this time according to the offset grid numbers of the x axis and the y axis at the last time and the difference value of the offset grid numbers of the x axis and the y axis at this time;
c. and translating the whole grid map according to the number of the grids to be translated actually at this time.
As shown in fig. 4, where x-min, x-max is the minimum and maximum values of the used grid in the x-axis direction; y-min, y-max being the minimum and maximum values of the used grid in the y-axis direction; the x-offset, y-offset records the actual grid offset in the x-axis, y-axis direction of the current grid map.
The specific method of the step a in the map translation sub-process comprises the following steps:
a1, respectively updating the x axis and the y axis of the map, and the maximum and minimum values x-min, x-max, y-min and y-max of the used grids;
a2, judging whether (x-max + x-offset) is close to the boundary, but (x-min + x-offset) is not close to the boundary, if yes, subtracting one from x-offset and entering the step a4, otherwise, entering the step a 3;
a3, judging whether (x-min + x-offset) is close to the boundary, but (x-max + x-offset) is not close to the boundary, if yes, adding x-offset and entering the step a4, otherwise, directly entering the step a 4;
a4, judging whether (y-max + y-offset) is close to the boundary, but (y-min + y-offset) is not close to the boundary, if yes, then y-offset is reduced by one and step a6 is proceeded, otherwise, step a5 is proceeded;
a5, judging whether (y-min + y-offset) is close to the boundary, but (y-max + y-offset) is not close to the boundary, if yes, adding y-offset and entering the step a6, otherwise, directly entering the step a 6;
a6, if the x-offset or y-offset is changed, starting to translate the whole grid map, otherwise, jumping out of the sub-flow.
As shown in fig. 5, wherein x-offset and y-offset record the actual grid offset in the x-axis and y-axis directions of the current grid map; old-x-offset and old-y-offset record grid offset in the x-axis direction and the y-axis direction when the grid map is translated last time; abs represents the absolute value of this number; act-x-offset and act-y-offset are the actual number of grids to be shifted.
The specific method of the step b in the map translation sub-process comprises the following steps:
b1, setting act-x-offset to x-offset-old-x-offset, and act-y-offset to y-offset-old-y-offset;
b2, judging whether act-x-offset is less than 0, if yes, determining that the whole grid map moves abs (act-x-offset) grids in the negative x-axis direction and entering the step b4, otherwise entering the step b 3;
b3, judging whether act-x-offset is greater than 0, if yes, determining that the whole grid map moves abs (act-x-offset) grids in the positive direction of the x axis and entering the step b4, otherwise, directly entering the step b 4;
b4, judging whether actul-y-offset is less than 0; if yes, determining that the whole grid map moves abs (act-y-offset) grids in the negative direction of the y axis and entering step b6, otherwise entering step b 5;
b5, judging whether act-y-offset is greater than 0; moving abs (act-y-offset) grids in the positive y-axis direction of the whole grid map and entering step b6, otherwise, directly entering step b 6;
b6, updating the grid offsets old-x-offset and old-y-offset records in the x-axis and y-axis directions of the last grid map translation by using the actual grid offsets x-offset and y-offset in the x-axis and y-axis directions of the current grid map.
As shown in FIG. 6, the global-map is a grid map array; height and Width represent the Height and Width of the global-map grid array; start-x represents that the first line has a line number with data not zero, that is, data after the line is started needs to be translated; the count records how many grids of a row of data are zero (unused grids). If the whole row of raster data is zero, the translation is finished.
This embodiment is described by taking the x-axis to translate in the negative direction as an example, i.e., act-x-offset is less than zero. When the whole grid map is translated, no used grid (data is zero) is not needed to be operated.
The specific method of the step c in the map translation sub-process comprises the following steps:
c1, start x is 0, y is 0, start-x is 0;
c2, judging whether x is < Height, if yes, entering a step c3, and if not, ending;
c3, setting count to 0 and entering step c 4;
c4, judging whether y is less than Width, if yes, entering the step c5, and if not, returning to the step c2 by x + +;
c5, determining whether start-x! If yes, go to step c51, otherwise go to step c 6;
c51, determining whether global-map [ x ] [ y ]! 0; if yes, setting global-map [ x + actul-x-offset ] [ y ] ═ global-map [ x ] [ y ], global-map [ x ] [ y ] ═ 0 and proceeding to step c8, otherwise, count + + and proceeding to step c 8;
c6, determining whether global-map [ x ] [ y ]! If yes, go to step c7, otherwise go to step c 8;
c7, setting start-x ═ x, global-map [ x + actul-x-offset ] [ y ] ═ global-map [ x ] [ y ], global-map [ x ] [ y ] ═ 0, and the process proceeds to step c 8;
c8, judging whether the count is equal to Width, if yes, ending, otherwise, y + + returning to the step c 4.
When actul-x-offset is greater than zero, in the above flowchart, it is only necessary to set the initial value of x to Height-1, and after each loop, execute x- - -until x < 0.
The translation principle of the y-axis is the same as that of the x-axis.
Furthermore, when the translation function is activated, it is not suitable to translate the entire grid map at once, and it is preferable to wait for the prototype to stop. Because the whole grid map is translated, CPU resources are consumed, and the smoothness of the movement of the sweeper is influenced.
In order to prevent the grid map from crossing the border in the waiting process, a small amount of memory must be opened up as a buffer to store the grid map data that has crossed the border. And after the whole grid map is translated, writing the buffered grid data into the grid map. Therefore, when reading or writing the grid map data, it is necessary to consider whether or not there is a buffer.
As shown in fig. 7, the flow of reading data in the corresponding buffering method provided by the present embodiment is as follows:
s1, setting x-index to x + x-offset, and y-index to y + y-offset;
s2, judging whether (x-index, y-index) is in the grid map and the map translation function is not started, if so, entering the step S3, otherwise, entering the step S2 a;
s2a, reading from the buffer and entering the step S2 b;
s2b, judging whether the reading is successful, if so, entering the step S4, otherwise, entering the step S2 c;
s2c, judging whether (x-index, y-index) is in the grid map, if yes, entering the step S2d, and if not, returning to zero and ending;
s2d, directly reading the corresponding grid map data and entering the step S4;
s3, directly reading the corresponding grid map data and entering the step S4;
s4, returns the read value and ends.
As shown in fig. 8, the flow of writing data in the corresponding buffering method provided by the present embodiment is as follows:
t1, reading the (x, y) value and entering step T2;
t2, determining whether the written value is equal to the read value, if yes, ending the process, otherwise, setting x-index to x + x-offset, and y-index to y + y-offset, and proceeding to step T3;
and T3, judging whether (x-index, y-index) is in the grid map and the map translation function is not started, if so, directly writing the data into the corresponding grid map data and ending, and otherwise, writing the data into the buffer and ending.
Wherein x and y are grid coordinates where the robot is located currently; and x-index and y-index are actual coordinates of the corresponding grid map.
The above embodiments are merely provided for full disclosure and not for limitation, and any replacement of equivalent technical features based on the creative work of the invention should be regarded as the scope of the disclosure of the present application.
Claims (11)
1. A grid map creating method of an intelligent robot is based on the intelligent robot and comprises a mobile body, a main control module, a sensor set, a power supply module and a regional operation assembly; the grid map creation method comprises the following steps:
(1) controlling the robot to move;
(2) detecting whether the action of the current position of the robot is edge action and whether the current position detects an obstacle, entering a step (3a) if the action of the current position is edge action but the obstacle is not detected, entering a step (3b) if the action of the current position is edge action and the obstacle is detected at the same time, entering a step (3c) if the action of the current position is not edge action but the obstacle is detected, and entering a step (3d) if the action of the current position is not edge action but the obstacle is not detected;
(3a) marking the grid of the current position on the map as an edge action point and returning to the step (1);
(3b) marking the grid of the current position on the map as an edge behavior point, simultaneously calculating the grid coordinate of the obstacle and marking the grid corresponding to the obstacle on the map as an obstacle point, and then returning to the step (1);
(3c) marking the grid of the current position on the map as a normal passing point, simultaneously calculating the grid coordinate of the obstacle and marking the grid corresponding to the obstacle on the map as an obstacle point, and then returning to the step (1);
(3d) marking the grid of the current position on the map as a normal passing point and returning to the step (1);
in the step (1), a map translation sub-process is first executed each time the robot is controlled to move, and the sub-process includes:
a. whether the whole grid map needs to be translated or not is detected, and the method specifically comprises the following steps: when the actually used grid in one direction of the x axis or the y axis of the grid map reaches the boundary of the whole grid map and the other direction of the grid map has the condition that the rest grid is not used, the step b is carried out, otherwise, the sub-process is skipped;
b. determining the actual grid number to be translated at this time according to the offset grid numbers of the x axis and the y axis at the last time and the difference value of the offset grid numbers of the x axis and the y axis at this time;
c. and translating the whole grid map according to the number of the grids to be translated actually at this time.
2. The method for creating the grid map of the intelligent robot according to claim 1, wherein the grid map is created by marking a grid of a starting point of the robot movement on the map as a normal passing point.
3. The method for creating a grid map of an intelligent robot according to claim 1, wherein each grid in the grid map is represented by a numerical sequence, comprising: a digital segment indicating which area the grid is located in, a digital segment indicating whether the intelligent robot has reached the grid, a digital segment indicating whether the grid has an obstacle, and a digital segment indicating that the intelligent robot has passed the grid along the edge.
4. The method as claimed in claim 3, wherein each grid is represented by a number of 8 bits, the upper four bits of the grid record area information indicating in which area the grid is located, and the lower four bits of the grid record actual information of the map: the 0 th bit represents whether the intelligent robot reaches the grid, 0 represents that the intelligent robot does not reach the grid, and 1 represents that the intelligent robot reaches the grid; the 1 st bit indicates whether an obstacle exists in the grid, 0 indicates absence, and 1 indicates presence; bit 2, when indicating that the robot is along the edge, a1 indicates that the robot passes through the grid, and a 0 indicates that the robot does not pass through the grid; and 3, reserving.
5. The method for creating a grid map of an intelligent robot according to claim 1, wherein the method for calculating the grid coordinates of the obstacle specifically comprises:
A. calculating the distance between the obstacle and the central point of the robot;
B. calculating the actual angle between the obstacle and the center of the robot;
C. calling a trigonometric function, and calculating the coordinates of the barrier point relative to the central point of the robot;
D. and adding the calculated coordinates to the coordinates of the center point of the robot to obtain the coordinates of the obstacle.
6. The method of claim 5, wherein the distance of the obstacle from the center point of the robot and the actual angle of the obstacle from the center point of the robot are calculated according to the following formulas:
the distance between the obstacle and the center point of the sweeper is the distance detected by the sensor plus the radius of the robot;
the angle between the obstacle and the center of the sweeper is equal to the angle between the right front of the sweeper and the angle difference between the position of the sensor and the right front of the robot.
7. The method for creating the grid map of the intelligent robot according to claim 1, wherein the specific method of step a in the map translation sub-process comprises:
a1, respectively updating the x axis and the y axis of the map, and the maximum and minimum values x-min, x-max, y-min and y-max of the used grids;
a2, judging whether (x-max + x-offset) is close to the boundary, but (x-min + x-offset) is not close to the boundary, if yes, subtracting one from x-offset and entering the step a4, otherwise, entering the step a 3;
a3, judging whether (x-min + x-offset) is close to the boundary, but (x-max + x-offset) is not close to the boundary, if yes, adding x-offset and entering the step a4, otherwise, directly entering the step a 4;
a4, judging whether (y-max + y-offset) is close to the boundary, but (y-min + y-offset) is not close to the boundary, if yes, then y-offset is reduced by one and step a6 is proceeded, otherwise, step a5 is proceeded;
a5, judging whether (y-min + y-offset) is close to the boundary, but (y-max + y-offset) is not close to the boundary, if yes, adding y-offset and entering the step a6, otherwise, directly entering the step a 6;
a6, judging whether x-offset or y-offset changes, if yes, starting to translate the whole grid map, otherwise, jumping out of the sub-process;
wherein x-min, x-max is the minimum and maximum values of the used grid in the x-axis direction; y-min, y-max being the minimum and maximum values of the used grid in the y-axis direction; the x-offset, y-offset records the actual grid offset in the x-axis, y-axis direction of the current grid map.
8. The method for creating the grid map of the intelligent robot according to claim 7, wherein the specific method of step b in the map translation sub-process comprises:
b1, setting act-x-offset to x-offset-old-x-offset, and act-y-offset to y-offset-old-y-offset;
b2, judging whether act-x-offset is less than 0, if yes, determining that the whole grid map moves abs (act-x-offset) grids in the negative x-axis direction and entering the step b4, otherwise entering the step b 3;
b3, judging whether act-x-offset is greater than 0, if yes, determining that the whole grid map moves abs (act-x-offset) grids in the positive direction of the x axis and entering the step b4, otherwise, directly entering the step b 4;
b4, judging whether actul-y-offset is less than 0; if yes, determining that the whole grid map moves abs (act-y-offset) grids in the negative direction of the y axis and entering step b6, otherwise entering step b 5;
b5, judging whether act-y-offset is greater than 0; moving abs (act-y-offset) grids in the positive y-axis direction of the whole grid map and entering step b6, otherwise, directly entering step b 6;
b6, updating grid offsets old-x-offset and old-y-offset records in the x-axis direction and the y-axis direction when the grid map is translated last time by using the actual grid offsets x-offset and y-offset in the x-axis direction and the y-axis direction of the current grid map;
recording the actual grid offset in the x-axis direction and the y-axis direction of the current grid map by using the x-offset and the y-offset; old-x-offset and old-y-offset record grid offset in the x-axis direction and the y-axis direction when the grid map is translated last time; abs represents the absolute value of this number; act-x-offset and act-y-offset are the actual number of grids to be shifted.
9. The method for creating the grid map of the intelligent robot according to claim 8, wherein in step c of the map translation subroutine, when actul-x-offset is less than zero, the specific method for translating the x-axis in the negative direction comprises:
c1, start x is 0, y is 0, start-x is 0;
c2, judging whether x is < Height, if yes, entering a step c3, and if not, ending;
c3, setting count to 0 and entering step c 4;
c4, judging whether y is less than Width, if yes, entering the step c5, and if not, returning to the step c2 by x + +;
c5, determining whether start-x! If yes, go to step c51, otherwise go to step c 6;
c51, determining whether global-map [ x ] [ y ]! 0; if yes, setting global-map [ x + actul-x-offset ] [ y ] ═ global-map [ x ] [ y ], global-map [ x ] [ y ] ═ 0 and proceeding to step c8, otherwise, count + + and proceeding to step c 8;
c6, determining whether global-map [ x ] [ y ]! If yes, go to step c7, otherwise go to step c 8;
c7, setting start-x ═ x, global-map [ x + actul-x-offset ] [ y ] ═ global-map [ x ] [ y ], global-map [ x ] [ y ] ═ 0, and the process proceeds to step c 8;
c8, judging whether the count is equal to Width, if yes, ending, otherwise, y + + returning to the step c 4;
wherein the global-map is a grid map array; height and Width represent the Height and Width of the global-map grid array; start-x represents that the first line has a line number with data not zero, that is, data after the line is started needs to be translated; the count records how many grids of a row of data are zero;
when actul-x-offset is greater than zero, in the above flowchart, the initial value of x is set to Height-1, and after each cycle, x- - - -, is executed until x < 0; the translation principle of the y-axis is the same as that of the x-axis.
10. The method as claimed in claim 9, wherein when the translation function is activated, a small memory is opened up as a buffer to store the border-crossed grid map data, and when the entire grid map is translated, the buffered grid data is written into the grid map.
11. The method for creating the grid map of the intelligent robot according to claim 10, wherein the flow of reading data in the buffering process is as follows:
s1, setting x-index to x + x-offset, and y-index to y + y-offset;
s2, judging whether (x-index, y-index) is in the grid map and the map translation function is not started, if so, entering the step S3, otherwise, entering the step S2 a;
s2a, reading from the buffer and entering the step S2 b;
s2b, judging whether the reading is successful, if so, entering the step S4, otherwise, entering the step S2 c;
s2c, judging whether (x-index, y-index) is in the grid map, if yes, entering the step S2d, and if not, returning to zero and ending;
s2d, directly reading the corresponding grid map data and entering the step S4;
s3, directly reading the corresponding grid map data and entering the step S4;
s4, returning the read value and ending;
the flow of writing data in the buffering process is as follows:
t1, reading the (x, y) value and entering step T2;
t2, determining whether the written value is equal to the read value, if yes, ending the process, otherwise, setting x-index to x + x-offset, and y-index to y + y-offset, and proceeding to step T3;
t3, judging whether (x-index, y-index) is in the grid map and the map translation function is not started, if yes, directly writing the data into the corresponding grid map data and ending, otherwise, writing the data into the buffer and ending;
wherein x and y are grid coordinates where the robot is located currently; and x-index and y-index are actual coordinates of the corresponding grid map.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710234045.9A CN107065872B (en) | 2017-04-11 | 2017-04-11 | Grid map creation method of intelligent robot |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710234045.9A CN107065872B (en) | 2017-04-11 | 2017-04-11 | Grid map creation method of intelligent robot |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107065872A CN107065872A (en) | 2017-08-18 |
CN107065872B true CN107065872B (en) | 2020-06-05 |
Family
ID=59603085
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710234045.9A Active CN107065872B (en) | 2017-04-11 | 2017-04-11 | Grid map creation method of intelligent robot |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107065872B (en) |
Families Citing this family (18)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2018187943A1 (en) * | 2017-04-11 | 2018-10-18 | 珠海市一微半导体有限公司 | Method for creating grid map of intelligent robot |
CN107450557A (en) * | 2017-09-10 | 2017-12-08 | 南京中高知识产权股份有限公司 | A kind of sweeping robot method for searching based on high in the clouds memory |
CN107831773A (en) * | 2017-11-30 | 2018-03-23 | 深圳市沃特沃德股份有限公司 | The method and sweeping robot that sweeping robot all standing cleans |
CN108334080B (en) * | 2018-01-18 | 2021-01-05 | 大连理工大学 | Automatic virtual wall generation method for robot navigation |
CN108427411A (en) * | 2018-02-28 | 2018-08-21 | 北京奇虎科技有限公司 | A kind for the treatment of method and apparatus of getting rid of poverty of robot |
CN108553041B (en) * | 2018-03-19 | 2021-03-23 | 珠海市一微半导体有限公司 | Method for judging trapped robot |
CN108469264B (en) * | 2018-03-20 | 2020-04-24 | 杭州晶一智能科技有限公司 | Automatic dust collection robot optimal path planning method based on angle analysis |
CN108803602B (en) * | 2018-06-01 | 2021-07-13 | 浙江亚特电器有限公司 | Obstacle self-learning method and new obstacle self-learning method |
CN112214560A (en) * | 2019-07-09 | 2021-01-12 | 苏州科瓴精密机械科技有限公司 | Updating method and updating system of grid map |
WO2021031441A1 (en) * | 2019-08-16 | 2021-02-25 | 苏州科瓴精密机械科技有限公司 | Path planning method and system, robot and readable storage medium |
CN112393737B (en) * | 2019-08-16 | 2024-03-08 | 苏州科瓴精密机械科技有限公司 | Obstacle map creation method, obstacle map creation system, robot and readable storage medium |
CN110543174A (en) * | 2019-09-10 | 2019-12-06 | 速感科技(北京)有限公司 | Method for establishing passable area graph, method for processing passable area graph, device and movable equipment |
CN110908378B (en) * | 2019-11-28 | 2022-06-21 | 深圳乐动机器人有限公司 | Robot edge method and robot |
CN111221337B (en) * | 2020-01-19 | 2023-05-16 | 弗徕威智能机器人科技(上海)有限公司 | Robot grid map construction method and system |
CN111906779B (en) * | 2020-06-30 | 2022-05-10 | 珠海一微半导体股份有限公司 | Obstacle crossing end judgment method, obstacle crossing control method, chip and robot |
CN112083722B (en) * | 2020-08-27 | 2023-08-04 | 广州赛特智能科技有限公司 | Multi-machine multi-floor scheduling system and scheduling method for mobile robot |
CN113225090B (en) * | 2021-05-19 | 2024-03-22 | 上海高仙自动化科技发展有限公司 | Compression method, compression device, electronic equipment and storage medium |
CN113317733B (en) * | 2021-06-04 | 2023-01-31 | 深圳飞鼠动力科技有限公司 | Path planning method and cleaning robot |
Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5798947A (en) * | 1996-09-25 | 1998-08-25 | The Board Of Trustees Of The Leland Stanford, Jr. University | Methods, apparatus and computer program products for self-calibrating two-dimensional metrology stages |
WO1999056082A1 (en) * | 1998-04-23 | 1999-11-04 | Yeoman Marine Limited | Referencing maps with respect to digitising apparatuses |
CN101000507A (en) * | 2006-09-29 | 2007-07-18 | 浙江大学 | Method for moving robot simultanously positioning and map structuring at unknown environment |
CN101957987A (en) * | 2009-07-17 | 2011-01-26 | 同济大学 | Method for automatically registering raster image and vector electronic map |
CN102138769A (en) * | 2010-01-28 | 2011-08-03 | 深圳先进技术研究院 | Cleaning robot and cleaning method thereby |
CN103472823A (en) * | 2013-08-20 | 2013-12-25 | 苏州两江科技有限公司 | Raster map creating method for intelligent robot |
CN104808671A (en) * | 2015-05-19 | 2015-07-29 | 东南大学 | Robot path planning method under home environment |
CN105652876A (en) * | 2016-03-29 | 2016-06-08 | 北京工业大学 | Mobile robot indoor route planning method based on array map |
CN105806344A (en) * | 2016-05-17 | 2016-07-27 | 杭州申昊科技股份有限公司 | Raster map building method based on local map splicing |
-
2017
- 2017-04-11 CN CN201710234045.9A patent/CN107065872B/en active Active
Patent Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5798947A (en) * | 1996-09-25 | 1998-08-25 | The Board Of Trustees Of The Leland Stanford, Jr. University | Methods, apparatus and computer program products for self-calibrating two-dimensional metrology stages |
WO1999056082A1 (en) * | 1998-04-23 | 1999-11-04 | Yeoman Marine Limited | Referencing maps with respect to digitising apparatuses |
CN101000507A (en) * | 2006-09-29 | 2007-07-18 | 浙江大学 | Method for moving robot simultanously positioning and map structuring at unknown environment |
CN101957987A (en) * | 2009-07-17 | 2011-01-26 | 同济大学 | Method for automatically registering raster image and vector electronic map |
CN102138769A (en) * | 2010-01-28 | 2011-08-03 | 深圳先进技术研究院 | Cleaning robot and cleaning method thereby |
CN103472823A (en) * | 2013-08-20 | 2013-12-25 | 苏州两江科技有限公司 | Raster map creating method for intelligent robot |
CN104808671A (en) * | 2015-05-19 | 2015-07-29 | 东南大学 | Robot path planning method under home environment |
CN105652876A (en) * | 2016-03-29 | 2016-06-08 | 北京工业大学 | Mobile robot indoor route planning method based on array map |
CN105806344A (en) * | 2016-05-17 | 2016-07-27 | 杭州申昊科技股份有限公司 | Raster map building method based on local map splicing |
Also Published As
Publication number | Publication date |
---|---|
CN107065872A (en) | 2017-08-18 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107065872B (en) | Grid map creation method of intelligent robot | |
EP3611590B1 (en) | Method for creating grid map of intelligent robot | |
CN107340768B (en) | Path planning method of intelligent robot | |
CN109363585B (en) | Partition traversing method, sweeping method and sweeping robot thereof | |
CN109945873B (en) | Hybrid path planning method for indoor mobile robot motion control | |
CN104914865B (en) | Intelligent Mobile Robot Position Fixing Navigation System and method | |
CN113110457B (en) | Autonomous coverage inspection method for intelligent robot in indoor complex dynamic environment | |
CN106873601B (en) | Map translation control method in grid map construction | |
US20080294338A1 (en) | Method of Mapping and Navigating Mobile Robot by Artificial Landmark and Local Coordinate | |
CN111103887B (en) | Multi-sensor-based multi-mobile-robot scheduling system design method | |
CN108444484B (en) | Control method and chip for constructing grid map and robot | |
CN105702151A (en) | Indoor map constructing method and device | |
CN110488818B (en) | Laser radar-based robot positioning method and device and robot | |
Tully et al. | A unified Bayesian framework for global localization and SLAM in hybrid metric/topological maps | |
CN112698657A (en) | Sweeping robot path planning method | |
CN112633590B (en) | Intelligent warehousing method and system for four-way shuttle | |
CN115540852A (en) | Electronic grid map construction method and device, electronic equipment and storage medium | |
KR20140086245A (en) | Method and system for coverage of multiple mobile robots within constrained time | |
Abi-Char et al. | A collision-free path planning algorithm for non-complex ASRS using heuristic functions | |
Košnar et al. | Visual topological mapping | |
Araujo et al. | Map building using fuzzy ART, and learning to navigate a mobile robot on an unknown world | |
Khanal et al. | Guided sampling-based motion planning with dynamics in unknown environments | |
Yu et al. | Path planning method of a humanoid robot based on a home network | |
KR20130027384A (en) | Method and system for robot coverage of unknown environment | |
Mehta et al. | Motion Planning in the Area of Robotics and Automation |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |