CN117330091A - Method for constructing grid map, storage medium and pool robot - Google Patents

Method for constructing grid map, storage medium and pool robot Download PDF

Info

Publication number
CN117330091A
CN117330091A CN202311293855.3A CN202311293855A CN117330091A CN 117330091 A CN117330091 A CN 117330091A CN 202311293855 A CN202311293855 A CN 202311293855A CN 117330091 A CN117330091 A CN 117330091A
Authority
CN
China
Prior art keywords
grid map
grid
obstacle
determining
data
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
CN202311293855.3A
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.)
Xingmai Innovation Technology Suzhou Co ltd
Original Assignee
Xingmai Innovation Technology Suzhou 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 Xingmai Innovation Technology Suzhou Co ltd filed Critical Xingmai Innovation Technology Suzhou Co ltd
Priority to CN202311293855.3A priority Critical patent/CN117330091A/en
Publication of CN117330091A publication Critical patent/CN117330091A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T17/00Three dimensional [3D] modelling, e.g. data description of 3D objects
    • G06T17/05Geographic models
    • 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
    • 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/38Electronic maps specially adapted for navigation; Updating thereof
    • G01C21/3804Creation or updating of map data
    • 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/38Electronic maps specially adapted for navigation; Updating thereof
    • G01C21/3804Creation or updating of map data
    • G01C21/3833Creation or updating of map data characterised by the source of data
    • G01C21/3841Data obtained from two or more sources, e.g. probe vehicles
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/70Determining position or orientation of objects or cameras
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10028Range image; Depth image; 3D point clouds
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30248Vehicle exterior or interior
    • G06T2207/30252Vehicle exterior; Vicinity of vehicle
    • G06T2207/30261Obstacle

Landscapes

  • Engineering & Computer Science (AREA)
  • Remote Sensing (AREA)
  • Radar, Positioning & Navigation (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Automation & Control Theory (AREA)
  • Geometry (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Graphics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Control Of Position, Course, Altitude, Or Attitude Of Moving Bodies (AREA)

Abstract

The embodiment of the application provides a method for constructing a grid map, a storage medium and a pool robot, wherein the method comprises the following steps: in the process that the pool robot moves in the target water area, determining point cloud data acquired by a line laser component, wherein the line laser component is arranged on one side of the pool robot; determining the position of an obstacle in the target water area marked in the original grid map by utilizing the point cloud data; and updating the marked positions of the obstacles in the original grid map by using the determined current positions of the obstacles to construct a target grid map. Through the method and the device, the problem that the drawing is difficult to accurately build in the water in the prior art is solved, and the effect of improving the drawing accuracy of the pool robot in the water is achieved.

Description

Method for constructing grid map, storage medium and pool robot
Technical Field
The embodiment of the application relates to the field of robots, in particular to a method for constructing a grid map, a storage medium and a pool robot.
Background
Most of the robots in the existing water tanks (such as cleaning robots in the water tanks) have irregular motion paths, are easily affected by factors such as slipping and water flow impact by moving in an inertial navigation positioning mode, have poor positioning accuracy, are easily abnormal in positioning and have low operation efficiency.
Aiming at the problem that the precise mapping in water is difficult in the related art, no effective solution has been proposed yet.
Disclosure of Invention
The embodiment of the application provides a method for constructing a grid map, a storage medium and a pool robot, which at least solve the problem that the accurate construction of the map in water is difficult in the related technology.
According to one embodiment of the present application, there is provided a method of constructing a grid map, including: in the process that the pool robot moves in the target water, determining point cloud data acquired by a line laser component, wherein the line laser component is arranged on one side of the pool robot; determining the position of an obstacle in the target water area marked in an original grid map by using the point cloud data; and updating the marked positions of the obstacles in the original grid map by using the determined current positions of the obstacles to construct a target grid map.
According to another embodiment of the present application, there is provided an apparatus for constructing a grid map, including: the first determining module is used for determining the point cloud data acquired by the line laser component in the process that the pool robot moves in the target water, wherein the line laser component is arranged on one side of the pool robot; a second determining module, configured to determine a position of an obstacle in the target water area marked in an original grid map by using the point cloud data; and the first construction module is used for updating the marked positions of the obstacles in the original grid map by using the determined current positions of the obstacles so as to construct a target grid map.
In an exemplary embodiment, the first determining module includes: and the first acquisition unit is used for acquiring a plurality of point data which are transversely arranged through the single-line laser sensor in the process that the pool robot moves along the edge in the target water area to obtain point cloud data.
In an exemplary embodiment, the second determining module includes: a first determining unit, configured to determine an occupancy probability value that a grid in the original grid map is occupied by a plurality of point data in the point cloud data, so as to obtain an occupancy probability value set; and a second determining unit configured to determine a position of the obstacle in the grid of the original grid map using the set of occupancy probability values, and mark the grid position.
In one exemplary embodiment, the first determining unit includes: a first converting subunit configured to convert the point cloud data into a world coordinate system, and determine three-dimensional coordinates of each of the point data in the world coordinate system; a first marking subunit configured to mark a three-dimensional coordinate of each of the point data in the world coordinate system into the original grid map; and the first calculating subunit is used for calculating the probability value of each grid occupied by each point data in the original grid map to obtain the occupancy probability value set.
In one exemplary embodiment, a first computing subunit comprises: the first determining submodule is used for determining current pose data of the pool robot in the target water area; a second determining sub-module, configured to determine a grid value of each of the grids in the original grid map, where the grid value is used to represent a state in which the grid is occupied by point data in the point cloud data; and a third determining sub-module, configured to determine a probability value of each grid occupied by each point data by using the current pose data and the grid value of each grid, so as to obtain the occupancy probability value set.
In one exemplary embodiment, the second determining unit includes: a first determining subunit, configured to determine an occupancy probability value in the occupancy probability value set that is greater than a first preset threshold, to obtain a target occupancy probability value set; and a second determining subunit, configured to determine a target grid corresponding to the target occupancy probability value set from the grids of the original grid map, and mark the obstacle in the target grid.
In an exemplary embodiment, the first building block includes: a third determining unit configured to determine a positional relationship between the pool robot and the obstacle; a fourth determining unit configured to determine the current position of the obstacle based on the positional relationship, wherein the current position is used to represent three-dimensional coordinates of the obstacle in a world coordinate system; and a first marking unit, configured to mark the current position in the original grid map, and update the position of the obstacle marked in the original grid map to obtain the target grid map.
In an exemplary embodiment, the above apparatus further includes: the device further comprises: a third determining module, configured to mark the current position in the original grid map, update a position marked in the original grid map by the obstacle, obtain the target grid map, and determine a data accumulation amount and a data change amount of the pool robot moving from an initial position in the target water area to a first position, where the first position is a position of the pool robot when acquiring a previous frame of point cloud data, and the previous frame of point cloud data and the point cloud data are two adjacent frames of point cloud data; the first prediction module is used for predicting the current coordinate of the pool robot in a world coordinate system according to the data accumulation amount and the data change amount to obtain a predicted world coordinate; and a first updating module for updating the position of the obstacle and updating the target grid map by using the predicted world coordinates and the positional relationship between the pool robot and the obstacle.
According to a further embodiment of the present application, there is also provided a computer readable storage medium having a computer program stored therein, wherein the computer program is arranged to perform the steps of any of the method embodiments described above when run.
According to a further embodiment of the present application there is also provided a pool robot comprising a memory having a computer program stored therein and a processor arranged to run the computer program to perform the steps of any of the method embodiments described above.
According to the method and the device, the position of the obstacle in the target water area marked in the original grid map is determined by utilizing the point cloud data acquired through the line laser component. The actual position of the obstacle can be used for updating the marked position of the obstacle in the original grid map, so that the target grid map can be accurately established. Therefore, the problem that the drawing is difficult to accurately build in the water in the related technology can be solved, and the effect of improving the drawing accuracy of the pool robot in the water is achieved.
Drawings
Fig. 1 is a hardware block diagram of a mobile terminal of a method of constructing a grid map according to an embodiment of the present application;
FIG. 2 is a flow chart of a method of constructing a grid map according to an embodiment of the present application;
fig. 3 is a schematic view of a line laser sensor provided in a cleaning robot according to an embodiment of the present application;
fig. 4 is a block diagram of a construction of an apparatus for constructing a grid map according to an embodiment of the present application.
Detailed Description
Embodiments of the present application will be described in detail below with reference to the accompanying drawings in conjunction with the embodiments.
It should be noted that the terms "first," "second," and the like in the description and claims of the present application and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order.
The method embodiments provided in the embodiments of the present application may be performed in a mobile terminal, a computer terminal or similar computing device. Taking the mobile terminal as an example, fig. 1 is a block diagram of a hardware structure of the mobile terminal of a method for constructing a grid map according to an embodiment of the present application. As shown in fig. 1, a mobile terminal may include one or more (only one is shown in fig. 1) processors 102 (the processor 102 may include, but is not limited to, a microprocessor MCU or a processing device such as a programmable logic device FPGA) and a memory 104 for storing data, wherein the mobile terminal may also include a transmission device 106 for communication functions and an input-output device 108. It will be appreciated by those skilled in the art that the structure shown in fig. 1 is merely illustrative and not limiting of the structure of the mobile terminal described above. For example, the mobile terminal may also include more or fewer components than shown in fig. 1, or have a different configuration than shown in fig. 1.
The memory 104 may be used to store a computer program, for example, a software program of application software and a module, such as a computer program corresponding to a method of constructing a grid map in the embodiment of the present application, and the processor 102 executes the computer program stored in the memory 104, thereby performing various functional applications and data processing, that is, implementing the above-mentioned method. Memory 104 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include memory remotely located relative to the processor 102, which may be connected to the mobile terminal via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission device 106 is used to receive or transmit data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider of the mobile terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, simply referred to as NIC) that can connect to other network devices through a base station to communicate with the internet. In one example, the transmission device 106 may be a Radio Frequency (RF) module, which is configured to communicate with the internet wirelessly.
In this embodiment, a method for constructing a grid map is provided, fig. 2 is a flowchart of a method for constructing a grid map according to an embodiment of the present application, and as shown in fig. 2, the flowchart includes the following steps:
step S202, determining point cloud data acquired by a line laser component in the process that the pool robot moves in a target water area, wherein the line laser component is arranged on one side of the pool robot;
step S204, determining the marked position of the obstacle in the target water area in the original grid map by utilizing the point cloud data;
step S206, updating the position of the obstacle marked in the original grid map with the determined current position of the obstacle to construct a target grid map.
The main body of execution of the above steps may be a specific processor set in a terminal, a server, a terminal or a server, or a processor or a processing device set relatively independently from the terminal or the server, or may be a pool robot itself, but is not limited thereto.
Alternatively, the method of constructing the grid map may be, but is not limited to, a process of moving in a water area using a pool robot, or other scenes of controlling the pool robot to move along a target path within a specific place.
Alternatively, the pool robot includes, but is not limited to, a self-moving device, such as a cleaning robot for sweeping the pool, a sanitizing robot for sanitizing the pool, and the like. Line laser assemblies include, but are not limited to, lidar (e.g., single line laser sensor, two line laser sensor), vision sensor, and the like. For example, if the right side is close to the side wall of a water area when the pool robot moves sideways in a target water area, a single-line laser sensor is transversely mounted in front of the right side of the pool robot, and the field of view is partially in front of the pool robot and partially on the right side of the pool robot. If the pool robot is bordered on the left side near the water side wall, the single line laser sensor is arranged at the left front. The point cloud data may be a line laser data point cloud acquired by a single line laser sensor. Because the pool robot moves in the target water area, the line laser assembly can be a line laser sensor and a laser radar with higher waterproof level, and the point cloud data is used for constructing a grid chart and positioning the pool robot.
Alternatively, the original grid map may be constructed using point cloud data of the target water area acquired by the line laser assembly. Obstacles include, but are not limited to, obstacles within the pool robot cleaning area, such as pool walls in a pool.
Through the steps, the position of the obstacle in the target water area marked in the original grid map is determined by utilizing the point cloud data, which is the point cloud data acquired by the line laser component. The actual position of the obstacle can be used for updating the marked position of the obstacle in the original grid map, so that the target grid map can be accurately established. Therefore, the problem that the drawing is difficult to accurately build in the water in the related technology can be solved, and the effect of improving the drawing accuracy of the pool robot in the water is achieved.
In one exemplary embodiment, the line laser assembly includes a single line laser sensor, and the single line laser sensor is disposed at a corner of the pool robot, and in a process of moving the pool robot in the target water, determining point cloud data acquired by the line laser assembly includes: and in the process that the pool robot moves along the edge in the target water area, acquiring a plurality of point data which are transversely arranged by a single-line laser sensor to obtain point cloud data. In this embodiment, the pool robot may perform a cleaning operation, a sterilizing operation, etc. during the movement along the side in the target water area. But also a movement made only for the purpose of creating a grid map. Alternatively, the single-wire laser sensor includes one wire laser sensor, in this embodiment, a single wire laser sensor is provided, a plurality of data points arranged laterally can be obtained by a single observation, and since the single-wire laser sensor is provided at the corner of the robot, a plurality of fields of view can be obtained by the robot, for example, provided in the right front of the robot, a part of the field of view of the robot can be made in front of the cleaning robot, and a part of the field of view is on the right side of the cleaning robot. Therefore, the acquisition of a plurality of angle data can be realized through a single line laser sensor, and the cost is reduced. Optionally, the single line laser assembly may also set the on time period. Periodically acquiring point cloud data in the movement process of the edge of the pool robot, and continuously correcting the established grid map. According to the embodiment, the point cloud data in the target water area can be accurately obtained through the single-line laser component, and accurate grid map establishment is facilitated.
In one exemplary embodiment, determining the location of an obstacle in a target water area marked in an original grid map using point cloud data includes: determining an occupancy probability value of a grid in an original grid map occupied by a plurality of point data in point cloud data to obtain an occupancy probability value set; and determining the position of the obstacle in the grid of the original grid map by using the occupancy probability value set, and marking the grid position. Optionally, determining the position of the obstacle in the target water area marked in the original grid map using the point cloud data includes: determining an occupancy probability value of a grid in an original grid map occupied by a plurality of point data in point cloud data to obtain an occupancy probability value set; and determining the position of the obstacle in the grid of the original grid map by using the occupancy probability value set, and marking the grid position. In this embodiment, the point cloud data is three-dimensional data of the laser sensor for scanning the obstacle in the target water area, and the point cloud data is converted into the world coordinate system, so that the position of the pool robot can be determined better. Alternatively, the original grid map may be a map pre-constructed by pre-acquired point cloud data, which may include obstacles, or may be a blank map having an identical planar coordinate system to the grid map. The blank map does not have any obstacle information, and the pool robot can determine the position of the obstacle in the original grid map according to the information of the obstacle in the point cloud data.
Optionally, calculating a probability value that each grid in the original grid map is occupied by each point data, to obtain an occupancy probability value set, including: determining current pose data of the pool robot in a target water area; determining a grid value of each grid in the original grid map, wherein the grid value is used for representing the state that the grid is occupied by point data in the point cloud data; and determining the probability value of each grid occupied by each point data by using the current pose data and the grid value of each grid to obtain an occupancy probability value set. In this embodiment, the grid values may include, but are not limited to, numerical values, letters, combinations thereof, and the like; different values, letters, etc. indicate whether the grid is occupied or whether there is an obstacle in the location of the grid. According to the embodiment, through weighting calculation, the occupancy probability value can be accurately determined, so that whether the obstacle exists or not can be accurately determined.
Optionally, determining an occupancy probability value that a grid in the original grid map is occupied by a plurality of point data in the point cloud data, to obtain an occupancy probability value set, including: converting the point cloud data into a world coordinate system, and determining the three-dimensional coordinate of each point data in the world coordinate system; marking three-dimensional coordinates of each point data in a world coordinate system into an original grid map; and calculating the probability value of each grid occupied by each point data in the original grid map to obtain an occupied probability value set.
Optionally, determining a position of the obstacle in the grid of the original grid map using the set of occupancy probability values and marking the grid position comprises: determining an occupancy probability value larger than a first preset threshold value in the occupancy probability value set to obtain a target occupancy probability value set; and determining a target grid corresponding to the target occupancy probability value set from grids of the original grid map, and marking the obstacle into the target grid. In this embodiment, the first preset threshold may be a numerical value, or may be a character or the like. For example, if the first preset threshold is set to be 1, a grid with an occupancy probability value greater than 1 is marked as an obstacle, and a grid with an occupancy probability value less than 1 is a blank area. The embodiment can accurately determine the position of the obstacle through the comparison between the occupancy probability value and the threshold value.
In one exemplary embodiment, updating the position of the obstacle marked in the original grid map with the determined current position of the obstacle to construct a target grid map includes: determining a positional relationship between the pool robot and the obstacle; determining a current position of the obstacle based on the position relationship, wherein the current position is used for representing three-dimensional coordinates of the obstacle in a world coordinate system; and marking the current position into the original grid map, and updating the marked position of the obstacle in the original grid map to obtain the target grid map. In this embodiment, the target grid is the position of the obstacle. For example, during the course of the pool robot moving along the edge, 10 obstacles are encountered, and the corresponding grids of the 10 obstacles are marked as obstacles. Therefore, the obstacle can be accurately marked in the grid map.
In an exemplary embodiment, the above method further comprises: acquiring an initial position of the pool robot moving in a target water area; determining a first position of the pool robot when the point cloud data of the previous frame is acquired, wherein the point cloud data of the previous frame and the point cloud data are two adjacent frames of point cloud data; determining a data accumulation amount and a data change amount of the pool robot moving from the initial position to the first position by using a code wheel, wherein the code wheel is arranged on a driving wheel of the pool robot; and predicting the current coordinates of the pool robot in the world coordinate system according to the data accumulation amount and the data change amount to obtain predicted world coordinates. In this embodiment, the initial position may be any position in the target water area. For example, assuming that the initial coordinate position is (0, 0), the first position of the pool robot when the previous frame of point cloud data is received is R k-1 (x k-1 ,y k-1 ,yaw k-1 ) The accumulated amount (d) between two adjacent frames of data of the pool robot is calculated according to the code wheel accumulated amount x ,d y ) Inertial measurement unit (Inertial Measurement Unit, IMU) variation d yaw Calculating the predicted world coordinate R of the water pool robot k’ (x k’ ,y k’ ,yaw k’ )=(x k-1 +d x ,y k-1 +d y ,yaw k-1 +d yaw ). Wherein, yaw k-1 For indicating the azimuth angle of the pool robot orientation.
Optionally, after predicting the current coordinates of the pool robot in the world coordinate system according to the data accumulation amount and the data change amount to obtain the predicted world coordinates, the method further comprises: performing offset processing on each point data in the point cloud data according to a preset offset to obtain offset point cloud data; calculating the matching degree between each offset point data in the offset point cloud data and the target grid map to obtain a plurality of matching degrees; and updating the predicted world coordinates by using the plurality of matching degrees to obtain the target world coordinates of the pool robot in the world coordinate system. In the embodiment, after the target grid map is determined, the position of the obstacle can be determined clearly, so that the actual position of the pool robot can be determined accuratelyFor example, the world coordinate R is predicted based on the above estimation k’ Calculating coordinates of currently acquired point cloud data (for example, line laser point cloud) under a world coordinate system, and setting the point cloud data as P; the offset space E comprises m offset schemes, each offset scheme comprises fixed tiny offsets of x, y and yaw, and point cloud data of P subjected to m offsets is calculated to be Q 1 ,Q 2 ,...,Q m And calculating a matching degree score (i.e. matching degree) of each point data and the current grid map, for example, if the point data in the point cloud data corresponds to the position on the current map as an obstacle, accumulating 1 score, and accumulating the scores of all the point data in the point cloud data to obtain the matching degree score. The offset point cloud data l (x l ,y l ,yaw l ) Updating the predicted world coordinates to obtain target world coordinates R k (x,y,yaw)=(x k’ +x l ,y k’ +y l ,yaw k’ +yaw l ). According to the embodiment, the position of the pool robot can be continuously updated by carrying out offset processing on the point cloud data, so that the accuracy of positioning is realized; and the position of the obstacle can be continuously updated according to the updated positioning of the robot and the position relation between the robot and the obstacle, so that the accuracy of constructing the target grid map is further improved.
The present application is described below in connection with specific embodiments:
the pool robot in this embodiment will be described taking a cleaning robot for cleaning in a swimming pool as an example. And a line laser sensor with higher waterproof level is arranged on one side of the cleaning robot, and point cloud data is used for drawing and positioning, and the running position of the swimming pool robot is optimized. The method specifically comprises the following steps:
fig. 3 is a schematic diagram of a line laser sensor in a cleaning robot according to an embodiment of the application, as shown in fig. 3, when the cleaning robot performs a side-by-side motion in a swimming pool, the right side of the cleaning robot is close to a side wall of the swimming pool, single line laser sensors are assembled in front of the right side of the cleaning robot, and the single line laser sensors are transversely arranged, so that more point cloud data can be acquired by the single line laser sensors. The field of view of the single line laser sensor is partly in front of the cleaning robot and partly to the right of the cleaning robot. If the cleaning robot is bordered on the left side near the side wall of the pool, a single line laser sensor is placed in front of the cleaning robot on the left.
The embodiment establishes a grid map by collecting line laser data acquired by a single line laser sensor, and specifically comprises the following steps:
s1, setting the initial coordinate position of the cleaning robot for executing the cleaning operation as (0, 0), and setting the first position of the pool robot as R when the previous frame of point cloud data is received k-1 (x k-1 ,y k-1 ,yaw k-1 ) The accumulated amount (d) between two adjacent frames of data of the cleaning robot is calculated based on the code wheel accumulated amount x ,d y ) Amount of imu change d yaw The predicted world coordinate R of the cleaning robot is calculated k’ (x k’ ,y k’ ,yaw k’ )=(x k-1 +d x ,y k-1 +d y ,yaw k-1 +d yaw )。
S2, the cleaning machine performs edge cleaning in the swimming pool, and in the edge cleaning process, a line laser data point cloud is obtained through a single line laser sensor. Each frame of line laser data point cloud is converted into a world coordinate system, and the occupancy probability value of a grid from each point mark in the line laser data point cloud to a corresponding position is calculated.
S3, comparing the plurality of occupancy probability values with a threshold value 1, and marking a grid with the occupancy probability value larger than the threshold value 1 as an obstacle; other grids less than 1 or having no occupancy probability value are determined as blank areas. The grids marking the obstacle and the blank grids are determined as a grid map.
S4, after the grid map is determined, the grid map of the cleaning robot needs to be updated in real time because the cleaning robot is in a continuous moving state in the swimming pool. World coordinate R of cleaning robot calculated in the above S1 k’ Calculating the obtained current line laser point cloud of the cleaning robotSetting point cloud data as P in the coordinates of the world coordinate system; the offset space E comprises m offset schemes, each offset scheme comprises fixed tiny offsets of x, y and yaw, and point cloud data of P subjected to m offsets is calculated to be Q 1 ,Q 2 ,...,Q m Calculating the matching degree score (i.e. matching degree) of each point data and the current grid map, and obtaining the offset point cloud data l (x l ,y l ,yaw l ) Updating the predicted world coordinates to obtain target world coordinates R k (x,y,yaw)=(x k’ +x l ,y k’ +y l ,yaw k’ +yaw l )。
And S5, after the target world coordinates are obtained, continuously obtaining the current position of the obstacle according to the target world coordinates and the position relation between the cleaning robot and the obstacle, and updating the grid map according to the current position of the obstacle. After the cleaning robot cleans one round along the edge in the swimming pool, the construction of the grid map can be completed. Optionally, determining that the cleaning robot is to clean one round along the edge in the pool when the distance of the current position (x, y) of the cleaning robot from the starting position is less than a first threshold value while the angular difference of the orientation of the cleaning robot from the starting orientation is less than a second threshold value.
It should be noted that, when the cleaning robot needs to perform repositioning each time it resumes the cleaning operation, the cleaning robot may select the nearest initial point to start the edge cleaning, plan the cleaning path after the edge cleaning, and perform the cleaning operation according to the planned cleaning path.
In summary, the cleaning robot in this embodiment has the function of mapping and positioning, so that the degree of cleaning intelligence of the cleaning robot is effectively improved.
From the description of the above embodiments, it will be clear to a person skilled in the art that the method according to the above embodiments may be implemented by means of software plus the necessary general hardware platform, but of course also by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk), comprising several instructions for causing a terminal device (which may be a mobile phone, a computer, a server, or a network device, etc.) to perform the method described in the embodiments of the present application.
The embodiment also provides a device for constructing a grid map, which is used for implementing the foregoing embodiments and preferred embodiments, and is not described in detail. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. While the means described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware, is also possible and contemplated.
Fig. 4 is a block diagram of an apparatus for constructing a grid map according to an embodiment of the present application, as shown in fig. 4, the apparatus including:
a first determining module 42, configured to determine, during a movement of the pool robot in a target water area, point cloud data acquired by a line laser assembly, where the line laser assembly is disposed on one side of the pool robot;
a second determining module 44, configured to determine a position of an obstacle in the target water area marked in an original grid map using the point cloud data, where the original grid map includes a plurality of the grids;
a first construction module 46 for updating the position of the obstacle marked in the original grid map with the determined current position of the obstacle to construct a target grid map.
In an exemplary embodiment, the first determining module includes:
and the first acquisition unit is used for acquiring a plurality of point data which are transversely arranged through the single-line laser sensor in the process that the pool robot moves along the edge in the target water area to obtain point cloud data.
In an exemplary embodiment, the second determining module includes:
a first determining unit, configured to determine an occupancy probability value that a grid in the original grid map is occupied by a plurality of point data in the point cloud data, so as to obtain an occupancy probability value set;
and a second determining unit configured to determine a position of the obstacle in the grid of the original grid map using the set of occupancy probability values, and mark the grid position.
In one exemplary embodiment, the first determining unit includes:
a first converting subunit configured to convert the point cloud data into a world coordinate system, and determine three-dimensional coordinates of each of the point data in the world coordinate system;
a first marking subunit configured to mark a three-dimensional coordinate of each of the point data in the world coordinate system into the original grid map;
and the first calculating subunit is used for calculating the probability value of each grid occupied by each point data in the original grid map to obtain the occupancy probability value set.
In one exemplary embodiment, a first computing subunit comprises:
the first determining submodule is used for determining current pose data of the pool robot in the target water area;
a second determining sub-module, configured to determine a grid value of each of the grids in the original grid map, where the grid value is used to represent a state in which the grid is occupied by point data in the point cloud data;
and a third determining sub-module, configured to determine a probability value of each grid occupied by each point data by using the current pose data and the grid value of each grid, so as to obtain the occupancy probability value set.
In one exemplary embodiment, the second determining unit includes:
a first determining subunit, configured to determine an occupancy probability value in the occupancy probability value set that is greater than a first preset threshold, to obtain a target occupancy probability value set;
and a second determining subunit, configured to determine a target grid corresponding to the target occupancy probability value set from the grids of the original grid map, and mark the obstacle in the target grid.
In an exemplary embodiment, the first building block includes:
a third determining unit configured to determine a positional relationship between the pool robot and the obstacle;
a fourth determining unit configured to determine the current position of the obstacle based on the positional relationship, wherein the current position is used to represent three-dimensional coordinates of the obstacle in a world coordinate system;
and a first marking unit, configured to mark the current position in the original grid map, and update the position of the obstacle marked in the original grid map to obtain the target grid map.
In an exemplary embodiment, the above apparatus further includes: the device further comprises:
a third determining module, configured to mark the current position in the original grid map, update a position marked in the original grid map by the obstacle, obtain the target grid map, and determine a data accumulation amount and a data change amount of the pool robot moving from an initial position in the target water area to a first position, where the first position is a position of the pool robot when acquiring a previous frame of point cloud data, and the previous frame of point cloud data and the point cloud data are two adjacent frames of point cloud data;
the first prediction module is used for predicting the current coordinate of the pool robot in a world coordinate system according to the data accumulation amount and the data change amount to obtain a predicted world coordinate;
and a first updating module for updating the position of the obstacle and updating the target grid map by using the predicted world coordinates and the positional relationship between the pool robot and the obstacle.
It should be noted that each of the above modules may be implemented by software or hardware, and for the latter, it may be implemented by, but not limited to: the modules are all located in the same processor; alternatively, the above modules may be located in different processors in any combination.
Embodiments of the present application also provide a computer readable storage medium having a computer program stored therein, wherein the computer program is arranged to perform the steps of any of the method embodiments described above when run.
In one exemplary embodiment, the computer readable storage medium may include, but is not limited to: a usb disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a removable hard disk, a magnetic disk, or an optical disk, or other various media capable of storing a computer program.
Embodiments of the present application also provide a pool robot comprising a memory having a computer program stored therein and a processor arranged to run the computer program to perform the steps of any of the method embodiments described above.
In an exemplary embodiment, the pool robot may further include a transmission device connected to the processor, and an input/output device connected to the processor.
Specific examples in this embodiment may refer to the examples described in the foregoing embodiments and the exemplary implementation, and this embodiment is not described herein.
It will be appreciated by those skilled in the art that the modules or steps of the application described above may be implemented in a general purpose computing device, they may be concentrated on a single computing device, or distributed across a network of computing devices, they may be implemented in program code executable by computing devices, so that they may be stored in a storage device for execution by computing devices, and in some cases, the steps shown or described may be performed in a different order than that shown or described herein, or they may be separately fabricated into individual integrated circuit modules, or multiple modules or steps of them may be fabricated into a single integrated circuit module. Thus, the present application is not limited to any specific combination of hardware and software.
The foregoing description is only of the preferred embodiments of the present application and is not intended to limit the same, but rather, various modifications and variations may be made by those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the principles of the present application should be included in the protection scope of the present application.

Claims (10)

1. A method of constructing a grid map, comprising:
in the process that the pool robot moves in the target water area, determining point cloud data acquired by a line laser component, wherein the line laser component is arranged on one side of the pool robot;
determining the position of an obstacle in the target water area marked in an original grid map by utilizing the point cloud data;
and updating the marked position of the obstacle in the original grid map by using the determined current position of the obstacle to construct a target grid map.
2. The method of claim 1, wherein the line laser assembly comprises a single line laser sensor, and wherein the single line laser sensor is disposed at a corner of the pool robot, and wherein determining the point cloud data acquired by the line laser assembly during movement of the pool robot in the target water comprises:
and in the process that the pool robot moves along the edge in the target water area, acquiring a plurality of point data which are transversely arranged through the single-line laser sensor to obtain the point cloud data.
3. The method of claim 1, wherein determining a location of an obstacle in the target water area marked in an original grid map using the point cloud data comprises:
determining an occupancy probability value of the grid in the original grid map occupied by a plurality of point data in the point cloud data to obtain an occupancy probability value set;
and determining the position of the obstacle in the grid of the original grid map by using the occupancy probability value set, and marking the grid position.
4. The method of claim 3, wherein determining occupancy probability values for a grid in the original grid map occupied by a plurality of point data in the point cloud data, resulting in a set of occupancy probability values, comprises:
converting the point cloud data into a world coordinate system, and determining the three-dimensional coordinate of each point data in the world coordinate system;
marking three-dimensional coordinates of each point data in the world coordinate system into the original grid map;
and calculating the probability value of each grid occupied by each point data in the original grid map to obtain the occupied probability value set.
5. The method of claim 4, wherein calculating a probability value for each grid in the original grid map to be occupied by each of the point data results in the set of occupancy probability values, comprising:
determining current pose data of the pool robot in the target water area;
determining a grid value of each grid in the original grid map, wherein the grid value is used for representing the state that the grids are occupied by point data in the point cloud data;
and determining the probability value of each grid occupied by each point data by utilizing the current pose data and the grid value of each grid, and obtaining the occupancy probability value set.
6. A method according to claim 3, wherein determining the position of the obstacle in the grid of the original grid map using the set of occupancy probability values and marking grid positions comprises:
determining an occupancy probability value larger than a first preset threshold value in the occupancy probability value set to obtain a target occupancy probability value set;
and determining a target grid corresponding to the target occupancy probability value set from the grids of the original grid map, and marking the obstacle into the target grid.
7. The method of claim 1, wherein updating the position of the obstacle marked in the original raster map with the determined current position of the obstacle to construct a target raster map comprises:
determining a positional relationship between the pool robot and the obstacle;
determining the current position of the obstacle based on the position relationship, wherein the current position is used for representing three-dimensional coordinates of the obstacle in a world coordinate system;
and marking the current position into the original grid map, and updating the marked position of the obstacle in the original grid map to obtain the target grid map.
8. The method of claim 7, wherein marking the current location into the original grid map updates the location of the obstacle marked in the original grid map to obtain the target grid map, the method further comprising:
determining a data accumulation amount and a data change amount of the pool robot moving from an initial position to a first position in the target water area, wherein the first position is a position of the pool robot when acquiring a previous frame of point cloud data, and the previous frame of point cloud data and the point cloud data are two adjacent frames of point cloud data;
predicting the current coordinate of the pool robot in a world coordinate system according to the data accumulation amount and the data change amount to obtain a predicted world coordinate;
and updating the position of the obstacle by using the predicted world coordinates and the position relationship between the pool robot and the obstacle, and updating the target grid map.
9. A computer readable storage medium, characterized in that a computer program is stored in the computer readable storage medium, wherein the computer program, when being executed by a processor, implements the steps of the method according to any of the claims 1 to 8.
10. A pool robot comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the steps of the method of any of claims 1 to 8 when the computer program is executed.
CN202311293855.3A 2023-10-08 2023-10-08 Method for constructing grid map, storage medium and pool robot Pending CN117330091A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311293855.3A CN117330091A (en) 2023-10-08 2023-10-08 Method for constructing grid map, storage medium and pool robot

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311293855.3A CN117330091A (en) 2023-10-08 2023-10-08 Method for constructing grid map, storage medium and pool robot

Publications (1)

Publication Number Publication Date
CN117330091A true CN117330091A (en) 2024-01-02

Family

ID=89282460

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311293855.3A Pending CN117330091A (en) 2023-10-08 2023-10-08 Method for constructing grid map, storage medium and pool robot

Country Status (1)

Country Link
CN (1) CN117330091A (en)

Similar Documents

Publication Publication Date Title
US11994872B1 (en) Polymorphic path planning for robotic devices
US11385067B2 (en) Route planning method for mobile vehicle
CN113455965B (en) Cleaning robot control method, cleaning robot control device, medium and cleaning robot
KR101525071B1 (en) Device for searching area and mapping for path of intelligent robot in unknown environments
CN110705385B (en) Method, device, equipment and medium for detecting angle of obstacle
CN113674351B (en) Drawing construction method of robot and robot
CN110749895B (en) Laser radar point cloud data-based positioning method
CN113475977B (en) Robot path planning method and device and robot
CN112526985B (en) Walking forbidden zone planning method and device and self-moving robot
CN112150805B (en) Determination method, device and equipment of travelable area and storage medium
CN115609594A (en) Planning method and device for mechanical arm path, upper control end and storage medium
CN113124902B (en) Positioning correction method and device for mobile robot, storage medium and electronic device
CN113158779B (en) Walking method, walking device and computer storage medium
CN117330091A (en) Method for constructing grid map, storage medium and pool robot
CN113485372B (en) Map searching method and device, storage medium and electronic device
CN115097833A (en) Automatic obstacle avoidance method and system for pesticide application robot and storage medium
CN114995459A (en) Robot control method, device, equipment and storage medium
CN114547227A (en) Ant colony and A-Star algorithm parallel grid map path planning method
CN112578798A (en) Robot map acquisition method and device, processor and electronic device
CN116859951A (en) Water surface map building method, storage medium and pool robot
CN112445211B (en) Robot control method and device, storage medium and electronic device
CN117130371A (en) Method and device for adjusting running path, storage medium and pool robot
CN114019977B (en) Path control method and device for mobile robot, storage medium and electronic equipment
CN116700297B (en) Autonomous navigation control system and control method based on livestock shed operation robot
CN116698015A (en) Target map building method, storage medium and pool robot

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