CN116859951A - Water surface map building method, storage medium and pool robot - Google Patents

Water surface map building method, storage medium and pool robot Download PDF

Info

Publication number
CN116859951A
CN116859951A CN202311006743.5A CN202311006743A CN116859951A CN 116859951 A CN116859951 A CN 116859951A CN 202311006743 A CN202311006743 A CN 202311006743A CN 116859951 A CN116859951 A CN 116859951A
Authority
CN
China
Prior art keywords
data
target
pool
position data
pool robot
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311006743.5A
Other languages
Chinese (zh)
Inventor
张石磊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Xingmai Innovation Technology Suzhou Co ltd
Original Assignee
Xingmai Innovation Technology Suzhou Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Xingmai Innovation Technology Suzhou Co ltd filed Critical Xingmai Innovation Technology Suzhou Co ltd
Priority to CN202311006743.5A priority Critical patent/CN116859951A/en
Publication of CN116859951A publication Critical patent/CN116859951A/en
Pending legal-status Critical Current

Links

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02ATECHNOLOGIES FOR ADAPTATION TO CLIMATE CHANGE
    • Y02A90/00Technologies having an indirect contribution to adaptation to climate change
    • Y02A90/30Assessment of water resources

Landscapes

  • Control Of Position, Course, Altitude, Or Attitude Of Moving Bodies (AREA)

Abstract

The embodiment of the invention provides a water surface mapping method, a storage medium and a pool robot, wherein the method comprises the following steps: under the condition that the pool robot is controlled to walk along the water surface of the target pool and a preset edgewise walking path is not completed, acquiring a group of position data and a group of ultrasonic data, wherein the group of position data comprises N time position data of the pool robot in the water surface edgewise walking process, and the group of ultrasonic data comprises data of a reflected signal received after the pool robot sends ultrasonic signals to a preset direction at each of the N time; and constructing a target map of the water surface of the target pool according to the set of position data and the set of ultrasonic data. The embodiment of the invention solves the technical problem that the pool robot in the related technology does not have the functions of water surface positioning and map building.

Description

Water surface map building method, storage medium and pool robot
Technical Field
The embodiment of the invention relates to the technical field of artificial intelligence, in particular to a water surface map building method, a storage medium and a pool robot.
Background
Currently, pool robots are increasingly favored, for example, pool robots for purification, disinfection, or pool robots for detecting water quality, or pool robots for pool cleaning, etc. The use of pool robots to operate pools is becoming widespread. However, in the related art, the pool robot does not have the functions of positioning and mapping the water surface, so that the movement route is not regular, and the direction can be randomly selected to execute the operation after the pool robot collides with the pool wall, so that the pool cannot be effectively operated.
Aiming at the technical problem that the pool robot in the related technology does not have the functions of water surface positioning and mapping, no effective solution is proposed at present.
Disclosure of Invention
The embodiment of the invention provides a water surface mapping method, a storage medium and a pool robot, which are used for at least solving the technical problem of lower cleaning efficiency of the pool robot in the related technology.
According to an embodiment of the present invention, there is provided a water surface mapping method applied to a pool robot, including: under the condition that a pool robot is controlled to walk along the water surface of a target pool and a preset edgewise walking path is not completed, acquiring a group of position data of the pool robot, and acquiring a group of ultrasonic data, wherein the group of position data comprises position data of the pool robot at N moments in the water surface edgewise walking process, the group of ultrasonic data comprises data of a reflection signal received by the pool robot after the pool robot sends ultrasonic signals to a preset direction at each of the N moments, and N is a positive integer greater than or equal to 2; and constructing a target map of the water surface according to the group of position data and the group of ultrasonic data.
In one exemplary embodiment, the acquiring a set of positional data of the pool robot includes: the method comprises the steps of obtaining each position data in the group of position data, wherein when the following steps are executed, each position data is current position data, and the current position data is used for representing the position data of the pool robot at the current moment in the N moments: acquiring target motion data of a target propeller and target angle data of an Inertial Measurement Unit (IMU), wherein the target propeller and the IMU are arranged on the pool robot, the target motion data are motion data of the target propeller at the current moment, and the target angle data are angle data of the IMU at the current moment; and obtaining the current position data according to the target motion data and the target angle data.
In an exemplary embodiment, the obtaining the current position data according to the target motion data and the target angle data includes: acquiring a target rotating speed of the target propeller; determining a target movement distance according to the target rotating speed, wherein the target movement distance is used for representing the movement distance of the pool robot at the current moment relative to the moment before the current moment; and obtaining the current position data according to the target movement distance and the target angle data.
In an exemplary embodiment, the determining the target movement distance according to the target rotation speed includes: determining the central line speed of the pool robot according to the target rotating speed, wherein the central line speed is used for representing the distance of the central point of the pool robot in unit time; and determining the target movement distance according to the central line speed.
In one exemplary embodiment, the target propeller includes a first propeller and a second propeller, and the determining the center line speed of the pool robot according to the target rotation speed includes: determining a first linear speed of the first propeller and a second linear speed of the second propeller according to a first rotating speed of the first propeller and a second rotating speed of the second propeller, wherein the target rotating speed comprises the first rotating speed and the second rotating speed; the centerline speed is determined from the first and second linear speeds.
In an exemplary embodiment, the obtaining the current position data according to the target movement distance and the target angle data includes: determining a first offset and a second offset according to the target movement distance and a first azimuth angle, wherein the first offset represents a change value of the pool robot in a first direction from a time before the current time to the current time, the second offset represents a change value of the pool robot in a second direction from the time before the current time to the current time, and the first azimuth angle represents an azimuth angle of the pool robot in the time before the current time; obtaining a second abscissa according to the first abscissa and the first offset, and obtaining a second ordinate according to the first ordinate and the second offset; determining an angle change amount of the target angle data relative to first angle data, and obtaining a second azimuth angle according to the first azimuth angle and the angle change amount, wherein the second azimuth angle represents an azimuth angle of the pool robot at the current moment, and the first angle data is angle data of the IMU at a moment before the current moment; the position data of the pool robot at a time before the current time comprises the first abscissa, the second abscissa and the first azimuth angle, and the current position data comprises the second abscissa, the second ordinate and the second azimuth angle.
In an exemplary embodiment, the constructing the target map of the water surface according to the set of position data and the set of ultrasound data includes: determining obstacle position data of an obstacle in the water surface from the set of position data and the set of ultrasonic data; and marking the grid map according to the obstacle position data to obtain the target map of the water surface.
In an exemplary embodiment, the method further comprises: under the condition that the distance between a first position and an initial position meets a first threshold condition, determining that the pool robot completes the preset edgewise walking path, and completing construction of a target map of the water surface after determining that the preset edgewise walking path is completed, wherein the first position is used for representing the position of the pool robot at the Nth moment, and the initial position is used for representing the position of the pool robot at the starting moment of executing the preset edgewise walking path; and/or under the condition that the difference between a third azimuth angle and an initial azimuth angle meets a second threshold condition, determining that the pool robot completes the preset edgewise walking path, and completing construction of a target map of the water surface after determining that the preset edgewise walking path is completed, wherein the third azimuth angle is used for indicating the azimuth angle of the pool robot at the Nth moment, and the initial azimuth angle is used for indicating the azimuth angle of the pool robot at the starting moment of executing the preset edgewise walking path.
According to another embodiment of the present invention, there is also provided a water surface mapping apparatus in a pool robot, including: the device comprises an acquisition module, a control module and a control module, wherein the acquisition module is used for acquiring a group of position data of a pool robot and a group of ultrasonic data under the condition that the pool robot is controlled to walk along the water surface of a target pool and a preset edge walking path is not finished, the group of position data comprises N time position data of the pool robot in the water surface edge walking process, the group of ultrasonic data comprises data of a reflection signal received by the pool robot after the ultrasonic signal is sent to a preset direction at each time of the N time, and N is a positive integer greater than or equal to 2; and the construction module is used for constructing a target map of the water surface according to the group of position data and the group of ultrasonic data.
According to a further embodiment of the invention, there is also provided a computer readable storage medium having stored therein a computer program, wherein the computer program is arranged to perform the steps of any of the method embodiments described above when run.
According to a further embodiment of the invention there is also provided a pool robot comprising a memory and a processor, the memory having stored therein a computer program, the processor being arranged to run the computer program to perform the steps of any of the method embodiments described above.
According to the invention, under the condition that the pool robot is controlled to walk along the water surface of the target pool and a preset edgewise walking path is not completed, acquiring the position data of the pool robot at N moments in the water surface edgewise walking process to obtain a group of position data, and acquiring the data of a reflected signal received after the pool robot sends out ultrasonic signals to a preset direction at each of the N moments to obtain a group of ultrasonic data; and constructing a target map of the water surface of the target pool according to the set of position data and the set of ultrasonic data. The purpose of positioning the water surface and constructing the target map of the water surface is achieved, so that the purpose of effectively controlling the pool robot to operate the pool can be achieved, and the problem that the pool robot in the related art cannot operate the pool effectively because the pool robot does not have the functions of positioning the water surface and constructing the map is avoided. Therefore, the technical problem that the pool robot in the related technology does not have the functions of water surface positioning and map building is solved, and the effect of improving the operation efficiency of the pool robot is achieved.
Drawings
FIG. 1 is a block diagram of a mobile terminal hardware structure of a water surface mapping method according to an embodiment of the present invention;
FIG. 2 is a flow chart of a water mapping method according to an embodiment of the invention;
fig. 3 is a schematic structural view of a pool robot according to an embodiment of the present invention;
FIG. 4 is an exemplary diagram of a water surface location mapping scenario in accordance with an embodiment of the present invention;
fig. 5 is a block diagram of a water surface mapping apparatus according to an embodiment of the present invention.
Detailed Description
The invention is described in further detail below with reference to the drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting thereof. It should be further noted that, for convenience of description, only a part of structures related to the present invention, not the whole structures, are shown in the drawings.
In the description of the present invention, unless explicitly stated and limited otherwise, the terms "connected," "connected," and "fixed" are to be construed broadly, and may be, for example, fixedly connected, detachably connected, or integrally formed; can be mechanically or electrically connected; can be directly connected or indirectly connected through an intermediate medium, and can be the communication of structures in two elements or the interaction relationship of the two elements. The specific meaning of the above terms in the present invention will be understood in specific cases by those of ordinary skill in the art.
In the present invention, unless expressly stated or limited otherwise, a first feature "above" or "below" a second feature may include both the first and second features being in direct contact, as well as the first and second features not being in direct contact but being in contact with each other through additional features therebetween. Moreover, a first feature being "above," "over" and "on" a second feature includes the first feature being directly above and obliquely above the second feature, or simply indicating that the first feature is higher in level than the second feature. The first feature being "under", "below" and "beneath" the second feature includes the first feature being directly under and obliquely below the second feature, or simply means that the first feature is less level than the second feature.
In the description of the present embodiment, the terms "upper", "lower", "left", "right", and the like are orientation or positional relationships based on those shown in the drawings, merely for convenience of description and simplicity of operation, and do not indicate or imply that the apparatus or elements referred to must have a specific orientation, be constructed and operated in a specific orientation, and thus should not be construed as limiting the invention. Furthermore, the terms "first," "second," and the like, are used merely for distinguishing between descriptions and not for distinguishing between them.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present application and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order.
The method embodiments provided in the embodiments of the present application may be performed in a mobile terminal, a computer terminal or similar computing device. Taking the operation on a mobile terminal as an example, fig. 1 is a block diagram of a mobile terminal hardware structure of a water mapping method according to an embodiment of the present application. As shown in fig. 1, a mobile terminal may include one or more (only one is shown in fig. 1) processors 102 (the processor 102 may include, but is not limited to, a microprocessor MCU or a processing device such as a programmable logic device FPGA) and a memory 104 for storing data, wherein the mobile terminal may also include a transmission device 106 for communication functions and an input-output device 108. It will be appreciated by those skilled in the art that the structure shown in fig. 1 is merely illustrative and not limiting of the structure of the mobile terminal described above. For example, the mobile terminal may also include more or fewer components than shown in fig. 1, or have a different configuration than shown in fig. 1.
The memory 104 may be used to store a computer program, for example, a software program of application software and a module, such as a computer program corresponding to a water mapping method in an embodiment of the present invention, and the processor 102 executes the computer program stored in the memory 104 to perform various functional applications and data processing, that is, implement the above-mentioned method. Memory 104 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include memory remotely located relative to the processor 102, which may be connected to the mobile terminal via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission device 106 is used to receive or transmit data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider of the mobile terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, simply referred to as NIC) that can connect to other network devices through a base station to communicate with the internet. In one example, the transmission device 106 may be a Radio Frequency (RF) module, which is configured to communicate with the internet wirelessly.
The embodiment of the application provides a water surface mapping method of a pool robot, wherein the pool robot can be a robot for purifying and sterilizing a pool, a robot for detecting water quality, a pool cleaning robot for cleaning a pool, or other robots for underwater or underwater work, and the like.
In this embodiment, a water surface mapping method is provided, and the method is applied to a pool robot, and fig. 2 is a flowchart of the water surface mapping method according to an embodiment of the present application, as shown in fig. 2, where the flowchart includes the following steps:
step S202, under the condition that the pool robot is controlled to walk along the water surface of a target pool and a preset edge walking path is not completed, acquiring a group of position data of the pool robot, and acquiring a group of ultrasonic data, wherein the group of position data comprises position data of the pool robot at N moments in the water surface edge walking process, the group of ultrasonic data comprises data of a reflection signal received by the pool robot after sending ultrasonic signals to a preset direction at each moment in the N moments, and N is a positive integer greater than or equal to 2;
Step S204, constructing a target map of the water surface according to the group of position data and the group of ultrasonic data.
Through the steps, under the condition that the pool robot is controlled to walk along the water surface of the target pool and a preset edgewise walking path is not completed, acquiring the position data of the pool robot at N moments in the water surface edgewise walking process, obtaining a group of position data, and acquiring the data of a reflected signal received after the pool robot sends out ultrasonic signals to a preset direction at each of the N moments, thus obtaining a group of ultrasonic data; and constructing a target map of the water surface of the target pool according to the set of position data and the set of ultrasonic data. The purpose of positioning the water surface and constructing the target map of the water surface is achieved, so that the purpose of effectively controlling the pool robot to operate the pool can be achieved, and the problem that the pool robot in the related art cannot operate the pool effectively because the pool robot does not have the functions of positioning the water surface and constructing the map is avoided. Therefore, the technical problem that the pool robot in the related technology does not have the functions of water surface positioning and map building is solved, and the effect of improving the operation efficiency of the pool robot is achieved.
The main execution body of the steps may be a pool robot, a processor with man-machine interaction capability configured on a storage device, a processing device or a processing unit with similar processing capability, or the like, but is not limited thereto.
In the technical solution provided in step S202, the pool robot is controlled to walk along the water surface of the target pool, for example, a path may be traveled along the wall of the water surface of the target pool, in practical application, the pool robot may be controlled to travel one round or one week along the wall of the water surface of the pool, or may not need to travel one complete round, and the appearance of the target pool may be square, circular, oval, or the like. Under the condition that the pool robot walks along the water surface of the target pool and a preset edgewise walking path is not finished, acquiring the position information of N moments of the pool robot in the edgewise walking process, obtaining a group of position data, and acquiring the data of a reflection signal received by the pool robot after sending ultrasonic signals to a preset direction at each of the N moments, obtaining a group of ultrasonic data, namely acquiring the position data and the ultrasonic data of the N moments, wherein the N moments can be moments of acquiring the data for a plurality of times according to a preset period, for example, acquiring the data once every 20ms (or other periods), and the acquired data each time comprises the position data and the ultrasonic data, and certainly, the data can also be acquired without according to a fixed period. Through the step S202, the position data of the pool robot at N times may be obtained, that is, a set of position data includes the position data at N times, where the position data at each time may also be referred to as pose data of the pool robot, for example, the position data includes x, y, and yaw, which respectively indicate an abscissa, an ordinate, and an azimuth; ultrasonic data corresponding to each of the N times may also be obtained, where the ultrasonic data at each of the N times is data of a reflected signal received after the pool robot transmits an ultrasonic signal in a predetermined direction, that is, one set of ultrasonic data includes ultrasonic data at the N times, for example, an ultrasonic sensor is installed on a right side (or a left side, or a front side, etc.) of the pool robot, so that whether an obstacle (such as a pool wall, or others) exists in a certain range near the right side may be detected during the edgewise walking of the pool robot.
In the technical solution provided in the above step S204, a target map of the water surface of the target pool may be constructed according to the N time position data and the N time ultrasonic data obtained in the step S202, for example, coordinate information of the obstacle detected by the pool robot at each of the N time may be obtained according to the N time position data and the N time ultrasonic data. Through this step S204, obstacle position data (such as the coordinate information of the obstacle) may be obtained, and a target map of the water surface of the target pool may be constructed according to the coordinate information of the obstacle, for example, a grid corresponding to the coordinate of the obstacle in the grid map may be marked as the obstacle, so that after the pool robot completes a predetermined edgewise travel path along the water surface of the target pool, a plurality of obstacles may be marked in the grid map, for example, after the water surface of the target pool travels one turn or one week, a target map of the water surface of the target pool may be obtained. In practical application, after the construction of the target map of the water surface is completed, the pool robot can perform corresponding operations on the pool according to the constructed target map, such as cleaning operations, disinfection or water quality detection or other operations.
Through the embodiment, the purposes of positioning the water surface and constructing the target map of the water surface are realized, so that the purpose of effectively controlling the pool robot to operate the pool can be realized, and the problem that the pool robot in the related art cannot effectively operate the pool due to the fact that the pool robot does not have the functions of positioning the water surface and constructing the map is solved. Therefore, the technical problem that the pool robot in the related technology does not have the functions of water surface positioning and map building is solved, and the effect of improving the operation efficiency of the pool robot is achieved.
In an alternative embodiment, the acquiring a set of position data of the pool robot includes: the method comprises the steps of obtaining each position data in the group of position data, wherein when the following steps are executed, each position data is current position data, and the current position data is used for representing the position data of the pool robot at the current moment in the N moments: acquiring target motion data of a target propeller and target angle data of an Inertial Measurement Unit (IMU), wherein the target propeller and the IMU are arranged on the pool robot, the target motion data are motion data of the target propeller at the current moment, and the target angle data are angle data of the IMU at the current moment; and obtaining the current position data according to the target motion data and the target angle data.
In the above embodiment, each position data in the set of position data may be obtained by performing the above steps, and taking the position data of the current time in the N times as an example, the current position data corresponding to the current time may be obtained by the following steps: and acquiring motion data (such as target motion data) of the target propeller at the current moment and angle data (such as target angle data) of the IMU at the current moment, and acquiring current position data according to the target motion data and the target angle data. For example, the target motion data may be a rotational speed or a linear speed of the target propeller, so that a moving distance of the current moment relative to a previous moment can be obtained according to the rotational speed or the linear speed of the target propeller, and then current position data of the pool robot at the current moment can be obtained according to the moving distance and the target angle data, wherein the previous moment represents a moment adjacent to the current moment and earlier than the current moment in the N moments. For other time points out of the N time points than the current time point, the position data corresponding to each time point can be obtained by the same method as described above. The target propeller may include a motor and an impeller, and may be disposed at the rear of the pool robot, and in practical applications, the target propeller may be a single propeller or may be a plurality of propellers, for example, one propeller may be disposed at each of left and right sides of the rear of the pool robot. Because the pool robot relies on the driving force generated by the propeller of the pool robot when moving on the water surface, the purpose of determining the current position data of the pool robot in the water surface based on the target movement data of the target propeller and the target angle data of the IMU is achieved through the embodiment, and the problem that the pool robot does not have a water surface positioning function is solved.
In an optional embodiment, the obtaining the current position data according to the target motion data and the target angle data includes: acquiring a target rotating speed of the target propeller; determining a target movement distance according to the target rotating speed, wherein the target movement distance is used for representing the movement distance of the pool robot at the current moment relative to the moment before the current moment; and obtaining the current position data according to the target movement distance and the target angle data.
In the above embodiment, the target rotation speed of the target propeller may be obtained, and then the target movement distance may be determined according to the target rotation speed, for example, the linear speed of the target propeller may be obtained by calculating according to the target rotation speed, and then the movement center line speed of the pool robot may be obtained by calculating according to the linear speed of the target propeller, so that the movement distance of the pool robot at the current moment relative to the previous moment may be determined, and then the current position data may be obtained according to the target movement distance and the target angle data. According to the embodiment, the purpose of determining the target movement distance of the pool robot according to the target rotation speed of the target propeller and further determining the current position data of the pool robot according to the target movement distance and the target angle data is achieved.
In an optional embodiment, the determining the target movement distance according to the target rotation speed includes: determining the central line speed of the pool robot according to the target rotating speed, wherein the central line speed is used for representing the distance of the central point of the pool robot in unit time; and determining the target movement distance according to the central line speed.
In the above embodiment, the center line speed of the pool robot may be determined according to the target rotation speed, and then the target movement distance may be determined according to the center line speed, for example, the target rotation speed is r, and the center line speed may be determined according to the formula v= (r×d×pi)/60, where v is the line speed of the single propeller, r is the rotation speed, D is the diameter of the single propeller, and pi is the circumferential rate pi; when the target propeller comprises a single propeller, the centerline speed can be directly obtained according to the above formula. The target movement distance can be calculated according to the following formula according to the center line speed: s=v×Δt×k, where S represents a target movement distance, V represents a center line speed, Δt represents a time difference of a current time with respect to a previous time, and k is a preset scaling factor. For example, k=0.1 (or other value), k can be adjusted according to actual needs. According to the embodiment, the central line speed of the pool robot is determined according to the target rotating speed, and then the target moving distance of the pool robot is determined according to the central line speed, so that the purpose that the target moving distance can be determined when one or more target propellers are provided is achieved, and the application range of a target moving distance determining mode is enlarged. In an alternative embodiment, the target propeller includes a first propeller and a second propeller, and the determining the center line speed of the pool robot according to the target rotation speed includes: determining a first linear speed of the first propeller and a second linear speed of the second propeller according to a first rotating speed of the first propeller and a second rotating speed of the second propeller, wherein the target rotating speed comprises the first rotating speed and the second rotating speed; the centerline speed is determined from the first and second linear speeds.
In the above embodiment, when the target propeller includes the first propeller and the second propeller, for example, the first propeller and the second propeller are left and right side propellers of the pool robot, respectively, the linear speed of the first propeller (i.e., the first linear speed) may be determined based on the rotational speed of the first propeller (i.e., the first rotational speed), and the linear speed of the second propeller (i.e., the second linear speed) may be determined based on the rotational speed of the second propeller (i.e., the second rotational speed), and then the center line speed may be obtained based on the first linear speed and the second linear speed, for example, the center line speed is equal to an average of the sum of the first linear speed and the second linear speed. For example, the center line speed is determined according to the formula v '= (vl+vr)/2, where vl and vr respectively represent the linear speeds of the left and right propellers, and vl and vr may be obtained according to the above-mentioned linear speed calculation formula of the single propeller, and v' represents the center line speed. Through the embodiment, the linear speed of the first propeller and the linear speed of the second propeller can be determined according to the rotating speed of the first propeller and the rotating speed of the second propeller, and then the purpose of determining the central line speed of the pool robot can be achieved.
In an optional embodiment, the obtaining the current position data according to the target movement distance and the target angle data includes: determining a first offset and a second offset according to the target movement distance and a first azimuth angle, wherein the first offset represents a change value of the pool robot in a first direction from a time before the current time to the current time, the second offset represents a change value of the pool robot in a second direction from the time before the current time to the current time, and the first azimuth angle represents an azimuth angle of the pool robot in the time before the current time; obtaining a second abscissa according to the first abscissa and the first offset, and obtaining a second ordinate according to the first ordinate and the second offset; determining an angle change amount of the target angle data relative to first angle data, and obtaining a second azimuth angle according to the first azimuth angle and the angle change amount, wherein the second azimuth angle represents an azimuth angle of the pool robot at the current moment, and the first angle data is angle data of the IMU at a moment before the current moment; the position data of the pool robot at a time before the current time comprises the first abscissa, the second abscissa and the first azimuth angle, and the current position data comprises the second abscissa, the second ordinate and the second azimuth angle.
In the above embodiment, the first offset and the second offset are determined according to the target movement distance and the first azimuth angle, where the first azimuth angle represents the azimuth angle of the pool robot at the previous time of the current time, that is, the target movement distance is converted into the change amounts of the x-axis (corresponding to the first direction) and the y-axis (corresponding to the second direction) in the world coordinate system, so that the first offset and the second offset can be obtained; according to the first abscissa and the first ordinate included in the position data of the pool robot at the moment before the current moment, and the first offset and the second offset, calculating to obtain a second abscissa and a second ordinate, wherein the second abscissa and the second ordinate represent coordinate data included in the position data of the pool robot at the current moment; in addition, according to the target angle data of the IMU and the angle data (namely the first angle data) of the IMU at the moment before the current moment, determining an angle change amount, and obtaining a second azimuth angle according to the first azimuth angle and the angle change amount, wherein the second azimuth angle represents the azimuth angle of the pool robot at the current moment, so that the position data (namely the current position data) of the pool robot at the current moment is obtained, and the current position data comprises a second abscissa, a second ordinate and a second azimuth angle. According to the embodiment, the position data of the current moment can be obtained according to the position data of the pool robot at the moment before the current moment and the target movement distance.
In an alternative embodiment, the constructing the target map of the water surface according to the set of position data and the set of ultrasonic data includes: determining obstacle position data of an obstacle in the water surface from the set of position data and the set of ultrasonic data; and marking the grid map according to the obstacle position data to obtain the target map of the water surface.
In the above embodiment, the obstacle position data of the obstacle in the water surface may be determined according to a set of position data and a set of ultrasonic data, for example, N coordinate pair data may be obtained according to the position data of N times and the ultrasonic data corresponding to the N times, where the ith coordinate pair data in the N coordinate pair data represents coordinate information of the obstacle detected by the pool robot at the ith time (or may be referred to as the ith obstacle position data), for example, the ultrasonic data corresponding to the ith time may be a distance between the obstacle and the pool robot (may be referred to as a distance at the ith time), where i is a positive integer greater than or equal to 1 and less than or equal to N; in this way, according to the position data (such as coordinate data) of the pool robot at the ith moment and the distance between the obstacle and the pool robot at the ith moment, the coordinate information of the obstacle detected at the ith moment is calculated to obtain the ith coordinate pair data, and the coordinate information of the obstacles detected at a plurality of different moments can be obtained by analogy, so that the obstacle position data detected at different moments in the water surface edge walking process of the pool robot can be obtained; and then marking the grid map according to the obstacle position data, so as to obtain the target map of the water surface.
In an alternative embodiment, the method further comprises: under the condition that the distance between a first position and an initial position meets a first threshold condition, determining that the pool robot completes the preset edgewise walking path, and completing construction of a target map of the water surface after determining that the preset edgewise walking path is completed, wherein the first position is used for representing the position of the pool robot at the Nth moment, and the initial position is used for representing the position of the pool robot at the starting moment of executing the preset edgewise walking path; and/or under the condition that the difference between a third azimuth angle and an initial azimuth angle meets a second threshold condition, determining that the pool robot completes the preset edgewise walking path, and completing construction of a target map of the water surface after determining that the preset edgewise walking path is completed, wherein the third azimuth angle is used for indicating the azimuth angle of the pool robot at the Nth moment, and the initial azimuth angle is used for indicating the azimuth angle of the pool robot at the starting moment of executing the preset edgewise walking path.
In the above embodiment, when the distance between the position of the pool robot at the nth time (i.e., the first position) and the initial position satisfies the first threshold condition, for example, the first threshold condition is that the distance is less than 1m (or 2m, or other values), it may be determined that the pool robot completes the predetermined edgewise travel path, and after it is determined that the pool robot completes the predetermined edgewise travel path, it may also complete the construction of the target map of the water surface; alternatively, when the difference between the azimuth angle of the pool robot at the nth time (such as the third azimuth angle described above) and the initial azimuth angle satisfies the second threshold condition, for example, the second threshold condition is that the difference between the azimuth angles is less than 30 ° (or 40 °, or other angles), it may be determined that the pool robot completes the predetermined edgewise travel path, and after it is determined that the pool robot completes the predetermined edgewise travel path, it may also complete the construction of the target map of the water surface. By the embodiment, the aim of determining whether the preset edgewise walking path is completed or not in the process of constructing the water surface map and the aim of constructing the target map of the water surface after the preset edgewise walking path is completed are achieved.
As an alternative embodiment, the acquiring a set of position data of the pool robot includes: and performing repeated iterative operation on the initial position data to obtain the group of position data, wherein when each iterative operation is performed, the current position data is obtained according to the previous position data, and the initial position data is used for representing the data of the initial position of the pool robot walking along the water surface. For example, by performing a plurality of iterative operations on initial position data, a set of position data is obtained, wherein the initial position data can be understood as data of a starting position of the pool robot for mapping, for example, the initial position data is (0, 0), wherein the initial position data comprises an abscissa x, an ordinate y and an azimuth angle yaw, and the initial azimuth angle yaw can be defined as 0; the method comprises the steps that sensor data on the pool robot can be acquired once at regular intervals (such as 20ms or other time intervals) to determine current position data of the pool robot, for example, the position after 20ms (the position is L0 and is corresponding to the time t 1) is obtained through iterative calculation of the initial position L0 from the initial position (the position is L0 and is corresponding to the time t 0), for example, the rotational speed of a propeller of the pool robot can be acquired through a sensor in the propeller of the pool robot, the linear speed of the propeller and the central line speed of the pool robot are acquired, then the distance between the time t1 (namely the position L1) and the time t0 (namely the position L0) is determined, and further, the distance can be converted into components in the directions of an x axis and a y axis in a world coordinate system, and x and y coordinates corresponding to the position L1 can be obtained due to the fact that the data of the initial position L0 is (0, 0 and 0); the azimuth angle of the L1 position can be calculated according to the angle data of the pool robot at the time t0 and the time t1 obtained by the inertial measurement unit IMU (Inertial Measurement Unit) carried in the pool robot, for example, according to the angle data of the pool robot at the time t0 and the time t1 obtained by the IMU, the azimuth angle variation of the pool robot at the time t0 and the time t1 is calculated, and the azimuth angle of the pool robot at the time t1 is further determined, so that the data of the L1 position is determined. Similarly, the position data (e.g., the L2 position) at the next time (e.g., the t2 time) and the position data at the other subsequent times may be further determined according to the data of the L1 position, so that a set of position data may be obtained. According to the embodiment, the initial position data is subjected to repeated iterative operation, so that the purpose of obtaining a group of position data is achieved.
As an optional implementation manner, the performing multiple iterative operations on the initial position data to obtain the set of position data includes: obtaining the ith-1 position data through the ith-1 iterative operation, and performing the ith iterative operation according to the following formula to obtain the ith position data: x is X i =X i-1 +dx,Y i =Y i-1 +dy,yaw i =yaw i-1 +dyaw; wherein i is a positive integer greater than or equal to 1 and less than N, and the i-1 th position data includes X i-1 、Y i-1 、yaw i-1 ,yaw i-1 Representing an azimuth angle of the pool robot at a position corresponding to the i-1 th position data including X i 、Y i 、yaw i ,yaw i Dx is used for representing a change value of the pool robot in a first direction from an i-1 th time to an i-th time, dy is used for representing a change value of the pool robot in a second direction from the i-1 th time to the i-th time, dyaw is used for representing a change amount of the pool robot in azimuth from the i-1 th time to the i-th time, the i-1 th position data represents position data of the pool robot in the i-1 th time, and the i-th position data represents the pool robot Position data of the person at the i-th moment; when i=1, the i-1 position data represents the starting position of the pool robot walking along the water surface, and the i-1 moment represents the starting moment of the pool robot walking along the water surface.
In the above embodiment, the i-1 th position data is obtained from the initial position data by the i-1 st iterative operation, and the i-1 th position data is obtained from the i-1 th position data according to the above formula, wherein X is the above formula i-1 、Y i-1 、yaw i-1 The i-1 th position data (corresponding to the i-1 th time in N times) can also be understood as the positioning data of the pool robot at the i-1 th position, such as X i-1 Is the X coordinate and Y coordinate of the pool robot at the i-1 position i-1 For the Y-coordinate of the pool robot at the i-1 th position, yaw i-1 For the azimuth angle of the pool robot at the i-1 th position, X is expressed in the formula i 、Y i 、yaw i The ith position data (corresponding to the ith time out of the N times) may also be understood as the position data of the pool robot at the ith position, dx represents a change value of the pool robot in the first direction (e.g. X direction) from the ith-1 time to the ith time, dy represents a change value of the pool robot in the second direction (e.g. Y direction) from the ith-1 time to the ith time, and dyaw represents a change amount of the azimuth angle of the pool robot from the ith-1 time to the ith time. According to the embodiment, the ith position data can be obtained by performing one iteration operation on the ith-1 th position data according to the formula.
As an alternative embodiment, the acquiring a set of position data of the pool robot includes: the following steps are performed to obtain the ith position data in the set of position data: acquiring an ith movement distance of the pool robot, wherein the ith movement distance is used for representing a movement distance of the pool robot between an ith moment and an ith moment, and the N moments comprise the ith moment and the ith moment; determining the ith position data according to the ith movement distance and the ith-1 th position data, wherein the ith-1 th position data is used for representing the position data of the pool robot at the ith-1 th moment, the ith position data is used for representing the position data of the pool robot at the ith moment, the ith-1 th position data is determined based on initial position data, and the initial position data is used for representing the data of the initial position of the pool robot in the driving process of the path section.
In the above embodiment, for any one of the set of position data, for example, the i-th position data (corresponding to the i-th time of the N times), the following steps can be obtained: the method comprises the steps of obtaining the ith movement distance of the pool robot between the ith moment and the ith moment, determining the ith position data according to the ith movement distance and the ith-1 th position data, for example, determining x and y coordinate data in the ith position data, further obtaining the variation of the azimuth angle of the pool robot between the ith moment and the ith-1 th moment according to an inertial measurement unit IMU in the pool robot, and determining azimuth angle data in the ith position data.
As an alternative embodiment, the determining the ith position data according to the ith movement distance and the ith-1 th position data includes: acquiring first angle data corresponding to the ith moment and the (1) th moment of the pool robot and second angle data corresponding to the ith moment of the pool robot through an inertia measurement module; and determining the ith position data according to the ith movement distance, the ith-1 th position data, the first angle data and the second angle data.
In the above embodiment, the first angle data corresponding to the ith-1 th moment of time and the second angle data corresponding to the ith moment of time of the pool robot may be obtained by an inertial measurement module (such as an IMU) in the pool robot, the first angle data and the second angle data are different from the azimuth angles, the first angle data and the second angle data may be obtained by the IMU, and then the ith position data may be determined according to the ith movement distance, the ith-1 th position data, the first angle data and the second angle data, for example, the azimuth angle change amounts of the ith position and the ith-1 th position in the x-axis and y-axis directions may be obtained according to the ith movement distance, the ith-1 th position data, the first angle data and the second angle data obtained by the IMU, and the azimuth angle change amounts of the pool robot between the ith position and the ith-1 th position may be determined, thereby obtaining the azimuth angle at the ith position.
As an alternative embodiment, the determining the ith position data according to the ith movement distance, the ith-1 th position data, the first angle data, and the second angle data includes: determining a first offset and a second offset according to the ith movement distance and a first azimuth angle, wherein the first offset represents a change value of the pool robot in a first direction from the ith-1 moment to the ith moment, and the second offset represents a change value of the pool robot in a second direction from the ith-1 moment to the ith moment; obtaining a second abscissa according to a first abscissa and the first offset, obtaining a second ordinate according to a first ordinate and the second offset, and obtaining a second azimuth according to the first azimuth, the first angle data and the second angle data, wherein the i-1 th position data comprises the first abscissa, the first ordinate and the first azimuth, and the i-th position data comprises the second abscissa, the second ordinate and the second azimuth.
In the above embodiment, the first offset and the second offset may be determined according to the ith movement distance and the first azimuth angle, that is, the ith movement distance may be converted into the variation amounts of the x-axis and the y-axis directions in the world coordinate system according to the ith movement distance and the first azimuth angle of the pool robot between the ith-1 th moment and the ith moment, and the first offset and the second offset may be obtained; obtaining a second abscissa according to the first abscissa and the first offset in the i-1 th position data, and obtaining a second ordinate according to the first ordinate and the second offset in the i-1 th position data, so as to obtain a second abscissa and a second ordinate in the i-1 th position data; the second azimuth angle can be obtained according to the first azimuth angle, the first angle data and the second angle data in the i-1 th position data, the first angle data and the second angle data are obtained according to the IMU, for example, the azimuth angle change amount of the pool robot between the i-1 th moment and the i-1 th moment can be determined according to the first angle data and the second angle data, for example, the azimuth angle change amount is an angle difference value between the second angle data and the first angle data, and the second azimuth angle can be determined by combining the first azimuth angle in the i-1 th position data, so that the purpose of determining the i-1 th position data is achieved.
As an optional embodiment, the acquiring the i-th movement distance of the pool robot includes: determining a center line speed of the pool robot, wherein the center line speed is used for representing the distance of the center point of the pool robot in unit time; calculating the ith target movement distance according to the center line speed by the following formula: s=v×Δt×k, where S represents the i-th target movement distance, V represents the center line speed, Δt represents the time difference between the i-th time and the i-1-th time, and k is a preset scaling factor.
In the above embodiment, the center line speed of the pool robot may be determined first, and then the i-th movement distance may be determined according to the center line speed, for example, the i-th movement distance may be calculated according to the formula s=v×Δt×k, where k is a preset scaling factor, for example, k=0.1 (or other values), and k may be adjusted according to actual needs.
As an alternative embodiment, the determining the center line speed of the pool robot includes: acquiring a first rotating speed and a second rotating speed of the pool robot, wherein the first rotating speed is used for representing the rotating speed of a first side propeller of the pool robot, and the second rotating speed is used for representing the rotating speed of a second side propeller of the pool robot; and determining the center line speed according to the first rotating speed and the second rotating speed.
In the above embodiment, the first rotation speed and the second rotation speed of the pool robot may be obtained first, and then the center line speed may be determined according to the first rotation speed and the second rotation speed, where the first rotation speed and the second rotation speed may respectively represent the rotation speeds of the propellers on the left and right sides of the pool robot, in practical application, when the pool robot is in the driving process, the rotation speeds of the left and right propellers, that is, the first rotation speed and the second rotation speed, are obtained through the sensors in the propellers, and assuming that the first rotation speed is Rl, the second rotation speed is Rr, the line speeds of the left and right propellers may be calculated according to the rotation speeds of the propellers, for example, the line speeds of the left and right propellers may be calculated according to the formula v= (r×d×pi), where R is the rotation speed (e.g., rl, rr), D is the diameter of the propellers, and pi is the circumferential rate pi; then, the linear speeds of the left propeller and the right propeller are converted into the central line speeds, and the central line speeds can be calculated according to a formula v= (vl+vr)/2.
As an optional implementation manner, the obtaining N coordinate pair data according to the set of position data and the set of ultrasonic data includes: the following steps are executed to obtain the ith coordinate pair data in the N coordinate pair data: determining ith distance data between an ith obstacle and the pool robot based on an ith ultrasonic data in the set of ultrasonic data, wherein the ith ultrasonic data represents data of a reflected signal received by the pool robot after sending an ultrasonic signal to a preset direction at an ith moment in the N moments; and obtaining the ith coordinate pair data based on the ith distance data and the ith position data, wherein the ith coordinate pair data is used for representing the position data of the ith obstacle, the ith position data represents the position data of the pool robot at the ith moment, and the group of position data comprises the ith position data.
In the above embodiment, for any one of the N coordinate pair data, for example, the i-th coordinate pair data, it is possible to obtain the following steps: according to the ith ultrasonic data, the ith distance data between the ith obstacle and the pool robot is determined, and then according to the ith distance data and the ith position data, the coordinate data of the ith obstacle is obtained, namely the ith coordinate pair data is obtained, for example, the ith distance data can be converted into a world coordinate system to obtain the offset of the ith obstacle relative to the pool robot at the ith position, further the coordinate data of the obstacle is obtained, and the like, N coordinate pair data corresponding to N moments respectively can be obtained, so that a target map of the water surface of the target pool can be constructed based on the N coordinate data.
It will be apparent that the embodiments described above are merely some, but not all, embodiments of the invention. The present invention will be specifically described with reference to examples.
Fig. 3 is a schematic structural view of a pool robot according to an embodiment of the present invention, the pool robot including: the system comprises a walking module 302, a working module 304, a control module 306, a storage module 308 and a map planning module 310, wherein the map planning module 310 is in communication connection with the control module 306 and the storage module 308. The walking module 302 is used for driving the pool robot to walk on a working surface, and the working surface can be a pool bottom, a water surface and a pool wall. The work module 304 is used to implement various work content performed by the pool robot. The map planning module 310 is configured to obtain a map of the pool robot working pool so that it can reasonably plan the working path, and store the map in the storage module 308. The control module 306 is used for controlling the working content of the pool robot.
The water tank cleaning robot of the embodiment of the invention is internally provided with a floating cavity and a water suction and drainage pump and has the cleaning functions of the water surface and the water bottom; meanwhile, a water surface positioning estimation scheme is provided, and the functions of water surface positioning and map building are realized. The forward and backward movement of the pool robot on the water surface is realized mainly through forward rotation and backward rotation of the propeller, and the left and right propellers are used for distributing rotating speeds with different sizes so as to realize the leftward or rightward rotation of the pool robot. The pool robot (or simply referred to as a machine) walks along the pool wall on the water surface, and the implementation flow of the positioning and mapping function on the water surface is as follows:
(1) Set the initial position coordinates of the machine as (0, 0) and three-dimensional coordinatesRespectively x, y and yaw, as shown in FIG. 4P 0 The position is the initial position.
(2) According to the current rotation speed thrusher_l (corresponding to the first rotation speed) of the left and right propellers, the thrusher_r (corresponding to the second rotation speed) is converted into left and right linear speeds vl, vr, and the conversion formula is as follows:
v=(r*D*pi)/60,
where v is the linear velocity (e.g., vl, vr above), r is the rotational velocity (e.g., thrusher_l, thrusher_r above), D is the propeller diameter, and pi is the circumferential rate pi.
(3) Converting the left and right linear velocity into a motion center line velocity, wherein the conversion formula is as follows:
v=(vl+vr)/2。
(4) Calculating a motion distance delta_s (corresponding to the target motion distance) between two frames of data, wherein the calculation formula is as follows:
delta_s=v*delta_t*coe,
where v is the motion centerline speed, delta_t is the time difference between two frames of data, coe is the proportionality coefficient of the propeller linear speed to the true linear speed of the robot when moving (corresponding to proportionality coefficient k described above).
Two frames of data represent data acquired or acquired at two different times.
(5) The delta_s is converted into components in the directions of the x axis and the y axis in the world coordinate system according to the current azimuth angle, and the conversion result is (dx, dy).
(6) And calculating the azimuth angle change dyaw between two adjacent frames according to the angle data of imu (inertial sensor, inertial navigation system or inertial measurement module).
(7) According to the machine coordinates P of the previous frame i-1 (x i-1 ,y i-1 ,yaw i-1 ) As shown in fig. 4, the coordinate variation between two frames is accumulated to obtain the machine coordinate P of the current frame i =(x i-1 +dx,y i-1 +dy,yaw i-1 +dyaw),P i-1 、P i Respectively corresponding to the i-1 th position data and the i-th position data.
(8) And receiving ultrasonic data of the current frame, estimating coordinates Q (x, y) of ultrasonic observation data in a world coordinate system according to the current machine coordinates and the position relationship between the ultrasonic and the machine, and marking a grid occupied by a Q point in a grid map as an obstacle.
And after the edge is finished, deriving the grid map, namely, obtaining a map building result of the machine. I.e. after walking a path along the wall of the pool, the grid map is derived. In practical applications, it may be determined whether the operation of walking along the edge is completed according to the pose relationship of the pool robot, for example, whether the distance between the current position and the initial position of the pool robot meets a first threshold condition, and/or whether the current azimuth angle and the initial azimuth angle of the pool robot meet a second threshold condition, for example, the first threshold condition is that the distance is less than 1m (or 2m, or other values), and the second threshold condition may be that the difference between azimuth angles is less than 30 ° (or 40 °, or other angles).
After the water surface map is built, path planning can be performed according to the map building result, and then water surface cleaning work is completed. The construction process of the pool bottom of the water pool can be implemented according to the similar steps, and the description is omitted herein.
Through the embodiment, the water surface positioning scheme based on the rotating speed of the propeller is provided, the position of the robot is estimated under the condition that the water surface positioning and the motion control are extremely difficult, the grid map is built, the motion strategy of the machine can be executed more accurately based on the positioning and the map, after the water surface edge is finished, the water surface coverage path can be calculated according to the built grid map, the reasonable cleaning strategy is executed, the cleaning effect is improved, the cleaning efficiency is improved, and the electric quantity consumption and the damage to devices are reduced. The water surface cleaning function is increased compared to the pool cleaning robot in the related art. The pool robot provided by the embodiment of the application has the functions of water surface positioning and map building, can realize regular and orderly water surface cleaning flow, and can improve cleaning effect.
From the description of the above embodiments, it will be clear to a person skilled in the art that the method according to the above embodiments may be implemented by means of software plus the necessary general hardware platform, but of course also by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (e.g. ROM/RAM, magnetic disk, optical disk) comprising instructions for causing a terminal device (which may be a mobile phone, a computer, a server, or a network device, etc.) to perform the method according to the embodiments of the present invention.
In this embodiment, a water surface mapping device is further provided, and fig. 5 is a block diagram of a water surface mapping device according to an embodiment of the present invention, as shown in fig. 5, where the device includes:
an obtaining module 502, configured to obtain a set of position data of a pool robot under the condition that the pool robot is controlled to walk along the water surface of a target pool and a predetermined walking path along the edge is not completed, and obtain a set of ultrasonic data, where the set of position data includes position data of the pool robot at N times during the water surface walking, the set of ultrasonic data includes data of a reflected signal received by the pool robot after sending an ultrasonic signal to a predetermined direction at each of the N times, and N is a positive integer greater than or equal to 2;
A construction module 504 is configured to construct a target map of the water surface based on the set of position data and the set of ultrasound data.
In an alternative embodiment, the acquiring module 502 includes: the execution unit is used for executing the following steps to obtain each position data in the group of position data, wherein when the following steps are executed, each position data is current position data, and the current position data is used for representing the position data of the pool robot at the current moment in the N moments: acquiring target motion data of a target propeller and target angle data of an Inertial Measurement Unit (IMU), wherein the target propeller and the IMU are arranged on the pool robot, the target motion data are motion data of the target propeller at the current moment, and the target angle data are angle data of the IMU at the current moment; and obtaining the current position data according to the target motion data and the target angle data.
In an alternative embodiment, the execution unit is configured to obtain the current location data by: acquiring a target rotating speed of the target propeller; determining a target movement distance according to the target rotating speed, wherein the target movement distance is used for representing the movement distance of the pool robot at the current moment relative to the moment before the current moment; and obtaining the current position data according to the target movement distance and the target angle data.
In an alternative embodiment, the execution unit is configured to determine the target movement distance by: determining the central line speed of the pool robot according to the target rotating speed, wherein the central line speed is used for representing the distance of the central point of the pool robot in unit time; and determining the target movement distance according to the central line speed.
In an alternative embodiment, the target propeller comprises a first propeller and a second propeller, and the execution unit is configured to determine the center line speed of the pool robot by: determining a first linear speed of the first propeller and a second linear speed of the second propeller according to a first rotating speed of the first propeller and a second rotating speed of the second propeller, wherein the target rotating speed comprises the first rotating speed and the second rotating speed; the centerline speed is determined from the first and second linear speeds.
In an alternative embodiment, the execution unit is configured to obtain the current location data by: determining a first offset and a second offset according to the target movement distance and a first azimuth angle, wherein the first offset represents a change value of the pool robot in a first direction from a time before the current time to the current time, the second offset represents a change value of the pool robot in a second direction from the time before the current time to the current time, and the first azimuth angle represents an azimuth angle of the pool robot in the time before the current time; obtaining a second abscissa according to the first abscissa and the first offset, and obtaining a second ordinate according to the first ordinate and the second offset; determining an angle change amount of the target angle data relative to first angle data, and obtaining a second azimuth angle according to the first azimuth angle and the angle change amount, wherein the second azimuth angle represents an azimuth angle of the pool robot at the current moment, and the first angle data is angle data of the IMU at a moment before the current moment; the position data of the pool robot at a time before the current time comprises the first abscissa, the second abscissa and the first azimuth angle, and the current position data comprises the second abscissa, the second ordinate and the second azimuth angle.
In an alternative embodiment, the building block 504 includes: a determining unit configured to determine obstacle position data of an obstacle in the water surface based on the set of position data and the set of ultrasonic data; and the obtaining unit is used for executing marking operation on the grid map according to the obstacle position data to obtain the target map of the water surface.
In an alternative embodiment, the apparatus further comprises: a first determining module, configured to determine that the pool robot completes the predetermined edgewise travel path if it is determined that a distance between a first position and an initial position meets a first threshold condition, and complete construction of a target map of the water surface after it is determined that the predetermined edgewise travel path is completed, where the first position is used to represent a position of the pool robot at an nth time, and the initial position is used to represent a position of the pool robot at a start time of executing the predetermined edgewise travel path; and/or a second determining module, configured to determine that the pool robot completes the predetermined edgewise travel path if it is determined that a difference between a third azimuth angle and an initial azimuth angle satisfies a second threshold condition, and complete the construction of the target map of the water surface after it is determined that the predetermined edgewise travel path is completed, where the third azimuth angle is used to represent an azimuth angle of the pool robot at an nth time, and the initial azimuth angle is used to represent an azimuth angle of the pool robot at a start time of executing the predetermined edgewise travel path.
It should be noted that each of the above modules may be implemented by software or hardware, and for the latter, it may be implemented by, but not limited to: the modules are all located in the same processor; alternatively, the above modules may be located in different processors in any combination.
Embodiments of the present invention also provide a computer readable storage medium having a computer program stored therein, wherein the computer program is arranged to perform the steps of any of the method embodiments described above when run.
In one exemplary embodiment, the computer readable storage medium may include, but is not limited to: a usb disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a removable hard disk, a magnetic disk, or an optical disk, or other various media capable of storing a computer program.
Embodiments of the present invention also provide a pool robot comprising a memory having a computer program stored therein and a processor arranged to run the computer program to perform the steps of any of the method embodiments described above.
In an exemplary embodiment, the pool robot may further include a transmission device connected to the processor, and an input/output device connected to the processor.
Specific examples in this embodiment may refer to the examples described in the foregoing embodiments and the exemplary implementation, and this embodiment is not described herein.
It will be appreciated by those skilled in the art that the modules or steps of the invention described above may be implemented in a general purpose computing device, they may be concentrated on a single computing device, or distributed across a network of computing devices, they may be implemented in program code executable by computing devices, so that they may be stored in a storage device for execution by computing devices, and in some cases, the steps shown or described may be performed in a different order than that shown or described herein, or they may be separately fabricated into individual integrated circuit modules, or multiple modules or steps of them may be fabricated into a single integrated circuit module. Thus, the present invention is not limited to any specific combination of hardware and software.
The above description is only of the preferred embodiments of the present invention and is not intended to limit the present invention, but various modifications and variations can be made to the present invention by those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1. The water surface mapping method is applied to a pool robot and is characterized by comprising the following steps of:
under the condition that a pool robot is controlled to walk along the water surface of a target pool and a preset edgewise walking path is not completed, acquiring a group of position data of the pool robot, and acquiring a group of ultrasonic data, wherein the group of position data comprises position data of the pool robot at N moments in the water surface edgewise walking process, the group of ultrasonic data comprises data of a reflection signal received by the pool robot after the pool robot sends ultrasonic signals to a preset direction at each of the N moments, and N is a positive integer greater than or equal to 2;
and constructing a target map of the water surface according to the group of position data and the group of ultrasonic data.
2. The method of claim 1, wherein the acquiring a set of positional data of the pool robot comprises:
The method comprises the steps of obtaining each position data in the group of position data, wherein when the following steps are executed, each position data is current position data, and the current position data is used for representing the position data of the pool robot at the current moment in the N moments:
acquiring target motion data of a target propeller and target angle data of an Inertial Measurement Unit (IMU), wherein the target propeller and the IMU are arranged on the pool robot, the target motion data are motion data of the target propeller at the current moment, and the target angle data are angle data of the IMU at the current moment;
and obtaining the current position data according to the target motion data and the target angle data.
3. The method of claim 2, wherein the obtaining the current position data from the target motion data and the target angle data comprises:
acquiring a target rotating speed of the target propeller;
determining a target movement distance according to the target rotating speed, wherein the target movement distance is used for representing the movement distance of the pool robot at the current moment relative to the moment before the current moment;
And obtaining the current position data according to the target movement distance and the target angle data.
4. A method according to claim 3, wherein said determining a target distance of movement from said target rotational speed comprises:
determining the central line speed of the pool robot according to the target rotating speed, wherein the central line speed is used for representing the distance of the central point of the pool robot in unit time;
and determining the target movement distance according to the central line speed.
5. The method of claim 4, wherein the target propeller comprises a first propeller and a second propeller, wherein the determining the centerline speed of the pool robot from the target rotational speed comprises:
determining a first linear speed of the first propeller and a second linear speed of the second propeller according to a first rotating speed of the first propeller and a second rotating speed of the second propeller, wherein the target rotating speed comprises the first rotating speed and the second rotating speed;
the centerline speed is determined from the first and second linear speeds.
6. A method according to claim 3, wherein said obtaining said current position data from said target movement distance and said target angle data comprises:
Determining a first offset and a second offset according to the target movement distance and a first azimuth angle, wherein the first offset represents a change value of the pool robot in a first direction from a time before the current time to the current time, the second offset represents a change value of the pool robot in a second direction from the time before the current time to the current time, and the first azimuth angle represents an azimuth angle of the pool robot in the time before the current time;
obtaining a second abscissa according to the first abscissa and the first offset, and obtaining a second ordinate according to the first ordinate and the second offset;
determining an angle change amount of the target angle data relative to first angle data, and obtaining a second azimuth angle according to the first azimuth angle and the angle change amount, wherein the second azimuth angle represents an azimuth angle of the pool robot at the current moment, and the first angle data is angle data of the IMU at a moment before the current moment;
the position data of the pool robot at a time before the current time comprises the first abscissa, the second abscissa and the first azimuth angle, and the current position data comprises the second abscissa, the second ordinate and the second azimuth angle.
7. The method of claim 1, wherein constructing the target map of the water surface from the set of position data and the set of ultrasound data comprises:
determining obstacle position data of an obstacle in the water surface from the set of position data and the set of ultrasonic data;
and marking the grid map according to the obstacle position data to obtain the target map of the water surface.
8. The method according to claim 1, wherein the method further comprises:
under the condition that the distance between a first position and an initial position meets a first threshold condition, determining that the pool robot completes the preset edgewise walking path, and completing construction of a target map of the water surface after determining that the preset edgewise walking path is completed, wherein the first position is used for representing the position of the pool robot at the Nth moment, and the initial position is used for representing the position of the pool robot at the starting moment of executing the preset edgewise walking path; and/or
And under the condition that the difference between a third azimuth angle and an initial azimuth angle meets a second threshold condition, determining that the pool robot completes the preset edgewise walking path, and completing construction of a target map of the water surface after determining that the preset edgewise walking path is completed, wherein the third azimuth angle is used for indicating the azimuth angle of the pool robot at the Nth moment, and the initial azimuth angle is used for indicating the azimuth angle of the pool robot at the starting moment of executing the preset edgewise walking path.
9. A computer readable storage medium, characterized in that a computer program is stored in the computer readable storage medium, wherein the computer program, when being executed by a processor, implements the steps of the method according to any of the claims 1 to 8.
10. A pool robot comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the steps of the method of any of claims 1 to 8 when the computer program is executed.
CN202311006743.5A 2023-08-10 2023-08-10 Water surface map building method, storage medium and pool robot Pending CN116859951A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311006743.5A CN116859951A (en) 2023-08-10 2023-08-10 Water surface map building method, storage medium and pool robot

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311006743.5A CN116859951A (en) 2023-08-10 2023-08-10 Water surface map building method, storage medium and pool robot

Publications (1)

Publication Number Publication Date
CN116859951A true CN116859951A (en) 2023-10-10

Family

ID=88234221

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311006743.5A Pending CN116859951A (en) 2023-08-10 2023-08-10 Water surface map building method, storage medium and pool robot

Country Status (1)

Country Link
CN (1) CN116859951A (en)

Similar Documents

Publication Publication Date Title
CN110023867B (en) System and method for robotic mapping
US11886186B2 (en) Mobile robot and control method of mobile robot
CN113455965B (en) Cleaning robot control method, cleaning robot control device, medium and cleaning robot
CN111590595A (en) Positioning method and device, mobile robot and storage medium
CN113741438A (en) Path planning method and device, storage medium, chip and robot
CN108844553A (en) Correct the method, apparatus and robot of the mileage in robot moving process
CN111240310A (en) Robot obstacle avoidance processing method and device and electronic equipment
CN111240308A (en) Method and device for detecting repeated obstacle, electronic equipment and readable storage medium
WO2021238001A1 (en) Robot travelling control method and system, robot, and readable storage medium
TWI823581B (en) Robots and control methods
CN113110498A (en) Robot escaping method based on single-point TOF
CN113475977A (en) Robot path planning method and device and robot
CN114355887B (en) Narrow-lane passage method and device for robot, robot and storage medium
CN112318507A (en) Robot intelligent control system based on SLAM technology
CN116859951A (en) Water surface map building method, storage medium and pool robot
CN112294192A (en) Robot control method and robot
CN111103872A (en) Method and device for controlling robot to avoid charging device and computing equipment
CN114115263B (en) Autonomous mapping method and device for AGV, mobile robot and medium
CN112308033B (en) Obstacle collision warning method based on depth data and visual chip
CN115718487A (en) Self-moving equipment pose determining method and device, self-moving equipment and storage medium
CN111897337B (en) Obstacle avoidance control method and control system for robot during edgewise walking
CN112489131A (en) Method, device, medium and robot for constructing cost map based on road surface detection
CN116700297B (en) Autonomous navigation control system and control method based on livestock shed operation robot
CN117330091A (en) Method for constructing grid map, storage medium and pool robot
CN115444328B (en) Obstacle detection method, cleaning robot and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination