Path planning method and device, storage medium and electronic equipment

By determining the reference point and the undetermined sampling point in the path planning of the robot arm, judging and adjusting the path, the problem of the robot arm colliding with obstacles during movement is solved, and safe robot arm motion path planning is achieved.

CN118809573APending Publication Date: 2024-10-22SUZHOU GREAT ROBOTICS MEDICAL TECH CO LTD

Patent Information

Application Number
CN202310423684.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-04-19
Publication Date
2024-10-22

AI Technical Summary

Technical Problem

It is difficult for the robotic arm to effectively avoid obstacles during movement, leading to collisions, and it is difficult to effectively plan a safe path with existing technology.

Method used

By determining the starting position and reference point of the robotic arm, determine the path planning direction based on the sampling point closest to the reference point, and determine the undetermined sampling point in the path planning direction to determine whether the robotic arm collides with an obstacle at the undetermined sampling point. Collision. If there is a collision, re-determine the reference point and the undetermined sampling point until the manipulator does not collide with obstacles at the undetermined sampling point. Generate a path between the undetermined sampling point and the target sampling point, add it to the sampling point set, and continue. Determine the pending sampling points until the path reaches the target position.

Benefits of technology

It realizes the safe movement of the robotic arm from the starting position to the target position, avoids obstacles in the three-dimensional map, and ensures that the robotic arm does not collide with obstacles during movement.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118809573A_ABST
    Figure CN118809573A_ABST
Patent Text Reader

Abstract

The invention discloses a path planning method and device, a storage medium and electronic equipment, and the method comprises the steps: taking an initial position of a mechanical arm as an existing sampling point, adding the initial position into a sampling point set, determining a reference point on a three-dimensional map, determining a path planning direction according to the reference point and the existing sampling point closest to the reference point, and determining a path planning result according to the path planning direction; and a to-be-sampled point is determined, and whether the mechanical arm collides with the obstacle or not is judged according to the posture of the mechanical arm at the to-be-sampled point. If the to-be-sampled point does not collide with the obstacle, generating a path between the to-be-sampled point and the existing sampling point closest to the reference point, adding the to-be-sampled point as the existing sampling point into the sampling point set, re-determining the reference point, continuously determining the to-be-determined sampling point according to the re-determined reference point, and determining the to-be-determined sampling point according to the re-determined reference point; by means of the method, the mechanical arm does not collide with the obstacle in the process of moving from the initial position to the target position, and safe movement is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a method, device, storage medium and electronic device for path planning. Background Art

[0002] With the development of science and technology, robotic arms are being used more and more widely. In the actual application scenarios of robotic arms, there may be multiple obstacles that may hinder the movement of the robotic arm. Therefore, when the robotic arm moves from the starting position to the target position, it is necessary to plan a path to avoid obstacles in the scene and realize automatic navigation from the starting position to the target position.

[0003] Therefore, how to better plan the path for the robotic arm to avoid collision with obstacles is an urgent problem to be solved. Summary of the invention

[0004] This specification provides a path planning method, device, storage medium and electronic device to partially solve the above-mentioned problems existing in the prior art.

[0005] This manual adopts the following technical solutions:

[0006] This specification provides a path planning method, including:

[0007] Determine the starting position of the robot arm, and add the starting position as an existing sampling point to the sampling point set;

[0008] Determine a reference point on the three-dimensional map where the robotic arm is located, and determine an existing sampling point that is closest to the reference point in the sampling point set as a target sampling point;

[0009] Determine a path planning direction according to the reference point and the target sampling point, and determine a pending sampling point in the path planning direction;

[0010] Determining the posture of the robotic arm at the undetermined sampling point;

[0011] According to the posture of the robotic arm, determining whether the robotic arm collides with an obstacle at the to-be-determined sampling point;

[0012] If yes, then re-determine the reference point, and re-determine the pending sampling point according to the re-determined reference point, until the robot arm does not collide with the obstacle at the determined pending sampling point;

[0013] Otherwise, a path between the pending sampling point and the target sampling point is generated, the pending sampling point is added to the sampling point set as an existing sampling point, and the reference point is re-determined, and the pending sampling point is continuously determined according to the re-determined reference point until the path between the sampling points in the sampling point set reaches the target position.

[0014] Optionally, determining the posture of the robotic arm at the undetermined sampling point specifically includes:

[0015] Determining the posture of the end of the robotic arm at the undetermined sampling point;

[0016] According to the posture of the end of the robotic arm at the undetermined sampling point and the preset parameters, the inverse motion solution of the robotic arm is obtained to obtain the position of each joint of the robotic arm;

[0017] The posture of the robotic arm is determined according to the positions of the joints of the robotic arm.

[0018] Optionally, determining the posture of the end of the robotic arm at the undetermined sampling point specifically includes:

[0019] Determine the gravitational force at the undetermined sampling point, and determine the posture of the end of the robotic arm affected by the gravitational force at the undetermined sampling point according to the gravitational force at the undetermined sampling point;

[0020] The repulsive force at the undetermined sampling point is determined, and according to the determined repulsive force at the undetermined sampling point, the posture of the end of the robotic arm affected by the gravity at the undetermined sampling point is corrected to obtain the posture of the end of the robotic arm at the undetermined sampling point.

[0021] Optionally, obtaining an inverse motion solution for the robotic arm specifically includes:

[0022] Taking the dynamic model of the robot arm as a constraint, an inverse motion solution for the robot arm is obtained.

[0023] Optionally, determining the gravity at the undetermined sampling point specifically includes:

[0024] According to the distance between the undetermined sampling point and the starting position, determine the gravitational force of the starting position on the undetermined sampling point as the starting gravitational force; according to the distance between the undetermined sampling point and the target position, determine the gravitational force of the target position on the undetermined sampling point as the target gravitational force;

[0025] Determining the posture of the end of the robotic arm affected by the gravity at the undetermined sampling point according to the gravity at the undetermined sampling point specifically includes:

[0026] Determine the posture of the end of the robotic arm at the starting position as the starting posture; determine the posture of the end of the robotic arm at the target position as the target posture;

[0027] The posture of the end of the manipulator affected by gravity at the undetermined sampling point is determined according to the starting gravity, the target gravity, the starting posture and the target posture.

[0028] Optionally, according to the determined repulsive force at the undetermined sampling point, the posture of the end of the robot arm affected by gravity at the undetermined sampling point is corrected, specifically including:

[0029] Acquire the posture of the end of the robotic arm at the target sampling point;

[0030] According to the repulsive force at the pending sampling point, the posture of the end of the robotic arm affected by gravity at the pending sampling point is corrected with the goal of minimizing the difference between the corrected posture and the posture of the end of the robotic arm at the target sampling point.

[0031] Optionally, the method further comprises:

[0032] Determine at least one reachable path from the starting position to the target position according to the paths between the sampling points in the sampling point set;

[0033] A reachable path that meets a specified condition is selected from each reachable path as a motion path, so as to control the robot arm to move according to the motion path.

[0034] This specification provides a path planning device, including:

[0035] A first determination module is used to determine a starting position of the robot arm, and add the starting position as an existing sampling point to the sampling point set;

[0036] A second determination module is used to determine a reference point on the three-dimensional map where the robotic arm is located, and determine an existing sampling point that is closest to the reference point in the sampling point set as a target sampling point;

[0037] A third determination module is used to determine a path planning direction according to the reference point and the target sampling point, and determine a pending sampling point in the path planning direction;

[0038] A posture module, used to determine the posture of the robotic arm at the to-be-determined sampling point;

[0039] A collision detection module is used to determine whether the robotic arm collides with an obstacle at the pending sampling point according to the posture of the robotic arm; if so, re-determine the reference point, and re-determine the pending sampling point according to the re-determined reference point, until the robotic arm does not collide with the obstacle at the determined pending sampling point; otherwise, generate a path between the pending sampling point and the target sampling point, add the pending sampling point as an existing sampling point to the sampling point set, and re-determine the reference point, and continue to determine the pending sampling point according to the re-determined reference point, until the path between the sampling points in the sampling point set reaches the target position.

[0040] Optionally, the posture module is specifically used to determine the posture of the end of the robotic arm at the undetermined sampling point; according to the posture of the end of the robotic arm at the undetermined sampling point and preset parameters, solve the inverse motion of the robotic arm to obtain the position of each joint of the robotic arm; determine the posture of the robotic arm according to the position of each joint of the robotic arm.

[0041] Optionally, the posture module is specifically used to determine the gravity at the pending sampling point, and determine the posture of the end of the robotic arm affected by the gravity at the pending sampling point based on the gravity at the pending sampling point; determine the repulsion at the pending sampling point, and correct the posture of the end of the robotic arm affected by the gravity at the pending sampling point based on the determined repulsion at the pending sampling point, so as to obtain the posture of the end of the robotic arm at the pending sampling point.

[0042] Optionally, the posture module is specifically used to obtain an inverse motion solution for the robotic arm using a dynamic model of the robotic arm as a constraint.

[0043] Optionally, the posture module is specifically used to determine, according to the distance between the undetermined sampling point and the starting position, the gravitational force of the starting position on the undetermined sampling point as the starting gravitational force; according to the distance between the undetermined sampling point and the target position, determine the gravitational force of the target position on the undetermined sampling point as the target gravitational force; determine the posture of the end of the robotic arm at the starting position as the starting posture; determine the posture of the end of the robotic arm at the target position as the target posture; and determine the posture of the end of the robotic arm affected by gravity at the undetermined sampling point according to the starting gravity, the target gravity, the starting posture and the target posture.

[0044] Optionally, the posture module is specifically used to obtain the posture of the end of the robotic arm at the target sampling point; based on the repulsive force at the undetermined sampling point, the posture of the end of the robotic arm affected by gravity at the undetermined sampling point is corrected with the goal of minimizing the difference between the corrected posture and the posture of the end of the robotic arm at the target sampling point.

[0045] Optionally, the device further comprises:

[0046] A path module is used to determine at least one reachable path from the starting position to the target position according to the paths between the sampling points in the sampling point set; and select a reachable path that meets the specified conditions from each reachable path as a motion path to control the robot arm to move according to the motion path.

[0047] This specification provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the above-mentioned path planning method is implemented.

[0048] This specification provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned path planning method when executing the program.

[0049] At least one of the above technical solutions adopted in this specification can achieve the following beneficial effects:

[0050] In the path planning method provided in the present specification, the starting position of the robot arm is determined, and the starting position is added to the sampling point set as an existing sampling point, a reference point is determined on the three-dimensional map where the robot arm is located, and the sampling point closest to the reference point is determined in the sampling point set as the target sampling point, the path planning direction is determined according to the reference point and the target sampling point, and the sampling point to be sampled is determined in the path planning direction, and the posture of the robot arm at the sampling point to be sampled is determined, and according to the posture of the robot arm, it is judged whether it collides with an obstacle, if so, the reference point is re-determined, and the sampling point to be sampled is re-determined according to the re-determined reference point, until the robot arm does not collide with the robot arm at the sampling point to be sampled, otherwise, a path between the sampling point to be sampled and the target sampling point is generated, the sampling point to be sampled is added to the sampling point set as an existing sampling point, and the reference point is re-determined, and the sampling point to be determined is continued to be determined according to the re-determined reference point until the path between the sampling points in the sampling point set reaches the target position.

[0051] It can be seen from the above path planning method that the path planning direction is determined according to the reference point and the existing sampling point closest to the reference point, and the point to be sampled is determined in the path planning direction. According to the posture of the robot arm at the point to be sampled, it is judged whether there is a collision with an obstacle. If there is no collision with the obstacle, a path between the point to be sampled and the existing sampling point closest to the reference point is generated, and the point to be sampled is added to the sampling point set as an existing sampling point, and the reference point is re-determined. The sampling point to be determined is continued to be determined according to the re-determined reference point until the path between the sampling points in the sampling point set reaches the target position. Path planning is performed in this way, so that the robot arm does not collide with obstacles in the process of moving from the starting position to the target position, and can avoid obstacles in the three-dimensional map and move safely. BRIEF DESCRIPTION OF THE DRAWINGS

[0052] The drawings described herein are used to provide a further understanding of this specification and constitute a part of this specification. The illustrative embodiments and descriptions of this specification are used to explain this specification and do not constitute an improper limitation on this specification. In the drawings:

[0053] Figure 1 A schematic diagram of a path planning method provided in this specification;

[0054] Figure 2 This is a schematic diagram of a path planning process provided in this specification;

[0055] Figure 3 A schematic diagram of a path planning device provided in this specification;

[0056] Figure 4 The present invention is a schematic diagram of the structure of an electronic device provided in this specification. DETAILED DESCRIPTION

[0057] In order to make the purpose, technical solutions and advantages of this specification more clear, the technical solutions of this specification will be clearly and completely described below in combination with the specific embodiments of this specification and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of this specification, not all of them. Based on the embodiments in this specification, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this specification.

[0058] The embodiments of this specification provide a method for path planning. The technical solutions provided by the embodiments of this specification are described in detail below in conjunction with the accompanying drawings.

[0059] Figure 1 A schematic diagram of a path planning method provided in this specification, specifically comprising the following steps:

[0060] S100: Determine the starting position of the robot arm, and add the starting position as an existing sampling point to the sampling point set.

[0061] The device for path planning determines the starting position of the robot arm and adds the starting position as an existing sampling point to the sampling point set, wherein the device for path planning can be a server for path planning, or a device such as a system, a personal computer (PC) that can execute the solution of this specification. For the convenience of description, the following description is based on the server as the execution subject.

[0062] The server determines the starting position of the robot arm and adds the starting position as an existing sampling point to the sampling point set. For example, the starting position of the robot arm is at point A, and point A is added to the sampling point set as an existing sampling point.

[0063] S102: Determine a reference point on the three-dimensional map where the robot arm is located, and determine an existing sampling point that is closest to the reference point in the sampling point set as a target sampling point.

[0064] The server determines a reference point on the three-dimensional map where the robot is located, and determines an existing sampling point closest to the reference point in the sampling point set as the target sampling point. The three-dimensional map is pre-constructed according to the environment where the robot is located.

[0065] Specifically, the server can randomly select a point on the three-dimensional map where the robot arm is located as a reference point, and determine the existing sampling point closest to the reference point in the sampling point set as the target sampling point. Figure 2 , Figure 2 This is a schematic diagram of a path planning process provided in this specification. Figure 2 Point A is the starting position of the robot arm, point B is the target position of the robot arm, and the existing sampling points in the sampling point set are point A, point 1, point 2, and point 3. Assume that the reference point randomly selected by the server is point R, and the existing sampling point closest to point R is point 3, that is, the target sampling point is point 3.

[0066] When constructing a three-dimensional map, OctoMap can be used to build a map based on the pre-acquired point cloud information of the environment where the robot is located and the required accuracy requirements, and in the process of building the map, the obstacles are convex-hulled, that is, the Z coordinates of any cells where obstacles exist are projected onto the XY plane. Among them, the point cloud information of the environment where the robot is located can be obtained by laser measurement or photogrammetry of the environment where the robot is located in advance. As for the specific method of obtaining the point cloud information, this manual does not make specific restrictions. OctoMap is an octree-based three-dimensional map creation tool that can display complete 3D graphics including obstacle-free areas and unmapped areas.

[0067] S104: Determine a path planning direction according to the reference point and the target sampling point, and determine a pending sampling point in the path planning direction.

[0068] The server determines the path planning direction based on the reference point and the target sampling point, and determines the pending sampling point in the path planning direction. Specifically, the server uses the direction from the target sampling point to the reference point as the path planning direction based on the reference point and the target sampling point. Afterwards, in the path planning direction, the point whose distance from the target sampling point is a preset length is used as the pending sampling point. Continuing with the above example, the server uses the direction from point 3 to point R as the path planning direction based on point R and point 3. Assuming the preset length is s, in the path planning direction, the point whose distance from point 3 is s is used as the pending sampling point, that is, Figure 2 Point W in .

[0069] S106: Determine the posture of the robotic arm at the undetermined sampling point.

[0070] The server determines the posture of the robot arm at the undetermined sampling point. Specifically, the server may first determine the posture of the end of the robot arm at the undetermined sampling point, and according to the posture of the end of the robot arm at the undetermined sampling point and preset parameters, find the inverse motion solution of the robot arm to obtain the position of each joint of the robot arm, and determine the posture of the robot arm according to the position of each joint of the robot arm. The inverse motion solution is to find the position of each joint of the robot arm when the position and posture of the end of the robot arm and the geometric parameters of all connecting rods are known.

[0071] When determining the posture of the end of the manipulator at the pending sampling point, the server can determine the posture of the end of the manipulator at the pending sampling point according to the artificial potential field method. The artificial potential field method is to construct an obstacle repulsion potential field around the obstacle and to construct a gravitational potential field around the starting position and the target position. The manipulator is subjected to repulsion and gravitation in the composite field composed of these two potential fields. Therefore, the posture of the end of the manipulator at the pending sampling point can be determined according to the gravitational force and repulsion received by the end of the manipulator at the pending sampling point. Specifically, the server can determine the gravitational force at the pending sampling point, and determine the posture of the end of the manipulator at the pending sampling point affected by the gravitational force according to the gravitational force at the pending sampling point, and then determine the repulsion at the pending sampling point, and according to the determined repulsion at the pending sampling point, correct the posture of the end of the manipulator at the pending sampling point affected by the gravitational force, and obtain the posture of the end of the manipulator at the pending sampling point.

[0072] When determining the gravity at the pending sampling point, the server may determine the gravity of the pending sampling point at the starting position as the starting gravity based on the distance between the pending sampling point and the starting position, and determine the gravity of the pending sampling point at the target position as the target gravity based on the distance between the pending sampling point and the target position. The gravity calculation formula is as follows:

[0073]

[0074] Among them, U represents gravity, ζ represents gravity gain, and d represents the distance between the undetermined sampling point and the gravity point.

[0075] When the gravity point is the starting position, the gravity obtained according to the above formula is the starting gravity of the starting position to the predetermined sampling point. When the gravity point is the target position, the gravity obtained according to the above formula is the target gravity of the target position to the predetermined sampling point.

[0076] Afterwards, when determining the posture of the end of the robotic arm affected by gravity at the to-be-determined sampling point according to the gravity at the to-be-determined sampling point, the server first uses the posture of the end of the robotic arm at the starting position as the starting posture, and the posture of the end of the robotic arm at the target position as the target posture, and then determines the posture of the end of the robotic arm affected by gravity at the to-be-determined sampling point according to the starting gravity and target gravity as well as the starting posture and target posture calculated by the above formula, and calculates the posture of the end of the robotic arm affected by gravity at the to-be-determined sampling point by the following formula:

[0077] ΔP=P B -P A

[0078]

[0079] Among them, ΔP represents the attitude difference, PA represents the starting posture, P B represents the target posture, P w represents the posture of the end of the manipulator under the influence of gravity at the undetermined sampling point, U B represents the target gravity, U A Indicates the starting gravity.

[0080] When determining the repulsive force at the sampling point to be determined, the server can determine the repulsive force at the sampling point to be determined based on the preset range of action of the obstacle and the distance between the end of the robot arm and the obstacle. The calculation is performed using the following repulsive force formula:

[0081]

[0082] Among them, Q represents the range of the obstacle, U 斥 represents the repulsive force, η represents the repulsive force gain, and d represents the distance between the end of the robot arm and the obstacle.

[0083] Specifically, since the obstacles have been convexly processed when constructing the three-dimensional map, the calculation of the repulsive force at the end of the robot arm can be simplified to the repulsive force generated by the obstacles on the XY plane where the end of the robot arm is located. The server can pre-set the maximum scanning range Q, that is, the range of action of the above-mentioned obstacles, and perform a preset number of scans n times on the XY plane where the end of the robot arm is located. The scanning direction can be clockwise or counterclockwise. This manual does not make specific restrictions. The result of each scan is the rotation angle of the end of the robot arm and the distance from the obstacle. The repulsive force is then calculated using the above-mentioned repulsive force formula, and then each scan result is converted into a vector with a length of repulsive force in the direction of the rotation angle. The average of the n vectors is calculated as U 斥 For example, the result of the nth scan is the rotation angle θ of the end of the robot arm. n and the corresponding distance d n , the repulsive force calculated by the above repulsive force formula is U n . Then convert the scan result into n The length in the direction is U n Where n is a positive integer and the rotation angle is the angle with the world coordinate system.

[0084] In order to avoid collision between the robot and obstacles, the robot should be as far away from the obstacle area as possible. Therefore, the server can also establish a region containing collision repulsion with different weights by dilating the obstacle area, and the magnitude of the repulsion should be determined by the distance. For example, the magnitude of the repulsion can be calculated by linear attenuation, and the calculation formula is as follows:

[0085] F=(d-d0)F0

[0086] Among them, F represents repulsion, d represents the set safety distance, F0 represents the initial repulsion, and d0 represents the shortest distance between the robot arm and the collision area.

[0087] The server can also use the above two repulsive forces, F and U 斥 , linear weighting is performed to obtain the repulsive force used to correct the posture of the end of the manipulator affected by gravity at the undetermined sampling point.

[0088] When the posture of the end of the robot arm affected by gravity at the to-be-determined sampling point is corrected according to the repulsive force determined at the to-be-determined sampling point, the server can obtain the posture of the end of the robot arm at the target sampling point, and correct the posture of the end of the robot arm affected by gravity at the to-be-determined sampling point according to the repulsive force at the to-be-determined sampling point, with the goal of minimizing the difference between the corrected posture and the posture of the end of the robot arm at the target sampling point.

[0089] Specifically, the server can obtain the posture of the end of the robot arm at the target sampling point, in the same XY plane and perpendicular to the U 斥 Among the vectors of , determine a vector that is closer to the posture of the end of the robot arm at the target sampling point as V U , and convert it to an angle θ U and intensity t U , then, P W Decomposed into the rotation r around the xyz axis in the world coordinates x , r y , r z , and use U 斥 It is corrected, where the intensity t U is the distance d u The reciprocal of is corrected by the following formula:

[0090]

[0091]

[0092] Among them, r x Indicates that P W Decomposed into the rotation around the x-axis in world coordinates, r y Indicates that P W Decomposed into the rotation around the y-axis in world coordinates, r z Indicates that P W This resolves to a rotation around the z-axis in world coordinates.

[0093] When solving the inverse motion solution of the robotic arm, there may be many solutions, but not every solution can satisfy the dynamic model of the robotic arm. Therefore, the server can use the dynamic model of the robotic arm as a constraint to solve the inverse motion of the robotic arm. That is, the positions of the joints of the robotic arm obtained by solving the inverse motion solution of the robotic arm satisfy the dynamic model of the robotic arm and are positions that the robotic arm can reach through adjustment.

[0094] S108: Determine, based on the posture of the robotic arm, whether the robotic arm collides with an obstacle at the to-be-determined sampling point; if so, execute step S110; otherwise, execute step S112.

[0095] The server determines whether the robotic arm collides with an obstacle at the sampling point to be determined based on the posture of the robotic arm. If so, step S110 is executed, otherwise step S112 is executed. The server can determine whether the robotic arm collides with an obstacle at the sampling point to be determined by collision interference detection, or by any other existing collision detection method, which is not specifically limited in this specification.

[0096] Continuing with the above example, the posture of the robot arm at the undetermined sampling point, that is, point W, is determined. Based on the posture of the robot arm at point W, it is determined whether a collision with an obstacle occurs. It is possible to detect whether the robot arm interferes with the obstacle. If so, the robot arm collides with the obstacle, and step S110 is executed. Otherwise, step S112 is executed.

[0097] S110: Re-determine the reference point and return to step S102.

[0098] When the robot arm collides with an obstacle at the undetermined sampling point, the server re-determines the reference point, returns to step S102, and repeats the above steps S102 to S108.

[0099] S112: Generate a path between the pending sampling point and the target sampling point, add the pending sampling point as an existing sampling point to the sampling point set, re-determine the reference point, and continue to determine the pending sampling point according to the re-determined reference point until the path between the sampling points in the sampling point set reaches the target position.

[0100] When the robot arm does not collide with an obstacle at the pending sampling point, the server generates a path between the pending sampling point and the target sampling point, adds the pending sampling point as an existing sampling point to the sampling point set, and re-determines the reference point, returns to step S102, and repeatedly executes steps S102 to S108 until the path between the sampling points in the sampling point set reaches the target position.

[0101] Continuing with the above example, when the robot arm does not collide with an obstacle at point W, the server generates a path between point W and point 3, that is, Figure 2 The length of the edge is s, point W is added to the sampling point set as an existing sampling point, and then the reference point is re-determined, and the process returns to step S102, and the above steps S102 to S108 are repeatedly executed until the path between the sampling points in the sampling point set reaches the target position.

[0102] It can be seen from the above method that the path planning direction is determined according to the reference point and the existing sampling point closest to the reference point, and the sampling point to be sampled is determined in the path planning direction. It is judged whether the robot collides with the obstacle according to the posture of the robot at the sampling point to be sampled. If there is no collision with the obstacle, a path between the sampling point to be sampled and the existing sampling point closest to the reference point is generated, and the sampling point to be sampled is added to the sampling point set as an existing sampling point, and the reference point is re-determined. The sampling point to be determined is continued to be determined according to the re-determined reference point until the path between the sampling points in the sampling point set reaches the target position. Path planning is performed in this way, which not only considers whether the robot collides with the obstacle when it is at a certain position, but also considers whether the posture of the robot at a certain position will collide with the obstacle, thereby reducing the possibility of the robot colliding with the obstacle in the process of moving from the starting position to the target position, so that the robot can avoid obstacles in the three-dimensional map and move safely.

[0103] In this specification, after the path between each sampling point in the sampling point set reaches the target position, the server can determine at least one reachable path from the starting position to the target position according to the path between each sampling point in the sampling point set, and select a reachable path that meets the specified condition from each reachable path as the motion path to control the robot arm to move according to the motion path. The specified condition can be the shortest path, that is, the server can select the path with the shortest path length from each reachable path as the motion path to control the robot arm to move according to the motion path, that is, the shortest path.

[0104] In this specification, in order to avoid the local optimum, when setting the repulsion gain, the set repulsion gain should be smaller than the set attraction gain.

[0105] In this manual Figure 1The path planning method shown is similar to the Rapidly-exploring Random Trees (RRT) algorithm, which is an efficient planning method in multidimensional space. It uses an initial position as the root node and generates a random expansion tree by randomly sampling and adding leaf nodes. When the leaf node in the random tree contains the target position or enters the target area, a path from the initial position to the target position can be found in the random tree. For example, a point P' is randomly generated on the three-dimensional map, and the point N closest to the point P' is selected from the current tree structure, and a line segment E is extended from point N to point P' with a fixed length s. If the line segment E interferes with an obstacle, it is ignored. Otherwise, the line segment E and another point connected to the line segment E, that is, point P, are added to the tree structure.

[0106] The path planning method provided in this specification can also replace the part using the RRT algorithm with an algorithm such as RRT*, so as to increase the pruning operation in the tree structure on the basis of realizing path planning, so that it can quickly perform path planning and find a shorter motion path. The RRT* algorithm is improved on the basis of the RRT algorithm, and adds the operation of reselecting the parent node and rewiring. For example, in the above example, when the line segment E does not interfere with the obstacle, the point P is taken as the center of the circle and the preset length is taken as the radius to determine the points existing in the current tree structure around it, and a better point is selected as the parent node of point P, and point P is connected to the reselected parent node, and the connected line segment is used as line segment E, and then line segment E and point P connected to line segment E are added to the tree structure. The selection of a better parent node can select the parent node according to the principle of being closest to the starting position, that is, the point closest to the starting position is selected as the parent node of point P.

[0107] The above is a path planning method provided in one or more embodiments of this specification. Based on the same idea, this specification also provides a corresponding path planning device, such as Figure 3 shown.

[0108] Figure 3 A schematic diagram of a path planning device provided in this specification specifically includes:

[0109] A first determination module 200 is used to determine a starting position of the robot arm and add the starting position as an existing sampling point to a sampling point set;

[0110] A second determination module 202 is used to determine a reference point on the three-dimensional map where the robot arm is located, and determine an existing sampling point closest to the reference point in the sampling point set as a target sampling point;

[0111] A third determination module 204 is used to determine a path planning direction according to the reference point and the target sampling point, and determine a pending sampling point in the path planning direction;

[0112] A posture module 206, used to determine the posture of the mechanical arm at the undetermined sampling point;

[0113] The collision detection module 208 is used to determine whether the robotic arm collides with an obstacle at the pending sampling point according to the posture of the robotic arm; if so, re-determine the reference point, and re-determine the pending sampling point according to the re-determined reference point, until the robotic arm does not collide with the obstacle at the determined pending sampling point; otherwise, generate a path between the pending sampling point and the target sampling point, add the pending sampling point as an existing sampling point to the sampling point set, and re-determine the reference point, and continue to determine the pending sampling point according to the re-determined reference point, until the path between the sampling points in the sampling point set reaches the target position.

[0114] Optionally, the posture module 206 is specifically used to determine the posture of the end of the robotic arm at the undetermined sampling point; according to the posture of the end of the robotic arm at the undetermined sampling point and preset parameters, inverse kinematic solution of the robotic arm is obtained to obtain the position of each joint of the robotic arm; and the posture of the robotic arm is determined according to the position of each joint of the robotic arm.

[0115] Optionally, the posture module 206 is specifically used to determine the gravity at the pending sampling point, and determine the posture of the end of the robotic arm affected by the gravity at the pending sampling point based on the gravity at the pending sampling point; determine the repulsion at the pending sampling point, and correct the posture of the end of the robotic arm affected by the gravity at the pending sampling point based on the determined repulsion at the pending sampling point, so as to obtain the posture of the end of the robotic arm at the pending sampling point.

[0116] Optionally, the posture module 206 is specifically used to obtain an inverse motion solution for the robotic arm using the dynamic model of the robotic arm as a constraint.

[0117] Optionally, the posture module 206 is specifically used to determine, according to the distance between the undetermined sampling point and the starting position, the gravitational force of the starting position on the undetermined sampling point as the starting gravitational force; according to the distance between the undetermined sampling point and the target position, determine the gravitational force of the target position on the undetermined sampling point as the target gravitational force; determine the posture of the end of the robotic arm at the starting position as the starting posture; determine the posture of the end of the robotic arm at the target position as the target posture; and determine the posture of the end of the robotic arm affected by gravity at the undetermined sampling point according to the starting gravity, the target gravity, the starting posture and the target posture.

[0118] Optionally, the posture module 206 is specifically used to obtain the posture of the end of the robotic arm at the target sampling point; based on the repulsive force at the undetermined sampling point, with the goal of minimizing the difference between the corrected posture and the posture of the end of the robotic arm at the target sampling point, the posture of the end of the robotic arm affected by gravity at the undetermined sampling point is corrected.

[0119] Optionally, the device further comprises:

[0120] The path module 210 is used to determine at least one reachable path from the starting position to the target position according to the paths between the sampling points in the sampling point set; and select a reachable path that meets the specified conditions from the reachable paths as a motion path to control the robot arm to move according to the motion path.

[0121] This specification also provides a computer-readable storage medium, which stores a computer program. The computer program can be used to execute the above-mentioned path planning method.

[0122] This manual also provides Figure 4 The structural diagram of the electronic device shown in FIG. Figure 4 As shown, at the hardware level, the electronic device includes a processor, an internal bus, a memory, and a non-volatile memory, and may also include hardware required for other services. The processor reads the corresponding computer program from the non-volatile memory into the memory and then runs it to implement the above path planning method.

[0123] Of course, in addition to software implementation, this specification does not exclude other implementation methods, such as logic devices or a combination of software and hardware, etc., that is to say, the executor of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.

[0124] In the 1990s, improvements to a technology could be clearly distinguished as hardware improvements (for example, improvements to the circuit structure of diodes, transistors, switches, etc.) or software improvements (improvements to the method flow). However, with the development of technology, many improvements to the method flow today can be regarded as direct improvements to the hardware circuit structure. Designers almost always obtain the corresponding hardware circuit structure by programming the improved method flow into the hardware circuit. Therefore, it cannot be said that an improvement in a method flow cannot be implemented using a hardware entity module. For example, a programmable logic device (PLD) (such as a field programmable gate array (FPGA)) is such an integrated circuit whose logical function is determined by the user's programming of the device. Designers can "integrate" a digital system on a PLD by programming it themselves, without having to ask a chip manufacturer to design and produce a dedicated integrated circuit chip. Moreover, nowadays, instead of manually making integrated circuit chips, this kind of programming is mostly implemented by "logic compiler" software, which is similar to the software compiler used when developing and writing programs, and the original code before compilation must also be written in a specific programming language, which is called hardware description language (HDL). There is not only one HDL, but many kinds, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, RHDL (Ruby Hardware Description Language), etc. The most commonly used ones are VHDL (Very-High-Speed ​​Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should also know that it is only necessary to program the method flow slightly in the above-mentioned hardware description languages ​​and program it into the integrated circuit, and then it is easy to obtain the hardware circuit that implements the logic method flow.

[0125] The controller can be implemented in any appropriate manner, for example, the controller can take the form of a microprocessor or processor and a computer-readable medium storing a computer-readable program code (such as software or firmware) that can be executed by the (micro)processor, a logic gate, a switch, an application-specific integrated circuit (ASIC), a programmable logic controller, and an embedded microcontroller. Examples of controllers include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320. The memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art also know that in addition to implementing the controller in a purely computer-readable program code manner, the controller can be implemented in the form of a logic gate, a switch, an application-specific integrated circuit, a programmable logic controller, and an embedded microcontroller by logically programming the method steps. Therefore, this controller can be considered as a hardware component, and the devices included therein for implementing various functions can also be regarded as structures within the hardware component. Or even, the devices for implementing various functions can be regarded as both software modules for implementing the method and structures within the hardware component.

[0126] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.

[0127] For the convenience of description, the above device is described in various units according to their functions. Of course, when implementing this specification, the functions of each unit can be implemented in the same or multiple software and / or hardware.

[0128] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0129] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0130] These computer program instructions may also be stored in a computer readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0131] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0132] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0133] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0134] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.

[0135] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0136] Those skilled in the art will appreciate that the embodiments of this specification may be provided as methods, systems or computer program products. Therefore, this specification may take the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware. Moreover, this specification may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0137] This specification may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. This specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.

[0138] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0139] The above description is only an embodiment of the present specification and is not intended to limit the present specification. For those skilled in the art, the present specification may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present specification shall be included in the scope of the claims of the present specification.

Claims

1. A path planning method, characterized in that: include: Determine the starting position of the robot arm, and add the starting position as an existing sampling point to the sampling point set; Determine a reference point on the three-dimensional map where the robotic arm is located, and determine an existing sampling point that is closest to the reference point in the sampling point set as a target sampling point; Determine a path planning direction according to the reference point and the target sampling point, and determine a pending sampling point in the path planning direction; Determining the posture of the robotic arm at the undetermined sampling point; According to the posture of the robotic arm, determining whether the robotic arm collides with an obstacle at the to-be-determined sampling point; If yes, then re-determine the reference point, and re-determine the pending sampling point according to the re-determined reference point, until the robot arm does not collide with the obstacle at the determined pending sampling point; Otherwise, a path between the pending sampling point and the target sampling point is generated, the pending sampling point is added to the sampling point set as an existing sampling point, and the reference point is re-determined, and the pending sampling point is continuously determined according to the re-determined reference point until the path between the sampling points in the sampling point set reaches the target position.

2. The method according to claim 1, characterized in that Determining the posture of the robotic arm at the undetermined sampling point specifically includes: Determining the posture of the end of the robotic arm at the undetermined sampling point; According to the posture of the end of the robotic arm at the undetermined sampling point and the preset parameters, the inverse motion solution of the robotic arm is obtained to obtain the position of each joint of the robotic arm; The posture of the robotic arm is determined according to the positions of the joints of the robotic arm.

3. The method according to claim 2, characterized in that Determining the posture of the end of the robotic arm at the undetermined sampling point specifically includes: Determine the gravitational force at the undetermined sampling point, and determine the posture of the end of the robotic arm affected by the gravitational force at the undetermined sampling point according to the gravitational force at the undetermined sampling point; The repulsive force at the undetermined sampling point is determined, and according to the determined repulsive force at the undetermined sampling point, the posture of the end of the robotic arm affected by the gravity at the undetermined sampling point is corrected to obtain the posture of the end of the robotic arm at the undetermined sampling point.

4. The method according to claim 2, characterized in that Obtaining an inverse motion solution for the robotic arm specifically includes: Taking the dynamic model of the robot arm as a constraint, an inverse motion solution for the robot arm is obtained.

5. The method according to claim 3, characterized in that Determining the gravity at the undetermined sampling point specifically includes: According to the distance between the undetermined sampling point and the starting position, determine the gravitational force of the starting position on the undetermined sampling point as the starting gravitational force; according to the distance between the undetermined sampling point and the target position, determine the gravitational force of the target position on the undetermined sampling point as the target gravitational force; Determining the posture of the end of the robotic arm affected by the gravity at the undetermined sampling point according to the gravity at the undetermined sampling point specifically includes: Determine the posture of the end of the robotic arm at the starting position as the starting posture; determine the posture of the end of the robotic arm at the target position as the target posture; The posture of the end of the manipulator affected by gravity at the undetermined sampling point is determined according to the starting gravity, the target gravity, the starting posture and the target posture.

6. The method according to claim 3, characterized in that According to the determined repulsive force at the undetermined sampling point, the posture of the end of the robotic arm affected by gravity at the undetermined sampling point is corrected, specifically including: Acquire the posture of the end of the robotic arm at the target sampling point; According to the repulsive force at the pending sampling point, the posture of the end of the robotic arm affected by gravity at the pending sampling point is corrected with the goal of minimizing the difference between the corrected posture and the posture of the end of the robotic arm at the target sampling point.

7. The method according to claim 1, characterized in that The method further comprises: Determine at least one reachable path from the starting position to the target position according to the paths between the sampling points in the sampling point set; A reachable path that meets a specified condition is selected from each reachable path as a motion path, so as to control the robot arm to move according to the motion path.

8. A path planning device, characterized in that: include: A first determination module is used to determine a starting position of the robot arm, and add the starting position as an existing sampling point to the sampling point set; A second determination module is used to determine a reference point on the three-dimensional map where the robotic arm is located, and determine an existing sampling point that is closest to the reference point in the sampling point set as a target sampling point; A third determination module is used to determine a path planning direction according to the reference point and the target sampling point, and determine a pending sampling point in the path planning direction; A posture module, used to determine the posture of the robotic arm at the to-be-determined sampling point; A collision detection module, used to determine whether the robotic arm collides with an obstacle at the to-be-determined sampling point according to the posture of the robotic arm; If so, the reference point is re-determined, and the pending sampling point is re-determined according to the re-determined reference point, until the robot arm does not collide with the obstacle at the determined pending sampling point; otherwise, a path between the pending sampling point and the target sampling point is generated, the pending sampling point is added to the sampling point set as an existing sampling point, and the reference point is re-determined, and the pending sampling point is continued to be determined according to the re-determined reference point, until the path between the sampling points in the sampling point set reaches the target position.

9. The device according to claim 8, characterized in that The posture module is specifically used to determine the posture of the end of the robotic arm at the undetermined sampling point; according to the posture of the end of the robotic arm at the undetermined sampling point and preset parameters, the inverse motion solution of the robotic arm is obtained to obtain the position of each joint of the robotic arm; and the posture of the robotic arm is determined according to the position of each joint of the robotic arm.

10. The device according to claim 9, characterized in that The posture module is specifically used to determine the gravity at the undetermined sampling point, and determine the posture of the end of the manipulator affected by the gravity at the undetermined sampling point according to the gravity at the undetermined sampling point; The repulsive force at the undetermined sampling point is determined, and according to the determined repulsive force at the undetermined sampling point, the posture of the end of the robotic arm affected by the gravity at the undetermined sampling point is corrected to obtain the posture of the end of the robotic arm at the undetermined sampling point.

11. The device according to claim 9, characterized in that The posture module is specifically used to obtain an inverse motion solution for the robotic arm using the dynamic model of the robotic arm as a constraint.

12. The device according to claim 10, characterized in that The posture module is specifically used to determine the gravitational force of the starting position on the undetermined sampling point as the starting gravitational force according to the distance between the undetermined sampling point and the starting position; Determine, according to the distance between the undetermined sampling point and the target position, the gravitational force of the target position on the undetermined sampling point as the target gravitational force; Determine the posture of the end of the robotic arm at the starting position as the starting posture; Determining a posture of the end of the robotic arm at the target position as a target posture; The posture of the end of the manipulator affected by gravity at the undetermined sampling point is determined according to the starting gravity, the target gravity, the starting posture and the target posture.

13. The device according to claim 10, characterized in that The posture module is specifically used to obtain the posture of the end of the robotic arm at the target sampling point; based on the repulsive force at the undetermined sampling point, with the goal of minimizing the difference between the corrected posture and the posture of the end of the robotic arm at the target sampling point, correct the posture of the end of the robotic arm affected by gravity at the undetermined sampling point.

14. The device according to claim 8, characterized in that The device also includes: A path module is used to determine at least one reachable path from the starting position to the target position according to the paths between the sampling points in the sampling point set; and select a reachable path that meets the specified conditions from each reachable path as a motion path to control the robot arm to move according to the motion path.

15. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.

16. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the method according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Mechanical arm on-line obstacle avoidance movement planning method

    CN110228069A

  • Mechanical arm dynamic obstacle avoidance control method based on fast advancing tree

    CN110370274A

  • Surgical robot path planning method and system

    CN114564009A

  • Satellite simulator formation obstacle avoidance path planning method based on artificial potential field method

    CN115494877A

  • Three-dimensional space path planning method

    CN115946117A

Cited By

  • Operation obstacle avoidance control method and system for coating construction integrated robot

    CN121028787A