CN114689062A - Map construction method and device, computer equipment and storage medium - Google Patents

Map construction method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN114689062A
CN114689062A CN202011584287.9A CN202011584287A CN114689062A CN 114689062 A CN114689062 A CN 114689062A CN 202011584287 A CN202011584287 A CN 202011584287A CN 114689062 A CN114689062 A CN 114689062A
Authority
CN
China
Prior art keywords
exploration
robot
grid
point
determining
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.)
Pending
Application number
CN202011584287.9A
Other languages
Chinese (zh)
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.)
Shenzhen Pudu Technology Co Ltd
Original Assignee
Shenzhen Pudu Technology 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 Shenzhen Pudu Technology Co Ltd filed Critical Shenzhen Pudu Technology Co Ltd
Priority to CN202011584287.9A priority Critical patent/CN114689062A/en
Publication of CN114689062A publication Critical patent/CN114689062A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01CMEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
    • G01C21/00Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00
    • G01C21/26Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00 specially adapted for navigation in a road network
    • G01C21/28Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00 specially adapted for navigation in a road network with correlation of data from several navigational instruments
    • G01C21/30Map- or contour-matching
    • G01C21/32Structuring or formatting of map data

Landscapes

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

Abstract

The invention discloses a map construction method, a map construction device, computer equipment and a storage medium, wherein the method part comprises the following steps: acquiring a grid map of an environment to be explored, determining a plurality of exploration points according to grids of an unexplored area in the grid map, determining a target point of each exploration path according to the real-time position of the robot and the plurality of exploration points, planning each exploration path according to the target point and the real-time position of the robot, exploring the environment to be explored along the exploration paths, determining whether the travel of the robot in each exploration path is larger than a preset travel, if so, replanning a navigation path to the previous target point, and operating towards the previous target point along the navigation path to acquire loop detection information and modify the exploration information so as to eliminate false points; the invention can effectively eliminate false points to prevent the robot from jamming and ensure the accuracy of the environmental information obtained by the robot exploration, thereby improving the accuracy of the global environment map.

Description

Map construction method and device, computer equipment and storage medium
Technical Field
The invention relates to the technical field of artificial intelligence, in particular to a map construction method, a map construction device, computer equipment and a storage medium.
Background
The map is a precondition for the use of the robot in a corresponding environment, and with the large-scale popularization and use of the robot, the map construction needs to be carried out on an unknown environment, so that the autonomous movement of the robot in the unknown environment is realized.
The existing robot exploration mapping generally comprises a semi-autonomous detection mapping and an autonomous navigation detection mapping which depend on manual intervention. When the robot autonomously navigates to probe and construct a map, the robot needs to explore an unknown environment according to autonomous navigation, so that the map of the unknown environment is constructed based on robot positioning information and environment information collected by the robot. However, due to technical reasons or environmental reasons, for example, when the robot builds a map, false unknown areas appear on the map, so that the robot cannot explore the unknown areas, and a jamming phenomenon occurs.
Disclosure of Invention
The invention provides a map construction method, a map construction device, computer equipment and a storage medium, and aims to solve the problem that in the prior art, the robot is jammed due to the fact that errors occur between environment information obtained by robot exploration and an actual environment.
A map construction method, comprising:
acquiring a grid map of an environment to be explored, and determining a plurality of exploration points according to grids of unexplored areas in the grid map;
determining a target point of each exploration path according to the real-time position of the robot and the plurality of exploration points;
planning each exploration path according to the target point and the real-time position of the robot, and controlling the robot to explore the environment to be explored along the exploration paths so as to obtain exploration information;
determining whether the travel of the robot in each exploration path is larger than a preset travel or not;
if the travel of the robot is larger than the preset travel, replanning the navigation path from the real-time position of the robot to the previous target point;
and controlling the robot to move upwards to a target point along the navigation path so as to obtain loop detection information when the robot moves along the navigation path, and correcting the exploration information based on the loop detection information so as to eliminate false points.
Further, after the revising the exploration information based on the loop detection information, the method further comprises the following steps:
and constructing a global environment map of the environment to be explored according to the revised exploration information.
Further, the determining a target point of each exploration path according to the real-time position of the robot and the plurality of exploration points includes:
determining a linear distance between the real-time position of the robot and each exploration point;
determining the number of grids of an unknown exploration area around each exploration point;
and determining the target point of each exploration path according to the linear distance and the number of the grids of the unknown exploration area.
Further, the determining the target point of each exploration path according to the linear distance and the unknown exploration area grid number comprises:
determining the distance score of each exploration point according to the linear distance and a preset rule;
determining the quantity score of each exploration point according to the number of grids of the unknown exploration area and the preset rule;
adding the distance score and the number score of each exploration point to obtain a total score of each exploration point;
and comparing the total scores of all the exploration points, and taking the exploration point with the highest score as the target point of the next exploration path.
Further, the preset rule includes:
if the straight line distance is smaller than or equal to a preset distance, setting the distance score of the exploration point as a first preset score;
if the straight-line distance is greater than the preset distance, the distance score of the exploration point is increased along with the increase of the straight-line distance, and the distance score of the exploration point is greater than the first preset score;
the number of exploration points score increases as the number of unknown exploration area grids around the exploration point increases.
Further, the determining a plurality of exploration points from an unexplored area grid in the grid map comprises:
determining an unexplored area grid according to the grid map;
dividing the unexplored region grids into multi-class region grids by adopting a clustering algorithm;
and taking the central point of each type of the regional grids as a search point of the regional grids to obtain the plurality of search points.
Further, the determining an unexplored area grid from the grid map comprises:
determining an unknown grid in the grid map as a first unknown grid by adopting a fast-expanding random tree algorithm based on the current position of the robot;
determining an unknown grid in the grid map as a second unknown grid by adopting a global positioning algorithm;
taking the first unknown grid and the second unknown grid as the unexplored area grid.
A map building apparatus comprising:
the system comprises an acquisition module, a search module and a search module, wherein the acquisition module is used for acquiring a grid map of an environment to be searched and determining a plurality of search points according to grids of an unexplored area in the grid map;
the first determining module is used for determining a target point of each exploration path according to the real-time position of the robot and the plurality of exploration points;
the first planning module is used for planning each exploration path according to the target point and the real-time position of the robot, and controlling the robot to explore the environment to be explored along the exploration paths so as to obtain exploration information;
the second determining module is used for determining whether the travel of the robot in each exploration path is larger than a preset travel or not;
the second planning module is used for re-planning the navigation path from the real-time position of the robot to the previous target point if the travel of the robot is greater than the preset travel;
and the correction module is used for controlling the robot to move upwards to a target point along the navigation path so as to acquire loop detection information when the robot moves along the navigation path, and correcting the exploration information based on the loop detection information so as to eliminate false points.
A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, the processor implementing the steps of the above mapping method when executing the computer program.
A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the steps of the above-mentioned map construction method.
In one scheme provided by the map construction method, the map construction device, the computer equipment and the storage medium, a grid map of an environment to be explored is obtained, a plurality of exploration points are determined according to grids of an unexplored area in the grid map, a target point of each exploration path is determined according to a real-time position of the robot and the plurality of exploration points, each exploration path is planned according to the target point and the real-time position of the robot, the robot is controlled to explore the environment to be explored along the exploration paths to obtain exploration information, whether the travel of the robot in each exploration path is larger than a preset travel or not is determined, if the travel of the robot is larger than the preset travel, a navigation path from the real-time position of the robot to the last target point is re-planned, the robot is controlled to move to the last target point along the navigation path to obtain loop detection information when the robot moves along the navigation path, and the exploration information is corrected based on the loop detection information, to eliminate false points; according to the method, the autonomous exploration and map building of the environment to be explored can be realized without human intervention, on the basis of improving the map building efficiency, a re-running mechanism between different target points is added in the exploration process to obtain loop detection information and further correct the exploration information, so that false points can be effectively eliminated, the robot can be prevented from being stuck, the accuracy of the environment information obtained by the robot exploration is further ensured, and the accuracy of the global environment map is improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments of the present invention will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to these drawings without inventive labor.
FIG. 1 is a flow chart of a map construction method according to an embodiment of the present invention;
FIG. 2 is an environmental schematic diagram of the actual environment and the map environment obtained by the robot exploration according to an embodiment of the present invention;
FIG. 3 is a schematic flow chart of an implementation of step S10 in FIG. 1;
FIG. 4 is a schematic diagram of a map building apparatus according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a computer device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The map construction method provided by the embodiment of the invention can be applied to an intelligent robot capable of moving autonomously, the map construction device is embedded in the robot and is an embedded device, and the map construction device is connected with the robot through a system bus. In other embodiments, the mapping apparatus may also be an external device external to the robot, and the mapping apparatus and the robot are connected via a network.
In this embodiment, an example in which the mapping apparatus is an embedded device built in a robot, that is, an execution subject of the robot mapping method is described. The robot is provided with an environment information acquisition device fixed on the robot and used for acquiring space data or environment information of the surrounding environment, and the environment information acquisition device can comprise a vision sensor, a laser radar sensor, a speedometer and the like. The robot collects data of an environment space in real time, and in the process of exploring the environment space, the robot collects the data in real time through carried environment information collecting equipment and constructs a map, and can obtain an SLAM map of the environment space by utilizing a Simultaneous Localization and Mapping (SLAM) technology, realize rasterization conversion of the SLAM map, and perform map fusion on a local grid map to obtain a global map.
The map construction device acquires a grid map of an environment to be explored, determines a plurality of exploration points according to grids of an unexplored area in the grid map, determines a target point of each exploration path according to a real-time position of the robot and the plurality of exploration points, plans each exploration path according to the target point and the real-time position of the robot, controls the robot to explore the environment to be explored along the exploration paths to obtain exploration information, determines whether the travel of the robot in each exploration path is larger than a preset travel, replans a navigation path from the real-time position of the robot to the previous target point if the travel of the robot is larger than the preset travel, controls the robot to move towards the previous target point along the navigation path to obtain loop detection information when the robot moves along the navigation path, corrects the exploration information based on the loop detection information to eliminate false points, and can realize autonomous exploration and map construction of the environment to be explored without human intervention, the map building efficiency is improved, and in the exploration process, a rerun mechanism among different target points is added to correct the exploration information, so that the accuracy of the global environment map is ensured.
In an embodiment, as shown in fig. 1, a map construction method is provided, which is described by taking a map construction device applied in a robot as an example, and includes the following steps:
s10: acquiring a grid map of an environment to be explored, and determining a plurality of exploration points according to an unexplored area grid in the grid map.
It should be understood that the environment to be explored is a new environment in which the robot needs to explore and construct a map autonomously, when the new environment needs to be explored and constructed, the robot does not know the information of the obstacles in the new environment, and the robot needs to be able to traverse the whole new environment to detect the information of the known area, the unknown area, the positions of the obstacles, and the like, and obtain the corresponding grid map according to the information. A grid map is a form of high-precision map commonly used in the robot field, and divides an environment to be explored into a series of grids, and the grid map comprises grids of known areas and grids of unexplored areas, wherein the grids of the known areas comprise obstacle areas and free areas. Each grid of the grid map is marked as a state, the state can be one of a free area, an unknown area and an obstacle area, which respectively represent that the grid is a searched free area, an unexplored unknown area and an area with obstacles, and each grid in the grid map is marked as a corresponding value, so as to simply mark the state of each grid, for example, the mark value of the obstacle area is 254, the mark value of the free area is 0, and the mark value of the unknown area is 255. Namely, the grid map is a product of digital rasterization of a real environment, the obstacles in the environment are identified by whether the grid is occupied, the grid map is updated by acquiring environment information in real time in the process that the robot explores the environment to be explored, and finally the grid map is subjected to map processing, so that the global map of the environment to be explored is obtained.
Before exploring the environment to be explored, in order to traverse the environment to be explored, a map building device in the robot needs to acquire a grid map of the environment to be explored, and determine a plurality of exploration points according to an unexplored area grid in the grid map, so that the environment to be explored is traversed according to the exploration points.
S20: and determining a target point of each exploration path according to the real-time position of the robot and the plurality of exploration points.
After determining a plurality of exploration points from the unexplored area grid in the grid map, a target point of each exploration path is determined from the real-time position of the robot and the plurality of exploration points. The robot determines the target points from the plurality of exploration points to be explored in each section of exploration path until traversing the whole environment to be explored.
S30: and planning each exploration path according to the target point and the real-time position of the robot, and controlling the robot to explore the environment to be explored along the exploration paths so as to obtain exploration information.
After the target point of each exploration path is determined, path planning is carried out on each exploration path according to the target point and the real-time position of the robot, and the robot is controlled to explore the environment to be explored along the exploration path so as to obtain exploration information. The robot determines a first target point from the plurality of exploration points, plans an exploration path from the real-time position of the robot to the first target point, controls the robot to explore the environment to be explored along the exploration path, determines a next target point from the plurality of unexplored target points after the first target point is reached, plans an exploration path from the real-time position of the robot to the next target point, controls the robot to explore the environment to be explored along the exploration path, and circulates in such a way until all the exploration points are explored, and traverses the whole environment to be explored.
For example, the search points determined according to the grid of the unexplored area in the grid map include a search point a, a search point B, and a search point C, and the whole search path traversed by the environment to be searched is divided into three segments, so that the whole search path planning process of the robot is as follows: if the target point of the first section of search path is a search point A, the first section of search path is a path from the starting position of the robot to the search point A, if the next target point is determined to be a search point B after the robot reaches the search point A, the second section of search path is a path from the search point A to the search point B, the third section of search path is a path from the search point B to the search point C, and in the search process of each search path, environment information is collected in real time to obtain search information.
In this embodiment, the plurality of exploration points including the exploration point a, the exploration point B, and the exploration point C are only exemplary illustrations, the whole exploration path planning process of the robot is also an exemplary illustration, in other embodiments, the plurality of exploration points may further include other exploration points, the whole exploration path planning process of the robot may further be other, and details are not described herein.
The target point is used as a navigation landmark point for path planning, and the path planning is used for guiding the running direction, speed, angular speed and the like of the robot. That is, the robot is directed to move from the current position in which direction at what speed or angular velocity, the robot may autonomously plan a path through an a-algorithm according to the current position and the position of the target point, and may also plan a path by using a D-algorithm or a Dijkstra algorithm, which is not described herein again.
S40: and determining whether the travel of the robot in each exploration path is larger than a preset travel.
In the process of controlling the robot to explore the to-be-explored environment along the exploration path, if the robot walks in a long stroke, the walking path may deviate from the planned exploration path, the acquired exploration information is incomplete, in order to ensure that more complete and accurate exploration information is acquired, a robot re-running mechanism needs to be set, whether the robot is controlled to return to the previous target point again is determined according to the stroke of the robot, whether the error occurs in the acquired exploration information is determined, and the error is corrected in time when the error occurs. The starting of the rerun mechanism is determined according to the travel of the robot, and in the exploration process, whether the travel of the robot in each exploration route is larger than a preset travel needs to be determined.
S50: and if the travel of the robot is larger than the preset travel, re-planning the navigation path of the real-time position of the robot to the upper target point.
After determining whether the travel of the robot in each exploration route is greater than the preset travel, if the travel of the robot is greater than the preset travel, it is indicated that the walking route of the robot may cause an error in exploration information, a rerun mechanism needs to be started, and at this time, a navigation route from the real-time position of the robot to a previous target point needs to be re-planned. If the travel of the robot is smaller than or equal to the preset travel, the possibility of errors of the exploration information is low, and a rerun mechanism is not required to be started. When the navigation path from the real-time position of the robot to the previous target point is re-planned, the navigation path from the real-time position of the robot to the previous target point may be different from the corresponding exploration path planned before.
S60: and controlling the robot to move towards an upper target point along the navigation path so as to acquire loop detection information when the robot moves along the navigation path, and correcting the exploration information based on the loop detection information so as to eliminate false points.
After the navigation path from the real-time position of the robot to the previous target point is re-planned, the robot needs to be controlled to move towards the previous target point along the navigation path so as to correct the acquired exploration information, after the robot moves to the previous target point, the robot is re-planned to determine the next target point until the map to be explored is traversed, loop detection information is obtained when the navigation path is in operation, and the exploration information is corrected based on the loop detection information so as to eliminate false points.
In the process that the robot explores the environment to be explored according to each exploration path, along with the continuous extension of the path, some accumulated errors exist in the process of drawing building of the robot, the errors can cause the obtained environment shape to be different from the real environment, and some false point regions (unkonwn regions) which cannot be explored all the time may exist. By arranging the robot rerunning mechanism, the robot can correct the environment information obtained by exploration in time in the exploration process of the environment to be explored, so that the accuracy of the finally obtained global environment map is ensured.
For example, as shown in fig. 2, the upper line graph in fig. 2 is an actual environment of the environment to be explored, and includes an actual boundary, a robot, and an actual obstacle, and the lower line graph in fig. 2 is a map environment obtained after the robot explores and maps the environment to be explored according to the exploration route. In the searching process, the robot causes the actual path of the robot to deviate from the planned searching path along with the extension of the searching path of the robot, and the environmental information obtained by searching and positioning does not accord with the actual environment (for example, in fig. 2, the actual environment contains an actual barrier, but the searching information of the robot is wrong, and two map barriers can appear); or due to robot positioning errors and the existence of some areas (such as an included angle between actual boundaries and an area between an actual boundary and an obstacle) which cannot be reached by the robot, the position deviation between the map boundary fed back by the robot and the actual boundary occurs, and a continuous environment boundary cannot be formed.
Optionally, the search information is corrected to eliminate some false points, for example, during the mapping process of the robot, an obstacle located in the middle of the map, for example, one wall, may be repeatedly mapped to be considered as two walls, since a blank area, that is, an unknown area with a mark value of 255, is left between the two walls, this may give a misleading information to the robot, and the robot continues to search for the unknown area, but in the actual scene, this is not present, that is, this part of the unknown area is actually a false point (i.e., a point which does not exist in the actual scene but exists in the constructed map and has a mark value of 255), because the two walls are integrated, the robot may never search for the area, so that the robot may, during the automatic mapping process, due to the mapping characteristics of the robot (completing the search for the unknown area), the robot may present a card jam. Similarly, if a continuous wall is originally formed, several discontinuous walls may be formed on the map, so that blank areas are left between adjacent discontinuous walls, namely unknown areas with a mark value of 255, which can also be considered as false points, and the robot also has a card jamming condition. Therefore, by the mode, the exploration information is corrected by utilizing the loop detection information, so that the robot determines the false points and eliminates the false points, the robot does not need to explore the unknown areas, the jamming phenomenon of the robot can be effectively reduced, and the whole image establishing process of the robot is smoother.
Optionally, the elimination of the false points in the above embodiments may be deleting the false points, or identifying the false points, so that the robot may determine that the false points are false points according to the identification information without searching.
In the embodiment, a grid map of an environment to be explored is obtained, a plurality of exploration points are determined according to grids of an unexplored area in the grid map, a target point of each exploration path is determined according to a real-time position of a robot and the plurality of exploration points, each exploration path is planned according to the target point and the real-time position of the robot, the robot is controlled to explore the environment to be explored along the exploration paths to obtain exploration information, whether the travel of the robot in each exploration path is larger than a preset travel or not is determined, if the travel of the robot is larger than the preset travel, a navigation path from the real-time position of the robot to the last target point is re-planned, the robot is controlled to move towards the upper target point along the navigation path to correct the exploration information, a global environment map of the environment to be explored is obtained through the corrected exploration information, and the autonomous exploration map building of the environment to be explored can be explored without human intervention, on the basis of improving the map building efficiency, a re-running mechanism between different target points is added in the exploration process to obtain loop detection information and then amend the exploration information, so that false points can be effectively eliminated, the robot is prevented from being jammed, the accuracy of environment information obtained by the robot exploration is ensured, and the accuracy of a global environment map is improved.
In an embodiment, after step S60, that is, after the search information is corrected based on the loop detection information, the method further includes the following steps:
s70: and constructing a global environment map of the environment to be explored according to the revised exploration information.
In the embodiment, after the exploration information is corrected based on the loop detection information, the loop detection information of the robot in the exploration process is obtained, so that the global environment map of the environment to be explored is constructed according to the corrected exploration information, the global environment map of the environment to be explored is finally constructed according to the corrected exploration information, the nonexistent areas in the exploration information of the robot are removed, the accumulated error formed in the exploration process of the robot is eliminated, and the accuracy of the global environment map is ensured.
In an embodiment, as shown in fig. 3, in step S10, determining a plurality of search points according to the unexplored area grid in the grid map specifically includes the following steps:
s11: an unexplored area grid is determined from the grid map.
After acquiring the grid map of the environment to be explored, it is necessary to determine an unexplored area grid in the grid map according to the mark value of each grid in the grid map. For example, an area grid of a grid map adjacent to an area grid (known free area) of a marker value of 0 and a marker value of 255 is determined.
S12: and adopting a clustering algorithm to divide the unexplored region grids into multi-class region grids.
After the unexplored area grid is determined, clustering is carried out on the unexplored area grid by adopting a clustering algorithm so as to divide the unexplored area grid into multiple types of area grids, and each type of area grid comprises multiple densely gathered clustering boundary points. The boundary points are boundary points of an exploration area determined by the boundary point detector, and can be boundary points obtained by randomly selecting sampling points in the exploration area by using the current pose of the robot as a root node through a local RRT boundary point detection method, and/or boundary points obtained by randomly selecting sampling points in the exploration area by using the initial pose of the robot as a root node through a global RRT boundary point detection method.
The clustering algorithm in this embodiment is a density clustering algorithm, and may be any one of a Mean Shift clustering algorithm, a DBSCAN clustering algorithm, an OPTICS clustering algorithm, and a SNN density-based clustering algorithm.
S13: and taking the central point of each type of regional grid as a search point of the regional grid to obtain a plurality of search points.
After the unexplored area grid is divided into the multi-class area grids, the central point of each clustering point in each class of area grids is used as a searching point of the area grid, so that a plurality of searching points are obtained. The central point of each type of regional grid is used as the exploration point of the regional grid, so that points which do not conform to the path planning can be avoided, invalid boundary point clustering points are filtered out, effective boundary point clustering points are obtained, unnecessary operation can be reduced, and the accuracy of the exploration points is ensured.
In the embodiment, the unexplored area grids are determined according to the grid map, the unexplored area grids are divided into the multiple types of area grids by adopting the clustering algorithm, the central point of each type of area grid is used as the searching point of the area grid to obtain the multiple searching points, the step of determining the multiple searching points according to the unexplored area grids in the grid map is refined, the multiple unexplored area grids are divided by adopting the density clustering algorithm, the dividing efficiency of the unexplored area is improved, and the accuracy of the searching points is ensured.
In an embodiment, in step S11, determining the unexplored area grid according to the grid map specifically includes the following steps:
s111: and determining an unknown grid in the grid map as a first unknown grid by adopting a fast-expanding random tree algorithm based on the current position of the robot.
After acquiring a grid map of an area to be explored, determining grids of an unexplored area by using a local exploration method, wherein the local exploration method takes the current position of a robot as a root node, randomly selects sampling points in the area of an environment to be explored as a detection direction through a fast-expansion random tree (RRT) algorithm, and records the grids as a first unknown grid if the RRT tree generated from the root node to the sampling points encounters a grid (namely an unknown grid) with a mark value of 255.
S113: and determining the unknown grid in the grid map as a second unknown grid by adopting a global positioning algorithm.
After obtaining the grid map of the area to be explored, a global positioning (copen CV) algorithm is further required to quickly search for an unknown grid in a global scope to determine the unknown grid in the grid map as a second unknown grid. At this time, there is a grid where the second unknown grid coincides with the first unknown grid.
S113: and taking the first unknown grid and the second unknown grid as unexplored area grids.
After the first unknown grid and the second unknown grid are obtained, the first unknown grid and the second unknown grid are used as the grids of the unexplored area, so that omission is avoided, and the accuracy of the grids of the unexplored area is guaranteed.
In this embodiment, based on the current position of the robot, an unknown grid in the grid map is determined by using a fast-expansion random tree algorithm as a first unknown grid, an unknown grid in the grid map is determined by using a global positioning algorithm as a second unknown grid, and the first unknown grid and the second unknown grid are used as grids of an unexplored area, so that a specific process of determining grids of the unexplored area according to the grid map is defined, the accuracy of the grids of the unexplored area is ensured, and the accuracy of the unexplored area is determined.
In an embodiment, in step S20, determining the target point of each search path according to the real-time position of the robot and the plurality of search points includes the following steps:
s21: a linear distance between the real-time position of the robot and each exploration point is determined.
After acquiring a plurality of exploration points, it is necessary to determine the linear distance between the real-time position of the robot and each exploration point.
S22: the number of unknown quest area grids around each quest point is determined.
After acquiring a plurality of exploration points, the number of grids of an unknown exploration area around each exploration point is determined according to the grid map.
S23: and determining the target point of each exploration path according to the linear distance and the unknown exploration area grid number.
After the linear distance between the real-time position of the robot and each search point and the number of grids of the unknown search area around each search point are determined, the longer the linear distance is, the longer the search stroke of the robot is, and the greater the possibility of errors is, so that the target point of each search path needs to be determined according to the linear distance and the number of grids of the unknown search area, so as to reduce the accumulation of errors in the search process.
For example, in each search path, a linear distance with a smaller linear distance from the real-time position of the robot may be selected as the next target point, or search points with a larger number of grids in the surrounding unknown search area may be selected as the next target point; the next target point may be selected from search points whose number of grids in the surrounding unknown search area is smaller than a predetermined number, and the next target point may be selected from search points whose number of grids in the surrounding unknown search area is the largest among search points whose number of grids in the surrounding unknown search area is smaller than the predetermined number.
In this embodiment, the step of determining the target point of each exploration path according to the real-time position of the robot and the plurality of exploration points is defined by determining the linear distance between the real-time position of the robot and each exploration point, determining the number of grids of the unknown exploration area around each exploration point, and finally determining the target point of each exploration path according to the linear distance and the number of grids of the unknown exploration area, thereby providing a basis for determining the subsequent exploration paths.
In an embodiment, in step S23, the step of determining the target point of each search path according to the linear distance and the unknown number of grids in the search area includes the following steps:
s231: and determining the distance score of each exploration point according to the straight-line distance and a preset rule.
After determining the linear distance between the real-time position of the robot and each exploration point, determining the distance score of each exploration point according to the linear distance and a preset rule.
S232: and determining the quantity score of each exploration point according to the number of grids of the unknown exploration area and a preset rule.
After determining the number of grids of the unknown exploration area around each exploration point, determining the number score of each exploration point according to the number of grids of the unknown exploration area and a preset rule.
S233: and adding the distance score and the number score of each exploration point to obtain the total score of each exploration point.
After determining the distance score and the number score for each exploration point, the distance score and the number score for each exploration point are added to obtain a total score for each exploration point.
S234: and comparing the total scores of all the search points, and taking the search point with the highest score as the target point of the next search path.
And after determining the total score of each search point according to the linear distance and the number of grids in the unknown search area, comparing the total score of each search point, and taking the search point with the highest score as the target point of the next search path.
For example, the plurality of search points include a search point a, a search point B, and a search point C, the total scores of the search point a, the search point B, and the search point C are determined by the number of grids of the unknown search area around the search point according to the linear distance between the search points at the real-time position of the robot, and are respectively 80, 60, and 50, the search point a with the highest score is used as the target point of the first search path, after the robot reaches the search point a along the first search path, the linear distance between the search points at the real-time position of the robot is determined by the number of grids of the unknown search area around the search point, and the total scores of the search point B and the search point C are respectively 65 and 70, the search point C is used as the next target point for searching, and so on, until all the search points are traversed, and the search of the environment to be searched is completed.
In this embodiment, the scores of the search point a, the search point B, and the search point C are only exemplary, and in other embodiments, the scores of the search points may be other, which is not described herein again.
In this embodiment, the distance score of each search point is determined according to the linear distance and the preset rule, the number score of each search point is determined according to the number of grids of the unknown search area and the preset rule, the distance score and the number score of each search point are added to obtain the total score of each search point, the total score of each search point is compared, the search point with the highest score is used as the target point of the next search path, the specific score of each search point is quantified according to the linear distance between the real-time position of the robot and each search point and the number of grids of the unknown search area around each search point, the search path of the robot is influenced based on the environmental factors, and the accurate map is finally obtained.
In one embodiment, the distance score of each exploration point is determined according to the linear distance and a preset rule, and the quantity score of each exploration point is determined according to the number of grids of the unknown exploration area and the preset rule, wherein the preset rule comprises:
and if the straight line distance is less than or equal to the preset distance, setting the distance score of the exploration point as a first preset score.
If the straight-line distance is greater than the preset distance, the distance score of the search point is increased along with the increase of the straight-line distance, and the distance score of the search point is greater than the first preset score.
The number of exploration points score increases as the number of grids of unknown exploration area around an exploration point increases.
In the embodiment, specific preset rule contents are determined, a basis for determining the distance score of each exploration point according to the linear distance and the preset rule and determining the number score of each exploration point according to the number of grids of unknown exploration areas and the preset rule is provided, and it is ensured that the finally determined target points are all the exploration points with shortest travel and densest unexplored areas in the current position.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present invention.
In an embodiment, a map construction apparatus is provided, and the map construction apparatus corresponds to the map construction method in the above embodiment one to one. As shown in fig. 4, the map building apparatus includes an obtaining module 401, a first determining module 402, a first planning module 403, a second determining module 404, a second planning module 405, and a modifying module 406. The functional modules are explained in detail as follows:
an obtaining module 401, configured to obtain a grid map of an environment to be explored, and determine a plurality of exploration points according to an unexplored area grid in the grid map;
a first determining module 402, configured to determine a target point of each exploration path according to the real-time position of the robot and the plurality of exploration points;
a first planning module 403, configured to plan each exploration path according to the target point and the real-time position of the robot, and control the robot to explore the environment to be explored along the exploration path to obtain exploration information;
a second determining module 404, configured to determine whether a travel of the robot in each exploration path is greater than a preset travel;
a second planning module 405, configured to re-plan a navigation path from the real-time position of the robot to the previous target point if the travel of the robot is greater than the preset travel;
and the correcting module 406 is configured to control the robot to move upward to a target point along the navigation path, so as to obtain loop detection information when the robot moves along the navigation path, and correct the exploration information based on the loop detection information, so as to eliminate false points.
Further, after the modifying the exploration information based on the loop detection information, the modifying module 406 is further configured to:
and constructing a global environment map of the environment to be explored according to the revised exploration information.
Further, the first determining module 402 is specifically configured to:
determining a linear distance between the real-time position of the robot and each exploration point;
determining the number of grids of an unknown exploration area around each exploration point;
and determining the target point of each exploration path according to the linear distance and the number of the grids of the unknown exploration area.
Further, the first determining module 402 is further specifically configured to:
determining the distance score of each exploration point according to the linear distance and a preset rule;
determining the quantity score of each exploration point according to the number of grids of the unknown exploration area and the preset rule;
adding the distance score and the number score of each exploration point to obtain a total score of each exploration point;
and comparing the total scores of all the exploration points, and taking the exploration point with the highest score as the target point of the next exploration path.
Further, the obtaining module 401 is specifically configured to:
determining an unexplored area grid according to the grid map;
dividing the unexplored region grids into multi-class region grids by adopting a clustering algorithm;
and taking the central point of each type of the regional grids as a search point of the regional grids to obtain the plurality of search points.
Further, the obtaining module 401 is specifically further configured to:
determining an unknown grid in the grid map as a first unknown grid by adopting a fast-expanding random tree algorithm based on the current position of the robot;
determining an unknown grid in the grid map as a second unknown grid by adopting a global positioning algorithm;
taking the first unknown grid and the second unknown grid as the unexplored area grid.
For specific limitations of the map building apparatus, reference may be made to the above limitations of the map building method, which are not described herein again. The various modules in the mapping apparatus described above may be implemented in whole or in part by software, hardware, and combinations thereof. The modules can be embedded in a hardware form or independent of a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided that includes a processor, a memory, a network interface connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The network interface of the computer device is used for communicating with an external server through a network connection. The computer program is executed by a processor to implement a map building method.
In one embodiment, as shown in fig. 5, there is provided a computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the following steps when executing the computer program:
acquiring a grid map of an environment to be explored, and determining a plurality of exploration points according to grids of unexplored areas in the grid map;
determining a target point of each exploration path according to the real-time position of the robot and the plurality of exploration points;
planning each exploration path according to the target point and the real-time position of the robot, and controlling the robot to explore the environment to be explored along the exploration paths so as to obtain exploration information;
determining whether the travel of the robot in each exploration path is larger than a preset travel or not;
if the travel of the robot is larger than the preset travel, replanning the navigation path from the real-time position of the robot to the previous target point;
and controlling the robot to move upwards to a target point along the navigation path so as to obtain loop detection information when the robot moves along the navigation path, and correcting the exploration information based on the loop detection information so as to eliminate false points.
In one embodiment, a computer-readable storage medium is provided, having a computer program stored thereon, which when executed by a processor, performs the steps of:
acquiring a grid map of an environment to be explored, and determining a plurality of exploration points according to grids of unexplored areas in the grid map;
determining a target point of each exploration path according to the real-time position of the robot and the plurality of exploration points;
planning each exploration path according to the target point and the real-time position of the robot, and controlling the robot to explore the environment to be explored along the exploration paths so as to obtain exploration information;
determining whether the travel of the robot in each exploration path is larger than a preset travel or not;
if the travel of the robot is larger than the preset travel, replanning the navigation path from the real-time position of the robot to the previous target point;
and controlling the robot to move upwards to a target point along the navigation path so as to obtain loop detection information when the robot moves along the navigation path, and correcting the exploration information based on the loop detection information so as to eliminate false points.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database or other medium used in the embodiments provided herein can include non-volatile and/or volatile memory. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned function distribution may be performed by different functional units and modules according to needs, that is, the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-mentioned functions.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present invention has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present invention, and are intended to be included within the scope of the present invention.

Claims (10)

1. A map construction method, comprising:
acquiring a grid map of an environment to be explored, and determining a plurality of exploration points according to grids of unexplored areas in the grid map;
determining a target point of each exploration path according to the real-time position of the robot and the plurality of exploration points;
planning each exploration path according to the target point and the real-time position of the robot, and controlling the robot to explore the environment to be explored along the exploration paths so as to obtain exploration information;
determining whether the travel of the robot in each exploration path is larger than a preset travel or not;
if the travel of the robot is larger than the preset travel, replanning the navigation path from the real-time position of the robot to the previous target point;
and controlling the robot to move upwards to a target point along the navigation path so as to obtain loop detection information when the robot moves along the navigation path, and correcting the exploration information based on the loop detection information so as to eliminate false points.
2. The mapping method according to claim 1, wherein after the revising the exploration information based on the loop detection information, the method further comprises:
and constructing a global environment map of the environment to be explored according to the revised exploration information.
3. The method of map construction of claim 1, wherein said determining a target point for each exploration path from a real-time location of the robot and the plurality of exploration points comprises:
determining a linear distance between the real-time position of the robot and each exploration point;
determining the number of grids of an unknown exploration area around each exploration point;
and determining the target point of each exploration path according to the linear distance and the number of the grids of the unknown exploration area.
4. The method of map construction of claim 3, wherein said determining a target point for each said exploration path based on said linear distance and said unknown exploration area grid number comprises:
determining the distance score of each exploration point according to the linear distance and a preset rule;
determining the quantity score of each exploration point according to the number of grids of the unknown exploration area and the preset rule;
adding the distance score and the number score of each exploration point to obtain a total score of each exploration point;
and comparing the total scores of all the exploration points, and taking the exploration point with the highest score as the target point of the next exploration path.
5. The map construction method according to claim 4, wherein the preset rule includes:
if the straight line distance is smaller than or equal to a preset distance, setting the distance score of the exploration point as a first preset score;
if the straight-line distance is greater than the preset distance, the distance score of the exploration point is increased along with the increase of the straight-line distance, and the distance score of the exploration point is greater than the first preset score;
the number score for the exploration point increases as the number of unknown exploration area grids around the exploration point increases.
6. A method of map construction according to any one of claims 1 to 5 wherein the determining a plurality of exploration points from an unexplored area grid in the grid map comprises:
determining an unexplored area grid according to the grid map;
dividing the unexplored region grids into multi-class region grids by adopting a clustering algorithm;
and taking the central point of each type of the regional grids as a search point of the regional grids to obtain the plurality of search points.
7. The method of map construction of claim 6, wherein said determining an unexplored area grid from said grid map comprises:
determining an unknown grid in the grid map as a first unknown grid by adopting a fast-expanding random tree algorithm based on the current position of the robot;
determining an unknown grid in the grid map as a second unknown grid by adopting a global positioning algorithm;
taking the first unknown grid and the second unknown grid as the unexplored area grid.
8. A map building apparatus, comprising:
the system comprises an acquisition module, a search module and a search module, wherein the acquisition module is used for acquiring a grid map of an environment to be searched and determining a plurality of search points according to grids of an unexplored area in the grid map;
the first determining module is used for determining a target point of each exploration path according to the real-time position of the robot and the plurality of exploration points;
the first planning module is used for planning each exploration path according to the target point and the real-time position of the robot and controlling the robot to explore the environment to be explored along the exploration paths so as to obtain exploration information;
the second determining module is used for determining whether the travel of the robot in each exploration path is larger than a preset travel or not;
the second planning module is used for re-planning the navigation path from the real-time position of the robot to the previous target point if the travel of the robot is greater than the preset travel;
and the correction module is used for controlling the robot to move upwards to a target point along the navigation path so as to acquire loop detection information when the robot moves along the navigation path, and correcting the exploration information based on the loop detection information so as to eliminate false points.
9. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the steps of the mapping method according to any of claims 1 to 7 are implemented by the processor when executing the computer program.
10. A readable storage medium, storing a computer program, wherein the computer program, when executed by a processor, performs the steps of the mapping method according to any of claims 1 to 7.
CN202011584287.9A 2020-12-28 2020-12-28 Map construction method and device, computer equipment and storage medium Pending CN114689062A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011584287.9A CN114689062A (en) 2020-12-28 2020-12-28 Map construction method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011584287.9A CN114689062A (en) 2020-12-28 2020-12-28 Map construction method and device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN114689062A true CN114689062A (en) 2022-07-01

Family

ID=82130635

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011584287.9A Pending CN114689062A (en) 2020-12-28 2020-12-28 Map construction method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114689062A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2024007807A1 (en) * 2022-07-06 2024-01-11 杭州萤石软件有限公司 Error correction method and apparatus, and mobile device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2024007807A1 (en) * 2022-07-06 2024-01-11 杭州萤石软件有限公司 Error correction method and apparatus, and mobile device

Similar Documents

Publication Publication Date Title
CN112000754B (en) Map construction method, device, storage medium and computer equipment
CN111938513B (en) Robot obstacle-crossing edgewise path selection method, chip and robot
CN111536964A (en) Robot positioning method and device, and storage medium
CN111906779B (en) Obstacle crossing end judgment method, obstacle crossing control method, chip and robot
CN113156956B (en) Navigation method and chip of robot and robot
JP5803392B2 (en) Autonomous mobile device
CN114764239B (en) Cleaning robot control method, cleaning robot control device, computer equipment and storage medium
CN113330279A (en) Method and system for determining the position of a vehicle
CN108803602B (en) Obstacle self-learning method and new obstacle self-learning method
CN114689062A (en) Map construction method and device, computer equipment and storage medium
CN113110497A (en) Navigation path-based edge obstacle-detouring path selection method, chip and robot
CN113110499B (en) Determination method of traffic area, route searching method, robot and chip
WO2024055855A1 (en) Autonomous mobile device and method for controlling the same, and computer readable storage medium
CN112346480B (en) Indoor unmanned aerial vehicle, control method thereof and computer-readable storage medium
CN116817957A (en) Unmanned vehicle driving path planning method and system based on machine vision
AU2021273605B2 (en) Multi-agent map generation
CN113110473B (en) Connectivity-based region judging method, chip and robot
CN116501813A (en) Picture construction method, device, equipment and medium
CN115326058B (en) Robot map generation method, device, storage medium, and mobile robot
CN113607157B (en) Autonomous positioning method, apparatus, autonomous body, chip and storage medium
CN118274832A (en) Path planning method, device, storage medium and equipment
CN113157842A (en) Map generation method and device, electronic equipment and readable storage medium
CN115542905A (en) Robot autonomous obstacle avoidance method, device, system and storage medium
CN116380044A (en) Map construction method, device, self-mobile device and storage medium
CN115167406A (en) Dynamic autopilot global path generation method and equipment

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