CN112356025A - Robot movement method and device for approximating NURBS curve by double arcs - Google Patents

Robot movement method and device for approximating NURBS curve by double arcs Download PDF

Info

Publication number
CN112356025A
CN112356025A CN202011179607.2A CN202011179607A CN112356025A CN 112356025 A CN112356025 A CN 112356025A CN 202011179607 A CN202011179607 A CN 202011179607A CN 112356025 A CN112356025 A CN 112356025A
Authority
CN
China
Prior art keywords
curve
bezier
arc
double
nurbs
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202011179607.2A
Other languages
Chinese (zh)
Other versions
CN112356025B (en
Inventor
许中兴
武延军
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Institute of Software of CAS
Original Assignee
Institute of Software of CAS
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Institute of Software of CAS filed Critical Institute of Software of CAS
Priority to CN202011179607.2A priority Critical patent/CN112356025B/en
Publication of CN112356025A publication Critical patent/CN112356025A/en
Application granted granted Critical
Publication of CN112356025B publication Critical patent/CN112356025B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • BPERFORMING OPERATIONS; TRANSPORTING
    • B25HAND TOOLS; PORTABLE POWER-DRIVEN TOOLS; MANIPULATORS
    • B25JMANIPULATORS; CHAMBERS PROVIDED WITH MANIPULATION DEVICES
    • B25J9/00Programme-controlled manipulators
    • B25J9/16Programme controls
    • B25J9/1656Programme controls characterised by programming, planning systems for manipulators
    • B25J9/1664Programme controls characterised by programming, planning systems for manipulators characterised by motion, path, trajectory planning

Landscapes

  • Engineering & Computer Science (AREA)
  • Robotics (AREA)
  • Mechanical Engineering (AREA)
  • Numerical Control (AREA)
  • Feedback Control In General (AREA)
  • Manipulator (AREA)

Abstract

The invention relates to a robot motion method and a device for approximating a NURBS curve by using double circular arcs. The method decomposes a NURBS curve into a plurality of equivalent Bezier curves; approximating each segment of Bezier curve by a double-arc to obtain a double-arc approximated NURBS curve; the robot tool is moved according to the NURBS curve approximated by a double circular arc. The invention can enable the mechanical arm to approximate any three-dimensional NURBS curve on the workpiece object in a linear or circular motion mode, can specify the approximation degree and ensure that the distance between the approximate curve and the original curve does not exceed the required distance, and has the characteristics of simplicity, rapidness and accuracy.

Description

Robot movement method and device for approximating NURBS curve by double arcs
Technical Field
The invention belongs to the technical field of industrial robots, and particularly relates to a robot motion method and device for approximating a NURBS curve by using double arcs.
Background
When programming an industrial robot using a simulation environment, we typically import a CAD model of the workpiece to generate path instructions for the robot. The automatic path generation means that the robot motion instructions are automatically generated on the edges of the CAD model through software, and the robot moves along the edges to complete application requirements, such as welding.
In the CAD model, the NURBS curve is a general mathematical curve, which is composed of elements such as control points, nodes and the like and has an accurate mathematical description method. For a detailed description of NURBS curves, reference is made to "Les Piegl, Wayne Tiller, The NURBS Book, Springer, 1997"
Workpiece objects, such as automobile housings, manipulated by industrial robotic arms are often NURBS surfaces or curves designed by CAD software. When the robot is performing tasks (e.g., painting, sanding), it needs to move along these NURBS curves, which if far apart, can affect the effectiveness of performing the task. However, among the commands supported by the industrial robot, there are generally only two types of the linear motion command MoveL and the circular arc motion command MoveC. Therefore, the NURBS curve must be approximated by a straight line or a circular arc, and the robot tool can move within a certain range (such as 5 mm) near the NURBS curve to fulfill the requirement.
Disclosure of Invention
The invention provides a robot motion method and a device for approximating a NURBS curve by a double-circular-arc curve. The bi-arc curve is a curve of 2 connected arcs, and the tangents of the 2 arcs at the junction are parallel to ensure smooth transition.
The technical scheme adopted by the invention is as follows:
a robot motion method for approximating a NURBS curve by a double-circular-arc curve comprises the following steps:
decomposing the NURBS curve into a plurality of equivalent Bezier curves;
approximating each segment of Bezier curve by a double-arc to obtain a double-arc approximated NURBS curve;
the robot tool is moved according to the NURBS curve approximated by a double circular arc.
Further, the decomposing the NURBS curve into several equivalent segments of Bezier curves includes:
and increasing the times of the multiple number of each internal node of the NURBS curve to the curve, wherein the part between every two nodes of the original NURBS curve forms an equivalent Bezier curve.
Further, the approximating each segment of the Bezier curve with a double circular arc comprises:
setting a tolerance value tol, and setting the maximum distance of the generated double-arc curve from the original NURBS curve not to exceed tol.
Further, the approximating each segment of the Bezier curve by a double-arc further comprises:
judging whether the distances between all internal control points of the Bezier curve and a straight line formed by the control points at two ends exceed a tolerance distance tol; if the number of the sub-paths exceeds the preset number, executing a split Bezier function, dividing the Bezier curve into 2 equal sub-Bezier curves, and adding the sub-Bezier curves into a stack; if the two arcs do not exceed the two tangent points, 2 connected arcs are constructed to approximate a Bezier curve, tangent lines at the connecting positions of the 2 arcs are parallel, the starting point and the end point of the double arc are respectively the starting point and the end point of the Bezier curve, and the arc phase connection point of the double arc is the midpoint of the connecting line of the starting point and the end point;
if the calculated distance between the double circular arcs and the Bezier curve control points is smaller than the tolerance value tol, returning to true, and recording the generated double circular arcs; otherwise, returning to false, and continuously dividing the Bezier curve into 2 sub-Bezier curves and adding the curves into the stack.
A robotic motion device that approximates a NURBS curve with a bi-circular arc curve, comprising:
the decomposition module is used for decomposing the NURBS curve into a plurality of equivalent Bezier curves;
the approximation module is used for approximating each section of Bezier curve by a double-arc to obtain a double-arc approximated NURBS curve;
and the movement module is used for enabling the robot tool to move according to the NURBS curve similar to the double circular arcs.
Further, the decomposition module increases the multiplicity of each internal node of the NURBS curve to the number of times of the curve, and the portion between every two nodes of the original NURBS curve forms an equivalent Bezier curve.
Further, the approximation module sets a tolerance value tol, which specifies that the maximum distance of the generated bi-arc curve from the original NURBS curve does not exceed tol.
Further, the approximation module performs the following operations to achieve a bi-arc approximation of each segment of the Bezier curve:
judging whether the distances between all internal control points of the Bezier curve and a straight line formed by the control points at two ends exceed a tolerance distance tol; if the number of the sub-paths exceeds the preset number, executing a split Bezier function, dividing the Bezier curve into 2 equal sub-Bezier curves, and adding the sub-Bezier curves into a stack; if the two arcs do not exceed the two tangent points, 2 connected arcs are constructed to approximate a Bezier curve, tangent lines at the connecting positions of the 2 arcs are parallel, the starting point and the end point of the double arc are respectively the starting point and the end point of the Bezier curve, and the arc phase connection point of the double arc is the midpoint of the connecting line of the starting point and the end point;
if the calculated distance between the double circular arcs and the Bezier curve control points is smaller than the tolerance value tol, returning to true, and recording the generated double circular arcs; otherwise, returning to false, and continuously dividing the Bezier curve into 2 sub-Bezier curves and adding the curves into the stack.
The invention has the following beneficial effects:
the method provided by the invention can enable the mechanical arm to approximate any three-dimensional NURBS curve on the workpiece object in a linear or circular motion mode, and can specify the approximation degree and ensure that the distance between the approximation curve and the original curve does not exceed the required distance. The method has the characteristics of simplicity, rapidness and accuracy. Some existing methods can only process plane conditions, some are very complex, and some cannot guarantee approximate precision.
Drawings
FIG. 1 is a flow chart of the steps of the method of the present invention.
Detailed Description
In order to make the aforementioned objects, features and advantages of the present invention comprehensible, the present invention shall be described in further detail with reference to the following detailed description and accompanying drawings.
The invention relates to a robot motion method for approximating a NURBS curve by a double-circular-arc curve, which comprises the steps of approximating the NURBS curve by the double circular arc, and enabling a robot tool to move in a certain range (such as 5 millimeters) near the NURBS curve so as to meet the actual use requirement. FIG. 1 is a flow chart of the steps of the method of the present invention.
The scheme of approximating the NURBS curve with double arcs generally divides into 2 steps. In the first step, the NURBS curve is decomposed into several equivalent segments of Bezier curves. And secondly, for each section of Bezier curve, approximating by a double-arc.
Decomposition of NURBS curves into Bezier curves
NURBS curves contain the following 5 elements:
and (3) control points: the control points of the NURBS curve generally define the shape of the curve, with the curve lying entirely within the convex polygon formed by the control points.
Weight of control point: the weight of a control point defines the ability of the control point to influence the shape of the curve, with the greater the weight, the more the curve stretches in the direction of the control point.
Number of curves: the degree of the mathematical polynomial representing the curve.
And (3) node: the nodes specify the value ranges of the arguments occupied by each basis function of the curve.
The number of nodes is: the node weights also affect the range of values of the arguments occupied by the curve basis functions and affect the shape of the curve segments.
The steps of decomposing the NURBS curve into equivalent Bezier curves are: the multiplicity of each internal node of the NURBS curve is increased to the number of curves. Thus, the portion between every 2 original NURBS curve nodes forms an equivalent Bezier curve.
For example, assume that the original NURBS curve is a 3-degree curve, there are 7 control points, nodes are 0,1,2,3,4, respectively, and the node weights are 4,1,1,1, 4. To decompose into a Bezier curve, the number of 3 internal nodes 1,2,3 needs to be increased to 3, and the corresponding control points are increased. The resulting new equivalent NURBS curve has 13 control points, nodes are also 0,1,2,3,4, and the node multiplicity is 4,3,3,3, 4. The equivalent Bezier curve obtained has 4. Each Bezier curve shares a control point with the previous Bezier curve.
We write the nodes of the new equivalent NURBS curve as: 00001112223334444, where the first 13 nodes correspond to 13 control points. Each 3 NURBS basis function uses 5 nodes. The 13 control points correspond to the NURBS basis functions corresponding to the first 13 nodes, respectively. The node used for the last basis function is 34444.
This new NURBS curve consists of a 4-segment Bezier curve. The control points corresponding to the Bezier curve are respectively the control points corresponding to the following nodes: 0000,0111,1222,2333. The 3-fold Bezier curve requires 4 control points. And 2 adjacent Bezier curves share a control point to ensure that the curves are continuous.
2. Approximation of Bezier curves by double arcs
We set a tolerance value tol, which specifies that the maximum distance of the generated bi-arc curve from the original NURBS curve does not exceed tol.
The method of approximating a Bezier curve with a double circular arc is an iterative method. The algorithm flow is as follows:
bstack is the stack that holds the Bezier curve currently needed to be processed, and b is the top element of the stack.
The algorithm is as follows:
when bstack is not empty, repeating the steps of:
the element b at the top of the stack is taken out,
if issright (b), i.e. b is sufficiently straight,
constructing 2 circular arcs to approximate b, namely executing tryBiarc (b);
if the circular arc does not meet the requirement, executing split Bezier (b);
otherwise, split Bezier (b) is executed.
The key operations in the above flow are explained separately below.
isserial (b) determines whether all the inner control points of the Bezier curve are more than the tolerance distance tol from the straight line formed by the two end control points. If so, a split Bezier function is performed, dividing the Bezier curve into 2 sub-Bezier curves, and adding the sub-Bezier curves into the stack bstack. If not, the tryBiarc () function is executed.
tryBiarc () constructs 2 connected arcs to approximate a Bezier curve, with the tangents at the locations where the 2 arcs are connected being parallel. The start and end points of the bi-arc are the start and end points of the Bezier curve, respectively. The arc phase connection point of the double arcs is the midpoint of the connecting line of the starting point and the end point. Accordingly, 2 centers and radii of the double circular arc can be calculated geometrically.
And if the calculated distance between the double circular arcs and the control points of the Bezier curve is less than the tolerance value tol, returning to true, and recording the generated double circular arcs. Otherwise, returning to false, continuously executing the split Bezier function, dividing the Bezier curve into 2 sub-Bezier curves, and adding the sub-Bezier curves into the stack bstack.
Wherein the split Bezier decomposes the Bezier curve into 2 equal sub-Bezier curves.
Based on the same inventive concept, another embodiment of the present invention provides a robot moving device that approximates a NURBS curve with a bi-circular arc curve, including:
the decomposition module is used for decomposing the NURBS curve into a plurality of equivalent Bezier curves;
the approximation module is used for approximating each section of Bezier curve by a double-arc to obtain a double-arc approximated NURBS curve;
and the movement module is used for enabling the robot tool to move according to the NURBS curve similar to the double circular arcs.
The decomposition module increases the number of times of each internal node of the NURBS curve to the number of times of the curve, and the part between every two nodes of the original NURBS curve forms an equivalent Bezier curve.
The approximation module sets a tolerance value tol, and the maximum distance between the generated double-arc curve and the original NURBS curve is not more than tol.
The approximation module performs the following operations to achieve a bi-arc approximation of each segment of the Bezier curve:
judging whether the distances between all internal control points of the Bezier curve and a straight line formed by the control points at two ends exceed a tolerance distance tol; if the number of the sub-paths exceeds the preset number, executing a split Bezier function, dividing the Bezier curve into 2 equal sub-Bezier curves, and adding the sub-Bezier curves into a stack; if the two arcs do not exceed the two tangent points, 2 connected arcs are constructed to approximate a Bezier curve, tangent lines at the connecting positions of the 2 arcs are parallel, the starting point and the end point of the double arc are respectively the starting point and the end point of the Bezier curve, and the arc phase connection point of the double arc is the midpoint of the connecting line of the starting point and the end point;
if the calculated distance between the double circular arcs and the Bezier curve control points is smaller than the tolerance value tol, returning to true, and recording the generated double circular arcs; otherwise, returning to false, and continuously dividing the Bezier curve into 2 sub-Bezier curves and adding the curves into the stack.
Based on the same inventive concept, another embodiment of the present invention provides an electronic device (computer, server, smartphone, etc.) comprising a memory storing a computer program configured to be executed by the processor, and a processor, the computer program comprising instructions for performing the steps of the inventive method.
Based on the same inventive concept, another embodiment of the present invention provides a computer-readable storage medium (e.g., ROM/RAM, magnetic disk, optical disk) storing a computer program, which when executed by a computer, performs the steps of the inventive method.
The foregoing disclosure of the specific embodiments of the present invention and the accompanying drawings is directed to an understanding of the present invention and its implementation, and it will be appreciated by those skilled in the art that various alternatives, modifications, and variations may be made without departing from the spirit and scope of the invention. The present invention should not be limited to the disclosure of the embodiments and drawings in the specification, and the scope of the present invention is defined by the scope of the claims.

Claims (10)

1. A method of robot motion that approximates a NURBS curve with a bi-arc curve, comprising the steps of:
decomposing the NURBS curve into a plurality of equivalent Bezier curves;
approximating each segment of Bezier curve by a double-arc to obtain a double-arc approximated NURBS curve;
the robot tool is moved according to the NURBS curve approximated by a double circular arc.
2. The method of claim 1, wherein decomposing the NURBS curve into equivalent segments of Bezier curves comprises:
and increasing the times of the multiple number of each internal node of the NURBS curve to the curve, wherein the part between every two nodes of the original NURBS curve forms an equivalent Bezier curve.
3. The method according to claim 1, wherein said approximating each segment of the Bezier curve with a double circular arc comprises:
setting a tolerance value tol, and setting the maximum distance of the generated double-arc curve from the original NURBS curve not to exceed tol.
4. The method according to claim 3, wherein said approximating each segment of the Bezier curve with a double circular arc further comprises:
judging whether the distances between all internal control points of the Bezier curve and a straight line formed by the control points at two ends exceed a tolerance distance tol; if the number of the sub-paths exceeds the preset number, executing a split Bezier function, dividing the Bezier curve into 2 equal sub-Bezier curves, and adding the sub-Bezier curves into a stack; if the two arcs do not exceed the two tangent points, 2 connected arcs are constructed to approximate a Bezier curve, tangent lines at the connecting positions of the 2 arcs are parallel, the starting point and the end point of the double arc are respectively the starting point and the end point of the Bezier curve, and the arc phase connection point of the double arc is the midpoint of the connecting line of the starting point and the end point;
if the calculated distance between the double circular arcs and the Bezier curve control points is smaller than the tolerance value tol, returning to true, and recording the generated double circular arcs; otherwise, returning to false, and continuously dividing the Bezier curve into 2 sub-Bezier curves and adding the curves into the stack.
5. A robotic motion device for approximating a NURBS curve with a bi-circular arc curve, comprising:
the decomposition module is used for decomposing the NURBS curve into a plurality of equivalent Bezier curves;
the approximation module is used for approximating each section of Bezier curve by a double-arc to obtain a double-arc approximated NURBS curve;
and the movement module is used for enabling the robot tool to move according to the NURBS curve similar to the double circular arcs.
6. The apparatus of claim 5, wherein the decomposition module increases the multiplicity of each internal node of the NURBS curve to the number of times the curve, the portion between every two original NURBS curve nodes forming an equivalent Bezier curve.
7. The apparatus of claim 5, wherein the approximation module sets a tolerance value tol, specifying that a maximum distance of the generated bi-circular arc curve from the original NURBS curve does not exceed tol.
8. The apparatus of claim 5, wherein the approximation module performs the following operations to achieve a bi-arc approximation of each segment of a Bezier curve:
judging whether the distances between all internal control points of the Bezier curve and a straight line formed by the control points at two ends exceed a tolerance distance tol; if the number of the sub-paths exceeds the preset number, executing a split Bezier function, dividing the Bezier curve into 2 equal sub-Bezier curves, and adding the sub-Bezier curves into a stack; if the two arcs do not exceed the two tangent points, 2 connected arcs are constructed to approximate a Bezier curve, tangent lines at the connecting positions of the 2 arcs are parallel, the starting point and the end point of the double arc are respectively the starting point and the end point of the Bezier curve, and the arc phase connection point of the double arc is the midpoint of the connecting line of the starting point and the end point;
if the calculated distance between the double circular arcs and the Bezier curve control points is smaller than the tolerance value tol, returning to true, and recording the generated double circular arcs; otherwise, returning to false, and continuously dividing the Bezier curve into 2 sub-Bezier curves and adding the curves into the stack.
9. An electronic apparatus, comprising a memory and a processor, the memory storing a computer program configured to be executed by the processor, the computer program comprising instructions for performing the method of any of claims 1 to 4.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program which, when executed by a computer, implements the method of any one of claims 1 to 4.
CN202011179607.2A 2020-10-29 2020-10-29 Robot movement method and device for approximating NURBS curve by double arcs Active CN112356025B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011179607.2A CN112356025B (en) 2020-10-29 2020-10-29 Robot movement method and device for approximating NURBS curve by double arcs

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011179607.2A CN112356025B (en) 2020-10-29 2020-10-29 Robot movement method and device for approximating NURBS curve by double arcs

Publications (2)

Publication Number Publication Date
CN112356025A true CN112356025A (en) 2021-02-12
CN112356025B CN112356025B (en) 2022-05-03

Family

ID=74512548

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011179607.2A Active CN112356025B (en) 2020-10-29 2020-10-29 Robot movement method and device for approximating NURBS curve by double arcs

Country Status (1)

Country Link
CN (1) CN112356025B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6906718B1 (en) * 1997-04-25 2005-06-14 Microsoft Corporation Method and system for efficiently evaluating and drawing NURBS surfaces for 3D graphics
CN108508847A (en) * 2018-01-22 2018-09-07 浙江工业大学 A method of the high small line segment of error is bent based on approximation etc. and approaches Nurbs curves
CN109583070A (en) * 2018-11-23 2019-04-05 拓卡奔马机电科技有限公司 A kind of method and system, computer readable storage medium, terminal optimizing trimmed curve quality
CN111061213A (en) * 2019-12-04 2020-04-24 天津大学 Processing method based on Bezier curve corner smooth transition algorithm

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6906718B1 (en) * 1997-04-25 2005-06-14 Microsoft Corporation Method and system for efficiently evaluating and drawing NURBS surfaces for 3D graphics
CN108508847A (en) * 2018-01-22 2018-09-07 浙江工业大学 A method of the high small line segment of error is bent based on approximation etc. and approaches Nurbs curves
CN109583070A (en) * 2018-11-23 2019-04-05 拓卡奔马机电科技有限公司 A kind of method and system, computer readable storage medium, terminal optimizing trimmed curve quality
CN111061213A (en) * 2019-12-04 2020-04-24 天津大学 Processing method based on Bezier curve corner smooth transition algorithm

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
徐少平等: "基于单位圆弧段逼近的B6zier曲线等距线生成算法", 《工程图学学报》 *
汪国平等: "平面NURBS曲线及其Offset的双圆弧逼近", 《软件学报》 *

Also Published As

Publication number Publication date
CN112356025B (en) 2022-05-03

Similar Documents

Publication Publication Date Title
CN108582071B (en) Industrial robot programming track diagnosis and speed optimization method
Rossi et al. Robot trajectory planning by assigning positions and tangential velocities
CN106826829A (en) A kind of industrial robot fairing trace generator method of Controllable Error
Bahr et al. A real-time scheme of cubic parametric curve interpolations for CNC systems
Shen et al. A smooth and undistorted toolpath interpolation method for 5-DoF parallel kinematic machines
US20120265331A1 (en) Five-axis flank milling system for machining curved surface and the tool-path planning method thereof
JPH03171303A (en) Method and apparatus for generating data structure
Shi et al. Multi-objective optimal trajectory planning of manipulators based on quintic NURBS
Li et al. The design of a NURBS pre-interpolator for five-axis machining
JP4644490B2 (en) System and method for drawing complex n-curves for direct control of tool motion
CN112405527A (en) Method for processing arc track on surface of workpiece and related device
Wen et al. A novel 3D path following control framework for robots performing surface finishing tasks
Wen et al. Path-constrained and collision-free optimal trajectory planning for robot manipulators
CN108803480B (en) Method, apparatus and computer readable storage medium for G2 continuous optical switching between tracks
US11813756B2 (en) Disassembly based assembly planning
CN112356025B (en) Robot movement method and device for approximating NURBS curve by double arcs
CN111880473A (en) Motion control method, system, device, robot and storage medium
Muhammed et al. Towards Comparison and Real Time Implementation of Path Planning Methods for 2R Planar Manipulator with Obstacles Avoidance.
CN114491865B (en) Self-adaptive discrete method for workpiece surface profile
CN116690557A (en) Method and device for controlling humanoid three-dimensional scanning motion based on point cloud
CN114193436B (en) Robot working space optimization method, device, storage medium and equipment
Nagata et al. Reverse and forward post processors for a robot machining system
Kim et al. Real-time monitoring and control system of an industrial robot with 6 degrees of freedom for grinding and polishing of aspherical mirror
CN110948489A (en) Method and system for limiting safe working space of live working robot
Moctezuma et al. Free shape paths in industrial robots

Legal Events

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