Water pool map generation method, storage medium and water pool robot

CN117301046BActive Publication Date: 2026-10-30XINGMAI INNOVATION TECH (SUZHOU) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311183922.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-09-13
Publication Date
2026-10-30
Estimated Expiration
2043-09-13

AI Technical Summary

Technical Problem

[0005]本申请实施例提供了一种水池地图的生成方法、存储介质及水池机器人,以至少解决相关技术中存在的无法对水池进行较为真实的立体展示的问题

Benefits of technology

[0020]通过本申请,由于在生成水池三维地图时,综合考虑了水池的内部立体构造,以及水池的池壁的立体展示,使得呈现出的水池的效果更贴近实际的水池,有效解决了相关技术中存在的无法对水池进行较为真实的立体展示的问题,提高了用户的视觉体验。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117301046B_ABST
    Figure CN117301046B_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a pool map generation method, a storage medium and a pool robot, wherein the method comprises: mapping a plurality 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 a target position point in a pool previously detected by the pool robot; generating a bottom surface model of the pool in the pool three-dimensional map based on 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 pool three-dimensional map based on the bottom surface information. Through the present application, the problem that a pool cannot be displayed in a relatively real three-dimensional manner in the related art is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of robotics, and more specifically, to a method for generating a pool map, a storage medium, and a pool robot. Background Technology

[0002] As people's living standards improve, more and more homes and playgrounds are equipped with pools for viewing or swimming, leading to the development of pool cleaning robots. These robots can automatically clean the bottom, sides, and surface of pools, greatly improving people's lives.

[0003] Currently, pool robots on the market only provide basic functions for cleaning pools (such as swimming pools). However, users actually 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.

[0004] There is currently no effective solution to the aforementioned problems in the relevant technologies. Summary of the Invention

[0005] This application provides a method for generating a water pool map, a storage medium, and a water pool robot, to at least solve the problem in related technologies that cannot provide a realistic three-dimensional display of a water pool.

[0006] According to one embodiment of this application, a method for generating a pool map is provided, comprising: mapping multiple two-dimensional coordinate information onto a three-dimensional map to obtain target three-dimensional coordinate information, wherein the two-dimensional coordinate information is grid information of target location points in the pool pre-detected by a pool robot; generating a bottom surface model of the pool in the pool three-dimensional 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 pool three-dimensional map based on the bottom surface information.

[0007] In an optional embodiment, generating the bottom surface model of the pool in the 3D map of the pool based on the bottom surface information of the pool included in the target 3D coordinate information includes: connecting the coordinate points corresponding to the adjacent edge position information included in the bottom surface information; generating a bottom surface edge connection map of the pool in the 3D map of the pool based on the connection results; and rendering the bottom surface edge connection map to obtain the bottom surface model.

[0008] In an optional embodiment, generating a water surface model of the pool in the 3D map of the pool based on the bottom surface information includes: obtaining the distances from each first position point on the water surface pre-detected by the pool robot to the bottom surface of the pool; generating a water surface connection map of the pool in the 3D map of the pool based on the distances from the first position points to the bottom surface of the pool; and rendering the water surface connection map to obtain the water surface model.

[0009] In an optional embodiment, generating the pool wall model in the 3D map of the pool based on the bottom surface information includes: generating an inner wall model of the pool in the 3D map of the pool based on the bottom surface information; and performing an expansion process on the inner wall model in the 3D map of the pool to generate the pool wall model in the 3D map of the pool.

[0010] In an optional embodiment, generating the inner wall model of the pool in the 3D map of the pool based on the bottom surface information includes: determining the edge line of the pool in the 3D map of the pool based on the bottom surface information; extending the edge line upwards by a predetermined height to generate a connection diagram of the pool walls in the 3D map of the pool; and rendering the connection diagram of the pool walls to obtain the inner wall model of the pool.

[0011] In an optional embodiment, performing an expansion process on the inner side model of the pool wall in the 3D map of the pool to generate the pool wall model in the 3D map of the pool includes: expanding the inner side model of the pool wall outward by a predetermined number of pixels in the 3D map of the pool to obtain the outer side model of the pool wall; connecting the inner points on the inner side model of the pool wall with the outer points on the outer side model of the pool wall to form a wall gap filling geometry; and rendering the wall gap filling geometry to obtain the pool wall model.

[0012] 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 in the three-dimensional map of the pool; hollowing out the outer contour of the pool wall in the three-dimensional map of the pool to form ground geometry around the pool; and rendering the ground geometry to obtain a ground model around the pool.

[0013] In an optional embodiment, the method further includes: acquiring robot position information when the pool robot is working in the pool; mapping the robot position information onto a 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 trajectory geometry with a thickness less than a target number of pixels; and rendering the trajectory geometry to obtain the working trajectory of the pool robot in the three-dimensional map of the pool.

[0014] In an optional embodiment, mapping multiple two-dimensional coordinate information to a three-dimensional map to obtain target three-dimensional coordinate information includes: splitting the target two-dimensional coordinate information included in the multiple two-dimensional coordinate information to obtain multiple groups of two-dimensional coordinate information, 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 to the three-dimensional map respectively to obtain the target three-dimensional coordinate information corresponding to each group of two-dimensional coordinate information, wherein the model generated based on the target three-dimensional coordinate information obtained after grouping and mapping supports the function of individual rendering.

[0015] In an optional embodiment, the method further includes: receiving a selection instruction for the target 3D map; determining a target area in the pool based on the selection instruction; controlling the pool robot to move to the target area and cleaning the target area.

[0016] In an optional embodiment, mapping multiple two-dimensional coordinate information to a three-dimensional map includes: traversing multiple two-dimensional coordinate information to determine information about a second location point with the largest coordinate value and information about a third location point with the smallest coordinate value; determining the origin of the three-dimensional map of the pool based on information about a fourth location point located at the midpoint between the second and third location points; and mapping the multiple location information to the three-dimensional map based on the difference between each location information and the origin.

[0017] According to another embodiment of this application, a pool map generation apparatus is provided, comprising: a mapping module for mapping multiple two-dimensional coordinate information onto a three-dimensional map to obtain target three-dimensional coordinate information, wherein the two-dimensional coordinate information is grid information of target location points in the pool pre-detected by a pool robot; a first generation module for generating a bottom surface model of the pool in the pool three-dimensional map based on the bottom surface information of the pool included in the target three-dimensional coordinate information; and a second generation module for generating a pool wall model and a water surface model of the pool in the pool three-dimensional map based on the bottom surface information.

[0018] According to yet another embodiment of this application, a computer-readable storage medium is also provided, wherein a computer program is stored therein, and the computer program is configured to perform the steps in any of the above method embodiments when it is run.

[0019] According to yet another embodiment of this application, a pool robot is also provided, including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to perform the steps in any of the above method embodiments.

[0020] This application, by comprehensively considering the internal three-dimensional structure of the pool and the three-dimensional display of the pool walls when generating the three-dimensional map of the pool, makes the presented pool effect closer to the actual pool, effectively solving the problem of the inability to provide a realistic three-dimensional display of the pool in related technologies, and improving the user's visual experience. Attached Figure Description

[0021] Figure 1 This is a hardware structure block diagram of a mobile terminal for the method of generating a pool map according to an embodiment of this application;

[0022] Figure 2 This is a flowchart of a method for generating a water tank map according to an embodiment of this application;

[0023] Figure 3-1 This is a schematic diagram of a water tank according to an embodiment of this application. Figure 1 ;

[0024] Figure 3-2 This is a schematic diagram of a water tank according to an embodiment of this application. Figure 1 Line drawing;

[0025] Figure 4-1 This is a schematic diagram of a water tank according to an embodiment of this application. Figure 2 ;

[0026] Figure 4-2 This is a schematic diagram of a water tank according to an embodiment of this application. Figure 2 Line drawing;

[0027] Figure 5-1 This is a schematic diagram of a water tank according to an embodiment of this application;

[0028] Figure 5-2 It is a line drawing of the water tank schematic diagram three according to the embodiment of this application;

[0029] Figure 6 This is an overall flowchart according to an embodiment of the present invention;

[0030] Figure 7 This is a structural block diagram of a pool map generation apparatus according to an embodiment of this application. Detailed Implementation

[0031] The embodiments of this application will be described in detail below with reference to the accompanying drawings and examples.

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

[0033] The methods and embodiments provided in this application can be executed on a mobile terminal, computer terminal, or similar computing device. Taking running on a mobile terminal as an example, Figure 1 This is a hardware structure block diagram of a mobile terminal for the method of generating a pool map according to an embodiment of this application. For example... Figure 1 As shown, a mobile terminal may include one or more ( Figure 1 Only one is shown in the diagram. A processor 102 (which may include, but is not limited to, a microprocessor MCU or a programmable logic device FPGA, etc.) and a memory 104 for storing data are also shown. The mobile terminal may further include a transmission device 106 for communication functions and an input / output device 108. Those skilled in the art will understand that... Figure 1 The structure shown is for illustrative purposes only and does not limit the structure of the mobile terminal described above. For example, the mobile terminal may also include components that are more... Figure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown.

[0034] The memory 104 can be used to store computer programs, such as application software programs and modules, like the computer program corresponding to the pool map generation method in this embodiment. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, thereby implementing the above-described method. The memory 104 may include high-speed random access memory and 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 memory remotely located relative to the processor 102, and these remote memories can be connected to the mobile terminal via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.

[0035] The transmission device 106 is used to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by the mobile terminal's communication provider. In one example, the transmission device 106 includes a Network Interface Controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission device 106 may be a Radio Frequency (RF) module used for wireless communication with the Internet.

[0036] In this embodiment of the invention, the pool robot can be a pool cleaning robot. When the pool robot first enters the pool to work, or when the pool robot needs to regenerate a 3D map of the pool after being reset, or in other scenarios where a 3D map of the pool needs to be generated, the pool map generation method in this embodiment of the invention can be used to generate a 3D map of the pool. The generated 3D map of the pool can be displayed on a mobile application (APP) interface. Users can view the 3D effect of the pool through the APP. Furthermore, users can control the pool robot to work on specific areas of the pool through the APP, and the working path of the pool robot can also be seen in the APP. The following describes how this invention generates a pool map:

[0037] Figure 2 This is a flowchart of a method for generating a pool map according to an embodiment of this application, such as... Figure 2 As shown, the process includes the following steps:

[0038] Step S202: Map multiple two-dimensional coordinate information onto a three-dimensional map to obtain the target three-dimensional coordinate information, wherein the two-dimensional coordinate information is the grid information of the target location point in the pool pre-detected by the pool robot;

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

[0040] Step S206: Generate the pool wall model and water surface model in the three-dimensional map of the pool based on the bottom surface information.

[0041] The entity executing the above steps can be a controller built into the pool robot, or a controller, control system, or processor that is associated with the pool robot and has data processing and signal interaction capabilities, or other processing devices or processing units with similar processing capabilities.

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

[0043] The aforementioned 3D map includes target 3D coordinate information mapped from grid data obtained by the robot's movement within the pool. Various rendering operations based on this target 3D coordinate information result in a 3D map of the pool. Besides the pool map itself, the 3D map may also include other rendered models (e.g., house models, tree models, etc.). The robot's trajectory within the map is correspondingly the real-time trajectory line generated as it moves within the pool. Furthermore, the 3D map can be a pre-constructed map. Additionally, after repositioning the robot to determine its coordinates, the real-time trajectory line generated during its movement can be added to the 3D map. This invention does not limit the timing of the 3D map's construction.

[0044] Through the above embodiments, 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 effect of the presented pool is closer to the actual pool. This effectively solves the problem in related technologies that cannot provide a realistic three-dimensional display of the pool, and improves the user's visual experience.

[0045] In an optional embodiment, generating the bottom surface model of the pool in the 3D map of the pool based on the bottom surface information of the pool included in the target 3D coordinate information includes: connecting the coordinate points corresponding to the adjacent edge position information included in the bottom surface position information; generating a bottom surface edge connection map of the pool in the 3D map of the pool based on the connection results; and rendering the bottom surface edge connection map to obtain the bottom surface model.

[0046] In the above embodiments, the bottom surface location information may include edge location information near the pool bottom outline, and may also include location information near the center area of ​​the pool bottom. When constructing the bottom surface connection map, the coordinate points corresponding to the edge location information of the pool bottom can be connected to obtain the bottom surface 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 gentle pool bottom edge. Furthermore, the pool bottom edge may be straight or curved. The edge type can be determined based on the shape of the line segments formed after connecting the edge points. For example, when the connecting lines of the edge points are not straight, the previously connected line segments are treated as a data wall segment. When a series of edge points cannot be connected to form a straight line, the data points from the beginning to the end of this series of edge points are marked as irregular curve data and treated as a data segment. In the above embodiments, Three.js technology can be used to render the pool bottom edge connection map; of course, other technologies can also be used to achieve the above rendering operation.

[0047] In an optional embodiment, generating a water surface model of the pool in the 3D map of the pool based on the bottom surface information includes: obtaining the distances from each first position point on the water surface pre-detected by the pool robot to the bottom surface of the pool; generating a water surface connection map of the pool in the 3D map of the pool based on the distances from the first position points to the bottom surface of the pool; and rendering the water surface connection map to obtain the water surface model.

[0048] In the above embodiments, the location information of the target locations detected in advance by the pool robot includes the coordinate information of each target location. Generally speaking, the coordinate information of the location points detected by the pool robot includes the coordinate information of the coordinate points in the two-dimensional coordinate system, that is, the coordinate values ​​in the world coordinate system in which the pool robot is currently located. However, the pool robot can also determine the depth information of each location point or the distance of each location point from a certain reference surface (e.g., the distance from the bottom of the pool) based on the built-in depth detection sensor (e.g., radar sensor, infrared sensor, pressure sensor, etc.) or a specific algorithm. Therefore, the pool robot actually records the depth (or height relative to the reference surface) of the target location points detected in advance. Thus, when the information of each location point is mapped onto the three-dimensional map, a complete mapping on three axes can be achieved.

[0049] In the above embodiments, the distance from each first position point to 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. Then, some points on the water surface can be marked in the 3D map. By connecting the marked points, a partial connection map of the water surface can be obtained. By extending the partial connection map of the water surface to the pool wall, the overall connection map of the water surface can be obtained. This allows for subsequent rendering operations on the overall connection map of the water surface. In addition, in this embodiment, Three.js technology can also be used to render the overall connection map of the water surface. Of course, the area from the water surface to the bottom of the pool can also be rendered as a water texture.

[0050] In an optional embodiment, generating the pool wall model in the 3D map of the pool based on the bottom surface information includes: generating an inner wall model of the pool in the 3D map of the pool based on the bottom surface information; and performing an outward expansion process on the inner wall model in the 3D map of the pool to generate the pool wall model in the 3D map of the pool. In this embodiment, the actual pool wall 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 outward expansion process on the inner wall model with a certain number of pixels (the size of which can be determined based on the actual thickness of the pool wall, or set to a fixed pixel value, or set according to other conditions, etc.) to obtain a more realistic pool shape.

[0051] In an optional embodiment, generating the inner wall model of the pool in the 3D map of the pool based on the bottom surface information includes: determining the edge line of the pool in the 3D map of the pool based on the bottom surface information; extending the edge line upwards by a predetermined height to generate a connection diagram of the pool walls in the 3D map of the pool; and rendering the connection diagram of the pool walls to obtain the inner wall model. In this embodiment, the pool wall model is actually attached to the edge of the bottom surface model. Therefore, when generating the connection diagram of the pool walls, the edge of the bottom surface model can be extended upwards (i.e., in the Z-axis direction of the 3D coordinate system). The specific extension height can be set based on the actual situation. 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 higher than the water surface model by a certain height. In addition, the height difference between the pool wall and the water surface can be detected in advance by a pool robot, and the height of the pool wall model can be set based on the pre-detected height difference. The specific setting can be based on a pre-configured method.

[0052] In an optional embodiment, expanding the inner wall model of the pool in the 3D map of the pool to generate the pool wall model in the 3D map includes: expanding the inner wall model of the pool by a predetermined number of pixels in the 3D map to obtain the outer wall model; connecting the inner points on the inner wall model to 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 walls actually have a certain thickness. To make the pool effect presented in the 3D map closer to the actual pool, the generated inner wall model can be expanded outward, for example, by 2 pixels, 5 pixels, or other numbers of pixels, or by a certain proportion according to the overall width of the pool (e.g., 1 / 50, 1 / 100, etc.). The expansion is actually an extension along the XY axis away from the pool. Furthermore, after expanding the inner models of each pool wall, gaps will exist between the pool wall models. Therefore, these gaps need to be filled. For example, if 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 to the two endpoints of the two expanded line segments formed after the expansion of the adjacent line segments, forming a triangle. Then, this triangle is extended from the bottom of the pool to the top of the pool to obtain the above-mentioned wall gap filling geometry. Optionally, after connecting, a smooth transition process can be performed on the geometry formed by the connection so that the connection of the pool walls 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 first point to form the filling material of the wall. At this time, the wall appears to have a uniform width and a smooth connection. In this embodiment, the pool wall model can also be split and rendered by performing data splitting (i.e., separating data belonging to different pool walls or pool bottoms through specific code or programs, thereby clarifying which location points correspond to which pool wall or pool bottom). After the pool wall model is split, the robot can be controlled to clean a specific pool wall model or pool bottom model area by selecting it individually in subsequent work.

[0053] 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 in the 3D map of the pool; hollowing out the outer contour of the pool wall in the 3D map of the pool to form ground geometry around the pool; and rendering the ground geometry to obtain a ground model around the pool. In this embodiment, there may also be ground surfaces such as lawns and beaches around the pool. To make the display effect of the pool closer to the actual effect, corresponding textures can be rendered around the pool. In order to avoid rendering the pool itself with the same texture as the surrounding area when rendering the surrounding area, the pool area is hollowed out in this embodiment of the invention, thereby achieving the purpose of rendering only the area around the pool. Alternatively, when constructing the ground around the pool, in addition to using the above-mentioned method of hollowing out after connecting the outer points, the top surface model of the pool wall can also be expanded outward in a way similar to expanding the inner side model of the pool wall. Furthermore, the expanded ground can be level with the top surface model of the pool wall or lower than the top surface model of the pool wall by a certain height.

[0054] In an optional embodiment, the method further includes: acquiring robot position information when the pool robot is working in the pool; mapping the robot position information onto a 3D map of the pool to obtain path data of the pool robot in the 3D map of the pool; processing the path data to generate trajectory geometry with a thickness less than a target number of pixels; and rendering the trajectory geometry to obtain the working trajectory of the pool robot in the 3D map of the pool. In this embodiment, when processing the path data, target stamping geometry model technology can be used to process the path data, wherein the width of the aforementioned trajectory geometry can be determined based on the width of the pool robot. In the above embodiments, 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 trajectory geometry of the pool robot, the pre-stored width data of the pool robot can be obtained, and the trajectory of the pool robot can be rendered according to the width data. In addition, considering that the height of the pool robot is relatively small relative to the pool, the thickness of the trajectory of the pool robot can be set to be relatively small, for example, set to 1 pixel or 2 pixels, etc. When rendering the trajectory of the pool robot, the stamping geometry model technology in Three.js can be used (of course, other technologies can also be used). Based on the processed path data (i.e., the data obtained when the pool robot moves, the specific processing methods may include data parsing, coordinate transformation, texture mapping, etc.), the smearing effect of the cleaning robot filtering water can be created, for example. By rendering the working trajectory of the pool robot, users can view its progress in real time. The working trajectory of the pool robot can be found in the attached image. Figure 3-1 , Figure 3-2 , Figure 4-1 , Figure 4-2 , Figure 5-1 and Figure 5-2 The robot's trajectory. For cleaning robots, this feature allows users to intuitively understand the robot's cleaning progress and coverage area, facilitating subsequent water usage assessments, water replacement assessments, and other types of cleaning activities for pool robots.

[0055] In the aforementioned embodiments, Three.js technology can be used to create and render a 3D scene model, which can realize the rendering of the pool bottom, walls, water surface, environmental elements, and the pool robot model, etc. The rendered image of the pool map can be found in the appendix. Figure 3-1 , Figure 4-1 and Figure 5-1To more clearly illustrate the various components of the pool map, please refer to the attached diagrams for the line drawings corresponding to each rendered image of the pool map. Figure 3-2 , Figure 4-2 and Figure 5-2 Conventional map-building methods based on raster data can only generate two-dimensional maps. Furthermore, current water robot apps lack any map display, failing to meet users' needs for comprehensive water cleaning coverage and targeted area cleaning. Compared to conventional two-dimensional map displays, this embodiment achieves a realistic three-dimensional water pool map. This allows users to observe and understand the pool's structure and layout in a more intuitive and realistic way. In addition, this embodiment can display the pool walls and bottom, providing multi-dimensional observation and display. Users can freely select specific areas to observe and trigger the robot to clean those areas. This functionality gives the robot a stronger point-to-point cleaning capability.

[0056] In an optional embodiment, mapping multiple two-dimensional coordinate information to a three-dimensional map to obtain target three-dimensional coordinate information includes: splitting the target two-dimensional coordinate information included in the multiple two-dimensional coordinate information to obtain multiple groups of two-dimensional coordinate information, 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 to the three-dimensional map respectively to obtain the target three-dimensional coordinate information corresponding to each group of two-dimensional coordinate information, wherein the model generated based on the target three-dimensional coordinate information obtained after grouping and mapping supports the function of individual rendering. In this embodiment, after obtaining the two-dimensional coordinate information, it is necessary to split these two-dimensional coordinate information, and the splitting operation mainly involves splitting the two-dimensional coordinate information of the edge points of the bottom of the pool. Considering that the bottom of the pool may not be a regular circle, but rather a regular or irregular shape with straight and / or curved line segments, 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 containing the target 2D coordinate information. After the splitting operation, multiple sets of 2D coordinate information located on different line segments need to be obtained. For example, each straight line segment and / or curved segment can be split (actually, the 2D coordinate information of the points located on each straight line segment and curved segment can be separated). This allows for the splitting of the pool wall model corresponding to each straight line segment and curved segment on the bottom edge. Optionally, the splitting operation can also be performed according to the plane corresponding to the target 2D coordinate information. For example, after the splitting operation, multiple sets of 2D coordinate information located on the walls of different surfaces of the pool can be obtained. The splitting operation can also be performed according to other preset requirements, such as obtaining multiple sets of 2D coordinate information of different blocks located on the same wall. Furthermore, after splitting, group mapping can be achieved. Group mapping facilitates subsequent block rendering of the pool wall model and the purpose of block selection. It should be noted that the splitting operation in this invention can be implemented through specific code or specific splitting tools.

[0057] In an optional embodiment, the method further includes: receiving a selection instruction for the target 3D map; determining a target area in the pool based on the selection instruction; controlling the pool robot to move to the target area and cleaning the target area. In this embodiment, the pool map can be viewed through a specific app, and a specific area of ​​the pool (e.g., a pool wall, bottom, water surface, etc.) can be selected through the app. See the appendix for specific selection effects. Figure 5-1 and attached Figure 5-2This triggers control commands to move the pool robot to the selected area to work. Specifically, the pool robot can be controlled to move to a specific location point in the selected area (e.g., the center point of the area, the starting point on an edge of the area, or the middle point on an edge of the area), or to the point in the selected area that is closest to the pool robot.

[0058] In an optional embodiment, mapping multiple two-dimensional coordinate information to a three-dimensional map includes: traversing multiple two-dimensional coordinate information to determine information about a second location point with the largest coordinate value and information about a third location point with the smallest coordinate value among the multiple two-dimensional coordinate information; determining the origin of the coordinates of the three-dimensional map based on information about a fourth location point located at the midpoint between the second location point and the third location point; and mapping the multiple location information to the three-dimensional map based on the difference between each location information and the origin. In this embodiment, when determining the second and third position points, one of the multiple world coordinate systems in which the robot is probing the target position point can be used as a reference coordinate system. This allows for the mapping of each position point onto that reference coordinate system, and then the two position points with the largest and smallest coordinate values ​​can be obtained. Furthermore, 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. Therefore, the position information of the coordinate origin determined based on the information of the fourth position point can be known. Then, based on the coordinate differences of other position points relative to this coordinate origin, the position of each position point in the 3D map can be determined. In this embodiment, the fourth position point can be directly determined as the coordinate origin, or a specific offset can be performed on the fourth position point to obtain the coordinate origin. Moreover, through position information mapping, the perspective of the target 3D map can be changed, for example, making the center point of the target 3D map the center point of the pool in the 3D perspective, thereby improving the generation effect of the pool map. Optionally, the raster data can be preprocessed before generating the pool. That is, raster data, such as terrain elevation data and pool structure data, can be preprocessed and transformed to meet the requirements of the Three.js rendering engine. This preprocessing includes data parsing, coordinate transformation, and texture mapping.

[0059] The process of generating the aforementioned pool map can be viewed through an app installed on the terminal. Furthermore, this app enables user interaction, allowing users to freely browse and interact with the scene, including rotation and zoom, so that users can fully appreciate and experience the 3D effect of the pool. In addition, the user interaction function allows users to interact with the pool map, enabling them to select specific areas and trigger the pool robot's directional work. This interactive function increases user engagement and improves the flexibility and efficiency of fixed-point cleaning.

[0060] The following uses a pool as an example, with the pool robot serving as a cleaning robot, to illustrate the overall process of this invention:

[0061] Figure 6 This is an overall flowchart according to an embodiment of the present invention, such as Figure 6 As shown, it includes the following steps:

[0062] S602, segment the data according to the initial raster data of the pool. The segmentation of the initial raster data mainly includes the following aspects: First, segment the various line segments on the bottom edge of the pool to facilitate the subsequent block rendering of each pool wall model; second, filter out the raster data of positions that are obviously not in the pool; and third, flatten the burrs, that is, adjust the raster data of positions that are slightly off the pool.

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

[0064] S606: Calculate the origin coordinates in the 3D graph based on the xy coordinates. Transform all coordinates based on the origin coordinates to obtain a new coordinate system in the 3D graph. The midpoint between the largest and smallest xy coordinates can be determined as the new origin. By subtracting the new origin from all xy coordinates, the xy coordinates are transformed into coordinates in the 3D scene.

[0065] S608 connects the coordinate points inside the pool bottom, generates the pool bottom (i.e., the bottom surface, or pool bottom) model and applies textures. The texture application can be achieved through rendering.

[0066] S610, generates a model of the water body inside the pool based on the shape of the pool bottom model;

[0067] S612, traverse and transform the segmented wall (i.e., pool wall) data, generate the coordinate points of the outer wall, and save them;

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

[0069] S616, traverse the data points of the outer wall and connect the data points of the outer wall with the data points of the inner wall in sequence to form the geometry of the wall gap filling;

[0070] S618, connect the data points of the outer wall in sequence to form the shape of the outer wall, hollow out the shape of the outer wall, and then generate the geometry of the surrounding lawn (here, we take the lawn around the swimming pool as an example for explanation).

[0071] S620, converts the trajectory data points of the pool robot to a 3D coordinate system;

[0072] S622, Generate a geometry with a small thickness, and connect the trajectory coordinate points to form a trajectory line geometry. The geometry with a small thickness can be a geometry with a thickness of 1 pixel.

[0073] S624 retrieves the latest loaded trajectory points to render the robot model and generates a dynamic cleaning effect.

[0074] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they 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 this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of this application.

[0075] This embodiment also provides a device for generating a pool map, which is used to implement the above embodiments and preferred embodiments; details already described will not be repeated. As used below, the term "module" can refer to a combination of software and / or hardware that performs a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.

[0076] Figure 7 This is a structural block diagram of a pool map generation apparatus according to an embodiment of this application, such as... Figure 7 As shown, the device includes:

[0077] The mapping module 72 is used to map multiple two-dimensional coordinate information onto 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 location point in the pool pre-detected by the pool robot; the first generation module 74 is used to generate the bottom surface model of the pool in the three-dimensional map of the pool based on the bottom surface information of the pool included in the target three-dimensional coordinate information; the second generation module 76 is used to generate the pool wall model and the water surface model of the pool in the three-dimensional map of the pool based on the bottom surface information.

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

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

[0080] 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; and 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.

[0081] In an optional embodiment, the third generation unit includes: a determining subunit, used to determine the edge line of the pool in the three-dimensional map of the pool based on the bottom surface information; an extending subunit, used to extend the edge line upwards by 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, used to render the pool wall connection diagram to obtain the inner side model of the pool wall.

[0082] In an optional embodiment, the expansion unit includes: an expansion subunit for expanding the inner side model of the pool wall outward by a predetermined number of pixels in the 3D map of the pool to obtain an outer side model of the pool wall; a connection subunit for connecting the inner points on the inner side model of the pool wall with the outer points on the outer side model of the pool wall to form a wall gap filling geometry; and a second rendering subunit for rendering the wall gap filling geometry to obtain the pool wall model.

[0083] In an optional embodiment, the device further includes: a connection unit, used 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 in the three-dimensional map of the pool; a fourth generation unit, used to hollow out the outer contour of the pool wall in the three-dimensional map of the pool, to form ground geometry located around the pool; and a third rendering unit, used to render the ground geometry to obtain the ground model located around the pool.

[0084] In an optional embodiment, the device further includes: an acquisition module for acquiring robot position information when the pool robot is working in the pool; a mapping module for mapping the robot position information onto a three-dimensional map of the pool to obtain path data of the pool robot in the three-dimensional map of the pool; a processing module for processing the path data to generate trajectory geometry with a thickness less than a target number of pixels; and a second rendering module for rendering the trajectory geometry to obtain the working trajectory of the pool robot in the three-dimensional map of the pool.

[0085] In an optional embodiment, the mapping module 72 includes: a splitting unit, used to split the target two-dimensional coordinate information included in the plurality of two-dimensional coordinate information to obtain multiple sets 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; and a first mapping unit, used to map the multiple sets of two-dimensional coordinate information groups onto the three-dimensional map respectively to obtain the target three-dimensional coordinate information corresponding to each set of two-dimensional coordinate information groups, wherein the model generated based on the target three-dimensional coordinate information obtained after grouping and mapping supports the function of individual rendering.

[0086] In an optional embodiment, the device further includes: a receiving module for receiving a selection instruction for the target 3D map; a determining module for determining a target area in the pool based on the selection instruction; and a control module for controlling the pool robot to move to the target area and clean the target area.

[0087] In an optional embodiment, the mapping module 72 includes: a first determining unit, configured to traverse multiple sets of two-dimensional coordinate information and determine information of a second position point with the largest coordinate value and information of a third position point with the smallest coordinate value among the multiple sets of two-dimensional coordinate information; a second determining unit, configured to determine the origin of the coordinates of the three-dimensional map of the pool based on information of a fourth position point located at the midpoint between the second position point and the third position point; and a second mapping unit, configured to map multiple sets of position information onto the three-dimensional map based on the difference between each set of position information and the origin of the coordinates.

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

[0089] Embodiments of this application also provide a computer-readable storage medium storing a computer program, wherein the computer program is configured to execute the steps in any of the above method embodiments when run.

[0090] In one exemplary embodiment, the aforementioned computer-readable storage medium may include, but is not limited to, various media capable of storing computer programs, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard disk, magnetic disk, or optical disk.

[0091] Embodiments of this application also provide an electronic device, including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to perform the steps in any of the above method embodiments.

[0092] In one 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.

[0093] Specific examples in this embodiment can be found in the examples described in the above embodiments and exemplary implementations, and will not be repeated here.

[0094] Obviously, those skilled in the art should understand that the modules or steps of this application described above can be implemented using general-purpose computing devices. They can be centralized on a single computing device or distributed across a network of multiple computing devices. They can be implemented using computer-executable program code, and thus can be stored in a storage device for execution by a computing device. In some cases, the steps shown or described can be performed in a different order than those presented here, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Thus, this application is not limited to any particular hardware and software combination.

[0095] The above description is merely a preferred embodiment of this application and is not intended to limit this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the principles of this application should be included within the protection scope of this application.

Claims

1. A method for generating a water pool map, characterized in that, include: Multiple two-dimensional coordinate information is mapped onto a three-dimensional map to obtain the target three-dimensional coordinate information. The two-dimensional coordinate information is the grid information of the target location points in the pool that the pool robot has detected in advance. The target location points include the location points at the bottom of the pool. Based on the bottom surface information of the pool included in the target's three-dimensional coordinate information, a bottom surface model of the pool is generated in the three-dimensional map of the pool; and, Based on the bottom surface information, a pool wall model and a water surface model are generated in the 3D map of the pool.

2. The method according to claim 1, characterized in that, The bottom surface model of the pool in the 3D map of the pool is generated based on the bottom surface information of the pool included in the target 3D coordinate information, including: Connect the coordinate points corresponding to the adjacent edge position information included in the bottom surface information; Based on the connection results, a bottom edge connection map of the pool is generated in the 3D map of the pool. The bottom edge connection diagram is rendered to obtain the bottom model.

3. The method according to claim 1, characterized in that, Generating the water surface model of the pool in the 3D map of the pool based on the bottom surface information includes: The distance from each first position point on the water surface pre-detected by the pool robot to the bottom surface of the pool is obtained. A water surface connection map of the pool is generated in the three-dimensional map of the pool based on the distance from the first location point to 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, characterized in that, Generating the pool wall model in the 3D map of the pool based on the bottom surface information includes: Based on the bottom surface information, a model of the inner wall of the pool in the 3D map of the pool is generated; In the 3D map of the pool, the inner side model of the pool wall is expanded outward to generate the pool wall model of the pool in the 3D map of the pool.

5. The method according to claim 4, characterized in that, Generating the inner wall model of the pool in the 3D map of the pool based on the bottom surface information includes: The edge line of the pool in the three-dimensional map of the pool is determined based on the bottom surface information; Extend the edge line upwards by a predetermined height to generate a connection diagram of the pool wall in the three-dimensional map of the pool. The connection diagram of the pool wall is rendered to obtain the inner side model of the pool wall.

6. The method according to claim 4, characterized in that, In the 3D map of the pool, an expansion process is performed on the inner side model of the pool wall to generate the pool wall model in the 3D map of the pool, including: In the 3D map of the pool, the inner side model of the pool wall is expanded outward by a predetermined number of pixels to obtain the outer side model of the pool wall. Connect the inner points on the inner side model of the pool wall with the outer points on the outer side model of the pool wall to form a wall gap filling geometry; The geometry filling the gaps in the wall is rendered to obtain the pool wall model.

7. The method according to claim 1, characterized in that, After generating the pool wall model, the method further includes: Connect the outer points on the outer side of the pool wall model to form the outer outline of the pool wall in the three-dimensional map of the pool. After hollowing out the outer contour of the pool wall in the 3D map of the pool, a ground geometry is formed around the pool. The ground geometry is rendered to obtain a ground model located around the pool.

8. The method according to claim 1, characterized in that, The method further includes: Obtain the robot position information when the robot is working in the pool; The robot's position information is mapped onto the 3D map of the pool to obtain the path data of the pool robot in the 3D map of the pool; The path data is processed to generate a trajectory geometry with a thickness less than the 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, characterized in that, Mapping multiple two-dimensional coordinate information onto a three-dimensional map yields the target's three-dimensional coordinate information, including: The target two-dimensional coordinate information included in the multiple two-dimensional coordinate information is split to obtain multiple sets 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; Multiple sets of two-dimensional coordinate information are mapped onto the three-dimensional map to obtain target three-dimensional coordinate information corresponding to each set of two-dimensional coordinate information. The model generated based on the target three-dimensional coordinate information obtained after grouping and mapping supports the function of individual rendering.

10. The method according to claim 1, characterized in that, The method further includes: Received a selection instruction for the 3D map of the pool; The target area in the pool is determined based on the selection instruction; Control the pool robot to move to the target area and clean the target area.

11. The method according to claim 1, characterized in that, Mapping multiple 2D coordinate information to a 3D map includes: By traversing multiple sets of two-dimensional coordinate information, 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 among the multiple sets of two-dimensional coordinate information are determined. The origin of the coordinates of the three-dimensional map of the pool is determined based on information from a fourth location located at the midpoint between the second and third location points. The multiple two-dimensional coordinate information is mapped onto the three-dimensional map based on the difference between each two-dimensional coordinate information and the origin.

12. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, wherein the computer program, when executed by a processor, implements the steps of the method described in any one of claims 1 to 11.

13. A pool robot, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method described in any one of claims 1 to 11.

Citation Information

Patent Citations

  • Method for controlling movement of robot

    CN116679717A

  • Target map establishing method, storage medium and pool robot

    CN116698015A