Path planning method and device, robot, medium and product
By expanding the radius of the inscribed circle and optimizing the orientation angle of non-circular robots, the problems of low coverage and collision risk in path planning of non-circular robots are solved, achieving more efficient path coverage and safety.
Patent Information
- Application Number
- CN202511325216.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-17
- Publication Date
- 2025-11-28
- Estimated Expiration
- 2045-09-17
AI Technical Summary
In existing technologies, non-circular robots, due to the expansion of the circumscribed circle radius during path planning, suffer from low coverage and collision risks, and cannot effectively cover narrow areas.
By analyzing the robot's geometry, expanding it using the radius of its inscribed circle, and optimizing the orientation angle based on the robot's geometric model, we can ensure that the robot can cover more narrow areas and avoid collisions.
It improves the coverage of non-circular robots, ensures path coverage, and enhances robot safety by preventing collisions with the environment.
Smart Images

Figure CN120828422B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of artificial intelligence, and in particular to a path planning method and device, a robot, a medium and a product. BACKGROUND
[0002] Full coverage path planning refers to planning a path for a robot in a working area to ensure that all reachable areas can be covered while avoiding collision with obstacles. The full coverage path planning method is usually implemented based on C-Space (Configuration Space), and the core idea is to model the robot as a circle and inflate the obstacles by the circumscribed radius to ensure that the robot will not collide with the obstacles during movement.
[0003] However, this method is only applicable to circular robots, and for non-circular robots such as rectangular or polygonal chassis robots, inflating by the circumscribed radius will excessively expand the obstacle area, resulting in the robot being unable to cover some narrow areas and causing low coverage. SUMMARY
[0004] The embodiments of the present application provide a path planning method, device, robot, medium and product to improve the coverage of non-circular robots and ensure safety.
[0005] In a first aspect, the embodiments of the present application provide a path planning method, the method comprising:
[0006] inflating obstacles in a working space map according to a full coverage distance parameter of the robot to determine an initial path of the robot, the full coverage distance parameter being associated with a geometric model of the robot;
[0007] determining the nearest obstacle for each pose in the initial path;
[0008] optimizing the orientation angle in at least part of the poses in the initial path according to the nearest obstacle for each pose and the geometric model of the robot.
[0009] In a possible implementation, optimizing the orientation angle in at least part of the poses in the initial path according to the nearest obstacle for each pose and the geometric model of the robot comprises:
[0010] calculating the distance between each pose and the nearest obstacle, and taking the pose with a distance less than a preset distance as a target pose;
[0011] determining the relative positional relationship between the robot and the nearest obstacle when the robot is in the target pose according to the geometric model of the robot;
[0012] optimizing the orientation angle in the target pose according to the relative positional relationship.
[0013] In a possible implementation, the relative position relationship between the robot and the nearest obstacle when the robot is in the target pose is determined according to the geometric model of the robot, and includes:
[0014] The first position coordinates of the nearest obstacle of the target pose are converted into the robot coordinate system to obtain second position coordinates of the nearest obstacle;
[0015] The relative position relationship between the robot and the nearest obstacle point when the robot is in each pose is determined according to the second position coordinates of the nearest obstacle and the geometric model of the robot.
[0016] In a possible implementation, the relative position relationship includes a relative direction and a relative distance, and the relative distance is a distance between the nearest obstacle and the geometric model; and the orientation angle in the target pose is optimized according to the relative position relationship, including:
[0017] An initial optimized orientation angle of the target pose is determined according to the relative direction in the relative position relationship;
[0018] The orientation angle in each pose is taken as a vertex, and an obstacle edge is formed based on the relative distance, and the initial optimized orientation angle of the target pose is secondarily optimized to obtain a target optimized orientation angle of the target pose.
[0019] In a possible implementation, the method further includes:
[0020] A velocity edge is formed with an angular velocity of each two adjacent poses, and / or an acceleration edge is formed with an acceleration of each three adjacent poses;
[0021] The orientation angle in each pose is taken as a vertex, and the initial optimized orientation angle of the target pose is secondarily optimized based on the obstacle edge, the velocity edge and / or the acceleration edge to obtain a target optimized orientation angle of the target pose.
[0022] In a possible implementation, the nearest obstacle of each pose in the initial path is determined, including:
[0023] The nearest obstacle of each pose is determined according to the first position coordinates of the center point of the robot in each pose and the first position coordinates of all obstacles.
[0024] In a second aspect, an embodiment of the present application provides a path planning device, and the device includes:
[0025] A first determination module is configured to dilate the obstacles in the workspace map according to a full coverage distance parameter of the robot to determine an initial path of the robot, and the full coverage distance parameter is associated with a geometric model of the robot.
[0026] a second determining module configured to determine a nearest obstacle of each pose in the initial path;
[0027] an angle optimizing module configured to optimize a heading angle in at least part of the poses in the initial path according to the nearest obstacle of each pose and a geometric model of the robot.
[0028] In a third aspect, an embodiment of the present application provides a computer device, including a memory and a processor, the memory storing computer execution instructions, and the processor executing the computer execution instructions stored in the memory, so that the processor executes the first aspect and / or various possible implementation manners of the first aspect.
[0029] In a fourth aspect, an embodiment of the present application provides a computer readable storage medium, the computer readable storage medium storing computer execution instructions, and the computer execution instructions being executed by a processor to implement the first aspect and / or various possible implementation manners of the first aspect.
[0030] In a fifth aspect, an embodiment of the present application provides a computer program product, including a computer program, the computer program being executed by a processor to implement the first aspect and / or various possible implementation manners of the first aspect.
[0031] In a sixth aspect, an embodiment of the present application provides a robot, including a controller, the controller being configured to execute the first aspect and / or various possible implementation manners of the first aspect.
[0032] The path planning method, device, robot, medium and product provided by the embodiments of the present application are applied to a movable robot, and the method includes: performing inflation on obstacles in a work space map according to a full coverage distance parameter of the robot, determining an initial path of the robot, and associating the full coverage distance parameter with a geometric model of the robot; determining a nearest obstacle of each pose in the initial path; and optimizing a heading angle in at least part of the poses in the initial path according to the nearest obstacle of each pose and the geometric model of the robot. The embodiments of the present application analyze the geometric shape of the robot, perform inflation by using an inscribed circle radius, so that the robot can cover more narrow areas and ensure the coverage rate of the path; then, the relative position relationship with the obstacles is analyzed in combination with the geometric model of the robot, the heading angle of the robot is optimized, so that the robot does not collide with the environment, and the safety of the robot is further improved. BRIEF DESCRIPTION OF DRAWINGS
[0033] The accompanying drawings, which are incorporated herein and form part of the specification, illustrate embodiments consistent with the present application and, together with the description, further serve to explain the principles of the application.
[0034] Figure 1 A robot geometric model diagram provided by the embodiments of the present application;
[0035] Figure 2 A flowchart of the path planning method provided in the present application Figure 1 ;
[0036] Figure 3 A schematic diagram of the workspace area provided in the present application
[0037] Figure 4 A flowchart of the path planning method provided in the present application Figure 2 ;
[0038] Figure 5 A flowchart of the path planning method provided in the present application Figure 3 ;
[0039] Figure 6 A schematic diagram of the relative position relationship between the robot and the obstacle provided in the present application
[0040] Figure 7 A schematic diagram of the structure of the path planning device provided in the present application
[0041] Figure 8 A schematic diagram of the structure of the computer device provided in the present application.
[0042] The specific embodiments of the present application have been shown through the above-described drawings, and will be described in more detail hereinafter. These drawings and the written description are not intended to restrict the scope of the present application concept in any way, but to illustrate the present application concept to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION
[0043] The exemplary embodiments will be described in detail herein with reference to the attached drawings. In the following description, the same numbers are used to indicate the same or similar components. The embodiments described in the following exemplary embodiments do not represent all the embodiments consistent with the present application. Instead, they only represent examples of devices and methods consistent with some aspects of the present application, as detailed in the appended claims.
[0044] In the description of the present application, the terms "first", "second" are used only for the purpose of description, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined with "first", "second" can explicitly or implicitly include one or more of the features. In the description of the present application, the meaning of "a plurality of" is two or more, unless otherwise specifically limited.
[0045] Full coverage path planning refers to planning a path for a robot in a working area to ensure that all reachable areas can be covered while avoiding collision with obstacles. The full coverage path planning method is usually implemented based on C-Space (Configuration Space), and the core idea is to model the robot as a circle and inflate the obstacles by the circumscribed radius to ensure that the robot will not collide with the obstacles during movement.
[0046] However, this method is only applicable to circular robots, and for non-circular robots such as robots with rectangular or polygonal chassis, inflating with the circumscribed radius will excessively expand the obstacle area. As shown in Figure 1 , the circumscribed radius R of the robot 100 is the distance from the center point of the robot 100 to the four corners, which will be greater than the distance from the center point to the four sides. If the circumscribed radius R of the rectangle is used to inflate the obstacle, the edges of the four sides of the robot 100 chassis cannot approach the obstacle as much as possible, resulting in the robot being unable to cover some narrow areas, causing low coverage.
[0047] To solve the above technical problems, the path planning method provided by the present application is applied to a mobile robot, especially a non-circular robot such as a non-circular cleaning robot, an automatic car washing robot, an automatic lawn mowing robot, a spraying robot, etc. The path planning method provided by the present application can be used in the scenario of planning a driving path before the robot works, and can also be applied to a robot in motion to update the driving path in real time. The present application analyzes the geometric shape of the robot, inflates with the inscribed radius, so that the robot can cover more narrow areas and ensure the coverage rate of the path; then, in combination with the geometric model of the robot, the relative position relationship with the obstacle is analyzed, and the orientation angle of the robot is optimized to ensure that the robot will not collide with the environment, further improving the safety of the robot.
[0048] The path planning method provided by the present application will be described below taking the scenario of path planning before application as an example.
[0049] In one of the embodiments, as shown in Figure 2 , the path planning method comprises:
[0050] Step 201, according to the full coverage distance parameter of the robot, inflating the obstacles in the working space map to determine the initial path of the robot, the full coverage distance parameter being associated with the geometric model of the robot;
[0051] The workspace map is a map of a real space in which the robot works, and includes a working area of the robot, such as a target cleaning area of a sweeping robot or a cleaning area of a car washing robot. The workspace map can be a two-dimensional map or a three-dimensional map. The workspace map includes obstacles in the working environment of the robot, such as a grid map in which the positions of obstacles (black grids) and free spaces (white grids) are marked, and the free spaces include the working area of the robot.
[0052] The initial path is a full coverage path of the robot planned based on the working area, and is a sequence composed of a series of poses, wherein the value of the first pose is determined by the number of poses in the initial path. is a point in space, that is, a position, is a yaw angle. The pose represents that the robot is in the pose of and faces .
[0053] The full coverage distance parameter is a parameter required for generating the full coverage path, and the full coverage path is generated by inflating the obstacle based on the full coverage distance parameter. In the embodiments of the present application, the setting of the full coverage distance parameter mainly considers the coverage rate of the path, to ensure that the initial path of the robot can cover the working area as much as possible. The full coverage distance parameter is determined by the geometric model of the robot, and further, the geometric model of the robot includes a robot chassis model or a projection model of the projection shape of the whole robot on the working surface, which can reflect the outline of the robot in the real world. Based on the chassis model or the projection model, the full coverage path parameter is determined.
[0054] For a non-circular robot, the full coverage distance parameter can be determined based on the distance between the edge of the chassis and the center point. For example, an intermediate value is determined according to the maximum distance and the minimum distance as the full coverage distance parameter. At this time, compared with the minimum distance, there is a certain area that cannot be covered, but compared with the maximum distance, there is a certain safety, but the collision of the edge at the maximum distance cannot be avoided.
[0055] In one of the embodiments, the radius r of the inscribed circle of the chassis shape or the projection shape is taken as the full coverage distance parameter. For example, Figure 1 For a robot with a rectangular chassis, the radius *r* of the inscribed circle of the rectangle is used as the full coverage distance parameter. Then, the obstacles in the workspace map are expanded. If the workspace map is a grid map, for each obstacle grid cell, a circle of radius *r* is drawn centered on that cell, and all grid cells covered by this circle are marked as new obstacles. After expansion, a C-Space map is obtained. Then, based on the C-Space map, a path that can cover the entire free area, i.e., the initial path, is planned.
[0056] It should be noted that the orientation angle of each pose in the initial path is undetermined or temporarily determined; for example, the orientation angle of each pose is the direction from this pose to the next pose. When expanding based on the inscribed circle radius r, the expansion of obstacles will actually shrink, such as... Figure 1 In the real world, if a robot with a rectangular chassis moves with its shorter side parallel to an obstacle, the actual distance between its center point and obstacle 200 when approaching obstacle 200 is r1. r1 is the safe distance, but r < r1, so a collision is possible. To ensure the robot's safety and prevent its vulnerable areas, such as side sensors, from colliding with obstacles, the robot's heading angle should be adjusted to face a safe direction.
[0057] Step 202: Determine the nearest obstacle for each pose in the initial path;
[0058] The nearest obstacle in each pose refers to the obstacle closest to the robot when it is in that pose. The nearest obstacle is typically determined by the robot's center point. The distance between the obstacle and the robot's center point can be calculated based on the workspace map or C-Space map to determine the nearest obstacle.
[0059] In the initial trajectory determined based on the C-Space map, each pose In Since this is the robot's center point, the nearest obstacle can be directly determined based on the C-Space map. In one embodiment, determining the nearest obstacle for each pose in the initial path includes:
[0060] Based on the first position coordinates of the robot's center point in each pose and the first position coordinates of all obstacles, determine the nearest obstacle in each pose.
[0061] The first position coordinate is the position coordinate in the C-Space map, indicating the robot's pose. The first position coordinates of the time center point are The initial coordinates of the obstacle can be obtained directly from the map. The distance between two points is calculated using the formula... The distance between the first position coordinate of each obstacle and the position coordinate of each pose.
[0062] In step 203, the orientation angle of at least part of the poses in the initial path is optimized according to the closest obstacle of each pose and the geometric model of the robot.
[0063] The closest obstacle of each pose is the obstacle that is most likely to collide with the robot when the robot is in the pose, and the orientation angle of the robot needs to be adjusted to keep the vulnerable surface of the robot, such as the side sensor, away from the obstacle. For a non-circular robot, since it does not have complete symmetry, when the inscribed circle radius is used for obstacle inflation, the robot will inevitably collide with the obstacle, so the positional relationship between the robot and the obstacle needs to be analyzed to adjust the orientation angle.
[0064] Specifically, the relative positional relationship between the robot and the closest obstacle in the real world when the robot is in each pose can be analyzed through the geometric model of the robot, and then the orientation angle of the robot when it is in the pose is optimized based on the relative positional relationship. For example, if the geometric model of the robot is a rectangle, the closest distance and angle between the closest obstacle and the outline of the robot are calculated to adjust the orientation angle of the robot.
[0065] It should be noted that when the robot moves in the middle of the working area away from the obstacle, since the distance from the robot to the obstacle is far, no matter which direction the robot faces, no collision will occur. Therefore, when optimizing the orientation angle, only the poses with safety hazards can be optimized. For example, for a cleaning robot, its cleaning area is a polygon, as shown in Figure 3 There is no obstacle in the middle area S1 of the polygon, and the distance between the obstacle and the robot is much larger than the size of the robot itself when the robot is in any position in the middle area S1, so the orientation angle does not matter and no collision will occur. There is an obstacle in the upper left corner of the polygon, and the robot may collide in the obstacle periphery and the boundary area S2 (the dashed part) of the cleaning area, so the orientation angle needs to be adjusted.
[0066] Specifically, the working space map can be divided into a safe area and a dangerous area through the geometric model of the robot and the position of the obstacle. For the poses in the dangerous area, the orientation angle is optimized, and for the poses in the safe area, the orientation angle can be optimized or not. The number of times of optimization of the orientation angle in this application can include multiple times, so the number of times of optimization of the orientation angle of the poses in different areas can be different. For example, in the initial optimization, the orientation angle of all poses is optimized, and in the secondary optimization, only the poses in the dangerous area can be optimized.
[0067] In one embodiment, the initial optimized orientation angle of each pose is determined by optimizing the orientation angle of each pose based on the relative position relationship between the robot and the nearest obstacle when the robot is in each pose through the geometric model of the robot. Then, the motion constraint condition is determined based on the poses in the dangerous area, and the initial optimized orientation angle of each pose is further optimized to ensure safety or make the motion of the robot smoother. For example, the secondary optimization can use an online optimization method based on model predictive control, and generate an optimized local trajectory of the position and orientation angle in line based on the global path, the current obstacle, and the accurate dynamics model of the robot.
[0068] In the method provided in the above embodiments, the robot can cover more narrow areas and ensure the coverage rate of the path by analyzing the geometric shape of the robot and inflating the inscribed circle radius. Then, the orientation angle of the robot is optimized based on the relative position relationship between the robot and the obstacle based on the geometric model of the robot, so that the robot will not collide with the environment, and the safety of the robot is further improved.
[0069] In one embodiment, as shown in FIG. 1, the orientation angle of at least part of the poses in the initial path is optimized according to the nearest obstacle of each pose and the geometric model of the robot, including: Figure 4
[0070] Step 401, the distance between each pose and the nearest obstacle is calculated, and the pose with a distance less than a preset distance is taken as a target pose;
[0071] Step 402, the relative position relationship between the robot and the nearest obstacle when the robot is in the target pose is determined based on the geometric model of the robot;
[0072] Step 403, the orientation angle in the target pose is optimized according to the relative position relationship.
[0073] The preset distance is a safe distance of the robot, and the obstacle outside the preset distance is absolutely safe for the robot. The preset distance is determined based on the geometric model of the robot, and the preset distance is determined by the maximum distance between the center point and the edge of the robot. For example, in one embodiment, the circumscribed circle radius of the robot chassis can be directly taken as the preset distance, or the circumscribed circle radius can be appropriately adjusted, and a value slightly larger than the circumscribed circle radius can be taken as the preset distance.
[0074] A target pose refers to a pose requiring orientation angle optimization, and is at least a portion of the pose in the initial path. Based on the above explanation, a target pose is understood to be a pose located within a danger zone. In some embodiments, after determining the nearest obstacle based on the distance between the robot's center point and the obstacle at each pose, the distance to the nearest obstacle can be directly used to determine whether it belongs to the target pose, without needing to divide the workspace map into safe and dangerous areas. In the embodiments of this application, the number of target poses is typically multiple.
[0075] For the target pose, based on the robot's geometric model, the relative positional relationship with the nearest obstacle is determined, and the orientation angle in the target pose is optimized. Optimizing the orientation angle of the target pose primarily requires considering the relationship between the robot and the nearest obstacle when in the target pose, to ensure the robot's safety while in the target pose. The determination of the target pose can also be used in global optimization, where the distance between the target pose and the nearest obstacle is used as a constraint for optimization.
[0076] In the method provided in the above embodiments, by specifically analyzing the distance between each pose and the nearest obstacle, the target pose that must be optimized for orientation angle in the initial path is determined, and the orientation angle of the target pose is precisely adjusted to ensure safety.
[0077] In one embodiment, such as Figure 5 As shown, based on the robot's geometric model, the relative positional relationship between the robot and the nearest obstacle when the robot is in the target pose is determined, including:
[0078] Step 501: Transform the first position coordinates of the nearest obstacle in the target pose to the robot coordinate system to obtain the second position coordinates of the nearest obstacle;
[0079] Step 502: Based on the second position coordinates of the nearest obstacle and the robot's geometric model, determine the relative positional relationship between the robot and the nearest obstacle point when the robot is in each pose.
[0080] Among them, the robot coordinate system This refers to a coordinate system constructed with the robot itself as a reference. The origin of the robot's coordinate system is always at the robot's center, and the direction is usually the robot's forward direction (directly forward). Positive axis direction, left side is The positive direction of the axis is upward. The positive axis. In contrast, the coordinate system of the workspace map is the image coordinate system. Image coordinate system It is a global reference frame used to describe the absolute position of all objects (including the robot itself, obstacles, and target points) in the global environment.
[0081] The second position coordinates refer to the position coordinates of the nearest obstacle in the robot's coordinate system. The second position coordinates represent the relative position of the nearest obstacle from the robot's perspective, such as being to the left or right front of the robot. When analyzing the relative positional relationship with the nearest obstacle from the robot's perspective, in conjunction with the robot's geometric model, it is necessary to convert the obstacle's first position coordinates to second position coordinates.
[0082] When transforming the first position coordinates of the nearest obstacle in the target pose to the robot coordinate system, it is necessary to combine the robot's first position coordinates and its orientation angle in the target pose for the transformation. First, the origin of the image coordinate system needs to be translated to the robot's origin to eliminate the absolute position difference between the robot and the obstacle; then, the translated point is rotated around the robot's origin based on the robot's orientation angle to eliminate the influence of the robot's orientation, thus obtaining the second position coordinates of the nearest obstacle in the robot coordinate system.
[0083] Then, using the second position coordinates and the robot coordinate system, the relative positional relationship between the nearest obstacle point and the robot is obtained. This relative positional relationship includes relative direction and relative distance. In this application, the actual distance refers to the distance between the obstacle and the robot in the real world, that is, the minimum distance between the obstacle and the robot's edge. For example, based on the robot's front (… The angle between the vector formed by the positive axis and the second position coordinates of the nearest obstacle. This represents the relative direction of the nearest obstacle to the robot. In one embodiment, it can be represented by an angle. Determine the initial optimized orientation angle for the target pose.
[0084] The relative distance is determined by calculating the distance between the nearest obstacle and each edge in the robot's geometric model. Specifically, the nearest distance to each edge is first determined using the distances between points, and then the minimum of the nearest distances to all edges is taken as the relative distance.
[0085] In the above embodiments, the relative positional relationships are determined by coordinate transformation and the robot's geometric model. At this point, the robot is no longer considered a simple point, but rather the relative positional relationship between the robot as a whole and the nearest obstacle is analyzed when the robot is in the target pose, including relative direction and relative distance. This reflects the real-world positional relationship between the robot and obstacles.
[0086] In one embodiment, the relative positional relationship includes relative direction and relative distance, where the relative distance is the distance between the nearest obstacle and the geometric model; optimizing the orientation angle in the target pose based on the relative positional relationship includes:
[0087] Determine the initial optimized orientation angle of the target pose based on the relative direction in the relative position relationship;
[0088] Using the orientation angle in each pose as a vertex, and constructing obstacle edges based on relative distances, the initial optimized orientation angle of the target pose is further optimized to obtain the target optimized orientation angle of the target pose.
[0089] Based on the relative direction, the robot's orientation angle is adjusted to keep it as far away from the nearest obstacle as possible. The core idea is to position the robot with its safest or least sensitive side, such as its widest side, facing the nearest obstacle. This maximizes maneuverability in narrow areas or when close to obstacles and reduces the risk of collision. Therefore, based on this core idea, the relative direction of the nearest obstacle has a target value—that is, the direction the nearest obstacle should be in relative to the robot. Since the obstacle cannot move, adjusting the robot's orientation angle changes the relative direction between the robot and the nearest obstacle.
[0090] In one embodiment, the robot's geometry is a rectangle with a length of 2 and a width of 1, where the longer side (with a unit length of 2) is the side face. Figure 6 As shown, the target pose is At this moment, the robot's orientation is global. Positive axis direction. Assume the first position coordinates of the nearest obstacle, Obs1, are... So, in the robot coordinate system ( The second position coordinates under ) are .rectangle The coordinates of the vertices in the robot coordinate system are as follows: , , , .
[0091] exist Figure 6 In the middle, the polar angle of the nearest obstacle Obs1 in the robot coordinate system (Representing relative direction). If the robot's side needs to face the nearest obstacle, that is, the line connecting the robot's center point and the nearest obstacle Obs1 is perpendicular to the long side, then the nearest obstacle Obs1 should be in the normal direction of the long side. Above, the normal of the longer side points to positive axis direction or In the negative direction of the axis. Taking the positive axis direction as an example, The obstacle Obs1 recently needs to be rotated. That is, rotating counterclockwise by 45° is required to achieve the desired effect. However, since the obstacle cannot be moved, the robot needs to rotate clockwise by 45° to achieve the same effect. , Initially optimize the orientation angle. The robot after changing the orientation angle. The position of the robot is shown as Figure 6
[0092] In the secondary optimization, a graph optimization problem is constructed, taking the initial optimized orientation angle in each pose as a vertex, and constructing an obstacle edge by the distance between the target pose and the nearest obstacle, so as to minimize the distance to the nearest obstacle, and optimizing the initial optimized orientation angle.
[0093] Specifically, a unary edge is created for the target pose, and the edge only connects one vertex. The cost function is set as:
[0094] ;
[0095] wherein, represents the nearest distance between the nearest obstacle point and the polygon boundary of the robot, that is, the relative distance.
[0096] In the method provided by the above embodiment, the collision caused by the inflation of the inscribed circle radius is eliminated through twice optimization adjustment, and safety is ensured.
[0097] In one of the embodiments, the method further comprises:
[0098] A velocity edge is constructed by the angular velocity of each adjacent two poses, and / or an acceleration edge is constructed by the acceleration of each adjacent three poses;
[0099] The orientation angle in each pose is taken as a vertex, and the initial optimized orientation angle of the target pose is secondarily optimized based on the obstacle edge, the velocity edge and / or the acceleration edge, to obtain the target optimized orientation angle of the target pose.
[0100] The angular velocity of each adjacent two poses is the changing speed of the orientation angle when the robot moves from one pose to another, that is, the angular velocity of rotation. For each two adjacent poses on the path, a binary edge is created, and the edge connects and The velocity edge is used to ensure smooth turning.
[0101] The acceleration edge is used to make the acceleration (angular acceleration) of the robot when turning as small as possible. The sudden start or stop of the turning action is avoided, the motion is smoother, and the mechanical stress is reduced. The creation of the acceleration edge requires three adjacent poses, and a ternary edge is created, and the edge connects , and .
[0102] In the method provided by the above embodiment, the velocity and acceleration of the robot are considered in the graph optimization, the obstacle edge is combined, and the safety of the robot, the smoothness of the turning and the fluency of the action are ensured.
[0103] It should be noted that the above graph optimization algorithm can be used for secondary optimization of the initial optimization orientation angle of each pose in the initial path.
[0104] A specific embodiment is given below, the path planning method comprises:
[0105] Based on the geometric model of the robot, the inscribed circle radius of the robot is determined;
[0106] According to the inscribed circle radius, a C-Space map is calculated to obtain an initial path;
[0107] For each pose in the initial path, the corresponding nearest obstacle is determined, and the pose with a distance greater than a preset distance from the nearest obstacle is taken as a target pose;
[0108] By each pose and its corresponding nearest obstacle, in combination with the geometric model of the robot, the relative position relationship between the robot and the nearest obstacle when the robot is in each pose is determined, so as to determine the initial optimization orientation angle of each pose;
[0109] A graph optimization problem is constructed: taking the initial optimization orientation angle of each pose as a vertex, creating an obstacle edge between each target pose and the nearest obstacle, creating a velocity edge between each adjacent two poses, and creating an acceleration edge between each adjacent three poses;
[0110] The above defined graph (including the initial optimization orientation angle of each pose, the obstacle edge, the velocity edge and the acceleration edge) is input into a graph optimization solver to obtain a target optimization orientation angle of each pose;
[0111] The target optimization orientation angle of each pose is assigned to the initial path to obtain an optimized full coverage path.
[0112] The method provided by the above embodiment is based on the inscribed circle radius for inflation, ensures the coverage rate of the path, and ingeniously uses the graph optimization framework to fuse multiple competing targets (coverage, safety, and motion performance) in robot motion planning into a mathematical problem for solving, so that a path with better comprehensive performance can be obtained.
[0113] It should be understood that although the steps in the flowcharts involved in the above embodiments are shown in sequence according to the arrows, the steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified herein, the execution of the steps is not strictly limited in sequence, and the steps can be executed in other orders. Moreover, at least some of the steps in the flowcharts involved in the above embodiments can include multiple steps or multiple stages, which are not necessarily executed at the same time, but can be executed at different times, and the execution order of the steps or stages is not necessarily sequential, but can be alternately or alternately executed with at least part of other steps or steps or stages in other steps.
[0114] Based on the same inventive concept, the embodiments of the present application also provide a path planning device, which provides a solution to the problem similar to the implementation scheme described in the above method, so the specific limitations in one or more path planning device embodiments provided below can refer to the limitations of the path planning method in the above text, which will not be repeated here.
[0115] In one embodiment, as shown in Figure 7 The path planning device includes a first determination module 701, a second determination module 702, and an angle optimization module 703, wherein:
[0116] The first determination module 701 is configured to dilate the obstacles in the workspace map according to the full coverage distance parameter of the robot to determine an initial path of the robot, and the full coverage distance parameter is associated with the geometric model of the robot.
[0117] The second determination module 702 is configured to determine the nearest obstacle of each pose in the initial path.
[0118] The angle optimization module 703 is configured to optimize the orientation angle of at least part of the poses in the initial path according to the nearest obstacle of each pose and the geometric model of the robot.
[0119] In one possible implementation, the angle optimization module 703 is specifically configured to:
[0120] Calculate the distance between each pose and the nearest obstacle, and take the pose with a distance less than a preset distance as a target pose;
[0121] According to the geometric model of the robot, determine the relative position relationship between the robot in the target pose and the nearest obstacle;
[0122] According to the relative position relationship, optimize the orientation angle of the target pose.
[0123] In one possible implementation, the angle optimization module 703 is specifically configured to:
[0124] convert the first position coordinates of the nearest obstacle of the target pose to the robot coordinate system to obtain second position coordinates of the nearest obstacle;
[0125] determine, according to the second position coordinates of the nearest obstacle and the geometric model of the robot, a relative position relationship between the robot and the nearest obstacle point when the robot is in each pose.
[0126] In a possible implementation, the relative position relationship includes a relative direction and a relative distance, and the relative distance is a distance between the nearest obstacle and the geometric model; the angle optimization module 703 is specifically configured to:
[0127] determine an initial optimized orientation angle of the target pose according to the relative direction in the relative position relationship;
[0128] take the orientation angle in each pose as a vertex, and construct an obstacle edge based on the relative distance, to perform secondary optimization on the initial optimized orientation angle of the target pose, to obtain a target optimized orientation angle of the target pose.
[0129] In a possible implementation, the angle optimization module 703 is specifically configured to:
[0130] construct a velocity edge with an angular velocity of each adjacent two poses, and / or construct an acceleration edge with an acceleration of each adjacent three poses;
[0131] take the orientation angle in each pose as a vertex, and construct an obstacle edge, a velocity edge and / or an acceleration edge based on the obstacle edge, the velocity edge and / or the acceleration edge, to perform secondary optimization on the initial optimized orientation angle of the target pose, to obtain a target optimized orientation angle of the target pose.
[0132] In a possible implementation, the second determination module 702 is specifically configured to:
[0133] determine the nearest obstacle of each pose according to the first position coordinates of the center point and the first position coordinates of all obstacles when the robot is in each pose.
[0134] Each module in the path planning apparatus can be implemented wholly or partially by software, hardware and combinations thereof. Each module can be embedded in or independent of a processor in the computer device in a hardware form, or can be stored in a memory in the computer device in a software form, so as to be called and executed by the processor to perform operations corresponding to each module.
[0135] Figure 8 The structure schematic diagram of the computer device provided in the present application is shown in FIG. 1. As shown in FIG. 1, the computer device includes a processor 101 and a memory 102. Figure 8As shown, the computer device 80 provided by the embodiment includes at least one processor 801 and a memory 802. Optionally, the device 80 further includes a communication component 803. Wherein, the processor 801, the memory 802 and the communication component 803 are connected through a bus 804.
[0136] In the process of implementation, the at least one processor 801 executes the computer execution instructions stored in the memory 802, so that the at least one processor 801 executes the above-mentioned method.
[0137] The specific implementation process of the processor 801 can refer to the above-mentioned method embodiment, which has similar implementation principles and technical effects, and will not be described here in detail.
[0138] In the above-mentioned embodiment, it should be understood that the processor can be a central processing unit (English: Central Processing Unit, for short: CPU), and can also be other general-purpose processors, digital signal processors (English: Digital Signal Processor, for short: DSP), application specific integrated circuits (English: Application Specific Integrated Circuit, for short: ASIC) and the like. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor and the like. The steps of the method disclosed in the application can be directly embodied as the execution of the hardware processor, or executed by the combination of hardware and software modules in the processor.
[0139] The memory can contain a high-speed memory (Random Access Memory, RAM), and can also include a non-volatile memory (Non-volatile Memory, NVM), for example, at least one disk memory.
[0140] The bus can be an industry standard architecture (Industry Standard Architecture, ISA) bus, a peripheral component (Peripheral Component, PCI) bus or an extended industry standard architecture (Extended Industry Standard Architecture, EISA) bus and the like. The bus can be divided into an address bus, a data bus, a control bus and the like. For the convenience of representation, the bus in the drawings of the present application does not limit only one bus or one type of bus.
[0141] The application also provides a robot, which comprises a controller configured to perform the steps of the above method. The robot herein can be a cleaning robot, such as a sweeping robot, a window cleaning robot, or a cleaning device with a non-circular chassis; an industrial robot, such as an automatic car washing robot, a warehouse AGV (Automatic Guided Vehicle), etc.; an agricultural robot, such as an automatic mower, a spraying robot, etc.; or a service robot, such as a hotel delivery robot, a hospital disinfection robot, etc., without limitation.
[0142] The application also provides a computer program product comprising a computer program which, when executed by a processor, implements the above method.
[0143] The application also provides a computer-readable storage medium having stored computer-executable instructions which, when executed by a processor, implement the above method.
[0144] The above computer-readable storage medium can be implemented by any type of volatile or non-volatile storage devices or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk or optical disk. The computer-readable storage medium can be any available medium accessible by a general or special purpose computer.
[0145] An exemplary computer-readable storage medium is coupled to the processor, so that the processor can read information from the computer-readable storage medium and write information to the computer-readable storage medium. Of course, the computer-readable storage medium can also be an integral part of the processor. The processor and the computer-readable storage medium can be located in an application specific integrated circuit (ASIC). Of course, the processor and the computer-readable storage medium can also exist as discrete components in a device.
[0146] The division of units is only a logical functional division, and in actual implementation, there can be another division manner, for example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the units or components shown or discussed can be indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0147] The units described as separate components may or may not be physically separate, and the components displayed as units may or may not be physical units, i.e., may be located in one place, or may be distributed to multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the embodiment scheme.
[0148] In addition, each functional unit in various embodiments of the application can be integrated into one processing unit, or each unit can exist physically, or two or more units can be integrated into one unit.
[0149] If the function is realized in the form of a software function unit and sold or used as an independent product, it can be stored in a computer readable storage medium. Based on this understanding, the technical solutions of the application essentially or the part that contributes to the prior art or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a number of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the various embodiment methods of the application. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk or an optical disk, and various media that can store program codes.
[0150] Those skilled in the art can understand that all or part of the steps of the above-mentioned method embodiments can be completed by program instruction related hardware. The aforementioned program can be stored in a computer readable storage medium. The program executes to perform the steps of the above-mentioned method embodiments; and the aforementioned storage medium includes: ROM, RAM, magnetic disk or optical disk, and various media that can store program codes.
[0151] Finally, it should be noted that those skilled in the art, after considering the specification and practicing the application disclosed herein, will easily think of other embodiments of the application. The application is intended to cover any variations, uses, or adaptations of the application that follow the general principles of the application and include common knowledge or conventional techniques in the art that are not disclosed by the application, and is not limited to the precise structure described above and shown in the drawings, and various modifications and changes can be made without departing from the scope thereof. The scope of the application is only limited by the appended claims.
Claims
1. A path planning method characterized by, The method comprises: According to the full coverage distance parameter of the robot, the obstacles in the workspace map are inflated to determine the initial path of the robot, the full coverage distance parameter is associated with the geometric model of the robot, the full coverage distance parameter is a parameter required to generate a full coverage path, and the setting of the full coverage distance parameter considers the coverage rate of the path to ensure that the initial path of the robot can cover the working area as much as possible; Determine the nearest obstacle of each pose in the initial path; According to the nearest obstacle of each pose and the geometric model of the robot, the orientation angle of at least part of the poses in the initial path is optimized; According to the nearest obstacle of each pose and the geometric model of the robot, the orientation angle of at least part of the poses in the initial path is optimized; Calculate the distance between each pose and the nearest obstacle, and take the pose with a distance less than a preset distance as a target pose; According to the geometric model of the robot, determine the relative position relationship between the robot and the nearest obstacle when the robot is in the target pose; According to the relative position relationship, the orientation angle of the target pose is optimized; The relative position relationship includes relative direction and relative distance, and the relative distance is the distance between the nearest obstacle and the geometric model; according to the relative position relationship, the orientation angle of the target pose is optimized, which comprises: According to the relative direction in the relative position relationship, determine the initial optimized orientation angle of the target pose; Take the orientation angle in each pose as a vertex, and based on the relative distance, form an obstacle edge to perform secondary optimization on the initial optimized orientation angle of the target pose to obtain a target optimized orientation angle of the target pose.
2. The method of claim 1, wherein, According to the geometric model of the robot, determine the relative position relationship between the robot and the nearest obstacle when the robot is in the target pose, which comprises: Convert the first position coordinates of the nearest obstacle of the target pose to the robot coordinate system to obtain the second position coordinates of the nearest obstacle; According to the second position coordinates of the nearest obstacle and the geometric model of the robot, determine the relative position relationship between the robot and the nearest obstacle point when the robot is in each pose.
3. The method of claim 1, wherein, The method further comprises: Form a velocity edge with the angular velocity of each adjacent two poses, and / or form an acceleration edge with the acceleration of each adjacent three poses; Take the orientation angle in each pose as a vertex, and based on the obstacle edge, the velocity edge and / or the acceleration edge, perform secondary optimization on the initial optimized orientation angle of the target pose to obtain a target optimized orientation angle of the target pose.
4. The method of claim 1, wherein, The determination of the nearest obstacle of each pose in the initial path comprises: According to the first position coordinates of the center point of the robot in each pose and the first position coordinates of all obstacles, determine the nearest obstacle of each pose.
5. A route planning apparatus characterized by comprising: The device comprises: The first determining module is used to expand the obstacles in the workspace map according to the robot's full coverage distance parameter to determine the robot's initial path. The full coverage distance parameter is associated with the robot's geometric model and is a parameter required to generate a full coverage path. The setting of the full coverage distance parameter takes into account the path coverage rate to ensure that the robot's initial path can cover the work area as much as possible. The second determining module is used to determine the nearest obstacle for each pose in the initial path; An angle optimization module is used to optimize the orientation angle in at least some poses of the initial path based on the nearest obstacle in each pose and the geometric model of the robot. The step of optimizing the orientation angle in at least a portion of the poses in the initial path based on the nearest obstacle for each pose and the robot's geometric model includes: Calculate the distance between each pose and the nearest obstacle, and take the pose with the distance less than a preset distance as the target pose; Based on the robot's geometric model, determine the relative positional relationship between the robot and the nearest obstacle when the robot is in the target pose; Based on the relative positional relationship, optimize the orientation angle in the target pose; The relative positional relationship includes relative direction and relative distance, where the relative distance is the distance between the nearest obstacle and the geometric model; optimizing the orientation angle in the target pose based on the relative positional relationship includes: Based on the relative directions in the relative positional relationship, determine the initial optimized orientation angle of the target pose; Using the orientation angle in each pose as a vertex, and constructing obstacle edges based on the relative distance, the initial optimized orientation angle of the target pose is further optimized to obtain the target optimized orientation angle of the target pose.
6. A computer device, comprising: include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory to implement the method as described in any one of claims 1 to 4.
7. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the method as described in any one of claims 1 to 4.
8. A computer program product, characterised in that, Includes a computer program that, when executed by a processor, implements the method as described in any one of claims 1 to 4.
9. A robot, characterized in that The robot includes a controller for performing the method as described in any one of claims 1 to 4.
Citation Information
Patent Citations
Trajectory planning method and device and system
CN112140101A
Obstacle avoiding path planning method, nonvolatile readable storage medium and robot
CN119002468A