Pool map generation method, storage medium, and pool robot

By mapping the two-dimensional coordinate information in the pool to a three-dimensional map, a three-dimensional map of the pool is generated, and the problem of real and three-dimensional display of the pool in the existing technology is solved, and the pool display effect is closer to reality is achieved, improving user experience and cleaning efficiency.

WO2025055131A1PCT designated stage expired Publication Date: 2025-03-20XINGMAI INNOVATION TECH (SUZHOU) CO LTD
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2023/134134
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-09-13
Filing Date
2023-11-24
Publication Date
2025-03-20

AI Technical Summary

Technical Problem

The prior art cannot provide a more realistic three-dimensional display of the pool, and cannot meet users' needs for pool cleaning coverage and area cleaning.

Method used

By mapping multiple two-dimensional coordinate information into a three-dimensional map, a three-dimensional map of the pool is generated, including the bottom surface, the pool wall and the water surface model, to achieve a three-dimensional display of the pool.

Benefits of technology

It realizes a real three-dimensional display of the pool, improves the user's visual experience, and enhances the fixed-point cleaning ability of the pool robot.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2023134134_20032025_PF_FP_ABST
    Figure CN2023134134_20032025_PF_FP_ABST
Patent Text Reader

Abstract

Provided are a pool map generation method, a storage medium, and a pool robot. The method comprises: mapping a plurality of pieces of two-dimensional coordinate information to a three-dimensional map to obtain target three-dimensional coordinate information, wherein the two-dimensional coordinate information is grid information of target position points in a pool pre-detected by a pool robot (S202); generating a bottom model of the pool in the three-dimensional map of the pool on the basis of bottom information of the pool comprised in the target three-dimensional coordinate information (S204); and on the basis of the bottom information, generating a pool wall model and a water surface model of the pool in the three-dimensional map of the pool (S206).
Need to check novelty before this filing date? Find Prior Art

Description

Pool map generation method, storage medium, and pool robot

[0001] This disclosure claims priority to a Chinese patent application filed with the Patent Office of China on September 13, 2023, with application number 202311183922.6 and invention name “Method for generating a pool map, storage medium and pool robot”, the entire contents of which are incorporated by reference into this disclosure. Technical Field

[0002] The embodiments of the present application relate to the field of robotics, and more specifically, to a method for generating a pool map, a storage medium, and a pool robot. Background Art

[0003] As people's quality of life improves, more and more homes and playgrounds are equipped with pools for viewing or swimming. Pool robots that can clean pools have emerged. Pool robots can automatically clean the bottom, side walls, and water surface of the pool, providing great convenience for people's lives.

[0004] Currently, pool robots on the market only provide some basic functions of cleaning pools (for example, swimming pools), but in fact users want more than that. In order to provide a better user experience, providing a more realistic pool display effect has also become a user demand. However, there is no method in the relevant technology that can provide a more realistic three-dimensional display of the pool.

[0005] Currently, no effective solution has been proposed to the above-mentioned problems existing in the related technologies.

[0006] Summary of the Invention

[0007] The embodiments of the present application provide a method for generating a pool map, a storage medium, and a pool robot, so as to at least solve the problem existing in the related art that a pool cannot be displayed in a relatively realistic three-dimensional manner.

[0008] According to one embodiment of the present application, a method for generating a pool map is provided, comprising: mapping multiple two-dimensional coordinate information into a three-dimensional map to obtain target three-dimensional coordinate information, wherein the two-dimensional coordinate information is grid information of a target position point in a pool pre-detected by a pool robot; generating a bottom surface model of the pool in the three-dimensional pool map based on the bottom surface information of the pool included in the target three-dimensional coordinate information; and generating a pool wall model and a water surface model of the pool in the three-dimensional pool map based on the bottom surface information.

[0009] According to another embodiment of the present application, a device for generating a pool map is provided, including: a mapping module, configured to map multiple two-dimensional coordinate information into a three-dimensional map to obtain target three-dimensional coordinate information, wherein the two-dimensional coordinate information is grid information of a target position point in the pool pre-detected by a pool robot; a first generation module, configured to generate a bottom surface model of the pool in the three-dimensional pool map based on the bottom surface information of the pool included in the target three-dimensional coordinate information; and a second generation module, configured to generate a pool wall model and a water surface model of the pool in the three-dimensional pool map based on the bottom surface information.

[0010] According to another embodiment of the present application, a computer-readable storage medium is provided, in which a computer program is stored. The computer program is configured to execute the steps of any one of the above method embodiments when run.

[0011] According to another embodiment of the present application, a pool robot is provided, comprising a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] FIG1 is a hardware structure block diagram of a mobile terminal for generating a pool map according to an embodiment of the present application;

[0013] FIG2 is a flow chart of a method for generating a pool map according to an embodiment of the present application;

[0014] FIG3-1 is a schematic diagram of a water pool according to an embodiment of the present application;

[0015] FIG3-2 is a line drawing of a schematic diagram of a pool according to an embodiment of the present application;

[0016] FIG4-1 is a second schematic diagram of a water pool according to an embodiment of the present application;

[0017] FIG4-2 is a line drawing of a second schematic diagram of a pool according to an embodiment of the present application;

[0018] FIG5-1 is a third schematic diagram of a pool according to an embodiment of the present application;

[0019] FIG5-2 is a line drawing of a third schematic diagram of a pool according to an embodiment of the present application;

[0020] FIG6 is an overall flow chart according to an embodiment of the present application;

[0021] FIG7 is a structural block diagram of a device for generating a pool map according to an embodiment of the present application. DETAILED DESCRIPTION

[0022] The embodiments of the present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0023] It should be noted that the terms "first", "second", etc. in the description and claims of this application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.

[0024] The method embodiment provided in the embodiment of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Taking operation on a mobile terminal as an example, FIG1 is a hardware structure block diagram of a mobile terminal of the method for generating a pool map in an embodiment of the present application. As shown in FIG1 , the mobile terminal may include one or more (only one is shown in FIG1 ) processors 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 configured to store data, wherein the mobile terminal may also include a transmission device 106 and an input / output device 108 configured to have a communication function. It will be understood by those skilled in the art that the structure shown in FIG1 is for illustration only and does not limit the structure of the mobile terminal. For example, the mobile terminal may also include more or fewer components than those shown in FIG1 , or have a configuration different from that shown in FIG1 .

[0025] The memory 104 can be configured to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the method for generating the pool map in the embodiment of the present application. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, implementing the above-mentioned method. The memory 104 may include a high-speed random access memory and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the mobile terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0026] The transmission device 106 is configured to receive or transmit data via a network. A specific example of the aforementioned network may include a wireless network provided by the mobile terminal's telecommunications provider. In one embodiment, the transmission device 106 includes a network interface controller (NIC), which can be connected to other network devices via a base station to enable communication with the Internet. In another embodiment, the transmission device 106 may be a radio frequency (RF) module configured to communicate with the Internet wirelessly.

[0027] In an embodiment of the present application, the pool robot may be a pool cleaning robot. When the pool robot first enters the pool to work, or when the pool robot needs to regenerate a three-dimensional pool map after being reset, or in other scenarios where a three-dimensional pool map needs to be generated, the pool map generation method in the embodiment of the present application may be used to generate a three-dimensional pool map. The generated three-dimensional pool map may be displayed on the mobile application APP interface, and the user may view the three-dimensional effect of the pool through the APP. In addition, the user may control the pool robot through the APP to operate on a specific area of ​​the pool, and the operation path of the pool robot may also be viewed in the APP. The following describes how the present application generates a pool map:

[0028] FIG2 is a flow chart of a method for generating a pool map according to an embodiment of the present application. As shown in FIG2 , the process includes the following steps:

[0029] Step S202: mapping the plurality of two-dimensional coordinate information into a three-dimensional map to obtain target three-dimensional coordinate information, wherein the two-dimensional coordinate information is grid information of the target position point in the pool pre-detected by the pool robot;

[0030] Step S204: generating a bottom model of the pool in the three-dimensional pool map based on the bottom information of the pool included in the target three-dimensional coordinate information;

[0031] Step S206 , generating a pool wall model and a water surface model of the pool in the three-dimensional pool map based on the bottom surface information.

[0032] Among them, the executor of the above steps can be a built-in controller of the pool robot, or a controller or control system or processor that is associated with the pool robot and has data processing and signal interaction capabilities, or it can also be other processing equipment or processing units with similar processing capabilities.

[0033] In the above embodiment, the pool robot can clean the above pool. The target pool includes but is not limited to swimming pools, ornamental reservoirs, outdoor pools, etc. The target locations can be locations within the pool detected by the pool robot when constructing a pool map, including locations on the pool bottom (corresponding to the aforementioned bottom surface), locations on the pool walls, and locations on objects within the pool (e.g., obstacles, pool landscaping, etc.). The pool robot can construct a pool map before or during a cleaning operation.

[0034] The above-mentioned three-dimensional map includes the raster data obtained based on the movement of the pool robot in the pool, and the mapped target three-dimensional coordinate information. The pool three-dimensional map can be obtained by performing various rendering operations based on the target three-dimensional coordinate information. In addition to the pool three-dimensional map, the above-mentioned three-dimensional map can also include other models that have been rendered (for example, a house model, a tree model, etc.). The working trajectory of the pool robot in the map also corresponds to the trajectory line generated in real time when the pool robot moves in the pool. In addition, the above-mentioned three-dimensional map can also be a pre-constructed map. In addition, after the pool robot is repositioned to determine the coordinates of the pool robot, the trajectory line generated in real time when the pool robot moves can be added to the pool three-dimensional map. This application does not limit the timing of constructing the above-mentioned three-dimensional map.

[0035] Through the above embodiment, since the internal three-dimensional structure of the pool and the three-dimensional display of the pool wall are comprehensively considered when generating the three-dimensional map of the pool, the presented pool effect is closer to the actual pool, effectively solving the problem of the inability to provide a relatively realistic three-dimensional display of the pool in the related art, and improving the user's visual experience.

[0036] In an optional embodiment, generating a bottom model of a pool in a three-dimensional pool map based on the bottom information of the pool included in the target three-dimensional coordinate information includes: connecting the coordinate points corresponding to adjacent edge position information included in the bottom position information; generating a bottom edge connection graph of the pool in the three-dimensional pool map based on the connection result; and rendering the bottom edge connection graph to obtain the bottom model.

[0037] In the above embodiment, the bottom surface location information may include edge location information near the pool bottom outline and may also include location information near the center of the pool bottom. When constructing a connection map of the bottom surface, the coordinate points corresponding to the edge location information of the pool bottom can be connected to obtain the connection map. Since the number of location points pre-collected by the pool robot may be limited, some lines in the connection map may have abrupt transitions. In this case, the abrupt line connections can be smoothed to obtain a relatively smooth bottom edge. Furthermore, the edge of the pool bottom may be straight or curved, and the edge type can be determined based on the shape of the line segment formed by connecting the edge points. For example, if the line connecting the edge points does not form a straight line segment, the previously connected line segment is treated as a data wall segment. If a series of edge points cannot be connected to form a straight line, the data point from the beginning to the end of the series of edge points is marked as irregular curve data and treated as a single data segment. In the above embodiment, the pool bottom edge connection map can be rendered using Three.js technology, although other technologies can also be used to implement this rendering operation.

[0038] In an optional embodiment, generating a water surface model of the pool in the three-dimensional map of the pool based on the bottom surface information includes: obtaining the distance between each first position point on the water surface pre-detected by the pool robot and the bottom surface of the pool; generating a water surface connection diagram of the pool in the three-dimensional map of the pool based on the distance between the first position point and the bottom surface of the pool; and rendering the water surface connection diagram to obtain the water surface model.

[0039] In the above embodiment, the position information of the target position points pre-detected by the pool robot includes the coordinate information of each target position point. Generally speaking, the coordinate information of the position points detected by the pool robot includes the coordinate point information in the two-dimensional coordinate system, that is, the coordinate value in the world coordinate system where the pool robot is currently located. However, the pool robot can also determine the depth information of each position point, or the distance of each position point from a reference surface (for example, from the bottom of the pool) based on a built-in depth detection sensor (for example, a radar sensor, an infrared sensor, a pressure sensor, etc.) or a specific algorithm. Therefore, the depth (or height relative to the reference surface) of the pre-detected target position point will actually be recorded inside the pool robot. Therefore, when the information of each position point is subsequently mapped into a three-dimensional map, complete mapping on three axes can be achieved.

[0040] In the above embodiment, the distance between each first position point and the bottom of the pool can be determined based on the depth (or height relative to the reference surface) of each first position point on the water surface pre-detected by the pool robot, and then some points on the water surface can be identified in the three-dimensional map. Then, by connecting the identified points, a partial connection diagram of the water surface can be obtained. At the position in the three-dimensional map of the pool, the overall connection diagram of the water surface can be obtained by expanding the partial connection diagram of the water surface to the pool wall, thereby achieving the purpose of performing subsequent rendering operations on the overall connection diagram of the water surface. In addition, in this embodiment, the overall connection diagram of the water surface can also be rendered using Three.js technology. Of course, the area from the water surface to the bottom of the pool can also be rendered as the texture of the water area.

[0041] In an optional embodiment, generating a pool wall model of the pool in the three-dimensional pool map based on the bottom surface information includes: generating an inner wall model of the pool in the three-dimensional pool map based on the bottom surface information; performing an expansion process on the inner wall model in the three-dimensional pool map to generate the pool wall model of the pool in the three-dimensional pool map. In this embodiment, the wall of an actual pool has a certain thickness. In order to achieve an effect that is closer to the actual shape of the pool, after generating the inner wall model, it is necessary to perform an expansion process on the inner wall model by a certain number of pixels (the pixel size can be determined based on the actual thickness of the pool wall, or a fixed pixel value can be set, or the pixel value can be set according to other conditions, etc.) to obtain a more realistic pool shape.

[0042] In an optional embodiment, generating an inner wall model of the pool in the three-dimensional pool map based on the bottom surface information includes: determining an edge line of the pool in the three-dimensional pool map based on the bottom surface information; extending the edge line upward by a predetermined height to generate a pool wall connection diagram of the pool in the three-dimensional pool map; and rendering the pool wall connection diagram to obtain the inner wall model. In this embodiment, the pool wall model actually aligns with the edge of the bottom surface model. Therefore, when generating the pool wall connection diagram, the edge of the bottom surface model can be extended upward (i.e., in the Z-axis direction of the three-dimensional coordinate system). The specific extension height can be set based on actual conditions. For example, the height of the pool wall model can be set to be the same as the height of the water surface model, or the height of the pool wall model can be set to be a certain height above the water surface model. In addition, the pool robot can also pre-detect the height difference between the pool wall and the water surface, and then set the height of the pool wall model based on the pre-detected height difference. The specific setting method can be set based on a pre-configured method.

[0043] In an optional embodiment, performing an outward expansion process on the inner wall model in the three-dimensional pool map to generate the pool wall model in the three-dimensional pool map includes: expanding the inner wall model in the three-dimensional pool map by a predetermined number of pixels to obtain an outer wall model; connecting the inner points on the inner wall model with the outer points on the outer wall model to form a wall gap filling geometry; and rendering the wall gap filling geometry to obtain the pool wall model. In this embodiment, the pool wall actually has a certain thickness. To make the pool effect presented in the three-dimensional map more similar to an actual pool, the generated inner wall model can be expanded, for example, by 2 pixels, 5 pixels, or another number of pixels, or by a predetermined proportion of the overall width of the pool (e.g., 1 / 50, 1 / 100, etc.), wherein the expansion is actually an expansion along the xy axis away from the pool. In addition, after the inner models of each pool wall are expanded, there will be gaps between the pool wall models. Therefore, these gaps need to be filled. For example, when the inner model of the pool wall is composed of multiple line segments, the intersection of adjacent line segments in the inner model of the pool wall can be connected with the two end points of the two expanded line segments formed after the adjacent line segments are expanded, close to the intersection, to form a triangle. The triangle is then extended from the bottom of the pool to the top of the pool to obtain the above-mentioned wall gap filling geometry. Optionally, after the connection is made, a smooth transition process can be performed on the connected geometry so that the pool wall connection can be smoothly connected. For example, the position point on the outside of the pool wall is offset by one position and then connected to the point inside the pool wall. The last data point is connected to the initial point to form a filler for the wall. At this time, the wall is visually uniform in width and smoothly connected. In this embodiment, the split rendering of the pool wall model can also be achieved by performing data splitting (that is, using specific codes or programs to separate the data belonging to different pool walls or pool bottoms, and then clarifying which position points correspond to which pool wall or pool bottom). After the splitting of the pool wall model is achieved, in subsequent work, a certain pool wall model or pool bottom model area can be selected separately to control the robot to clean it separately.

[0044] In an optional embodiment, after generating the pool wall model, the method further includes: connecting the outer points on the outer side of the pool wall model to form the outer contour of the pool wall of the pool in the three-dimensional pool map; hollowing out the outer contour of the pool wall in the three-dimensional pool map to form a ground geometry located around the pool; and rendering the ground geometry to obtain a ground model located around the pool. In this embodiment, there may be ground such as lawns and beaches around the pool. In order to make the display effect of the pool closer to the actual effect, a corresponding texture may be rendered around the pool. In order to avoid rendering the pool with the same texture as the surrounding area when rendering the pool perimeter, the present embodiment adopts a method of hollowing out the pool area, thereby achieving the purpose of rendering only the pool perimeter. Optionally, when constructing the ground around the pool, in addition to the above-mentioned method of hollowing out after connecting the outer points, the top surface model of the pool wall can also be expanded in a manner similar to the expansion of the inner side model of the pool wall. In addition, the expanded ground can be level with the top surface model of the pool wall, or it can be lower than the top surface model of the pool wall by a certain height.

[0045] In an optional embodiment, the method further includes: obtaining position information of the pool robot while operating in the pool; mapping the robot position information into a three-dimensional map of the pool to obtain path data for the pool robot within the three-dimensional map; processing the path data to generate a trajectory geometry having a thickness less than a target number of pixels; and rendering the trajectory geometry to obtain the operating trajectory of the pool robot within the three-dimensional map of the pool. In this embodiment, the path data can be processed using a target stamping geometry model technique, wherein the width of the trajectory geometry can be determined based on the width of the pool robot. In the above embodiment, a two-dimensional or three-dimensional pool robot and its working trajectory can also be rendered in a three-dimensional map. The working trajectory of the pool robot is determined by the actual travel path of the pool robot. Generally, the cleaning width of the pool robot is determined based on the width of the pool robot itself. Therefore, when generating the pool robot's trajectory geometry, pre-stored pool robot width data can be obtained, and the pool robot's trajectory can be rendered according to this width data. In addition, considering that the height of the pool robot is relatively small relative to the pool, the thickness of the pool robot's trajectory can be set to be relatively small, for example, to 1 pixel, 2 pixels, etc. When rendering the pool robot's trajectory, the stamping geometry model technology in Three.js can be utilized (of course, other technologies can also be utilized) to create based on processed path data (i.e., data obtained during the movement of the pool robot, and specific processing methods may include data parsing, coordinate conversion, texture mapping, etc.), for example, to create a smearing effect of the cleaning robot filtering water. By rendering the pool robot's work trajectory, users can view the robot's work progress in real time. The robot's work trajectory can be seen in Figures 3-1, 3-2, 4-1, 4-2, 5-1, and 5-2. For cleaning robots, this feature allows users to intuitively understand the robot's cleaning progress and coverage, facilitating subsequent water use assessments, water drainage and replacement assessments, and other types of cleaning activities.

[0046] In the aforementioned embodiment, Three.js technology can be used to create and render a three-dimensional scene model. This allows for rendering of the pool map's bottom, walls, water surface, environmental elements, and the pool robot model. For the pool map's renderings, see Figures 3-1, 4-1, and 5-1. To more clearly illustrate the various components of the pool map, the corresponding line drawings for each rendering of the pool map are shown in Figures 3-2, 4-2, and 5-2, respectively. Conventional solutions for generating maps based on raster data only generate two-dimensional maps. Furthermore, current pool robot apps on the market lack any form of map display, failing to meet user requirements for pool cleaning coverage and targeted area cleaning. Compared to conventional two-dimensional map display solutions, the present embodiment enables realistic three-dimensional pool map display. This allows users to observe and understand the pool's structure and layout in a more intuitive and realistic manner. Furthermore, the present embodiment can display the pool's walls and bottom, providing multi-dimensional observation and display. Users can freely select a specific area for observation and trigger the robot to clean the area in a targeted manner. This function gives the robot stronger fixed-point cleaning capabilities.

[0047] In an optional embodiment, mapping multiple two-dimensional coordinate information into a three-dimensional map to obtain target three-dimensional coordinate information includes: performing a splitting operation on the target two-dimensional coordinate information included in the multiple two-dimensional coordinate information to obtain multiple groups of two-dimensional coordinate information groups, wherein the target two-dimensional coordinate information is the grid information of the bottom edge of the pool pre-detected by the pool robot; mapping the multiple groups of two-dimensional coordinate information groups into the three-dimensional map respectively to obtain the target three-dimensional coordinate information corresponding to each group of two-dimensional coordinate information groups, wherein the model generated based on the target three-dimensional coordinate information obtained after group mapping supports the function of separate rendering. In this embodiment, after obtaining the two-dimensional coordinate information, it is necessary to split these two-dimensional coordinate information, wherein, when performing the splitting operation, it is mainly necessary to split the two-dimensional coordinate information of the edge points of the bottom surface of the pool. Considering that the bottom of the pool may not be a regular circle, but may be a regular or irregular shape with straight line segments and / or curved line segments, in this case, it is necessary to split the edge line of the pool bottom. That is, in this case, the splitting operation can be performed according to the type of line segment where the target two-dimensional coordinate information is located. After performing the splitting operation, it is necessary to obtain multiple groups of two-dimensional coordinate information groups located on different line segments. For example, each straight line segment and / or curved line segment is split out (actually, the two-dimensional coordinate information of the points located on each straight line segment and curved line segment is split out), so as to realize the splitting of the pool wall model corresponding to each pair of straight line segments and curved line segments on the bottom edge. Optionally, the splitting operation can also be performed according to the plane corresponding to the target two-dimensional coordinate information, for example, after performing the splitting operation, multiple groups of two-dimensional coordinate information groups located on different sides of the pool wall are obtained; the splitting operation can also be performed according to other preset requirements, for example, after performing the splitting operation, multiple groups of two-dimensional coordinate information groups located on different blocks of the same wall are obtained. In addition, group mapping can be achieved after splitting, which can facilitate the subsequent block rendering of the pool wall model and the purpose of block selection. It should be noted that the splitting operation in this application can be achieved through specific code or specific splitting tools.

[0048] In an optional embodiment, the method further includes: receiving a selection instruction for the target three-dimensional map; determining a target area in the pool based on the selection instruction; controlling the pool robot to move to the target area and clean the target area. In this embodiment, the pool map can be viewed through a specific app, and a certain area of ​​the pool (for example, a certain pool wall, pool bottom, water surface, etc.) can also be selected through the app. The specific selection effect can be seen in Figures 5-1 and 5-2, and then the control instruction is triggered to control the pool robot to move to the selected area to work, wherein the pool robot can be controlled to move to a specific position point in the selected area (for example, the center point of the area, the starting point on an edge of the area, the middle point on an edge of the area), or to a point in the selected area that is closest to the pool robot.

[0049] In an optional embodiment, mapping multiple two-dimensional coordinate information into a three-dimensional map includes: traversing the multiple two-dimensional coordinate information, determining the information of the second position point with the largest coordinate value and the information of the third position point with the smallest coordinate value included in the multiple two-dimensional coordinate information; determining the coordinate origin of the three-dimensional map based on the information of the fourth position point located at the middle position between the second position point and the third position point; and mapping the multiple position information into the three-dimensional map based on the difference of each position information relative to the coordinate origin. In this embodiment, when determining the second and third position points, one of the multiple world coordinate systems in which the robot is located when detecting the target position point can be used as a reference coordinate system, thereby obtaining the mapping coordinates of each position point mapped to the reference coordinate system. Then, the two position points with the largest and smallest coordinate values ​​can be obtained from them. In addition, since the height (or depth) information of the second and third position points is known in advance, the height (or depth) information of the fourth position point can naturally be calculated. In addition, the position information of the coordinate origin determined based on the information of the fourth position point can be known. Then, the position of each position point in the three-dimensional map can be determined based on the coordinate difference of other position points relative to the coordinate origin. In this embodiment, the fourth position point can be directly determined as the coordinate origin, or the coordinate origin can be obtained after a specific offset processing is performed on the fourth position point. In addition, through the position information mapping, the perspective of the target three-dimensional map can be changed, for example, the center point of the target three-dimensional map in the three-dimensional perspective is made to be the center point of the pool, thereby improving the generation effect of the pool map. Optionally, before generating the pool, the raster data can be pre-processed. That is, the raster data, such as terrain elevation data and pool structure data, can be pre-processed and converted to meet the requirements of the Three.js rendering engine. This pre-processing includes data parsing, coordinate conversion, texture mapping, etc.

[0050] The pool map generation process can be viewed through an app installed on the terminal. This app also enables user interaction, allowing users to freely browse and interact with the scene, including rotation, zooming, and other operations, allowing them to fully appreciate and experience the three-dimensional effects of the pool. Furthermore, this user interaction allows users to interact with the pool map, selecting specific areas and triggering the pool robot's targeted operation. This interactive function increases user engagement and improves the flexibility and efficiency of targeted cleaning.

[0051] The following uses the pool as a swimming pool and the pool robot as a cleaning robot as an example to illustrate the overall process of this application:

[0052] FIG6 is an overall flow chart according to an embodiment of the present application, as shown in FIG6 , including the following steps:

[0053] S602, segmenting the data based on the initial raster data of the swimming pool. The segmentation of the initial raster data mainly includes the following aspects: first, segmenting the line segments on the edge of the pool bottom to facilitate subsequent block rendering of each pool wall model; second, filtering out raster data of locations that are clearly not within the swimming pool; and third, leveling out burrs, that is, adjusting raster data of locations that are slightly outside the swimming pool.

[0054] S604: traverse the data points to find the maximum and minimum xy coordinate points in the two-dimensional angle. The traversal method may include traversing the segmented data sequentially, or dividing the segmented data into blocks and then traversing each block of data simultaneously, and comparing the maximum and minimum points found in each data block again to determine the final maximum and minimum coordinate points.

[0055] S606: Calculate the coordinates of the origin of the 3D image based on the xy coordinate points, and convert all coordinate points based on the coordinates of the origin to obtain a new coordinate system in the 3D image. The midpoint between the maximum and minimum xy coordinate points can be determined as the new coordinate origin. Subtract the new coordinate origin from all xy coordinate points to convert the xy coordinate points to coordinate points in the 3D scene.

[0056] S608, connecting the coordinate points in the pool bottom to generate a model of the pool bottom (i.e., bottom surface, or pool bottom) and mapping it, wherein the mapping operation can be achieved through a rendering operation;

[0057] S610, generating a water model contained in the swimming pool according to the shape of the swimming pool bottom model;

[0058] S612, traverse the transformed and segmented wall (i.e., pool wall) data, generate external wall coordinate points, and save them;

[0059] S614, connecting the inner wall points and the outer wall points to form a wall model;

[0060] S616, traversing the exterior wall data points and sequentially connecting the exterior wall data points with the interior wall data points to form a wall gap filling geometry;

[0061] S618: The exterior wall data points are sequentially connected to form the exterior wall shape, the exterior wall shape is hollowed out, and then the surrounding lawn geometry is generated (here, the lawn around the swimming pool is used as an example for explanation);

[0062] S620, converting the trajectory data points of the swimming pool robot into a 3D coordinate system;

[0063] S622, generating a geometric shape with a smaller thickness, and connecting the track coordinate points to form a track line geometry, wherein the geometric shape with a smaller thickness may be a geometric shape with a thickness of 1 pixel;

[0064] S624, taking the latest loaded trajectory points to render the robot model to generate a dynamic cleaning effect.

[0065] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus the necessary general hardware platform, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application, or the part that contributes to the relevant technology, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the method described in each embodiment of the present application.

[0066] This embodiment also provides a device for generating a pool map, which is used to implement the above-mentioned embodiments and optional implementations. Details already described will not be repeated here. As used below, the term "module" may refer to a combination of software and / or hardware that implements a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementation using hardware, or a combination of software and hardware, is also possible and contemplated.

[0067] FIG7 is a structural block diagram of a device for generating a pool map according to an embodiment of the present application. As shown in FIG7 , the device includes:

[0068] The mapping module 72 is configured to map multiple two-dimensional coordinate information into a three-dimensional map to obtain target three-dimensional map coordinate information, wherein the two-dimensional coordinate information is the grid information of the target position point in the pool pre-detected by the pool robot; the first generation module 74 is configured to generate a bottom surface model of the pool in the three-dimensional pool map based on the bottom surface information of the pool included in the target three-dimensional coordinate information; the second generation module 76 is configured to generate a pool wall model and a water surface model of the pool in the three-dimensional pool map based on the bottom surface information.

[0069] In an optional embodiment, the first generation module 74 includes: a first connection unit, configured to connect the coordinate points corresponding to adjacent edge position information included in the bottom surface information; a first generation unit, configured to generate a bottom surface edge connection diagram of the pool in the three-dimensional map of the pool based on the connection results; and a first rendering unit, configured to render the bottom surface edge connection diagram to obtain the bottom surface model.

[0070] In an optional embodiment, the second generation module 76 includes: an acquisition unit, configured to obtain the distance between each first position point on the water surface pre-detected by the pool robot and the bottom surface of the pool; a second generation unit, configured to generate a water surface connection diagram of the pool in the three-dimensional map of the pool based on the distance between the first position point and the bottom surface of the pool; and a second rendering unit, configured to render the water surface connection diagram to obtain the water surface model.

[0071] In an optional embodiment, the second generation module 76 includes: a third generation unit, configured to generate an inner wall model of the pool in the three-dimensional map of the pool based on the bottom surface information; an expansion unit, configured to perform expansion processing on the inner wall model of the pool in the three-dimensional map of the pool to generate a pool wall model of the pool in the three-dimensional map of the pool.

[0072] In an optional embodiment, the third generation unit includes: a determination subunit, configured to determine the edge line of the pool in the three-dimensional map of the pool based on the bottom surface information; an extension subunit, configured to extend the edge line upward to a predetermined height to generate a pool wall connection diagram of the pool in the three-dimensional map of the pool; and a first rendering subunit, configured to render the pool wall connection diagram to obtain the inner side model of the pool wall.

[0073] In an optional embodiment, the expansion unit includes an expansion subunit, configured to expand the inner model of the pool wall by a predetermined number of pixels in the three-dimensional map of the pool to obtain an outer model of the pool wall; a connection subunit, configured to connect the inner points on the inner model of the pool wall with the outer points on the outer model of the pool wall to form a wall gap filling geometry; and a second rendering subunit, configured to render the wall gap filling geometry to obtain the pool wall model.

[0074] In an optional embodiment, the device further includes: a connection unit, configured to connect the outer points on the outer side of the pool wall model after generating the pool wall model, to form the outer contour of the pool wall of the pool in the three-dimensional map of the pool; a fourth generation unit, configured to hollow out the outer contour of the pool wall in the three-dimensional map of the pool to form a ground geometry located around the pool; and a third rendering unit, configured to render the ground geometry to obtain a ground model located around the pool.

[0075] In an optional embodiment, the device also includes: an acquisition module, configured to obtain the robot position information of the pool robot when working in the pool; a mapping module, configured to map the robot position information into the three-dimensional map of the pool to obtain the path data of the pool robot in the three-dimensional map of the pool; a processing module, configured to process the path data to generate a trajectory geometry with a thickness less than a target number of pixels; a second rendering module, configured to render the trajectory geometry to obtain the working trajectory of the pool robot in the three-dimensional map of the pool.

[0076] In an optional embodiment, the mapping module 72 includes: a splitting unit, configured to split the target two-dimensional coordinate information included in the multiple two-dimensional coordinate information to obtain multiple groups of two-dimensional coordinate information groups, wherein the target two-dimensional coordinate information is the grid information of the bottom edge of the pool pre-detected by the pool robot; a first mapping unit, configured to map the multiple groups of two-dimensional coordinate information groups to the three-dimensional map respectively to obtain the target three-dimensional coordinate information corresponding to each group of the two-dimensional coordinate information groups, wherein the model generated based on the target three-dimensional coordinate information obtained after group mapping supports the function of separate rendering.

[0077] In an optional embodiment, the device also includes: a receiving module, configured to receive a selection instruction for the target three-dimensional map; a determination module, configured to determine the target area in the pool based on the selection instruction; and a control module, configured to control the pool robot to move to the target area and clean the target area.

[0078] In an optional embodiment, the mapping module 72 includes: a first determination unit, configured to traverse the multiple two-dimensional coordinate information to determine the information of the second position point with the largest coordinate value and the information of the third position point with the smallest coordinate value included in the multiple two-dimensional coordinate information; a second determination unit, configured to determine the coordinate origin of the three-dimensional map of the pool based on the information of the fourth position point located at the middle position between the second position point and the third position point; a second mapping unit, configured to map the multiple position information into the three-dimensional map based on the difference of each position information relative to the coordinate origin.

[0079] It should be noted that the above modules can be implemented through software or hardware. For the latter, it can be implemented in the following ways, but not limited to: the above modules are all located in the same processor; or the above modules are located in different processors in any combination.

[0080] An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored. The computer program is configured to execute the steps of any of the above method embodiments when run.

[0081] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk, or an optical disk.

[0082] An embodiment of the present application further provides an electronic device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0083] In an exemplary embodiment, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.

[0084] For specific examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary implementation modes, and this embodiment will not be described in detail here.

[0085] Obviously, those skilled in the art should understand that the modules or steps of the present application described above can be implemented using a general-purpose computing device, they can be concentrated on a single computing device, or distributed across a network composed of multiple computing devices, they can be implemented using program code executable by the computing device, and thus, they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be performed in a different order than herein, or they can be fabricated into separate integrated circuit modules, or multiple modules or steps can be fabricated into a single integrated circuit module for implementation. Thus, the present application is not limited to any specific combination of hardware and software.

[0086] The above description is merely an optional embodiment of the present application and is not intended to limit the present application. Various modifications and variations are possible for those skilled in the art. Any modifications, equivalent substitutions, improvements, etc. made within the principles of the present application shall be included within the scope of protection of the present application.

Claims

1. A method for generating a pool map, comprising: Mapping a plurality of two-dimensional coordinate information into a three-dimensional map to obtain target three-dimensional coordinate information, wherein the two-dimensional coordinate information is grid information of target position points in the pool pre-detected by the pool robot; generating a bottom surface model of the pool in the three-dimensional pool map based on the bottom surface information of the pool included in the target three-dimensional coordinate information; and A pool wall model and a water surface model of the pool in the three-dimensional map of the pool are generated based on the bottom surface information.

2. The method according to claim 1, wherein: Generating a bottom surface model of a pool in a three-dimensional pool map based on the bottom surface information of the pool included in the target three-dimensional coordinate information includes: Connecting coordinate points corresponding to adjacent edge position information included in the bottom surface information; Generate a bottom edge connection diagram of the pool in the three-dimensional map of the pool based on the connection results; The bottom surface edge connection graph is rendered to obtain the bottom surface model.

3. The method according to claim 1, wherein: Generating a water surface model of the pool in the three-dimensional map of the pool based on the bottom surface information includes: Obtaining the distance between each first position point on the water surface pre-detected by the pool robot and the bottom surface of the pool; generating a water surface connection diagram of the pool in the three-dimensional map of the pool based on the distance between the first position point and the bottom surface of the pool; The water surface connection diagram is rendered to obtain the water surface model.

4. The method according to claim 1, wherein: Generating a pool wall model of the pool in the three-dimensional pool map based on the bottom surface information includes: Generate a pool wall inner side model of the pool in the three-dimensional pool map based on the bottom surface information; An expansion process is performed on the inner side model of the pool wall in the three-dimensional map of the pool to generate a pool wall model of the pool in the three-dimensional map of the pool.

5. The method according to claim 4, wherein: Generating the inner wall model of the pool in the three-dimensional map of the pool based on the bottom surface information includes: Determine the edge line of the pool in the three-dimensional map of the pool based on the bottom surface information; Extending the edge line upward to a predetermined height to generate a pool wall connection diagram of the pool in the three-dimensional pool map; The pool wall connection diagram is rendered to obtain the inner side model of the pool wall.

6. The method according to claim 4, wherein: Performing an outward expansion process on the inner side model of the pool wall in the three-dimensional map of the pool to generate a pool wall model of the pool in the three-dimensional map of the pool includes: In the three-dimensional map of the pool, the inner side model of the pool wall is expanded outward by a predetermined number of pixels to obtain an outer side model of the pool wall; Connecting the inner points on the inner model of the pool wall with the outer points on the outer model of the pool wall to form a wall gap filling geometry; The wall gap filling geometry is rendered to obtain the pool wall model.

7. The method according to claim 1, wherein: After generating the pool wall model, the method further comprises: Connecting the outer points on the outer side of the pool wall model to form the outer contour of the pool wall of the pool in the three-dimensional map of the pool; After hollowing out the outer contour of the pool wall in the three-dimensional map of the pool, a ground geometric body located around the pool is formed; The ground geometry is rendered to obtain a ground model around the pool.

8. The method according to claim 1, wherein: The method further comprises: Acquiring robot position information of the pool robot when working in the pool; Mapping the robot position information to the three-dimensional map of the pool to obtain path data of the pool robot in the three-dimensional map of the pool; Processing the path data to generate a trajectory geometry having a thickness less than a target number of pixels; The trajectory geometry is rendered to obtain the working trajectory of the pool robot in the three-dimensional map of the pool.

9. The method according to claim 1, wherein: Mapping multiple two-dimensional coordinate information to a three-dimensional map to obtain the target three-dimensional coordinate information includes: Splitting the target two-dimensional coordinate information included in the plurality of two-dimensional coordinate information to obtain a plurality of two-dimensional coordinate information groups, wherein the target two-dimensional coordinate information is grid information of the bottom edge of the pool pre-detected by the pool robot; The plurality of groups of two-dimensional coordinate information are mapped to the three-dimensional map to obtain the target three-dimensional coordinate information corresponding to each group of two-dimensional coordinate information, wherein the model support unit generated based on the target three-dimensional coordinate information obtained after group mapping Separate rendering capabilities.

10. The method according to claim 1, wherein: The method further comprises: receiving a selection instruction for the target three-dimensional map; determining a target area in the pool based on the selection instruction; The pool robot is controlled to move to the target area and clean the target area.

11. The method according to claim 1, wherein: Mapping multiple 2D coordinate information to a 3D map includes: Traversing the plurality of two-dimensional coordinate information, determining information of the second position point with the largest coordinate value and information of the third position point with the smallest coordinate value included in the plurality of two-dimensional coordinate information; Determine the coordinate origin of the three-dimensional map of the pool based on information of a fourth position point located at an intermediate position between the second position point and the third position point; The plurality of position information are mapped into the three-dimensional map based on the difference of each position information relative to the coordinate origin.

12. The method according to claim 6, wherein: Before expanding the inner side model of the pool wall by a predetermined number of pixels in the three-dimensional map of the pool, the method further includes: Determine the pixel value of the width of the pool in the three-dimensional map; The predetermined number of pixels is determined according to a predetermined proportion of pixel values ​​occupying the width.

13. The method according to claim 7, wherein: The ground model is flush with the top surface of the pool wall model, or the ground model is lower than the top surface of the pool wall model.

14. The method according to claim 8, wherein: Processing the path data to generate a trajectory geometry with a thickness less than the target number of pixels includes: The path data is processed using a target punching geometry model technology to generate a trajectory geometry with a thickness less than the target number of pixels.

15. The method according to claim 8, wherein: Processing the path data to generate a trajectory geometry with a thickness less than the target number of pixels includes: Determining the width of the pool robot; The path data is processed based on the width of the pool robot to generate a trajectory geometry having a thickness less than the target number of pixels.

16. The method according to claim 10, wherein: Controlling the pool robot to move to the target area includes: Control the pool robot to move to a specific location point on the target area, wherein the specific location point includes one of the following: The center point of the target area, the starting point of an edge included in the target area, the middle point of an edge included in the target area, and the position point in the target area that is closest to the current position of the pool robot.

17. The method according to claim 11, wherein: Determining the coordinate origin of the three-dimensional map of the pool based on information of a fourth position point located at an intermediate position between the second position point and the third position point includes: Determine the fourth position point as the coordinate origin; or, The fourth position point is subjected to an offset process, and the offset position point is determined as the coordinate origin.

18. The method according to claim 9, wherein: The target two-dimensional coordinate information included in the plurality of two-dimensional coordinate information is split to obtain a plurality of groups of two-dimensional coordinate information groups including at least one of the following: Splitting the target two-dimensional coordinate information according to the type of the line segment where the target two-dimensional coordinate information is located, to obtain multiple groups of the two-dimensional coordinate information located on different types of line segments; Splitting the target two-dimensional coordinate information according to the plane where the target two-dimensional coordinate information is located, to obtain a plurality of groups of the two-dimensional coordinate information located on different planes; The target two-dimensional coordinate information is split according to the block area on the plane where the target two-dimensional coordinate information is located, so as to obtain multiple groups of the two-dimensional coordinate information located in different block areas.

19. A computer-readable storage medium having a computer program stored therein, wherein: When the computer program is executed by a processor, the steps of the method described in any one of claims 1 to 18 are implemented.

20. A pool robot, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method described in any one of claims 1 to 18 when executing the computer program.

Citation Information

Patent Citations

  • Pool column measuring system based on BIM and three-dimensional laser scanner, and measuring method

    CN109540036A

  • Numerical simulation method and system for object entering water

    CN110598168A

  • Cleaning path planning management system and method for swimming pool cleaning robot

    CN115648255A

  • Digital twin water affair analogue simulation test method

    CN116071520A

  • Method and device for cleaning pool

    CN116076950A