Motion planning method for multi-axis robot system, electronic equipment and medium
Technical Field
The invention relates to the technical field of robot automation control, in particular to a motion planning method, electronic equipment and a medium of a multi-axis robot system.
Background
With the wide application of the acceleration robot in the industrialized process, the production efficiency can be improved, the production cost can be reduced, the product quality can be improved, the labor intensity and occupational disease risk of workers can be effectively reduced, and the working environment and production safety of the workers can be improved. The traditional robot needs to carry out manual teaching when using, and efficiency is lower, so that the automatic robot control technology without manual teaching is more and more widely paid attention, and the motion planning technology is key.
In the manufacturing industries of automobiles, ships, airplanes and the like, target workpieces have the characteristics of large size span, complex and various shapes, high process quality requirements and the like, and the characteristics bring a plurality of difficulties to automation. Traditional single robot can only be responsible for one station, needs many robots cooperation just can satisfy the complex scene processing task of large-span, and the cost is higher. In order to solve the problem, an additional degree of freedom can be added to the robot, and the working space range of the robot can be expanded. For example, an additional shaft is added to the 6R robot (6 rotation shafts) to cooperatively move with the robot, so that the robot can realize a larger range of complex track movement, and a typical application scene is schematically shown in fig. 1. Or, a translational joint (a moving pair) is added to the robot, or the workpiece is placed on the moving guide rail, so that the same effect can be achieved, and the specific implementation mode is not limited. However, as the redundancy degree of freedom is increased, countless inverse solutions exist at each point in the space, which causes difficulty in robot motion planning, and when the working space is planned, the inverse solution corresponding to the target pose cannot be rapidly obtained, so that effective motion planning cannot be realized. The conventional solution is to decouple the additional shaft from the rotation shaft of the robot, keep the additional shaft motionless when the robot works, and move the position of the robot through the additional shaft when the working area exceeds the range, so that the robot is stationary after the position meets the working requirement, and then carry out the motion planning of the robot. The control mode does not fully utilize the flexibility of the additional degree of freedom brought by the additional shaft, and cannot meet the operation requirement in complex scenes.
Chinese patent application CN106272429B discloses a method for planning additional axis motion in a gantry hoisting robot working unit. On the basis of adding a redundant working unit and a fixed working platform, wherein the redundant working unit is formed by linking a gantry type external linear additional shaft with 6 joints of an industrial robot, a section of processing track point is monotonically changed along the moving direction of a sliding table fixedly connected with a robot base on the additional shaft, and two points on the processing track point are manually selected as endpoints of a priority interval. And obtaining the moving starting point of the sliding table through the projection principle of the point to the space straight line. And setting the step length of the sliding table to obtain a sliding table movement middle point and a sliding table movement end point, namely obtaining the distance from each movement position of the sliding table corresponding to the processing track point in the priority interval to the zero point of the additional shaft. The method can reduce the variation amplitude of the joints of the robot, so that the robot moves continuously and stably, and is suitable for processing continuous and dense track points by the robot. However, the method determines the position of the additional axis of each point based on the known track points, the motion planning between two points in the space cannot be performed, and the point positions of the interval are manually selected by manual intervention, so that the planning efficiency is affected. In addition, the method does not consider collision detection of the robot, but in practical application, obstacle avoidance is generally needed to be considered in the movement process of the robot, so that whether collision occurs at the position of the additional shaft or not should be considered in determining the position.
Disclosure of Invention
The technical purpose is that: aiming at the defects of the conventional multi-axis robot path planning, the invention discloses a multi-axis robot system motion planning method, electronic equipment and medium, which can effectively reduce frequent movement of an additional axis and improve path planning quality by adding additional axis information in a traditional motion planning space to ensure that the additional axis of a point to be solved takes value around an adjacent point preferentially.
The technical scheme is as follows: in order to achieve the technical purpose, the invention adopts the following technical scheme:
a method of motion planning for a multi-axis robot system, the multi-axis robot system comprising a multi-axis robot and an additional axis for assisting the multi-axis robot in performing a job, comprising the steps of:
s01, establishing a D-H kinematic model of the multi-axis robot, and determining modeling parameters;
s02, establishing a world coordinate system of multi-axis robot operation, and determining a movement track equation of an additional axis under the world coordinate system;
s03, establishing a search tree by taking a starting point of the multi-axis robot as a root node, and generating random sampling points in a sampling range;
S04, searching for the position in the search treeNearest neighbor node->Will->As a new node->;
S05, according to the new nodeThe gesture of (2) is subjected to inverse gesture kinematics solution to obtain wrist center coordinates of the multi-axis robot, the coordinates are converted into a robot coordinate system to be subjected to inverse position kinematics solution, if no solution exists, the steps S03-S05 are re-executed, and a new node is illustrated>Is an effective point;
s06, confirming the value of the additional shaft, searching the slavePerforming collision detection on the effective path from the point to the new node, wherein the collision detection meets the requirement, and taking the new node as +.>Adding the child node of the multi-axis robot system into the search tree, repeating the steps S03-S05, calculating the position of the next new node until the position of the new node coincides with the target point, and completing the motion planning of the multi-axis robot system from the root node to the target point.
Preferably, in step S02 of the present invention, the world coordinate system uses the origin of the additional axis as the origin of the world coordinate system, uses the direction of the additional axis as the Y axis, and establishes a three-dimensional coordinate system conforming to the right rule by overlapping the Z axis of the world coordinate system with the normal vector of the bottom surface of the multi-axis robot.
Preferably, in step S05 of the present invention, the process of converting the center coordinates of the multi-axis robot wrist into the robot coordinate system includes: and (3) obtaining the nearest point corresponding to the wrist center point on the axis of the additional shaft, taking the nearest point as a reference, and determining the relative coordinates of the wrist center point in the robot coordinate system on a plane which is perpendicular to the axis of the additional shaft and passes through the nearest point, so that whether the target point is in the robot work space or not can be rapidly judged, and the random searching performance in planning is improved.
Preferably, in step S04, the process of the present invention,if it isAnd->The distance between them does not exceed the threshold +.>Keep->The dot position is unchanged, otherwise +.>To->The point is moved so that the distance between them is +.>In the end->Point location as new node +.>。
Preferably, in step S06 of the present invention, the additional axis value range is confirmed before searching for the effective path: the method comprises the following steps:
s061, calculating an reachable radius range R of the multiaxial robot by using the kinematic model parameters of the multiaxial robot and taking the center of the wrist as the center of the sphere;
s062, with new nodeThe corresponding wrist center coordinate obtained by solving is taken as a sphere center, and the superposition area of the sphere with R as a radius and the additional axis is taken as a new node +.>The corresponding value range of the additional axis +.>;
S063, judging adjacent nodeCorresponding additional axis value->,In the calculated additional axis value range +.>As a new node->Corresponding additional axis value->,If the value is not within the calculated additional axis value range, then +.>And->Middle and->More recent as new node ++>Corresponding additional axis value->;
S064, taking the value of the selected additional axis, solving the inverse solution of the robot under the robot coordinate system, and taking the value of the current additional axis if the solution is not availableIs used as a center of the water tank,for step length of +.>Performing additional shaft value selection in the process, and reselecting the additional shaft value;
s065, performing collision detection according to the obtained inverse solution of the robot, reselecting an additional shaft value if collision occurs, and repeating the step S064; if collision does not occur, the current solution is valid, an additional axis value is selected, and path validity detection is performed.
The effective travel of the additional shaft is rapidly obtained, so that the target space range can be reduced, the search hit rate is improved, and the path search speed is increased; the value of the additional axis refers to the value of the additional axis of the adjacent point, and the search direction of the additional axis is defined, so that the movement of the additional axis in the path can be effectively reduced, and the path quality is improved.
Preferably, the path validity detection process of the present invention includes: at the position ofPoint and->Interpolation is carried out among the points to obtain n path space points; performing inverse kinematics calculation on the interpolation points, and obtaining the positions of all joints of the multi-axis robot according to the inverse calculation to perform collision detection; if the interpolation points are all solved and no collision is detected, the path is effective, and if the collision occurs, the steps S063-S065 are re-executed, new additional shaft values are obtained, and path effectiveness detection is performed again.
Preferably, inPoint and->The interpolation process between points includes: for->Point and->The positions among the points are linearly interpolated, the gestures are interpolated by slirp, and the additional axes are linearly interpolated to obtain corresponding interpolation points。
Preferably, in the step S03, a spatial bounding box is created for the starting point and the target point of the motion planning in the created world coordinate system as the sampling spatial range.
The invention also provides an electronic device, which comprises a memory, a processor and a computer program stored on the memory and capable of running on the processor, wherein the processor realizes the motion planning method of the multi-axis robot system when executing the computer program.
The invention discloses a computer readable storage medium, which stores computer executable instructions for executing the motion planning method of the multi-axis robot system; the storage medium includes: a usb disk, a removable hard disk, a ROM, a RAM, a magnetic disk, or an optical disk, etc.
The beneficial effects are that: the motion planning method, the electronic equipment and the medium for the multi-axis robot system provided by the invention have the following beneficial effects:
1. according to the invention, the wrist center corresponding to the target pose is obtained, the geometric characteristics are utilized to quickly convert into the reference point in the robot coordinate system, whether the new node position has a solution is judged, and the sampling efficiency is improved.
2. After confirming that the new node has a solution, the invention can quickly confirm the value range of the additional shaft by utilizing the geometric relationship between the wrist center and the additional shaft under the established coordinate system, thereby reducing the search range and improving the solving efficiency.
3. Only displacement conversion is needed between the world coordinate system and the robot coordinate system, so that the conversion difficulty in the solving process is reduced, and the calculation precision and the solving efficiency are improved.
4. In the path searching process, the invention takes values near the additional axes adjacent to the nodes, and defines the searching direction and searching range of the additional axes, thereby accelerating the searching efficiency, and simultaneously, the planned path can furthest reduce the movement of the additional axes, so that the movement of the robot is more stable.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below.
FIG. 1 is a schematic diagram of a practical application scenario of a multi-axis robot of the present invention;
FIG. 2 is a flow chart of a motion planning method of the present invention;
FIG. 3 is a schematic illustration of the present invention for determining the closest point of the wrist center on the additional axis;
FIG. 4 is a schematic view of the invention for determining additional axis value ranges by the center reachable radius of the wrist;
wherein, 1-additional axle, 2-multiaxis robot, 3-welding work piece.
Description of the embodiments
The present invention will now be described more fully hereinafter with reference to the accompanying drawings, in which preferred embodiments of the invention are shown, but in which the invention is not so limited.
As shown in fig. 2-4, the invention provides a motion planning method for a multi-axis robot system, which can rapidly judge the accessibility of a target pose in space by utilizing the geometric space characteristics of a robot and improve the searching efficiency. Meanwhile, the effective value range of the additional shaft corresponding to the point is solved rapidly, so that the search range of the additional shaft can be reduced effectively, and the solving speed is increased. In addition, by adding additional axis information in the traditional motion planning space, the additional axis of the point to be solved is prioritized to take values around the adjacent point, so that frequent movement of the additional axis can be effectively reduced, and the path quality is improved.
The specific method comprises the following steps:
s01, establishing a D-H kinematic model of the multi-axis robot, and determining modeling parameters;
s02, establishing a world coordinate system of multi-axis robot operation, and determining a movement track equation of an additional axis under the world coordinate system; the world coordinate system takes the starting point of the additional axis as the origin of the world coordinate system, takes the direction of the additional axis as the Y axis, and the Z axis of the world coordinate system is overlapped with the normal vector of the horizontal plane of the position of the multi-axis robot, so that a three-dimensional coordinate system conforming to the right rule is established, displacement transformation exists between the world coordinate system and the robot coordinate system, and the transformation of the subsequent corresponding point coordinates between the two coordinate systems is facilitated.
S03, establishing a space bounding box for a starting point and a target point of motion planning, taking the starting point of the multi-axis robot as a root node, establishing a search tree as a sampling space range, and generating random sampling points in the sampling range;
S04, searching for the position in the search treeNearest neighbor node->Will->As a new node->To reduce the difficulty of path planning, reduce the computational complexity and improve the efficiency, if +.>And->The distance between them does not exceed the threshold +.>Keep->The position of the point is unchanged, noWill->To->The point is moved so that the distance between them is +.>In the end->Point location as new node +.>Thereby shortening the distance for path planning in a single time;
s05, according to the new nodeThe gesture of (2) is subjected to inverse gesture kinematics solution to obtain wrist center coordinates of the multi-axis robot, the coordinates are converted into a robot coordinate system to be subjected to inverse position kinematics solution, if no solution exists, the steps S03-S05 are re-executed, and a new node is illustrated>Is an effective point;
the process of converting the center coordinates of the multi-axis robot wrist into the robot coordinate system comprises the following steps: and (3) obtaining the nearest point corresponding to the wrist center point on the axis of the additional shaft, and determining the relative coordinates of the wrist center point in the robot coordinate system on a plane which is perpendicular to the axis of the additional shaft and passes through the nearest point by taking the nearest point as a reference.
S06, search slaveEffective path of point to new node, when there is no collision, new node is taken as +.>Adding the child node of (2) into the search tree, repeating steps S03-S05, and calculating the position of the next new node until the new nodeAnd the position coincides with the target point, and the motion planning of the multi-axis robot system from the root node to the target point is completed.
In order to improve the searching efficiency, in step S06 of the present invention, before searching the effective path, the additional axis value range is confirmed, the searching direction of the additional axis is defined, and the confirming of the additional axis value range includes the steps of:
s061, as shown in FIG. 4, calculating the reachable radius range R of the multiaxial robot by using the kinematic model parameters of the multiaxial robot and taking the center of the wrist as the center of the sphere;
s062, with new nodeThe corresponding wrist center coordinate obtained by solving is taken as a sphere center, and the superposition area of the sphere with R as a radius and the additional axis is taken as a new node +.>The corresponding value range of the additional axis +.>;
S063, judging adjacent nodeCorresponding additional axis value->,In the calculated additional axis value range +.>As a new node->Corresponding additional axis value->,If the value is not within the calculated additional axis value range, then +.>And->Middle and->More recent as new node ++>Corresponding additional axis value->。
S064, taking the value of the selected additional axis, solving the inverse solution of the robot under the robot coordinate system, and taking the value of the current additional axis if the solution is not availableIs the center (is the->For step length of +.>Performing additional shaft value selection in the process, and reselecting the additional shaft value;the selection is performed according to the calculated additional axis value range, preferably less than 20% of the value range.
S065, performing collision detection according to the obtained inverse solution of the robot, reselecting an additional shaft value if collision occurs, and repeating the step S064; if collision does not occur, the current solution is valid, an additional axis value is selected, and path validity detection is performed.
The path validity detection process comprises the following steps: at the position ofPoint and->Interpolation is carried out among the points to obtain n path space points; inverse kinematics solving is carried out on interpolation points, and +.>Point and->The positions among the points are linearly interpolated, the gestures are interpolated by slirp, and the additional axes are linearly interpolated to obtain corresponding interpolation points +.>The positions of all joints of the multi-axis robot are obtained according to inverse solution to perform collision detection; if the interpolation points are all solved and no collision is detected, the path is effective, and if the collision occurs, the steps S063-S065 are re-executed, new additional shaft values are obtained, and path effectiveness detection is performed again.
In addition, the invention also provides electronic equipment, which comprises a memory, a processor and a computer program stored on the memory and capable of running on the processor, wherein the processor realizes the multi-axis robot system motion planning method when executing the computer program.
The invention discloses a computer readable storage medium, which stores computer executable instructions for executing the motion planning method of the multi-axis robot system; the storage medium includes: a usb disk, a removable hard disk, a ROM, a RAM, a magnetic disk, or an optical disk, etc.
The scheme of the invention is suitable for motion planning of any multi-axis robot and additional axes, and particularly for motion planning of the existing more commonly used 7-degree-of-freedom robot system, wherein the motion planning comprises three situations that a six-axis robot is added with an external additional axis, the six-axis robot is provided with a redundant seven-axis robot or a six-axis robot is used, but a workpiece moves on a moving guide rail to serve as the additional axis. In addition, by adding additional axis information in the traditional motion planning space, the additional axis of the point to be solved is prioritized around the adjacent point, so that frequent movement of the additional axis can be effectively reduced, and the path quality is improved.
First, a D-H matrix method is used to establish link coordinate relationship parameters of a 6-axis robotic arm as shown in table 1:
wherein, theta 1-theta 6 are the angles of rotation of 6 joints of the 6-axis robot respectively; d1-d 6 are offset distances of origins between 1-6 joint coordinate systems respectively; l1 to L6 are the vertical distances of the z axes of the adjacent coordinate systems respectively; α1 to α6 respectively represent that the z-axis of the former coordinate system of the adjacent coordinate systems is rotated around the x-axis thereof by an angle α and coincides with the z-axis of the latter coordinate system.
The starting point of the additional axis is taken as the origin of the world coordinate system, the Y axis of the world coordinate system coincides with the moving direction of the additional axis, the Z axis of the world coordinate system coincides with the normal vector of the bottom surface, a coordinate system conforming to the right rule is established, and under the established world coordinate system, the track equation of the additional axis is x=z=0.
Establishing a search tree by taking a starting point of the multi-axis robot as a root node, and generating random sampling points in a sampling rangeThe method comprises the steps of carrying out a first treatment on the surface of the Find AND/XUE in search tree>Nearest neighbor node->If->And->The distance between them exceeds a threshold->Will->To->The point is moved so that the distance between them is +.>Otherwise keep +.>The point position is unchanged, and a new node is obtained>;
According to new nodesThe gesture of the multi-axis robot is subjected to inverse gesture kinematics solution to obtain wrist center coordinates of the multi-axis robotThe nearest point coordinate of the wrist center on the additional axis track is +.>The corresponding reference point in the robot coordinate system has the coordinates (++>) Performing inverse position kinematic solution according to the obtained reference point coordinates in a robot coordinate system, and performing +_f if the solution indicates that the point is an effective point>Point to New node->Is a path search of (a);
according to the six-axis robot kinematic model, obtaining the radius of the center reachable range of the robot wrist asRThe nearest distance between the center of the wrist and the track isCorresponding to the calculated value range of the additional axis +.>Is that。
Judging adjacent nodeCorresponding additional axis value->,In the calculated additional axis value range +.>As a new node->Corresponding additional axis value->,If the value is not within the calculated additional axis value range, then +.>And->Middle and->More recent as new node ++>Corresponding additional axis value->Solving 6 joint inverse kinematics of the six-axis robot according to the obtained additional axis value to obtain joint angles of +.>,,,,,The method comprises the steps of carrying out a first treatment on the surface of the According to the obtained joint angles and the positions of the additional shafts, the positions of the joints of the robot are calculated by utilizing forward kinematics to perform collision detection with objects in the environment, if collision occurs, the additional shafts are selected again to take values, solving and collision detection are performed again, and if collision does not occur, the current solution is effective.
Finally toPoint and->Interpolation is carried out among the points to obtain n path space points; performing inverse kinematics calculation on the interpolation points, and obtaining the positions of all joints of the multi-axis robot according to the inverse calculation to perform collision detection; if collision occurs, new additional shaft value is obtained again, path effectiveness detection is carried out again, if interpolation points are all solved, collision is not detected, the path is effective, and judgment is carried out>Whether the target point requirement is met, if not, the target point requirement is about to be met>Added to the search tree as +.>And repeating the above process or the next child node according to the position of the newly obtained child node until +.>And the requirement of the target point is met, and the motion planning is completed.
The foregoing is only a preferred embodiment of the invention, it being noted that: it will be apparent to those skilled in the art that various modifications and adaptations can be made without departing from the principles of the present invention, and such modifications and adaptations are intended to be comprehended within the scope of the invention.