Method and Device for Generating Motion Path of Unmanned Manipulator Based on B-Spline Curve
By using four non-uniform B-spline curves in the unmanned robotic arm motion path planning, the problem of generating robotic arm motion paths in complex environments is solved, and a more stable and efficient motion path characterization is achieved.
Patent Information
- Application Number
- CN202510214066.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-26
- Publication Date
- 2025-06-10
- Estimated Expiration
- 2045-02-26
AI Technical Summary
The prior art is difficult to quickly generate unmanned robotic arm movement paths that meet the requirements of complex environments, resulting in shaking and bumping of the robotic arm movement when avoiding obstacles or changing the direction of travel, and the control difficulty and wear level increase.
Using a method based on B-spline curve, four non-uniform B-spline curves are calculated and generated by adjusting the control point position coordinates and node vectors to characterize the motion path of the unmanned robotic arm. The method includes obtaining the coordinate value of the control point, calculating the node vector, and calculating the generated motion path using the four non-uniform B-spline base matrix formula.
Through the use of four non-uniform B-spline curves, the emergence of sharp points and inflection points in path planning can be avoided, the balance and stability of the robotic arm movement can be improved, while reducing the calculation amount and improving the path generation efficiency.
Smart Images

Figure CN119681913B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to a method for generating a motion path of an unmanned robotic arm, and more particularly, to a method and device for generating a motion path of an unmanned robotic arm based on B-spline curves. Background Art
[0002] The non-uniform B-spline curve is an important parametric curve and is widely used in fields such as geometric modeling, mechanical manufacturing, and path planning. The currently commonly used non-uniform B-spline curves are quadratic (3rd order) and cubic (4th order) curves. According to the B-spline principle, as the B-spline order increases, not only does the curve calculation amount increase significantly, but the curve shape becomes more complex and changeable. Therefore, higher-order curves of the fourth order (5th order) and above are less used. In recent years, with the continuous enhancement of application requirements such as the optimization of the motion path of unmanned robotic arms, the construction of complex geometric shapes, and the fitting of high-dimensional data, the high-order continuity and smoothness of B-spline curves of the fourth order and above have become one of the research hotspots.
[0003] According to the B-spline theory, by adjusting the position coordinates of control points and knot vectors, etc., it is possible to generate piecewise continuous and smooth curves, construct special shapes such as straight lines, tangents, and cusps, and effectively plan obstacle avoidance according to the convex hull property. Therefore, in the motion path planning of unmanned robotic arms, uniform cubic (4th order) B-spline curves are usually used to generate motion paths. However, when avoiding obstacles or changing the traveling direction, in order to maintain the balance and stability of the motion of the unmanned robotic arm, the speed needs to be adjusted in a timely manner. When using a cubic uniform B-spline curve for path planning, its acceleration is a linear function of the variable u, and it is easy to appear cusps and inflection points, resulting in obvious speed changes, causing the unmanned robotic arm to shake and jolt. Especially when the speed is fast, there are many obstacles, and the traveling space is narrow, the situation will be more frequent, and it may be superimposed and enhanced, increasing the control difficulty and wear degree of the motion of the unmanned robotic arm. It can be seen that the existing methods are difficult to quickly and effectively generate the motion path of an unmanned robotic arm in a complex environment. Summary of the Invention
[0004] The technical problem to be solved by the present invention is that the commonly used methods in the prior art are difficult to quickly generate the motion path of an unmanned robotic arm that meets the requirements of a complex environment. To solve the above problems, the present invention provides a method and device for generating a motion path of an unmanned robotic arm based on B-spline curves.
[0005] The content of the present invention includes:
[0006] In the first aspect, an embodiment of the present invention provides a method for generating a motion path of an unmanned robotic arm based on B-spline curves, including:
[0007] To enable the motion path of the unmanned robotic arm to avoid surrounding obstacles or specific objects, the coordinate values of the control points of the B-spline curve are obtained based on the convex hull property of the B-spline;
[0008] The knot vector is calculated based on the coordinate values of the control points;
[0009] Based on the coordinate values of multiple control points and the knot vector, a quartic non-uniform B-spline curve is calculated and generated using the quartic non-uniform B-spline basis matrix formula, and the quartic non-uniform B-spline curve is used to represent the motion path of the unmanned robotic arm.
[0010] Optionally, the step of calculating and generating a quartic non-uniform B-spline curve based on the coordinate values of multiple control points and the knot vector using the quartic non-uniform B-spline basis matrix formula includes:
[0011] Initializing parameters , index and order , where , , , is the knot vector, is the -th knot of the knot vector;
[0012] Performing times of coordinate value calculations to sequentially obtain the coordinate values of sampling points and generate a quartic non-uniform B-spline curve, is a positive integer, where the -th coordinate value calculation includes:
[0013] According to the parameter corresponding to the -th coordinate value calculation, searching for the knot interval where is located in the knot vector and updating the index to satisfy , is a positive integer less than or equal to ;
[0014] Calculating the coordinate value of the corresponding sampling point using the quartic non-uniform B-spline basis matrix formula;
[0015] Updating the value of the parameter corresponding to the -th coordinate value calculation to , where , , is the nodes, is the number of the control points.
[0016] Optionally, the coordinate values of the corresponding sampling points calculated by using the quartic non-uniform B-spline basis matrix formula include:
[0017] Calculate the values of each element in the basis matrix;
[0018] Based on calculate basis values;
[0019] Multiply the basis values by the basis matrix to obtain basis function values;
[0020] Calculate the coordinate values of the corresponding sampling points based on the coordinate values of the control points and the basis function values.
[0021] Optionally, the calculation of basis values based on includes:
[0022] Assign the value of the index to ;
[0023] Calculate the basis value :
[0024] ;
[0025] where ; ;
[0026] Optionally, the multiplication of the basis values by the basis matrix to obtain basis function values includes:
[0027] Calculate the basis function value corresponding to each , where , , is the basis value, is the element value of the -th row and -th column of the basis matrix.
[0028] Optionally, the calculation of the coordinate values of the corresponding sampling points based on the coordinate values of the control points and the basis function values includes:
[0029] Calculate each The coordinate values of the corresponding sampling points , where:
[0030] ;
[0031] ;
[0032] Among them, , , is the abscissa value of the sampling point, is the ordinate value of the sampling point, is the value of the basis function, is the abscissa value of the th control point, is the ordinate value of the th control point.
[0033] Optionally, before calculating the coordinate values of the corresponding sampling points using the quartic non-uniform B-spline basis matrix formula, the method further includes:
[0034] Assign the value of the index to , and the initial value of
[0035] is 0; Calculating the coordinate values of the corresponding sampling points using the quartic non-uniform B-spline basis matrix formula includes:
[0036] When the index is not equal to , calculate the coordinate values of the corresponding sampling points using the basis matrix.
[0037] In a second aspect, an embodiment of the present invention provides a device for generating a motion path of an unmanned robotic arm based on a B-spline curve, including:
[0038] An acquisition module, configured to obtain the coordinate values of the control points of the B-spline curve according to the B-spline convex hull property so that the motion path of the unmanned robotic arm can avoid surrounding obstacles or specific objects;
[0039] A calculation module, configured to calculate a knot vector based on the coordinate values of the control points;
[0040] A generation module, configured to calculate and generate a quartic non-uniform B-spline curve based on the coordinate values of multiple control points and the knot vector, and the quartic non-uniform B-spline curve is used to represent the motion path of the unmanned robotic arm.
[0041]
[0041] In a third aspect, an embodiment of the present invention provides an electronic device, including: a memory, a processor, and a program stored on the memory and executable on the processor; the processor is configured to read the program in the memory to implement the steps in the method for generating a motion path of an unmanned robotic arm based on a B-spline curve as described in the first aspect.
[0042] In a fourth aspect, an embodiment of the present invention provides a readable storage medium for storing a program, and when the program is executed by a processor, it implements the steps in the method for generating a motion path of an unmanned robotic arm based on a B-spline curve as described in the first aspect.
[0043] In an embodiment of the present invention, according to the convex hull property of the B-spline, the coordinates of multiple control points of the corresponding B-spline curve are roughly obtained, so as to determine the coordinate values of the multiple control points; based on the coordinate values of the multiple control points, parametric methods such as the chord length method or the centripetal method are used to calculate the knot vector from the coordinate values of the control points; the basis matrix method is used to calculate and generate a quartic non-uniform B-spline curve in sequence; the quartic non-uniform B-spline curve is used to represent the motion path of the unmanned robotic arm. The beneficial effects of the present invention are as follows. On the one hand, in an embodiment of the present invention, the motion path of the unmanned robotic arm is characterized by a quartic non-uniform B-spline curve, which can avoid the occurrence of cusps and inflection points in the planned path, so that the motion path of the unmanned robotic arm can better maintain balance and stability when avoiding obstacles or changing the traveling direction. On the other hand, compared with the prior art, in an embodiment of the present invention, the calculation amount is greatly reduced when drawing curves with the same quality, thereby improving the generation efficiency of the motion path of the unmanned robotic arm. Description of the Drawings
[0044] Fig. Figure 1 is a flowchart of the method for generating a motion path of an unmanned robotic arm based on a B-spline curve provided by an embodiment of the present invention;
[0045] Fig. Figure 2 is a schematic diagram of the device for generating a motion path of an unmanned robotic arm based on a B-spline curve provided by an embodiment of the present invention;
[0046] Fig. Figure 3 is a schematic diagram of the structure of the electronic device provided by an embodiment of the present invention. Detailed Embodiments
[0047] In the embodiments of the present application, the term "and / or" describes the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent three situations: A exists alone, A and B exist simultaneously, and B exists alone. The character " / " generally represents an "or" relationship between the associated objects before and after. In the embodiments of the present application, the term "plural" refers to two or more, and other quantifiers are similar. The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, rather than to describe a specific order or sequence. It should be understood that such terms can be interchanged under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described herein, and the objects distinguished by "first" and "second" are usually of the same category, and the number of objects is not limited. For example, the first object can be one or multiple.
[0048] Next, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present application.
[0049] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those of ordinary skill in the technical field to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.
[0050] First, the relevant concepts and contents involved in the present application will be described below.
[0051] According to the B-spline theory, a non-uniform -order spline curve composed of control points can be expressed as: non-uniform ; (1)
[0052] ; (1)
[0053] where the parameter , is the -order B-spline basis function defined on the knot vector .
[0054] Generally, the normalized -order non-uniform spline basis function can be defined by the de Boor-Cox recurrence formula as:
[0055] ; (2)
[0056] That is, any one order basis function can be expressed as a linear combination of two adjacent order basis functions and . Thus, a quartic (5th order) non-uniform B-spline basis function is obtained by linearly combining two cubic (4th order) basis functions and , and a non-uniform B-spline curve represented by order is composed of segments of continuous smooth curves, and each segment of the curve is controlled by control points .
[0057] Obviously, the above method can recursively calculate a quartic (5th order) non-uniform B-spline curve. For a non-uniform B-spline curve with sampling points order, the computational complexity is . As increases, the computational complexity will also increase accordingly, and the computational efficiency is low and difficult to meet real-time applications.
[0058] Based on this, the embodiments of the present application provide a method and device for generating a motion path of an unmanned robotic arm based on a B-spline curve, aiming to quickly generate a motion path of an unmanned robotic arm that can meet the requirements of complex environments. Please refer to Figure 1 . Figure 1 is a schematic flowchart of the method for generating a motion path of an unmanned robotic arm based on a B-spline curve provided by the embodiments of the present invention. The method specifically includes the following steps:
[0059] Step 101, in order to enable the motion path of the unmanned robotic arm to avoid surrounding obstacles or specific objects, obtain the coordinate values of the control points of the B-spline curve according to the B-spline convex hull property.
[0060] Step 102, calculate the knot vector based on the coordinate values of the control points.
[0061] Step 103, based on the coordinate values of multiple control points and the knot vector, use the quartic non-uniform B-spline basis matrix formula to calculate and generate a quartic non-uniform B-spline curve, and the quartic non-uniform B-spline curve is used to represent the motion path of the unmanned robotic arm.
[0062] In step 102, a knot vector is calculated based on the coordinate values of the control points. Specifically, the knot vector can be determined according to the actual situation. In the application of the motion path planning of an unmanned robotic arm, usually, a rough motion route of the unmanned robotic arm and the coordinate values of several control points are obtained according to the scene space, obstacles, and specific objects, etc. Then, parametric methods such as the uniform method, the centripetal method, or the chord length method can be used to calculate the knot vector, and its specific calculation method is not limited herein.
[0063] Exemplarily, in some embodiments, the number of control points is , so the coordinate values of the control points can be obtained. In specific implementation, the number and coordinates of the control points can be determined according to the actual situation and the motion path planning objective of the unmanned robotic arm, and its specific determination method is not limited herein.
[0064] According to the B-spline definition, a certain segment of a non-uniform B-spline curve point is only determined by its corresponding control points. Therefore, in step 103, according to the control points and their corresponding knot vector values, the current segment of the B-spline curve is calculated, and the calculation of each curve point is obtained by matrix multiplication. Optionally, in some embodiments, step 103 includes:
[0065] Initializing parameters , index , and order , where , , , is the knot vector, is the -th knot of the knot vector;
[0066] Performing times of coordinate value calculations to sequentially obtain the coordinate values of sampling points and generate a quartic non-uniform B-spline curve, is a positive integer, where the -th coordinate value calculation includes:
[0067] According to the parameter corresponding to the -th coordinate value calculation, searching for the node interval where it is located in the knot vector , and updating the index to make it satisfy , is a positive integer less than or equal to ;
[0068] Calculating the corresponding The coordinate values of the sampling points;
[0069] The parameter corresponding to the calculation of the coordinate values for the th time is updated to , where , is the th node of the node vector, is the number of control points.
[0070] Optionally, in some embodiments, the coordinate values of the corresponding sampling points calculated using the quartic non-uniform B-spline basis matrix formula include:
[0071] Calculate the values of each element in the basis matrix;
[0072] Based on calculate basis values;
[0073] Multiply of the basis values by the basis matrix to obtain the basis function values;
[0074] Based on the coordinate values of the control points and the basis function values, calculate the coordinate values of the corresponding sampling points.
[0075] First, based on the B-spline definition, the quartic non-uniform B-spline basis matrix formula is derived: As known from B-spline theory, for a order non-uniform spline curve formed by control points , it can be represented in matrix form as:
[0076] .
[0077] Where , .
[0078] ;
[0079] Where is called the recurrence basis matrix of the non-uniform spline function, forms a set of power bases.
[0080] For the quartic (5th order) basis matrix , , , From equation (2), the basis matrix of the quartic (5th order) non-uniform spline can be derived as: ;
[0081] Among them, the parameters are as follows: ; ; ; ;
[0082] ; ; ; ; ; ; ; ; ; ; ; ; ; ; ;
[0083] .
[0084] For a uniform B-spline, its knots are equally distributed, and the formula for the basis matrix of a quartic (5th order) uniform B-spline can be obtained as follows:
[0085] ;
[0086] According to the relationship between the piecewise Bézier ( ) curve and the uniform B-spline curve, let the knot vector of the 5th order spline be , then , . Therefore, the formula for the basis matrix of the 5th order Bézier curve can be deduced as follows:
[0087] ;
[0088] According to the above content, the quartic uniform B-spline curve and the quartic Bézier curve can be regarded as two special cases of the quartic non-uniform B-spline curve. The quartic uniform B-spline curve and the quartic Bézier curve can also be generated by the method provided in the embodiments of the present invention, and further characterize more diverse and complex motion paths of unmanned robotic arms.
[0089] Optionally, in some embodiments, the calculating the basis values based on includes:
[0090] Assign the value of the index to ;
[0091] Calculate the basis value :
[0092] ;
[0093] Among them, ; ; .
[0094] In specific implementation, the above method can be implemented by the following algorithm:
[0095] ;
[0096] Optionally, in some embodiments, the multiplying of the base values by the base matrix to obtain base function values includes:
[0097] Calculating the corresponding base function value for each , , where , , is the base value, is the element value of the -th row and -th column of the base matrix.
[0098] In specific implementation, the above method can be implemented by the following algorithm:
[0099]
[0100] Optionally, in some embodiments, the calculating of the coordinate values of the sampling points based on the coordinate values of the control points and the base function values includes:
[0101] Calculating the coordinate values of the corresponding sampling points for each , where:
[0102] ;
[0103] ;
[0104] where , , is the abscissa value of the sampling point, is the ordinate value of the sampling point, is the base function value, is the abscissa value of the -th control point, is the ordinate value of the -th control point.
[0105] In specific implementation, the above method can be implemented through the following algorithm:
[0106]
[0107] Optionally, in some embodiments, before calculating the coordinate values of the corresponding sampling points using the quartic non-uniform B-spline basis matrix formula, the method further includes:
[0108] Assign the value of the index to , whose initial value is 0;
[0109] Calculating the coordinate values of the corresponding sampling points using the quartic non-uniform B-spline basis matrix formula includes: When the index
[0110] is not equal to , calculate the coordinate values of the corresponding sampling points using the basis matrix. In this embodiment, only when the index is not equal to
[0111] , calculate the coordinate values of the corresponding sampling points using the basis matrix. When the index is equal to , there is no need to repeat the calculation, which further reduces the amount of calculation. As a specific embodiment, the method provided by the embodiment of the present invention can be implemented through the following algorithm: Assign the coordinate values of the control points equal to , the order
[0112] , the knot vector , the knot , the number of sampling points , the node , and output the coordinate values of all sampling points of the 5th-order non-uniform B-spline curve. The specific process is as follows: Among them, the specific method of calculating the B-spline curve sampling point coordinates using the basis matrix is as follows:
[0113]
[0114] According to the above content, for a
[0115]
[0116] with sampling points For the generation of a quartic non-uniform B-spline curve using the method provided in the embodiments of the present application for a non-uniform B-spline curve of order, the computational cost is , which is much smaller than the commonly used de Boor-Cox recurrence formula in the prior art. Moreover, the more sampling points are drawn, the more obvious the time performance advantage of the method provided in the embodiments of the present application; similarly, for the drawing of a quartic (fifth-order) uniform B-spline curve and a quartic (fifth-order) Bezier curve, the same conclusion also holds. Compared with the commonly used cubic (fourth-order) B-spline curve, based on the quartic B-spline curve, the motion acceleration of the unmanned robotic arm can be adjusted from a linear function of the variable to a quadratic function, thereby making the robotic arm move more smoothly and safely during variable-speed motion. In addition, compared with the de Boor-Cox method, the basis matrix method can reduce the computational time.
[0117] It should be understood that in specific implementation, since surface drawing can be regarded as curve drawing in two perpendicular directions of the x-axis and the y-axis, therefore, the method of the present invention can also be used to draw a quartic uniform / non-uniform B-spline surface and a quartic (fifth-order) Bezier surface.
[0118] Please refer to Figure 2 , the embodiments of the present invention also provide a device 200 for generating a motion path of an unmanned robotic arm based on a B-spline curve, including:
[0119] An acquisition module 201, configured to obtain the coordinate values of the control points of the B-spline curve according to the B-spline convex hull property so that the motion path of the unmanned robotic arm can avoid surrounding obstacles or specific objects;
[0120] A calculation module 202, configured to calculate the knot vector based on the coordinate values of the control points;
[0121] A generation module 203, configured to calculate and generate a quartic non-uniform B-spline curve based on the coordinate values of a plurality of the control points and the knot vector by using a quartic non-uniform B-spline basis matrix formula, where the quartic non-uniform B-spline curve is used to represent the motion path of the unmanned robotic arm.
[0122] Optionally, the second calculation module 203 includes:
[0123] An initialization unit, configured to initialize parameters , indices and orders , where , , , is the knot vector, is the -th knot of the knot vector;
[0124] A coordinate value calculation unit, configured to execute Calculate the secondary coordinate values, and obtain in sequence the coordinate values of the sampling points and generate a quartic non-uniform B-spline curve, wherein is a positive integer, and the
[0125] th secondary coordinate value calculation includes: According to the parameters corresponding to the th secondary coordinate value calculation in the knot vector find the knot interval where is located, and update the index to satisfy where
[0126] is a positive integer less than or equal to
[0127] Use the quartic non-uniform B-spline basis matrix formula to calculate the coordinate values of the corresponding sampling points; Update the value of the parameters corresponding to the th secondary coordinate value calculation to where is the th knot of the knot vector, and is the number of control points.
[0128] Optionally, the calculation of the coordinate values of the corresponding sampling points using the quartic non-uniform B-spline basis matrix formula includes:
[0129] Calculate the values of each element in the basis matrix;
[0130] Based on calculate basis values;
[0131] Multiply basis values by the basis matrix to obtain basis function values;
[0132] Based on the coordinate values of the control points and the basis function values, calculate the coordinate values of the corresponding sampling points.
[0133] Optionally, the calculation of basis values based on includes:
[0134] Assign the value of the index to ;
[0135] Calculate the basis value :
[0136] ;
[0137] Wherein, ; ; .
[0138] Optionally, multiplying the base values by the basis matrix to obtain basis function values includes:
[0139] Calculating the basis function value corresponding to each , , wherein, , , is the base value, is the element value of the -th row and -th column of the basis matrix.
[0140] Optionally, calculating the coordinate value of the corresponding sampling point based on the coordinate value of the control point and the basis function value includes:
[0141] Calculating the coordinate value of the corresponding sampling point, where:
[0142] ;
[0143] ;
[0144] wherein, , , is the abscissa value of the sampling point, is the ordinate value of the sampling point, is the basis function value, is the -th abscissa value of the control point, is the -th ordinate value of the control point.
[0145] Optionally, before calculating the coordinate value of the corresponding sampling point using the quartic non-uniform B-spline basis matrix formula, the method further includes:
[0146] Assigning the value of the index to , with an initial value of 0;
[0147] The coordinate values of the corresponding sampling points calculated by using the quartic non-uniform B-spline basis matrix formula include: When the index
[0148] is not equal to in the case of, the coordinate values of the corresponding sampling points are calculated by using the basis matrix
[0149]
[0150] The unmanned robotic arm motion path generation device 200 based on B-spline curve provided by the embodiment of the present application can execute the above method embodiment, and its implementation principle and technical effect are similar, which will not be elaborated here in this embodiment.
[0151] It should be noted that the division of units in the embodiment of the present application is illustrative, only a logical function division, and there may be other division methods in actual implementation. In addition, in each embodiment of the present application, each functional unit may be integrated in a processing unit, or each unit may exist physically alone, or two or more units may be integrated in one unit. The above integrated unit may be implemented in the form of hardware or in the form of a software functional unit.
[0152] If the above integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a processor-readable storage medium. Based on this understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor to execute all or part of the steps of the method described in each embodiment of the present application. The foregoing storage medium includes: various media such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disc that can store program codes.
[0152] As Figure 3 shown, the embodiment of the present application provides an electronic device 300, including: a memory 302, a processor 301, and a program stored on the memory 302 and executable on the processor 301; the processor 301 is configured to read the program in the memory 302 to implement the steps in the method for generating an unmanned robotic arm motion path based on B-spline curve as described above.
[0153] An embodiment of the present application further provides a readable storage medium. A program is stored on the readable storage medium. When the program is executed by a processor, it implements each process of the above-mentioned embodiment of the method for generating the motion path of an unmanned robotic arm based on a B-spline curve and can achieve the same technical effects. To avoid repetition, it will not be elaborated here. Among them, the readable storage medium can be any available medium or data storage device that can be accessed by the processor, including but not limited to magnetic memories (such as floppy disks, hard disks, magnetic tapes, magneto-optical disks (MO), etc.), optical memories (such as compact discs (CD), digital versatile discs (DVD), Blu-ray discs (BD), high-definition versatile discs (HVD), etc.), and semiconductor memories (such as read-only memories (ROM), erasable programmable read-only memories (EPROM), electrically erasable programmable read-only memories (EEPROM), non-volatile memories (NAND FLASH), solid-state disks (SSD), etc.).
[0154] It should be noted that in this article, the term "including", "comprising" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements, but also includes other elements not explicitly listed, or further includes elements inherent to such process, method, article or device. Without more limitations, an element defined by the statement "including one..." does not exclude the existence of another identical element in the process, method, article or device including that element.
[0155] Through the description of the above embodiments, those skilled in the art can clearly understand that the above embodiment methods can be implemented by means of software plus a necessary general hardware platform. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation. Based on such an understanding, the technical solution of the present application, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, disk, optical disc), and includes several instructions for causing a terminal (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in various embodiments of the present application.
[0156] The embodiments of the present application have been described above in conjunction with the accompanying drawings. However, the present application is not limited to the above specific implementation manners. The above specific implementation manners are merely illustrative and not restrictive. Under the inspiration of the present application, those of ordinary skill in the art can also make many forms without departing from the purpose of the present application and the scope protected by the claims, and all of them belong to the protection scope of the present application.
Claims
1. A method for generating a motion path of an unmanned robot arm based on a B-spline curve, characterized in that: include: In order to make the motion path of the unmanned robot arm avoid surrounding obstacles or target objects, the coordinate values of the control points of the B-spline curve are obtained according to the convexity of the B-spline; Calculate a node vector based on the coordinate values of the control point; Based on the coordinate values of the plurality of control points and the node vectors, a quartic non-uniform B-spline base matrix formula is used to calculate and generate a quartic non-uniform B-spline curve, wherein the quartic non-uniform B-spline curve is used to characterize the motion path of the unmanned robotic arm; The method of calculating and generating a quartic non-uniform B-spline curve based on the coordinate values of the plurality of control points and the node vectors using a quartic non-uniform B-spline base matrix formula includes: Initialization parameters ,index And the order ,in, , , , is the node vector, is the node vector nodes; implement The secondary coordinate values are calculated and obtained in turn. The coordinate values of the sampling points are used to generate a quartic non-uniform B-spline curve. is a positive integer, where The secondary coordinate value calculation includes: According to Parameters corresponding to the calculation of secondary coordinate values , at the node vector Search The node interval where the index is located is updated Satisfy , is less than or equal to A positive integer of ; The index The value of , The initial value of is 0; The quartic non-uniform B-spline basis matrix formula is used to calculate The coordinate values of the corresponding sampling points; The first Parameters corresponding to the calculation of secondary coordinate values The value of is updated to ,in, , is the node vector nodes, is the number of control points; Wherein, the quartic non-uniform B-spline basis matrix formula is used to calculate The coordinate values of the corresponding sampling points include: Calculate the value of each element in the basis matrix; based on calculate Base value; Will Multiply the basis values by the basis matrix to obtain basis function values; Calculate based on the coordinate values of the control points and the basis function values The coordinate values of the corresponding sampling points; In the index Not equal to In the case of , the basis matrix formula is used to calculate The coordinate values of the corresponding sampling points.
2. The method according to claim 1, characterized in that: The basis calculate Base values, including: The index The value of ; Calculate the base value : ; in, ; ; .
3. The method according to claim 1, characterized in that: The The basis function values are obtained by multiplying the basis values by the basis matrix, including: Calculate each The corresponding basis function value , ,in , , is the base value, is the basis matrix Line The element value of the column.
4. The method according to claim 1, characterized in that: The calculation based on the coordinate value of the control point and the basis function value The coordinate values of the corresponding sampling points include: Calculate each The corresponding coordinate values of the sampling points, ,in: ; ; in, , , is the horizontal coordinate value of the sampling point, is the ordinate value of the sampling point, is the basis function value, For the The horizontal coordinate value of the control point, For the The vertical coordinate value of the control point.
5. A device for generating motion paths of unmanned manipulators based on B-spline curves, characterized in that: include: An acquisition module is used to obtain the coordinate values of the control points of the B-spline curve according to the convexity of the B-spline so that the motion path of the unmanned robot arm can avoid surrounding obstacles or target objects; A calculation module, used for calculating a node vector based on the coordinate value of the control point; A generating module, configured to generate a quartic non-uniform B-spline curve by using a quartic non-uniform B-spline base matrix formula based on the coordinate values of the plurality of control points and the node vectors, wherein the quartic non-uniform B-spline curve is used to characterize the motion path of the unmanned manipulator; Wherein, the calculation module includes: Initialization unit, used to initialize parameters ,index And the order ,in, , , , is the node vector, is the node vector nodes; Coordinate value calculation unit, used to perform The secondary coordinate values are calculated and obtained in turn. The coordinate values of the sampling points are used to generate a quartic non-uniform B-spline curve. is a positive integer, where The secondary coordinate value calculation includes: According to Parameters corresponding to the calculation of secondary coordinate values , at the node vector Search The node interval where the index is located is updated Satisfy , is less than or equal to A positive integer of ; The index The value of , The initial value of is 0; The quartic non-uniform B-spline basis matrix formula is used to calculate The coordinate values of the corresponding sampling points; The first Parameters corresponding to the calculation of secondary coordinate values The value of is updated to ,in, , is the node vector nodes, is the number of control points; Wherein, the quartic non-uniform B-spline basis matrix formula is used to calculate The coordinate values of the corresponding sampling points include: Calculate the value of each element in the basis matrix; based on calculate Base value; Will Multiply the basis values by the basis matrix to obtain basis function values; Calculate based on the coordinate values of the control points and the basis function values The coordinate values of the corresponding sampling points; In the index Not equal to In the case of , the basis matrix formula is used to calculate The coordinate values of the corresponding sampling points.
6. An electronic device comprising: A memory, a processor, and a program stored in the memory and executable on the processor; wherein the processor is used to read the program in the memory to implement the steps in the method for generating a motion path of an unmanned robotic arm based on a B-spline curve as described in any one of claims 1 to 4.
7. A readable storage medium for storing a program, characterized in that: When the program is executed by a processor, the steps in the method for generating a motion path of an unmanned robotic arm based on a B-spline curve are implemented as described in any one of claims 1 to 4.
Citation Information
Patent Citations
Mechanical arm path planning method
CN113084811A
B spline curve-based path planning method, motion control method and system
CN113835423A