[go: up one dir, main page]

CN116400711A - Path planning method, underwater robot, electronic equipment and storage medium - Google Patents

Path planning method, underwater robot, electronic equipment and storage medium Download PDF

Info

Publication number
CN116400711A
CN116400711A CN202310658883.4A CN202310658883A CN116400711A CN 116400711 A CN116400711 A CN 116400711A CN 202310658883 A CN202310658883 A CN 202310658883A CN 116400711 A CN116400711 A CN 116400711A
Authority
CN
China
Prior art keywords
underwater robot
threshold
distance
position coordinates
difference
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.)
Granted
Application number
CN202310658883.4A
Other languages
Chinese (zh)
Other versions
CN116400711B (en
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.)
Shenzhilan Tianjin Underwater Intelligent Technology Co ltd
Original Assignee
Shenzhilan Tianjin Underwater Intelligent Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhilan Tianjin Underwater Intelligent Technology Co ltd filed Critical Shenzhilan Tianjin Underwater Intelligent Technology Co ltd
Priority to CN202310658883.4A priority Critical patent/CN116400711B/en
Priority to PCT/CN2023/100333 priority patent/WO2024250324A1/en
Publication of CN116400711A publication Critical patent/CN116400711A/en
Application granted granted Critical
Publication of CN116400711B publication Critical patent/CN116400711B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05DSYSTEMS FOR CONTROLLING OR REGULATING NON-ELECTRIC VARIABLES
    • G05D1/00Control of position, course, altitude or attitude of land, water, air or space vehicles, e.g. using automatic pilots
    • G05D1/40Control within particular dimensions
    • G05D1/43Control of position or course in two dimensions

Landscapes

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

Abstract

The application provides a path planning method, an underwater robot, electronic equipment and a storage medium, which are used in the field of the underwater robot and are used for solving the problems that the conventional underwater robot path planning is not intelligent and dead zones and repeated areas occur. The method comprises the following steps: acquiring position coordinates and azimuth angles of the underwater robot, a first distance from a current side pool wall and a second distance from the current front pool wall in real time; controlling the underwater robot to travel along the front side of the underwater robot, and keeping the first distance between the underwater robot and the current side pool wall equal to a first threshold value; controlling the underwater robot to rotate a first angle in a direction deviating from the current side pool wall under the condition that the second distance is smaller than a second threshold value; under the condition that the underwater robot returns to the initial point, determining that the underwater robot travels for one round, resetting the initial position, the first threshold value and the second threshold value of the underwater robot, and controlling the underwater robot to move to the reset initial position.

Description

路径规划方法及水下机器人、电子设备及存储介质Path planning method, underwater robot, electronic equipment and storage medium

技术领域technical field

本申请涉及水下机器人领域,具体而言,涉及一种路径规划方法及水下机器人、电子设备及存储介质。The present application relates to the field of underwater robots, in particular, to a path planning method, underwater robots, electronic equipment and storage media.

背景技术Background technique

利用水下机器人对私人泳池或公共泳池进行清洁能够节省人力,并且相比人力清洁,水下机器人清洁的更为彻底。因此,利用水下机器人代替人力进行泳池清洁势必会成为一种趋势。Using underwater robots to clean private or public swimming pools can save manpower, and compared to manual cleaning, underwater robots clean more thoroughly. Therefore, using underwater robots to replace manpower for swimming pool cleaning is bound to become a trend.

对于清洁机器人,路径规划方法主要包括随机路径法、规则泳池的路径规划方法等,需要清洁机器人根据配置的传感器、工作环境及任务特点不同采取合适的路径规划方法。For cleaning robots, path planning methods mainly include random path methods, path planning methods for regular swimming pools, etc. Cleaning robots need to adopt appropriate path planning methods according to the configured sensors, working environment and task characteristics.

然而,传统水下随机路径法在水下运动是随机的,因此极可能出现较多的清洁死区和较多的重复清洁区域,清洁效率低下,完全无法体现机器人的智能化;而规则泳池的路径规划方法使用范围及场景受到较大限制,仅适用于形状比较规则的泳池,现实中泳池形状千奇百怪,无法适应泳池发展及用户需求,且存在着效率不高的问题。However, the traditional underwater random path method is random in underwater movement, so there are likely to be more cleaning dead zones and more repeated cleaning areas, the cleaning efficiency is low, and it cannot reflect the intelligence of the robot at all; while the regular swimming pool The application range and scenarios of the path planning method are relatively limited, and it is only suitable for swimming pools with relatively regular shapes. In reality, the shapes of swimming pools are various, which cannot adapt to the development of swimming pools and user needs, and there is a problem of low efficiency.

在所述背景技术部分公开的上述信息仅用于加强对本申请的背景的理解,因此它可以包括不构成对本领域普通技术人员已知的现有技术的信息。The above information disclosed in this Background section is only for enhancement of understanding of the background of the application and therefore it may contain information that does not form the prior art that is already known in the art to a person of ordinary skill in the art.

发明内容Contents of the invention

为了解决上述问题,本申请提出一种路径规划方法及水下机器人、电子设备及存储介质。In order to solve the above problems, the present application proposes a path planning method, an underwater robot, an electronic device, and a storage medium.

根据本申请的第一方面,提出一种水下机器人的路径规划方法,所述方法包括:According to the first aspect of the present application, a method for path planning of an underwater robot is proposed, the method comprising:

(a)获取所述水下机器人的初始位置坐标和初始方位角;(a) Obtaining the initial position coordinates and initial azimuth of the underwater robot;

(b)实时获取所述水下机器人的位置坐标和方位角、与当前侧方池壁的第一距离和当前正前方池壁的第二距离;(b) Obtaining the position coordinates and azimuth angle of the underwater robot, the first distance from the current side pool wall and the second distance from the current frontal pool wall in real time;

(c)控制所述水下机器人沿其正前方行进,保持所述水下机器人与当前侧方池壁的第一距离等于第一阈值;(c) Controlling the underwater robot to move straight ahead, keeping the first distance between the underwater robot and the current side pool wall equal to a first threshold;

(d)在实时获取的所述水下机器人的位置坐标与所述初始位置坐标的差值持续第一时间变小,且小于第三阈值,实时获取的方位角与所述初始方位角的差值小于第四阈值的情况下,确定所述水下机器人返回初始点,并执行步骤(f);(d) The difference between the position coordinates of the underwater robot acquired in real time and the initial position coordinates continues to decrease for the first time and is smaller than the third threshold, and the difference between the azimuth angle acquired in real time and the initial azimuth angle When the value is less than the fourth threshold, it is determined that the underwater robot returns to the initial point, and step (f) is performed;

(e)在第二距离小于第二阈值的情况下,控制所述水下机器人以偏离当前侧方池壁的方向旋转第一角度,并执行步骤(c);(e) When the second distance is less than the second threshold, control the underwater robot to rotate by a first angle in a direction deviating from the current side pool wall, and perform step (c);

(f)在所述水下机器人返回所述初始点的情况下,确定所述水下机器人行进一轮,判断所述水下机器人在此轮行进过程中,实时获取的位置坐标中的横坐标的最大值与最小值,或者纵坐标的最大值与最小值中任意一个之差是否小于第五阈值;(f) When the underwater robot returns to the initial point, determine that the underwater robot has traveled one round, and determine the abscissa of the position coordinates obtained in real time by the underwater robot during this round of travel Whether the difference between the maximum value and the minimum value of , or any one of the maximum value and the minimum value of the ordinate is less than the fifth threshold;

(g)在所述横坐标的最大值与最小值,或者纵坐标的最大值与最小值之差均大于第五阈值的情况下,重新设置所述水下机器人的初始位置、所述第一阈值和所述第二阈值,控制所述水下机器人移动至重新设置后的初始位置,并执行步骤(a)。(g) When the difference between the maximum value and the minimum value of the abscissa, or the maximum value and the minimum value of the ordinate is greater than the fifth threshold, reset the initial position of the underwater robot, the first threshold and the second threshold, control the underwater robot to move to a reset initial position, and perform step (a).

根据一些实施例,在所述横坐标的最大值与最小值,或者纵坐标的最大值与最小值中任意一个之差小于等于第五阈值的情况下,控制所述水下机器人停止行进。According to some embodiments, when the difference between the maximum value and the minimum value of the abscissa, or any one of the maximum value and the minimum value of the ordinate is less than or equal to a fifth threshold, the underwater robot is controlled to stop traveling.

根据一些实施例,所述实时获取所述水下机器人的位置坐标和方位角、与当前侧方池壁的第一距离和当前正前方池壁的第二距离,包括:According to some embodiments, the real-time acquisition of the position coordinates and azimuth angle of the underwater robot, the first distance from the current side wall and the second distance from the current front wall includes:

通过所述水下机器人的超声测距,获取所述水下机器人与当前侧方池壁的第一距离和与当前正前方池壁的第二距离:

Figure SMS_1
Figure SMS_2
其中,S1为所述第一距离,S2为所述第二距离,V为水中声速,t0为发射声波信号时刻,t1为接收侧方池壁反射信号时刻,t2为接收正前方池壁反射信号时刻。Through the ultrasonic ranging of the underwater robot, the first distance between the underwater robot and the current side pool wall and the second distance from the current front side pool wall are obtained:
Figure SMS_1
Figure SMS_2
Among them, S1 is the first distance, S2 is the second distance, V is the speed of sound in water, t0 is the time of transmitting the sound wave signal, t1 is the time of receiving the reflected signal from the side pool wall, and t2 is the time of receiving the reflected signal from the front pool wall time.

根据一些实施例,所述水下机器人的位置坐标与所述初始位置坐标的差值和方位角与所述初始方位角的差值的计算方式为:

Figure SMS_3
其中,dz为所述水下机器人的位置坐标与所述初始位置坐标的差值,da为所述方位角与所述初始方位角的差值,x1、y1、a1为实时获取所述水下机器人的位置坐标及方位角,x0、y0、a0为所述水下机器人的初始位置坐标及初始方位角。According to some embodiments, the difference between the position coordinates of the underwater robot and the initial position coordinates and the difference between the azimuth and the initial azimuth are calculated as follows:
Figure SMS_3
Among them, dz is the difference between the position coordinates of the underwater robot and the initial position coordinates, da is the difference between the azimuth and the initial azimuth, and x1, y1, a1 are the real-time acquisition of the underwater robot. The position coordinates and azimuth angles of the robot, x0, y0, a0 are the initial position coordinates and initial azimuth angles of the underwater robot.

根据一些实施例,所述重新设置所述水下机器人的初始位置、所述第一阈值和所述第二阈值,包括:According to some embodiments, the resetting the initial position of the underwater robot, the first threshold and the second threshold includes:

将所述水下机器人沿偏离当前侧方池壁的方向移动第三距离;moving the underwater robot a third distance in a direction away from the current side pool wall;

将所述第一阈值增加第四距离;increasing the first threshold by a fourth distance;

将所述第二阈值增加第五距离。The second threshold is increased by a fifth distance.

根据本申请的第二方面,提出一种水下机器人,用于执行如第一方面中任一项的方法,所述水下机器人包括:According to the second aspect of the present application, an underwater robot is proposed for performing the method according to any one of the first aspect, the underwater robot includes:

超声测距模块,设置于所述水下机器人侧方和正前方,实时获取所述水下机器人的位置坐标,与当前侧方池壁的第一距离和当前正前方池壁的第二距离,获取所述水下机器人的初始位置坐标;The ultrasonic ranging module is arranged on the side and directly in front of the underwater robot, and obtains the position coordinates of the underwater robot in real time, the first distance from the current side pool wall and the second distance from the current front pool wall, and obtains The initial position coordinates of the underwater robot;

控制单元,用于控制所述水下机器人沿其正前方行进,保持所述水下机器人与当前侧方池壁的第一距离等于第一阈值;在所述第二距离小于第二阈值的情况下,控制所述水下机器人以偏离当前侧方池壁的方向旋转第一角度;在实时获取的所述水下机器人的位置坐标与所述初始位置坐标的差值持续第一时间变小,且小于第三阈值的情况下,确定所述水下机器人返回初始点;在所述水下机器人返回所述初始点的情况下,确定所述水下机器人行进一轮,判断所述水下机器人在此轮行进过程中,实时获取的位置坐标中的横坐标的最大值与最小值,或者纵坐标的最大值与最小值中任意一个之差是否小于第五阈值;在所述横坐标的最大值与最小值,或者纵坐标的最大值与最小值中任意一个之差小于等于第五阈值的情况下,控制所述水下机器人停止行进;A control unit, configured to control the underwater robot to move straight ahead and keep the first distance between the underwater robot and the current side pool wall equal to a first threshold; when the second distance is less than a second threshold Next, the underwater robot is controlled to rotate by a first angle in a direction deviating from the current side pool wall; the difference between the position coordinates of the underwater robot acquired in real time and the initial position coordinates continues to decrease for the first time, and is less than the third threshold, it is determined that the underwater robot returns to the initial point; in the case that the underwater robot returns to the initial point, it is determined that the underwater robot has advanced one round, and it is determined that the underwater robot During this round of travel, whether the difference between the maximum value and the minimum value of the abscissa in the real-time acquired position coordinates, or any one of the maximum value and the minimum value of the ordinate is less than the fifth threshold; value and the minimum value, or the difference between any one of the maximum value and the minimum value of the ordinate is less than or equal to the fifth threshold, control the underwater robot to stop advancing;

行进单元,用于接收所述控制单元的指令,控制所述水下机器人沿正前方行进。The traveling unit is configured to receive instructions from the control unit and control the underwater robot to travel straight ahead.

根据一些实施例,所述水下机器人还包括陀螺仪,用于获取所述水下机器人的方位角;According to some embodiments, the underwater robot further includes a gyroscope for acquiring an azimuth of the underwater robot;

所述控制单元还用于在实时获取的所述水下机器人的位置坐标与所述初始位置坐标的差值持续第一时间变小,所述水下机器人的位置坐标与所述初始位置坐标的差值小于第三阈值的情况下,判断方位角与所述初始方位角的差值是否小于第四阈值;在方位角与所述初始方位角的差值小于第四阈值的情况下,确定所述水下机器人返回初始点。The control unit is further configured to reduce the difference between the position coordinates of the underwater robot acquired in real time and the initial position coordinates for the first time, and the difference between the position coordinates of the underwater robot and the initial position coordinates When the difference is less than the third threshold, determine whether the difference between the azimuth and the initial azimuth is less than the fourth threshold; if the difference between the azimuth and the initial azimuth is less than the fourth threshold, determine the The underwater robot returns to the initial point.

根据一些实施例,所述控制单元还用于在所述横坐标的最大值与最小值,或者纵坐标的最大值与最小值之差均大于第五阈值的情况下,重新设置所述水下机器人的初始位置、所述第一阈值和所述第二阈值,控制所述水下机器人移动至重新设置后的初始位置。According to some embodiments, the control unit is further configured to reset the underwater threshold when the difference between the maximum value and the minimum value of the abscissa or the maximum value and the minimum value of the ordinate is greater than a fifth threshold. The initial position of the robot, the first threshold and the second threshold control the underwater robot to move to a reset initial position.

根据本申请的第三方面,提出一种电子设备,包括:According to a third aspect of the present application, an electronic device is proposed, including:

一个或多个处理器;one or more processors;

存储器,用于存储一个或多个程序;memory for storing one or more programs;

当所述一个或多个程序被所述一个或多个处理器执行,使得所述一个或多个处理器执行如第一方面中任一项所述的方法。When the one or more programs are executed by the one or more processors, the one or more processors are made to execute the method according to any one of the first aspect.

根据本申请的第四方面,提出一种计算机可读存储介质,其上存储有计算机程序,所述程序被处理器执行时实现如第一方面中任一所述的方法。According to a fourth aspect of the present application, a computer-readable storage medium is provided, on which a computer program is stored, and when the program is executed by a processor, the method described in any one of the first aspects is implemented.

本申请提出一种路径规划方法及水下机器人、电子设备及存储介质,基于超声波测距模块,沿池壁按照回形路径规划的方法,控制水下机器人由外围向中心行进,提高水下机器人的行进效率,且可避免出现盲区和路径的重复问题,路径规划不受水池形状影响,从而体现水下机器人的智能化;且本申请提供的水下机器人,只需要使用两个超声测距模块,即可实现路径规划,节约设备成本。This application proposes a path planning method, underwater robot, electronic equipment, and storage medium. Based on the ultrasonic ranging module, the underwater robot is controlled to move from the periphery to the center according to the method of planning the loop-shaped path along the pool wall, and the underwater robot is improved. The travel efficiency is high, and the problem of blind spots and path duplication can be avoided, and the path planning is not affected by the shape of the pool, thus reflecting the intelligence of the underwater robot; and the underwater robot provided by this application only needs to use two ultrasonic ranging modules , the path planning can be realized and the equipment cost can be saved.

应当理解的是,以上的一般描述和后文的细节描述仅是示例性的,并不能限制本申请。It is to be understood that both the foregoing general description and the following detailed description are exemplary only and are not restrictive of the application.

附图说明Description of drawings

通过参照附图详细描述其示例实施例,本申请的上述和其它目标、特征及优点将变得更加显而易见。下面描述的附图仅仅是本申请的一些实施例,而不是对本申请的限制。The above and other objects, features and advantages of the present application will become more apparent by describing in detail example embodiments thereof with reference to the accompanying drawings. The drawings described below are only some embodiments of the application, rather than limiting the application.

图1示出一示例性实施例的用于水下机器人的路径规划方法流程图;Fig. 1 shows a flow chart of a path planning method for an underwater robot in an exemplary embodiment;

图2示出一示例性实施例的水下机器人路径规划方法示意图;Fig. 2 shows a schematic diagram of an underwater robot path planning method in an exemplary embodiment;

图3示出一示例性实施例的水下机器人示意图;Fig. 3 shows the schematic diagram of the underwater robot of an exemplary embodiment;

图4示出本申请提供的一种电子设备的结构图。Fig. 4 shows a structural diagram of an electronic device provided by the present application.

具体实施方式Detailed ways

现在将参考附图更全面地描述示例实施例。然而,示例实施例能够以多种形式实施,且不应被理解为限于在此阐述的实施例;相反,提供这些实施例使得本申请将全面和完整,并将示例实施例的构思全面地传达给本领域的技术人员。在图中相同的附图标记表示相同或类似的部分,因而将省略对它们的重复描述。Example embodiments will now be described more fully with reference to the accompanying drawings. Example embodiments may, however, be embodied in many forms and should not be construed as limited to the embodiments set forth herein; rather, these embodiments are provided so that this application will be thorough and complete, and will fully convey the concept of example embodiments to those skilled in the art. The same reference numerals denote the same or similar parts in the drawings, and thus their repeated descriptions will be omitted.

所描述的特征、结构或特性可以以任何合适的方式结合在一个或更多实施例中。在下面的描述中,提供许多具体细节从而给出对本公开的实施例的充分理解。然而,本领域技术人员将意识到,可以实践本公开的技术方案而没有这些特定细节中的一个或更多,或者可以采用其它的方式、组元、材料、装置等。在这些情况下,将不详细示出或描述公知结构、方法、装置、实现、材料或者操作。The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided in order to give a thorough understanding of embodiments of the present disclosure. However, those skilled in the art will appreciate that the technical solutions of the present disclosure may be practiced without one or more of these specific details, or other methods, components, materials, devices, etc. may be used. In these instances, well-known structures, methods, devices, implementations, materials, or operations are not shown or described in detail.

附图中所示的流程图仅是示例性说明,不是必须包括所有的内容和操作/步骤,也不是必须按所描述的顺序执行。例如,有的操作/步骤还可以分解,而有的操作/步骤可以合并或部分合并,因此实际执行的顺序有可能根据实际情况改变。The flow charts shown in the drawings are only exemplary illustrations, and do not necessarily include all contents and operations/steps, nor must they be performed in the order described. For example, some operations/steps can be decomposed, and some operations/steps can be combined or partly combined, so the actual order of execution may be changed according to the actual situation.

本申请的说明书及上述附图中的术语“第一”、“第二”等是用于区别不同对象,而不是用于描述特定顺序。此外,术语“包括”和“具有”以及它们任何变形,意图在于覆盖不排他的包含。例如包含了一系列步骤或单元的过程、方法、系统、产品或设备没有限定于已列出的步骤或单元,而是可选地还包括没有列出的步骤或单元,或可选地还包括对于这些过程、方法、产品或设备固有的其他步骤或单元。The terms "first", "second" and the like in the description of the present application and the above drawings are used to distinguish different objects, rather than to describe a specific order. Furthermore, the terms "include" and "have", as well as any variations thereof, are intended to cover a non-exclusive inclusion. For example, a process, method, system, product or device comprising a series of steps or units is not limited to the listed steps or units, but optionally also includes unlisted steps or units, or optionally further includes For other steps or units inherent in these processes, methods, products or devices.

本领域技术人员可以理解,附图只是示例实施例的示意图,附图中的模块或流程并不一定是实施本申请所必须的,因此不能用于限制本申请的保护范围。Those skilled in the art can understand that the accompanying drawings are only schematic diagrams of exemplary embodiments, and the modules or processes in the accompanying drawings are not necessarily necessary for implementing the present application, and thus cannot be used to limit the protection scope of the present application.

图1示出一示例性实施例的用于水下机器人的路径规划方法流程图。Fig. 1 shows a flowchart of a path planning method for an underwater robot in an exemplary embodiment.

S101,获取水下机器人的初始位置坐标和初始方位角。S101. Obtain the initial position coordinates and initial azimuth of the underwater robot.

根据示例实施例,水下机器人获取初始位置坐标(x0,y0)和初始方位角a0。According to an example embodiment, the underwater robot obtains an initial position coordinate (x0, y0) and an initial azimuth a0.

S102,实时获取水下机器人的位置坐标和方位角、与当前侧方池壁的第一距离和当前正前方池壁的第二距离。S102. Obtain in real time the position coordinates and azimuth angles of the underwater robot, the first distance from the current side pool wall, and the second distance from the current frontal pool wall.

根据示例实施例,在水下机器人行进过程中,实时获取水下机器人的位置坐标(x1,y1)和方位角a1。According to an example embodiment, during the traveling process of the underwater robot, the position coordinates (x1, y1) and the azimuth a1 of the underwater robot are acquired in real time.

根据示例实施例,水下机器人通过超声测距,获取水下机器人与当前侧方池壁的第一距离S1和与当前正前方池壁的第二距离S2:

Figure SMS_4
Figure SMS_5
其中,S1为第一距离,S2为第二距离,V为水中声速,t0为发射声波信号时刻,t1为接收侧方池壁反射信号时刻,t2为接收正前方池壁反射信号时刻。According to an example embodiment, the underwater robot obtains the first distance S1 between the underwater robot and the current side pool wall and the second distance S2 between the current front pool wall and the current front pool wall through ultrasonic ranging:
Figure SMS_4
Figure SMS_5
Among them, S1 is the first distance, S2 is the second distance, V is the speed of sound in water, t0 is the moment of transmitting the sound wave signal, t1 is the moment of receiving the reflected signal from the side pool wall, and t2 is the moment of receiving the reflected signal from the front pool wall.

S103,控制水下机器人沿其正前方行进,保持水下机器人与当前侧方池壁的第一距离等于第一阈值。S103. Control the underwater robot to move forward directly, and keep the first distance between the underwater robot and the current side pool wall equal to the first threshold.

根据示例实施例,预设水下机器人距离侧方池壁的第一阈值为S01,控制水下机器人实时反馈侧方距离,调整水下机器人的运动行进角速度,以保持与当前侧方池壁的第一距离为第一阈值S01,并控制水下机器人沿其正前方行进。According to an exemplary embodiment, the first threshold of the distance between the underwater robot and the side pool wall is S01, and the underwater robot is controlled to feed back the side distance in real time, and the angular velocity of the underwater robot's movement is adjusted to maintain the distance with the current side pool wall. The first distance is the first threshold S01, and the underwater robot is controlled to travel directly in front of it.

S104,判断水下机器人是否返回初始位置。S104, judging whether the underwater robot returns to the initial position.

根据示例实施例,实时获取水下机器人的位置坐标,在其与初始位置坐标的差值持续第一时间变小,且小于第三阈值dz1的情况下,转到S105;若其与初始位置坐标的差值未持续第一时间变小,或者不小于第三阈值的情况下,则转到S109。According to an exemplary embodiment, the position coordinates of the underwater robot are acquired in real time, and when the difference between the underwater robot and the initial position coordinates continues to decrease for the first time and is smaller than the third threshold dz1, go to S105; if it is different from the initial position coordinates If the difference between the values does not decrease for the first time, or is not smaller than the third threshold, go to S109.

根据示例实施例,水下机器人的位置坐标与初始位置坐标的差值的计算方式为:

Figure SMS_6
其中,dz为水下机器人的位置坐标与初始位置坐标的差值,(x1,y1)为实时获取水下机器人的位置坐标,(x0,y0)为水下机器人的初始位置坐标。According to an example embodiment, the calculation method of the difference between the position coordinates of the underwater robot and the initial position coordinates is:
Figure SMS_6
Among them, dz is the difference between the position coordinates of the underwater robot and the initial position coordinates, (x1, y1) is the position coordinates of the underwater robot obtained in real time, and (x0, y0) is the initial position coordinates of the underwater robot.

根据一些实施例,第一时间可以根据实际需要进行设定。例如,第一时间为2s,若在2s内,实时检测到水下机器人的位置坐标与初始位置坐标的差值持续变小,且小于第三阈值dz1,则转到S105。According to some embodiments, the first time may be set according to actual needs. For example, the first time is 2s. If it is detected in real time that the difference between the position coordinates of the underwater robot and the initial position coordinates continues to decrease within 2s and is smaller than the third threshold dz1, go to S105.

S105,判断方位角与初始方位角的差值是否小于第四阈值。S105. Determine whether the difference between the azimuth angle and the initial azimuth angle is smaller than a fourth threshold.

根据示例实施例,在实时获取的水下机器人的位置坐标与初始位置坐标的差值持续第一时间变小,且小于第三阈值的情况下,计算实时获取的方位角与初始方位角的差值:

Figure SMS_7
da为方位角与初始方位角的差值,a1为实时获取水下机器人的方位角,a0为水下机器人的初始方位角。According to an exemplary embodiment, when the difference between the position coordinates of the underwater robot acquired in real time and the initial position coordinates continues to decrease for the first time and is smaller than a third threshold, the difference between the azimuth angle acquired in real time and the initial azimuth angle is calculated value:
Figure SMS_7
da is the difference between the azimuth and the initial azimuth, a1 is the real-time azimuth of the underwater robot, and a0 is the initial azimuth of the underwater robot.

在方位角与初始方位角的差值da小于第四阈值da1的情况下,确定水下机器人返回初始点,并转到S106;若大于等于第四阈值,则转到S109。If the difference da between the azimuth angle and the initial azimuth angle is less than the fourth threshold da1, determine that the underwater robot returns to the initial point, and go to S106; if it is greater than or equal to the fourth threshold, go to S109.

S106,判断水下机器人在此轮行进过程中,实时获取的位置坐标中的横坐标的最大值与最小值,或者纵坐标的最大值与最小值中任意一个之差是否小于第五阈值。S106 , judging whether the difference between the maximum value and the minimum value of the abscissa value, or any one of the maximum value and the minimum value of the ordinate value in the real-time acquired position coordinates of the underwater robot during this round of travel is less than a fifth threshold.

根据示例实施例,在水下机器人返回初始点的情况下,确定水下机器人行进一轮。根据实时获取的水下机器人的位置坐标,选择其中的横坐标最大值xmax与最小值xmin,纵坐标最大值ymax和最小值ymin,计算横坐标最大值与最小值的差值,纵坐标最大值与最小值的差值,判断横坐标的最大值与最小值,或者纵坐标的最大值与最小值中任意一个之差是否小于第五阈值。According to an example embodiment, in a case where the underwater robot returns to an initial point, it is determined that the underwater robot travels one round. According to the position coordinates of the underwater robot acquired in real time, select the maximum value x max and the minimum value x min of the abscissa, the maximum value y max and the minimum value y min of the ordinate, and calculate the difference between the maximum value and the minimum value of the abscissa, The difference between the maximum value and the minimum value of the ordinate determines whether the difference between the maximum value and the minimum value of the abscissa, or any one of the maximum value and the minimum value of the ordinate is smaller than the fifth threshold.

根据示例实施例,在坐标的最大值与最小值,或者纵坐标的最大值与最小值之差均大于第五阈值的情况下,转到S107;在横坐标的最大值与最小值,或者纵坐标的最大值与最小值中任意一个之差小于等于第五阈值的情况下,转到S108。According to an exemplary embodiment, if the difference between the maximum value and the minimum value of the coordinates, or the maximum value and the minimum value of the ordinate is greater than the fifth threshold, go to S107; the maximum value and the minimum value of the abscissa, or If the difference between any one of the maximum and minimum values of the coordinates is less than or equal to the fifth threshold, go to S108.

S107,重新设置水下机器人的初始位置、第一阈值和第二阈值,控制水下机器人移动至重新设置后的初始位置。S107, reset the initial position, the first threshold and the second threshold of the underwater robot, and control the underwater robot to move to the reset initial position.

根据示例实施例,在水下机器人行进一轮后,将水下机器人沿偏离当前侧方池壁的方向移动第三距离;将第一阈值增加第四距离;将第二阈值增加第五距离,如图2所示,将水下机器人从A0点移动至B0点,并转到S103。According to an example embodiment, after the underwater robot travels one round, the underwater robot is moved a third distance in a direction away from the current side pool wall; the first threshold is increased by a fourth distance; the second threshold is increased by a fifth distance, As shown in Figure 2, move the underwater robot from point A0 to point B0, and go to S103.

根据一些实施例,第四距离与第五距离可以相同。According to some embodiments, the fourth distance and the fifth distance may be the same.

S108,控制水下机器人停止行进。S108, controlling the underwater robot to stop traveling.

根据示例实施例,在横坐标的最大值与最小值,或者纵坐标的最大值与最小值中任意一个之差小于等于第五阈值的情况下,证明水下机器人已到达池子中心,控制水下机器人停止行进。According to an exemplary embodiment, when the difference between the maximum value and the minimum value of the abscissa, or the maximum value and the minimum value of the ordinate is less than or equal to the fifth threshold, it is proved that the underwater robot has reached the center of the pool, and the underwater robot is controlled to The robot stops traveling.

S109,判断第二距离是否小于第二阈值。S109. Determine whether the second distance is smaller than a second threshold.

根据示例实施例,预设水下机器人距离正前方池壁的第二阈值为S02,在水下机器人行进过程中,若获取的第二距离小于第二阈值S02,则转到S110;若获取的第二距离大于等于第二阈值,则转到S103。According to an exemplary embodiment, the second threshold value of the distance between the underwater robot and the front pool wall is preset as S02. During the travel of the underwater robot, if the obtained second distance is less than the second threshold S02, then go to S110; if the obtained If the second distance is greater than or equal to the second threshold, go to S103.

S110,控制水下机器人以偏离当前侧方池壁的方向旋转第一角度。S110. Control the underwater robot to rotate by a first angle in a direction deviating from the current side pool wall.

根据示例实施例,在水下机器人距离正前方的第二距离S2小于第二阈值S02的情况下,控制水下机器人以偏离当前侧方池壁的方向旋转第一角度:在水下机器人旋转第一角度后,并转到S103,即仍需要控制水下机器人在行进过程中,其与当前侧方池壁距离为第一阈值。According to an example embodiment, when the second distance S2 from the front of the underwater robot is less than the second threshold S02, the underwater robot is controlled to rotate by a first angle in a direction deviating from the current side pool wall: when the underwater robot rotates for the first After a certain angle, go to S103, that is, it is still necessary to control the distance between the underwater robot and the current side pool wall to be the first threshold during the traveling process.

根据一些实施例,第一角度可以自行设置。According to some embodiments, the first angle can be set by itself.

以图2为例,水下机器人在行进至A1点时,与正前方池壁的距离S2小于第二阈值S02,则控制水下机器人以偏离当前侧方池壁的方向,即向右旋转90°。Taking Figure 2 as an example, when the underwater robot travels to point A1, the distance S2 from the front wall is smaller than the second threshold S02, and the underwater robot is controlled to deviate from the current direction of the side wall, that is, to rotate 90 to the right. °.

本申请提出一种路径规划方法及水下机器人、电子设备及存储介质,基于超声波测距模块,沿池壁按照回形路径规划的方法,控制水下机器人由外围向中心行进,提高水下机器人的行进效率,且可避免出现盲区和路径的重复,不受水池形状影响,体现水下机器人的智能化。This application proposes a path planning method, underwater robot, electronic equipment, and storage medium. Based on the ultrasonic ranging module, the underwater robot is controlled to move from the periphery to the center according to the method of planning the loop-shaped path along the pool wall, and the underwater robot is improved. High travel efficiency, and can avoid blind spots and path repetition, not affected by the shape of the pool, reflecting the intelligence of underwater robots.

图3示出一示例性实施例的水下机器人示意图。Fig. 3 shows a schematic diagram of an underwater robot in an exemplary embodiment.

如图3所示,水下机器人30包括两个超声测距模块3011和超声测距模块3012,控制单元302、行进单元303,其中:As shown in Figure 3, the underwater robot 30 includes two ultrasonic ranging modules 3011 and an ultrasonic ranging module 3012, a control unit 302, and a traveling unit 303, wherein:

超声测距模块3011设置于水下机器人的侧方,用于获取水下机器人与当前侧方池壁的第一距离S1,超声测距模块3012设置于水下机器人的正前方,用于获取水下机器人与当前正前方池壁的第二距离S2。The ultrasonic ranging module 3011 is arranged on the side of the underwater robot for obtaining the first distance S1 between the underwater robot and the current side pool wall, and the ultrasonic ranging module 3012 is arranged directly in front of the underwater robot for obtaining Lower the second distance S2 between the robot and the pool wall directly in front of it.

水下机器人与当前侧方池壁的第一距离S1和与当前正前方池壁的第二距离S2计算方式为:

Figure SMS_8
Figure SMS_9
其中,S1为第一距离,S2为第二距离,V为水中声速,t0为发射声波信号时刻,t1为接收侧方池壁反射信号时刻,t2为接收正前方池壁反射信号时刻。The first distance S1 between the underwater robot and the current side wall and the second distance S2 from the current front wall are calculated as follows:
Figure SMS_8
Figure SMS_9
Among them, S1 is the first distance, S2 is the second distance, V is the speed of sound in water, t0 is the moment of transmitting the sound wave signal, t1 is the moment of receiving the reflected signal from the side pool wall, and t2 is the moment of receiving the reflected signal from the front pool wall.

根据示例实施例,超声测距模块3011和超声测距模块3012还用于获取水下机器人的位置坐标(x1,y1)和初始位置坐标(x0,y0)。According to an example embodiment, the ultrasonic ranging module 3011 and the ultrasonic ranging module 3012 are also used to obtain the position coordinates (x1, y1) and the initial position coordinates (x0, y0) of the underwater robot.

行进单元303,用于接收控制单元302的指令,控制水下机器人沿正前方行进。The traveling unit 303 is configured to receive an instruction from the control unit 302 and control the underwater robot to travel straight ahead.

控制单元302用于控制水下机器人沿其正前方行进的时候,保持水下机器人与当前侧方池壁的第一距离S1等于第一阈值S01,超声测距模块3011实时反馈侧方距离S1,控制单元302控制行进单元303调整水下机器人的运动行进角速度,以保持与当前侧方池壁的第一距离为第一阈值S01,并控制水下机器人沿其正前方行进。The control unit 302 is used to control the underwater robot to keep the first distance S1 between the underwater robot and the current side pool wall equal to the first threshold S01 when the underwater robot travels directly in front of it, and the ultrasonic ranging module 3011 feeds back the side distance S1 in real time, The control unit 302 controls the traveling unit 303 to adjust the angular velocity of the underwater robot to keep the first distance from the current side wall at the first threshold S01, and controls the underwater robot to move forward.

根据示例实施例,在超声测距模块3012实时获取的第二距离S2小于第二阈值S02的情况下,控制单元302输出控制指令至行进单元303,控制水下机器人以偏离当前侧方池壁的方向旋转第一角度。According to an exemplary embodiment, when the second distance S2 obtained by the ultrasonic distance measuring module 3012 in real time is less than the second threshold S02, the control unit 302 outputs a control instruction to the traveling unit 303 to control the underwater robot to deviate from the current distance of the side pool wall. The orientation is rotated by the first angle.

根据示例实施例,在超声测距模块3011和超声测距模块3012实时获取的水下机器人的位置坐标(x1,y1)与初始位置坐标(x0,y0)的差值持续第一时间变小,且小于第三阈值dz1的情况下,确定水下机器人返回初始点。According to an example embodiment, the difference between the position coordinates (x1, y1) of the underwater robot acquired in real time by the ultrasonic ranging module 3011 and the ultrasonic ranging module 3012 and the initial position coordinates (x0, y0) becomes smaller for the first time, and is less than the third threshold dz1, it is determined that the underwater robot returns to the initial point.

根据示例实施例,水下机器人还包括陀螺仪304,用于获取水下机器人的初始方位角a0和方位角a1:According to an example embodiment, the underwater robot further includes a gyroscope 304 for obtaining the initial azimuth a0 and azimuth a1 of the underwater robot:

在实时获取的水下机器人的位置坐标与初始位置坐标的差值持续第一时间变小,水下机器人的位置坐标与初始位置坐标的差值小于第三阈值的情况下,控制单元302还用于判断方位角与初始方位角的差值是否小于第四阈值;在方位角a1与初始方位角a0的差值小于第四阈值da1的情况下,确定水下机器人返回初始点。When the difference between the position coordinates of the underwater robot acquired in real time and the initial position coordinates continues to decrease for the first time, and the difference between the position coordinates of the underwater robot and the initial position coordinates is smaller than the third threshold, the control unit 302 also uses Determine whether the difference between the azimuth angle and the initial azimuth angle is less than the fourth threshold; if the difference between the azimuth angle a1 and the initial azimuth angle a0 is less than the fourth threshold da1, determine that the underwater robot returns to the initial point.

在水下机器人返回初始点的情况下,控制单元302确定水下机器人行进一轮,并根据实时获取的水下机器人的位置坐标,选择其中的横坐标最大值xmax与最小值xmin,纵坐标最大值ymax和最小值ymin,计算横坐标最大值与最小值的差值,纵坐标最大值与最小值的差值。判断水下机器人在此轮行进过程中,实时获取的位置坐标中的横坐标的最大值与最小值,或者纵坐标的最大值与最小值中任意一个之差是否小于第五阈值。When the underwater robot returns to the initial point, the control unit 302 determines that the underwater robot has traveled one round, and selects the maximum value x max and the minimum value x min of the abscissa and x min of the vertical coordinate according to the position coordinates of the underwater robot acquired in real time. Coordinate maximum value y max and minimum value y min , calculate the difference between the maximum value and the minimum value of the abscissa, and the difference between the maximum value and the minimum value of the ordinate. It is judged whether the difference between the maximum value and the minimum value of the abscissa value, or the maximum value and the minimum value of the ordinate value in the real-time acquired position coordinates of the underwater robot during this round of travel is less than the fifth threshold.

在横坐标的最大值与最小值,或者纵坐标的最大值与最小值中任意一个之差小于等于第五阈值的情况下,控制单元302输出控制指令至行进单元303,控制水下机器人停止行进。In the case where the difference between the maximum value and the minimum value of the abscissa, or any one of the maximum value and the minimum value of the ordinate is less than or equal to the fifth threshold, the control unit 302 outputs a control command to the travel unit 303 to control the underwater robot to stop. .

在横坐标的最大值与最小值,或者纵坐标的最大值与最小值之差均大于第五阈值的情况下,控制单元302重新设置水下机器人的初始位置,将水下机器人沿偏离当前侧方池壁的方向移动第三距离;重新设置第一阈值和第二阈值,将第一阈值增加第四距离;将第二阈值增加第五距离;并输出控制指令至行进单元303,控制水下机器人移动至重新设置后的初始位置。When the difference between the maximum value and the minimum value of the abscissa, or the maximum value and the minimum value of the ordinate is greater than the fifth threshold, the control unit 302 resets the initial position of the underwater robot, and moves the underwater robot away from the current side. Move the third distance in the direction of the square pool wall; reset the first threshold and the second threshold, increase the first threshold by the fourth distance; increase the second threshold by the fifth distance; and output control instructions to the traveling unit 303 to control the underwater The robot moves to the reset initial position.

根据一些实施例,第四距离与第五距离可以相同。According to some embodiments, the fourth distance and the fifth distance may be the same.

本申请提出一种路径规划方法及水下机器人、电子设备及存储介质,基于超声波测距模块,沿池壁按照回形路径规划的方法,只需要使用两个超声测距模块,即可实现路径规划,节约设备成本。This application proposes a path planning method, underwater robot, electronic equipment, and storage medium. Based on the ultrasonic ranging module, the method of planning along the pool wall according to the circular path only needs to use two ultrasonic ranging modules to realize the path. Planning, saving equipment costs.

图4示出本申请提供的一种电子设备的结构图。Fig. 4 shows a structural diagram of an electronic device provided by the present application.

参阅图4,图4提供一种电子设备40,包括处理器401以及存储器402。存储器402存储有计算机指令,当计算机指令被处理器401执行时,使得处理器401执行所述计算机指令从而实现如图1所示的方法以及细化方案,并经通信模块403收发数据。Referring to FIG. 4 , FIG. 4 provides an electronic device 40 including a processor 401 and a memory 402 . The memory 402 stores computer instructions. When the computer instructions are executed by the processor 401 , the processor 401 executes the computer instructions to realize the method and detailed scheme shown in FIG. 1 , and send and receive data via the communication module 403 .

应该理解,上述的装置实施例仅是示意性的,本发明披露的装置还可通过其它的方式实现。例如,上述实施例中所述单元/模块的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。例如,多个单元、模块或组件可以结合,或者可以集成到另一个系统,或一些特征可以忽略或不执行。It should be understood that the above device embodiments are only illustrative, and the device disclosed in the present invention can also be implemented in other ways. For example, the division of units/modules in the above embodiments is only a logical function division, and there may be other division methods in actual implementation. For example, several units, modules or components may be combined, or may be integrated into another system, or some features may be omitted or not implemented.

另外,若无特别说明,在本发明各个实施例中的各功能单元/模块可以集成在一个单元/模块中,也可以是各个单元/模块单独物理存在,也可以两个以上单元/模块集成在一起。上述集成的单元/模块既可以采用硬件的形式实现,也可以采用软件程序模块的形式实现。In addition, unless otherwise specified, each functional unit/module in each embodiment of the present invention may be integrated into one unit/module, each unit/module may exist separately physically, or more than two units/modules may be integrated in one Together. The above-mentioned integrated units/modules can be implemented in the form of hardware or in the form of software program modules.

所述集成的单元/模块如果以硬件的形式实现时,该硬件可以是数字电路,模拟电路等等。硬件结构的物理实现包括但不局限于晶体管,忆阻器等等。若无特别说明,所述处理器或芯片可以是任何适当的硬件处理器,比如CPU、GPU、FPGA、DSP和ASIC等等。若无特别说明,所述片上缓存、片外内存、存储器可以是任何适当的磁存储介质或者磁光存储介质,比如,阻变式存储器RRAM(Resistive Random Access Memory)、动态随机存取存储器DRAM(Dynamic Random Access Memory)、静态随机存取存储器SRAM(Static Random-AccessMemory)、增强动态随机存取存储器EDRAM(Enhanced Dynamic Random Access Memory)、高带宽内存HBM(High-Bandwidth Memory)、混合存储立方 HMC(Hybrid Memory Cube)等等。If the integrated unit/module is implemented in the form of hardware, the hardware may be a digital circuit, an analog circuit, or the like. Physical implementations of hardware structures include, but are not limited to, transistors, memristors, and so on. Unless otherwise specified, the processor or chip may be any appropriate hardware processor, such as CPU, GPU, FPGA, DSP, ASIC and so on. Unless otherwise specified, the on-chip cache, off-chip memory, and storage may be any suitable magnetic storage medium or magneto-optical storage medium, such as a resistive random access memory (RRAM), a dynamic random access memory (DRAM) Dynamic Random Access Memory), Static Random-Access Memory SRAM (Static Random-Access Memory), Enhanced Dynamic Random-Access Memory EDRAM (Enhanced Dynamic Random Access Memory), High-Bandwidth Memory HBM (High-Bandwidth Memory), Hybrid Storage Cube HMC ( Hybrid Memory Cube) and so on.

所述集成的单元/模块如果以软件程序模块的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储器中。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储器中,包括若干指令用以使得一台计算机设备(可为个人计算机、服务器或者网络设备等)执行本披露各个实施例所述方法的全部或部分步骤。而前述的存储器包括:U盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、移动硬盘、磁碟或者光盘等各种可以存储程序代码的介质。If the integrated unit/module is realized in the form of a software program module and sold or used as an independent product, it can be stored in a computer-readable memory. Based on this understanding, the essence of the technical solution of the present invention or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a memory. Several instructions are included to make a computer device (which may be a personal computer, server or network device, etc.) execute all or part of the steps of the methods described in the various embodiments of the present disclosure. The aforementioned memory includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk and other media that can store program codes.

本申请实施例还提供一种非瞬时性计算机存储介质,存储有计算机程序,当所述计算机程序被多个处理器执行时,使得所述处理器执行如图1所示的方法以及细化方案。The embodiment of the present application also provides a non-transitory computer storage medium, which stores a computer program, and when the computer program is executed by multiple processors, the processors execute the method and refinement scheme as shown in Figure 1 .

应清楚地理解,本申请描述了如何形成和使用特定示例,但本申请不限于这些示例的任何细节。相反,基于本申请公开的内容的教导,这些原理能够应用于许多其它实施例。It should be clearly understood that the application describes how to make and use specific examples, but the application is not limited to any details of these examples. Rather, these principles can be applied to many other embodiments based on the teachings of the present disclosure.

此外,需要注意的是,上述附图仅是根据本申请示例性实施例的方法所包括的处理的示意性说明,而不是限制目的。易于理解,上述附图所示的处理并不表明或限制这些处理的时间顺序。另外,也易于理解,这些处理可以是例如在多个模块中同步或异步执行的。In addition, it should be noted that the above figures are only schematic illustrations of the processing included in the method according to the exemplary embodiments of the present application, and are not intended to be limiting. It is easy to understand that the processes shown in the above figures do not imply or limit the chronological order of these processes. In addition, it is also easy to understand that these processes may be executed synchronously or asynchronously in multiple modules, for example.

以上具体地示出和描述了本申请的示例性实施例。应可理解的是,本申请不限于这里描述的详细结构、设置方式或实现方法;相反,本申请意图涵盖包含在所附权利要求的精神和范围内的各种修改和等效设置。Exemplary embodiments of the present application have been specifically shown and described above. It should be understood that the application is not limited to the detailed structures, arrangements or methods of implementation described herein; on the contrary, this application is intended to cover various modifications and equivalent arrangements included within the spirit and scope of the appended claims.

Claims (10)

1.一种水下机器人的路径规划方法,其特征在于,所述方法包括:1. a path planning method for underwater robot, it is characterized in that, described method comprises: (a)获取所述水下机器人的初始位置坐标和初始方位角;(a) Obtaining the initial position coordinates and initial azimuth of the underwater robot; (b)实时获取所述水下机器人的位置坐标和方位角、与当前侧方池壁的第一距离和当前正前方池壁的第二距离;(b) Obtaining the position coordinates and azimuth angle of the underwater robot, the first distance from the current side pool wall and the second distance from the current frontal pool wall in real time; (c)控制所述水下机器人沿其正前方行进,保持所述水下机器人与当前侧方池壁的第一距离等于第一阈值;(c) Controlling the underwater robot to move straight ahead, keeping the first distance between the underwater robot and the current side pool wall equal to a first threshold; (d)在实时获取的所述水下机器人的位置坐标与所述初始位置坐标的差值持续第一时间变小,且小于第三阈值,实时获取的方位角与所述初始方位角的差值小于第四阈值的情况下,确定所述水下机器人返回初始点,并执行步骤(f);(d) The difference between the position coordinates of the underwater robot acquired in real time and the initial position coordinates continues to decrease for the first time and is smaller than the third threshold, and the difference between the azimuth angle acquired in real time and the initial azimuth angle When the value is less than the fourth threshold, it is determined that the underwater robot returns to the initial point, and step (f) is performed; (e)在第二距离小于第二阈值的情况下,控制所述水下机器人以偏离当前侧方池壁的方向旋转第一角度,并执行步骤(c);(e) When the second distance is less than the second threshold, control the underwater robot to rotate by a first angle in a direction deviating from the current side pool wall, and perform step (c); (f)在所述水下机器人返回所述初始点的情况下,确定所述水下机器人行进一轮,判断所述水下机器人在此轮行进过程中,实时获取的位置坐标中的横坐标的最大值与最小值,或者纵坐标的最大值与最小值中任意一个之差是否小于第五阈值;(f) When the underwater robot returns to the initial point, determine that the underwater robot has traveled one round, and determine the abscissa of the position coordinates obtained in real time by the underwater robot during this round of travel Whether the difference between the maximum value and the minimum value of , or any one of the maximum value and the minimum value of the ordinate is less than the fifth threshold; (g)在所述横坐标的最大值与最小值,或者纵坐标的最大值与最小值之差均大于第五阈值的情况下,重新设置所述水下机器人的初始位置、所述第一阈值和所述第二阈值,控制所述水下机器人移动至重新设置后的初始位置,并执行步骤(a)。(g) When the difference between the maximum value and the minimum value of the abscissa, or the maximum value and the minimum value of the ordinate is greater than the fifth threshold, reset the initial position of the underwater robot, the first threshold and the second threshold, control the underwater robot to move to a reset initial position, and perform step (a). 2.如权利要求1所述的路径规划方法,其特征在于,在所述横坐标的最大值与最小值,或者纵坐标的最大值与最小值中任意一个之差小于等于第五阈值的情况下,控制所述水下机器人停止行进。2. The path planning method according to claim 1, wherein the difference between the maximum value and the minimum value of the abscissa or any one of the maximum value and the minimum value of the ordinate is less than or equal to the fifth threshold Next, control the underwater robot to stop advancing. 3.如权利要求1所述的路径规划方法,其特征在于,所述实时获取所述水下机器人的位置坐标和方位角、与当前侧方池壁的第一距离和当前正前方池壁的第二距离,包括:3. The path planning method according to claim 1, wherein the real-time acquisition of the position coordinates and the azimuth angle of the underwater robot, the first distance with the current side pool wall and the current distance from the current front pool wall Second distance, including: 通过所述水下机器人的超声测距,获取所述水下机器人与当前侧方池壁的第一距离和与当前正前方池壁的第二距离:
Figure QLYQS_1
Figure QLYQS_2
其中,S1为所述第一距离,S2为所述第二距离,V为水中声速,t0为发射声波信号时刻,t1为接收侧方池壁反射信号时刻,t2为接收正前方池壁反射信号时刻。
Through the ultrasonic ranging of the underwater robot, the first distance between the underwater robot and the current side pool wall and the second distance from the current front side pool wall are obtained:
Figure QLYQS_1
Figure QLYQS_2
Among them, S1 is the first distance, S2 is the second distance, V is the speed of sound in water, t0 is the time of transmitting the sound wave signal, t1 is the time of receiving the reflected signal from the side pool wall, and t2 is the time of receiving the reflected signal from the front pool wall time.
4.如权利要求1所述的路径规划方法,其特征在于,所述水下机器人的位置坐标与所述初始位置坐标的差值和方位角与所述初始方位角的差值的计算方式为:
Figure QLYQS_3
其中,dz为所述水下机器人的位置坐标与所述初始位置坐标的差值,da为所述方位角与所述初始方位角的差值,x1、y1、a1为实时获取所述水下机器人的位置坐标及方位角,x0、y0、a0为所述水下机器人的初始位置坐标及初始方位角。
4. path planning method as claimed in claim 1, is characterized in that, the position coordinate of described underwater robot and the difference of described initial position coordinate and the calculation method of the difference of azimuth and described initial azimuth are: :
Figure QLYQS_3
Among them, dz is the difference between the position coordinates of the underwater robot and the initial position coordinates, da is the difference between the azimuth and the initial azimuth, and x1, y1, a1 are the real-time acquisition of the underwater robot. The position coordinates and azimuth angles of the robot, x0, y0, a0 are the initial position coordinates and initial azimuth angles of the underwater robot.
5.如权利要求1所述的路径规划方法,其特征在于,所述重新设置所述水下机器人的初始位置、所述第一阈值和所述第二阈值,包括:5. The path planning method according to claim 1, wherein said resetting the initial position of said underwater vehicle, said first threshold and said second threshold comprises: 将所述水下机器人沿偏离当前侧方池壁的方向移动第三距离;moving the underwater robot a third distance in a direction away from the current side pool wall; 将所述第一阈值增加第四距离;increasing the first threshold by a fourth distance; 将所述第二阈值增加第五距离。The second threshold is increased by a fifth distance. 6.一种水下机器人,其特征在于,用于执行如权利要求1-5中任一项的方法,所述水下机器人包括:6. An underwater robot, characterized in that, for performing the method according to any one of claims 1-5, said underwater robot comprises: 超声测距模块,设置于所述水下机器人侧方和正前方,实时获取所述水下机器人的位置坐标,与当前侧方池壁的第一距离和当前正前方池壁的第二距离,获取所述水下机器人的初始位置坐标;The ultrasonic ranging module is arranged on the side and directly in front of the underwater robot, and obtains the position coordinates of the underwater robot in real time, the first distance from the current side pool wall and the second distance from the current front pool wall, and obtains The initial position coordinates of the underwater robot; 控制单元,用于控制所述水下机器人沿其正前方行进,保持所述水下机器人与当前侧方池壁的第一距离等于第一阈值;在所述第二距离小于第二阈值的情况下,控制所述水下机器人以偏离当前侧方池壁的方向旋转第一角度;在实时获取的所述水下机器人的位置坐标与所述初始位置坐标的差值持续第一时间变小,且小于第三阈值的情况下,确定所述水下机器人返回初始点;在所述水下机器人返回所述初始点的情况下,确定所述水下机器人行进一轮,判断所述水下机器人在此轮行进过程中,实时获取的位置坐标中的横坐标的最大值与最小值,或者纵坐标的最大值与最小值中任意一个之差是否小于第五阈值;在所述横坐标的最大值与最小值,或者纵坐标的最大值与最小值中任意一个之差小于等于第五阈值的情况下,控制所述水下机器人停止行进;A control unit, configured to control the underwater robot to move straight ahead and keep the first distance between the underwater robot and the current side pool wall equal to a first threshold; when the second distance is less than a second threshold Next, the underwater robot is controlled to rotate by a first angle in a direction deviating from the current side pool wall; the difference between the position coordinates of the underwater robot acquired in real time and the initial position coordinates continues to decrease for the first time, and is less than the third threshold, it is determined that the underwater robot returns to the initial point; in the case that the underwater robot returns to the initial point, it is determined that the underwater robot has advanced one round, and it is determined that the underwater robot During this round of travel, whether the difference between the maximum value and the minimum value of the abscissa in the real-time acquired position coordinates, or any one of the maximum value and the minimum value of the ordinate is less than the fifth threshold; value and the minimum value, or the difference between any one of the maximum value and the minimum value of the ordinate is less than or equal to the fifth threshold, control the underwater robot to stop advancing; 行进单元,用于接收所述控制单元的指令,控制所述水下机器人沿正前方行进。The traveling unit is configured to receive instructions from the control unit and control the underwater robot to travel straight ahead. 7.如权利要求6所述的水下机器人,其特征在于,所述水下机器人还包括陀螺仪,用于获取所述水下机器人的方位角;7. underwater robot as claimed in claim 6, is characterized in that, described underwater robot also comprises gyroscope, is used for obtaining the azimuth angle of described underwater robot; 所述控制单元还用于在实时获取的所述水下机器人的位置坐标与所述初始位置坐标的差值持续第一时间变小,所述水下机器人的位置坐标与所述初始位置坐标的差值小于第三阈值的情况下,判断方位角与所述初始方位角的差值是否小于第四阈值;在方位角与所述初始方位角的差值小于第四阈值的情况下,确定所述水下机器人返回初始点。The control unit is further configured to reduce the difference between the position coordinates of the underwater robot acquired in real time and the initial position coordinates for the first time, and the difference between the position coordinates of the underwater robot and the initial position coordinates When the difference is less than the third threshold, determine whether the difference between the azimuth and the initial azimuth is less than the fourth threshold; if the difference between the azimuth and the initial azimuth is less than the fourth threshold, determine the The underwater robot returns to the initial point. 8.如权利要求6所述的水下机器人,其特征在于,所述控制单元还用于在所述横坐标的最大值与最小值,或者纵坐标的最大值与最小值之差均大于第五阈值的情况下,重新设置所述水下机器人的初始位置、所述第一阈值和所述第二阈值,控制所述水下机器人移动至重新设置后的初始位置。8. The underwater robot according to claim 6, wherein the control unit is further configured to have a difference between the maximum value and the minimum value of the abscissa or the maximum value of the ordinate and the minimum value greater than the first In the case of five thresholds, reset the initial position of the underwater robot, the first threshold and the second threshold, and control the underwater robot to move to the reset initial position. 9.一种电子设备,其特征在于,包括:9. An electronic device, characterized in that it comprises: 一个或多个处理器;one or more processors; 存储器,用于存储一个或多个程序;memory for storing one or more programs; 当所述一个或多个程序被所述一个或多个处理器执行,使得所述一个或多个处理器执行如权利要求1-5中任一项所述的方法。When the one or more programs are executed by the one or more processors, the one or more processors are made to execute the method according to any one of claims 1-5. 10.一种计算机可读存储介质,其上存储有计算机程序,其特征在于,所述程序被处理器执行时实现如权利要求1-5中任一所述的方法。10. A computer-readable storage medium, on which a computer program is stored, wherein, when the program is executed by a processor, the method according to any one of claims 1-5 is implemented.
CN202310658883.4A 2023-06-06 2023-06-06 Path planning methods and underwater robots, electronic equipment and storage media Active CN116400711B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202310658883.4A CN116400711B (en) 2023-06-06 2023-06-06 Path planning methods and underwater robots, electronic equipment and storage media
PCT/CN2023/100333 WO2024250324A1 (en) 2023-06-06 2023-06-15 Path planning method, underwater robot, electronic device, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310658883.4A CN116400711B (en) 2023-06-06 2023-06-06 Path planning methods and underwater robots, electronic equipment and storage media

Publications (2)

Publication Number Publication Date
CN116400711A true CN116400711A (en) 2023-07-07
CN116400711B CN116400711B (en) 2023-10-03

Family

ID=87016437

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310658883.4A Active CN116400711B (en) 2023-06-06 2023-06-06 Path planning methods and underwater robots, electronic equipment and storage media

Country Status (2)

Country Link
CN (1) CN116400711B (en)
WO (1) WO2024250324A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2025124194A1 (en) * 2023-12-13 2025-06-19 天津望圆智能科技股份有限公司 Pool cleaning robot control method, and apparatus

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN119493426B (en) * 2025-01-07 2025-03-21 深圳市元鼎智能创新有限公司 Automatic pool cleaning device, control method and computer storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040167667A1 (en) * 2002-12-17 2004-08-26 Goncalves Luis Filipe Domingues Systems and methods for filtering potentially unreliable visual data for visual simultaneous localization and mapping
CN102083352A (en) * 2008-04-24 2011-06-01 进展机器人有限公司 Application of localization, positioning & navigation systems for robotic enabled mobile products
CN102799180A (en) * 2012-07-26 2012-11-28 杭州高越科技有限公司 Walking control method and device of cleaning machine
CN106708040A (en) * 2016-12-09 2017-05-24 重庆长安汽车股份有限公司 Sensor module of automatic driving system, automatic driving system and automatic driving method
CN114531903A (en) * 2020-08-31 2022-05-24 苏州珊口智能科技有限公司 Traveling control method and path planning method for mobile robot and mobile robot
CN115047893A (en) * 2022-06-13 2022-09-13 深圳众清人居科技有限公司 Underwater robot path planning method based on ultrasonic radar and underwater robot

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110018686A (en) * 2019-03-26 2019-07-16 宁波大叶园林设备股份有限公司 A kind of paths planning method of intelligent grass-removing
CN115191868B (en) * 2021-04-09 2024-06-14 美智纵横科技有限责任公司 Edge cleaning method and cleaning robot
CN113610944B (en) * 2021-07-30 2024-06-14 新线科技有限公司 Line drawing method, device, equipment and storage medium
CN114442642B (en) * 2022-04-02 2022-07-15 深圳市普渡科技有限公司 Path planning method, path planning device, computer equipment and storage medium
CN114779779B (en) * 2022-04-26 2025-05-23 深圳市普渡科技有限公司 Path planning method, device, computer equipment and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040167667A1 (en) * 2002-12-17 2004-08-26 Goncalves Luis Filipe Domingues Systems and methods for filtering potentially unreliable visual data for visual simultaneous localization and mapping
CN102083352A (en) * 2008-04-24 2011-06-01 进展机器人有限公司 Application of localization, positioning & navigation systems for robotic enabled mobile products
CN102799180A (en) * 2012-07-26 2012-11-28 杭州高越科技有限公司 Walking control method and device of cleaning machine
CN106708040A (en) * 2016-12-09 2017-05-24 重庆长安汽车股份有限公司 Sensor module of automatic driving system, automatic driving system and automatic driving method
CN114531903A (en) * 2020-08-31 2022-05-24 苏州珊口智能科技有限公司 Traveling control method and path planning method for mobile robot and mobile robot
CN115047893A (en) * 2022-06-13 2022-09-13 深圳众清人居科技有限公司 Underwater robot path planning method based on ultrasonic radar and underwater robot

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2025124194A1 (en) * 2023-12-13 2025-06-19 天津望圆智能科技股份有限公司 Pool cleaning robot control method, and apparatus

Also Published As

Publication number Publication date
WO2024250324A1 (en) 2024-12-12
CN116400711B (en) 2023-10-03

Similar Documents

Publication Publication Date Title
CN116400711B (en) Path planning methods and underwater robots, electronic equipment and storage media
CN112581613B (en) Grid map generation method, system, electronic equipment and storage medium
US11877716B2 (en) Determining region attribute
CN109241552B (en) A Motion Planning Method for Underwater Robot Based on Multiple Constraints
CN107752927B (en) Block adjusting method, device and equipment of cleaning robot and storage medium
CN111152266B (en) A kind of control method and system of cleaning robot
CN107462892A (en) Mobile robot synchronous superposition method based on more sonacs
CN109814557A (en) A Global Planner-led Robot Path Planning Method
CN109709945A (en) A path planning method, device and robot based on obstacle classification
WO2024012152A1 (en) Path planning method and apparatus for swimming pool cleaning robot
CN111272183A (en) Map creating method and device, electronic equipment and storage medium
CN114431771B (en) Sweeping method of sweeping robot and related device
CN105068550A (en) Auction mode-based underwater robot multi-target selection strategy
CN115248042A (en) Planning method and device for cleaning path
CN117103259A (en) Target following method, device, removable following equipment and storage medium
CN112237403A (en) Covering path generation method for cleaning device and cleaning device
CN112489131B (en) Method, device, medium and robot for constructing cost map based on pavement detection
CN113119995B (en) Path searching method and device, equipment and storage medium
CN117109597B (en) Unmanned plane path planning method and device based on improved A star algorithm
CN112068547A (en) Robot positioning method and device based on AMCL and robot
CN117694791A (en) Sweeper cleaning control method, device, storage medium and intelligent robot
CN118068834A (en) Path planning method, path planning device, vehicle and storage medium
CN105373123A (en) High-efficiency barrier avoidance method based on binary index calculation
CN111220943A (en) Positioning method, positioning system, computer-readable storage medium and vehicle
WO2024037036A1 (en) Trap escape method and apparatus for robot, and processor and robot

Legal Events

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