CN106873601B - Map translation control method in grid map construction - Google Patents

Map translation control method in grid map construction Download PDF

Info

Publication number
CN106873601B
CN106873601B CN201710234044.4A CN201710234044A CN106873601B CN 106873601 B CN106873601 B CN 106873601B CN 201710234044 A CN201710234044 A CN 201710234044A CN 106873601 B CN106873601 B CN 106873601B
Authority
CN
China
Prior art keywords
offset
map
grid
entering
axis
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
Application number
CN201710234044.4A
Other languages
Chinese (zh)
Other versions
CN106873601A (en
Inventor
李明
肖刚军
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhuhai Amicro Semiconductor Co Ltd
Original Assignee
Zhuhai Amicro Semiconductor Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Zhuhai Amicro Semiconductor Co Ltd filed Critical Zhuhai Amicro Semiconductor Co Ltd
Priority to CN201710234044.4A priority Critical patent/CN106873601B/en
Publication of CN106873601A publication Critical patent/CN106873601A/en
Application granted granted Critical
Publication of CN106873601B publication Critical patent/CN106873601B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05DSYSTEMS FOR CONTROLLING OR REGULATING NON-ELECTRIC VARIABLES
    • G05D1/00Control of position, course, altitude or attitude of land, water, air or space vehicles, e.g. using automatic pilots
    • G05D1/02Control of position or course in two dimensions
    • G05D1/021Control of position or course in two dimensions specially adapted to land vehicles
    • G05D1/0231Control of position or course in two dimensions specially adapted to land vehicles using optical position detecting means
    • G05D1/0242Control 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
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05DSYSTEMS FOR CONTROLLING OR REGULATING NON-ELECTRIC VARIABLES
    • G05D1/00Control of position, course, altitude or attitude of land, water, air or space vehicles, e.g. using automatic pilots
    • G05D1/02Control of position or course in two dimensions
    • G05D1/021Control of position or course in two dimensions specially adapted to land vehicles
    • G05D1/0212Control of position or course in two dimensions specially adapted to land vehicles with means for defining a desired trajectory
    • G05D1/0214Control of position or course in two dimensions specially adapted to land vehicles with means for defining a desired trajectory in accordance with safety or protection criteria, e.g. avoiding hazardous areas
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05DSYSTEMS FOR CONTROLLING OR REGULATING NON-ELECTRIC VARIABLES
    • G05D1/00Control of position, course, altitude or attitude of land, water, air or space vehicles, e.g. using automatic pilots
    • G05D1/02Control of position or course in two dimensions
    • G05D1/021Control of position or course in two dimensions specially adapted to land vehicles
    • G05D1/0212Control of position or course in two dimensions specially adapted to land vehicles with means for defining a desired trajectory
    • G05D1/0223Control of position or course in two dimensions specially adapted to land vehicles with means for defining a desired trajectory involving speed control of the vehicle
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05DSYSTEMS FOR CONTROLLING OR REGULATING NON-ELECTRIC VARIABLES
    • G05D1/00Control of position, course, altitude or attitude of land, water, air or space vehicles, e.g. using automatic pilots
    • G05D1/02Control of position or course in two dimensions
    • G05D1/021Control of position or course in two dimensions specially adapted to land vehicles
    • G05D1/0231Control of position or course in two dimensions specially adapted to land vehicles using optical position detecting means
    • G05D1/0246Control of position or course in two dimensions specially adapted to land vehicles using optical position detecting means using a video camera in combination with image processing means

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Aviation & Aerospace Engineering (AREA)
  • Radar, Positioning & Navigation (AREA)
  • Remote Sensing (AREA)
  • General Physics & Mathematics (AREA)
  • Automation & Control Theory (AREA)
  • Electromagnetism (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Multimedia (AREA)
  • Control Of Position, Course, Altitude, Or Attitude Of Moving Bodies (AREA)

Abstract

A map translation control method in grid map construction is characterized in that the following processes are executed each time a robot is controlled to move and a map is constructed: 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. The method can translate the whole grid map 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.

Description

Map translation control method in grid map construction
All as the field of technology
The invention relates to the technical field of electronic information and intelligent control, in particular to a map translation control method in grid map construction.
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.
More importantly, the robot creates the grid map in a traversal manner, so that the starting point of the robot is generally located at the center point of the grid map, the size of the grid map is fixed, and if the prototype is always cleaned towards one direction, the grid map is easy to cross the border. So that an out-of-range map appears in one direction, while a map in the opposite direction to this direction is left unused.
All the contents of the invention
The invention aims to provide a method, which translates the whole grid map 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. The purpose of the invention is realized by the following technical scheme:
a map translation control method in grid map construction is characterized in that the following processes are executed each time a robot is controlled to move and a map is constructed:
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 map translation control method in the grid map construction provided by the invention can translate the whole grid map 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, and the map creation efficiency can be effectively improved based on the map translation control method.
Description of the drawings
Fig. 1 is a block configuration diagram of an intelligent robot based on which a map panning control method according to an embodiment of the present invention is based.
Fig. 2 is a main flowchart of a grid map creation process 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 process according to an embodiment of the present invention.
Fig. 4 is a flowchart of starting map panning in a raster map creation process according to an embodiment of the present invention.
Fig. 5 is a flowchart for determining the number of translated grids of a map in the grid map creation process according to the embodiment of the present invention.
Fig. 6 is a flowchart of implementing a map panning operation in a grid map creation process according to an embodiment of the present invention.
Fig. 7 is a data reading flow chart of a buffer operation in a map translation process implemented in a raster map creation process according to an embodiment of the present invention.
Fig. 8 is a data writing flow chart of a buffer operation in a map translation process implemented in a raster map creation process according to an 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 map translation control method in the grid map construction provided in this embodiment is based on an intelligent robot including 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.
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.
As a problem, in the creation of the grid map of the intelligent robot, the starting point of the robot is generally located at the center 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.
And executing the following processes each time the robot is controlled to move to update the grid map:
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 (6)

1. A map translation control method in grid map construction is characterized in that the following processes are executed each time a robot is controlled to move and a map is constructed:
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 controlling map translation in grid map construction according to claim 1, wherein the specific method in 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.
3. The method for controlling map translation in grid map construction according to claim 2, wherein the specific method in 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.
4. The method according to claim 3, 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.
5. The map translation control method in grid map construction according to claim 4, wherein when the translation function is started, a small segment of memory is created as a buffer to store the grid map data that has crossed the border, and when the entire grid map is translated, the buffered grid data is written into the grid map.
6. The map translation control method in grid map construction according to claim 5, 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.
CN201710234044.4A 2017-04-11 2017-04-11 Map translation control method in grid map construction Active CN106873601B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710234044.4A CN106873601B (en) 2017-04-11 2017-04-11 Map translation control method in grid map construction

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710234044.4A CN106873601B (en) 2017-04-11 2017-04-11 Map translation control method in grid map construction

Publications (2)

Publication Number Publication Date
CN106873601A CN106873601A (en) 2017-06-20
CN106873601B true CN106873601B (en) 2020-01-21

Family

ID=59161954

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710234044.4A Active CN106873601B (en) 2017-04-11 2017-04-11 Map translation control method in grid map construction

Country Status (1)

Country Link
CN (1) CN106873601B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20200125105A1 (en) * 2017-04-11 2020-04-23 Amicro Semiconductor Co., Ltd. Method for Creating Grid Map of Intelligent Robot
CN108444484B (en) * 2018-03-12 2020-09-15 珠海市一微半导体有限公司 Control method and chip for constructing grid map and robot
CN108553041B (en) * 2018-03-19 2021-03-23 珠海市一微半导体有限公司 Method for judging trapped robot

Citations (6)

* Cited by examiner, † Cited by third party
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
GB2336673B (en) * 1998-04-23 2002-04-03 Yeoman Group Plc Referencing maps with respect to digitising apparatuses
CN101266659A (en) * 2008-05-08 2008-09-17 山东大学 Robot grid sub-map amalgamation method based on immune self-adapted genetic algorithm
CN101957987A (en) * 2009-07-17 2011-01-26 同济大学 Method for automatically registering raster image and vector electronic map
CN102842103A (en) * 2012-07-17 2012-12-26 北京交通大学 Two-dimensional holographic visualization system and method of high-speed comprehensive detecting train
CN105806344A (en) * 2016-05-17 2016-07-27 杭州申昊科技股份有限公司 Raster map building method based on local map splicing

Patent Citations (6)

* Cited by examiner, † Cited by third party
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
GB2336673B (en) * 1998-04-23 2002-04-03 Yeoman Group Plc Referencing maps with respect to digitising apparatuses
CN101266659A (en) * 2008-05-08 2008-09-17 山东大学 Robot grid sub-map amalgamation method based on immune self-adapted genetic algorithm
CN101957987A (en) * 2009-07-17 2011-01-26 同济大学 Method for automatically registering raster image and vector electronic map
CN102842103A (en) * 2012-07-17 2012-12-26 北京交通大学 Two-dimensional holographic visualization system and method of high-speed comprehensive detecting train
CN105806344A (en) * 2016-05-17 2016-07-27 杭州申昊科技股份有限公司 Raster map building method based on local map splicing

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
一种带宽受限环境下的海战场栅格服务自适应描述方法;李明;《舰船电子工程》;20151231(第12期);第28-33页 *
基于u-Blox GPS的工矿料场无人化车辆监控研究;黎雪芬;《装备制造技术》;20161231(第7期);第166-170页 *

Also Published As

Publication number Publication date
CN106873601A (en) 2017-06-20

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
CN109839935B (en) Multi-AGV path planning method and equipment
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
CN106873601B (en) Map translation control method in grid map construction
CN111103887B (en) Multi-sensor-based multi-mobile-robot scheduling system design method
CN111543908B (en) Method and device for planning travelling path and intelligent equipment travelling path
US20080294338A1 (en) Method of Mapping and Navigating Mobile Robot by Artificial Landmark and Local Coordinate
CN108444484B (en) Control method and chip for constructing grid map and robot
CN110488818B (en) Laser radar-based robot positioning method and device and robot
CN108873880A (en) Intelligent mobile equipment and its paths planning method, computer readable storage medium
CN111248819A (en) Cleaning path execution method and cleaning 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
CN114460939B (en) Autonomous navigation improvement method for intelligent walking robot in complex environment
WO2023231757A1 (en) Map area contour-based setting method and robot edge end control method
CN116300876A (en) Multi-agent unknown environment autonomous collaborative exploration method, system, device and storage medium
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
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

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