CN105082156B - Space trajectory smoothing method based on speed optimum control - Google Patents
Space trajectory smoothing method based on speed optimum control Download PDFInfo
- Publication number
- CN105082156B CN105082156B CN201510493101.1A CN201510493101A CN105082156B CN 105082156 B CN105082156 B CN 105082156B CN 201510493101 A CN201510493101 A CN 201510493101A CN 105082156 B CN105082156 B CN 105082156B
- Authority
- CN
- China
- Prior art keywords
- point
- trajectory
- turning
- coordinate system
- coordinates
- 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.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 31
- 238000009499 grossing Methods 0.000 title claims abstract description 20
- 239000013598 vector Substances 0.000 claims description 19
- 230000009466 transformation Effects 0.000 claims description 18
- 230000007704 transition Effects 0.000 claims description 14
- 230000008569 process Effects 0.000 claims description 7
- 239000011159 matrix material Substances 0.000 claims description 5
- 238000004364 calculation method Methods 0.000 claims description 3
- 239000012636 effector Substances 0.000 abstract description 4
- 238000006073 displacement reaction Methods 0.000 description 4
- 230000001133 acceleration Effects 0.000 description 3
- 238000010586 diagram Methods 0.000 description 2
- 239000000463 material Substances 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000006243 chemical reaction Methods 0.000 description 1
- 238000011156 evaluation Methods 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Landscapes
- Manipulator (AREA)
Abstract
本发明提出了一种基于速度最优控制的空间轨迹平滑方法,包括如下步骤:获取机器人机械臂运行的空间轨迹的起点、中点和终点、预设转弯区半径和预设参数;判断所述预设转弯区半径r是否超过所述第一简单轨迹的长度的一半;选取所述机器人的转弯方式为等长度转弯或等时间转弯,计算得到第一和第二简单轨迹相交形成的M、S和E点的坐标;根据计算得到S、M和E点的坐标建立局部坐标系,计算所述空间轨迹在所述局部坐标系下的转弯区的轨迹方程,其中,所述轨迹方程为平滑的转弯区的二次曲线。本发明可以保证速度方向的连续性,可方便定位机械臂的末端执行器在任意时刻的空间位置,便于控制。
The present invention proposes a space trajectory smoothing method based on speed optimal control, comprising the following steps: obtaining the starting point, midpoint and end point, preset turning area radius and preset parameters of the space trajectory of the robot manipulator; judging the Whether the radius r of the preset turning area exceeds half of the length of the first simple trajectory; the turning mode of the robot is selected as a turn of equal length or equal time, and the M and S formed by the intersection of the first and second simple trajectories are calculated. and the coordinates of the E point; according to the calculated coordinates of the S, M and E points, the local coordinate system is established, and the trajectory equation of the turning area of the space trajectory under the local coordinate system is calculated, wherein the trajectory equation is smooth Conic curve for the turn zone. The invention can ensure the continuity of the speed direction, can conveniently locate the spatial position of the end effector of the mechanical arm at any time, and is convenient for control.
Description
技术领域technical field
本发明涉及机器人控制技术领域,特别涉及一种基于速度最优控制的空间轨迹平滑方法。The invention relates to the technical field of robot control, in particular to a space trajectory smoothing method based on speed optimal control.
背景技术Background technique
空间轨迹平滑是空间运动学的一个分支。空间轨迹可由一系列简单轨迹拼接而成。简单轨迹分为直线和圆弧两种,其起点和终点称为节点。需进行操作任务的节点称为停止点,无操作任务的节点称为过渡点。在运动过程中,由速度为零至达到制定速度、由制定速度减速至零,都是十分耗费时间的。为了提高整体运动速度,提升工作效率,就要想方设法免去不必要的加减速过程,尽可能保持高速运行。过渡点的存在往往是为了绕开障碍物。沿轨迹行进过程中,无需精确抵达过渡点,因此提出转弯区平滑的概念,即在过渡点所处的轨迹相接处,采取平滑曲线过渡,保持较高速度通过新的平滑轨迹,从而提升转弯速度。Spatial trajectory smoothing is a branch of spatial kinematics. Spatial trajectories can be concatenated from a series of simple trajectories. There are two types of simple trajectories: straight line and circular arc, and their start and end points are called nodes. Nodes that need to perform operational tasks are called stop points, and nodes that do not have operational tasks are called transition points. During the movement, it takes a lot of time to go from zero speed to reaching the specified speed, and to decelerate from the specified speed to zero. In order to increase the overall movement speed and improve work efficiency, it is necessary to find ways to avoid unnecessary acceleration and deceleration processes, and to maintain high-speed operation as much as possible. Transition points often exist to avoid obstacles. In the process of traveling along the trajectory, there is no need to reach the transition point accurately, so the concept of smooth turning area is proposed, that is, at the junction of the trajectories where the transition point is located, a smooth curve transition is adopted, and a new smooth trajectory is maintained at a high speed, thereby improving the turning speed.
现有轨迹平滑方案主要有以下两类。The existing trajectory smoothing schemes mainly fall into the following two categories.
(1)基于速度规划曲线,按照等时的原则(即按照原速度规划,转弯起点到转弯中间点的时间与中间点到终点的时间相等)进行轨迹的平滑规划。由速度规划曲线计算转弯路径上各点速度,进行位移的空间向量叠加。(1) Based on the speed planning curve, the smooth planning of the trajectory is carried out according to the principle of isochronism (that is, according to the original speed planning, the time from the starting point of the turn to the middle point of the turn is equal to the time from the middle point to the end point). The speed of each point on the turning path is calculated from the speed planning curve, and the space vector superposition of the displacement is carried out.
(2)基于速度规划曲线,按照等距原则(即按照原速度规划,转弯起点到转弯中间点的距离与中间点到终点的距离相等)进行轨迹的平滑规划。由速度规划曲线计算转弯路径上各点速度,进行位移的空间向量叠加。(2) Based on the speed planning curve, the smooth planning of the trajectory is carried out according to the principle of equidistance (that is, according to the original speed planning, the distance from the starting point of the turn to the middle point of the turn is equal to the distance from the middle point to the end point). The speed of each point on the turning path is calculated from the speed planning curve, and the space vector superposition of the displacement is carried out.
现有的上述两种方案的缺陷在于:没有显式的轨迹表达式,或轨迹表达式过于复杂,不是简单曲线,难以完成对机械臂轨迹规划的精确控制,也不利于计算障碍规避空间。同时,按照上述方案执行,得到的在欧几里得空间中的轨迹并不是简单平滑曲线,其轨迹不直观,不利于操作者的对运行结果的直接观察与评价。The disadvantages of the above two existing schemes are: there is no explicit trajectory expression, or the trajectory expression is too complicated, not a simple curve, it is difficult to complete the precise control of the trajectory planning of the manipulator, and it is not conducive to calculating the obstacle avoidance space. At the same time, according to the above scheme, the obtained trajectory in the Euclidean space is not a simple smooth curve, and its trajectory is not intuitive, which is not conducive to the operator's direct observation and evaluation of the operation results.
发明内容Contents of the invention
本发明的目的旨在至少解决所述技术缺陷之一。The aim of the present invention is to solve at least one of said technical drawbacks.
为此,本发明的目的在于提出一种基于速度最优控制的空间轨迹平滑方法,可以保证速度方向的连续性,可方便定位机械臂的末端执行器在任意时刻的空间位置,便于控制。For this reason, the object of the present invention is to propose a space trajectory smoothing method based on speed optimal control, which can ensure the continuity of the speed direction, and can conveniently locate the spatial position of the end effector of the mechanical arm at any time, which is convenient for control.
为了实现上述目的,本发明的实施例提供一种基于速度最优控制的空间轨迹平滑方法,包括如下步骤:In order to achieve the above object, an embodiment of the present invention provides a space trajectory smoothing method based on speed optimal control, including the following steps:
步骤S1,获取机器人机械臂运行的空间轨迹的起点Ps、中点Pm、终点Pe、预设转弯区半径r和预设参数flag_dist,其中,所述起点Ps和中点Pm之间构成第一简单轨迹,所述中点Pm和终点Pe之间构成第二简单轨迹;Step S1, obtain the starting point Ps, the midpoint Pm, the end point Pe, the radius r of the preset turning area and the preset parameter flag_dist of the spatial trajectory of the robot arm, wherein the first simple structure between the starting point Ps and the midpoint Pm Trajectory, the second simple trajectory is formed between the midpoint Pm and the end point Pe;
步骤S2,将所述预设转弯区半径r与所述第一简单轨迹和所述第二简单轨迹的长度进行比较,如果所述预设转弯区半径r没有超过所述第一简单轨迹的长度的一半,且没有超过所述的第二简单轨迹的长度的一半,则执行步骤S3;Step S2, comparing the preset turning area radius r with the lengths of the first simple trajectory and the second simple trajectory, if the preset turning area radius r does not exceed the length of the first simple trajectory half of the length of the second simple trajectory, and does not exceed half of the length of the second simple trajectory, then perform step S3;
步骤S3,选取所述机器人的转弯方式为等长度转弯或等时间转弯,计算得到第一和第二简单轨迹相交形成的过渡点M的坐标、所述第一和第二简单轨迹分别与预设圆形相交的S和E点的坐标;Step S3, select the turning mode of the robot as equal-length turns or equal-time turns, and calculate the coordinates of the transition point M formed by the intersection of the first and second simple trajectories, and the first and second simple trajectories are respectively compared with the preset The coordinates of points S and E where the circles intersect;
步骤S4,根据计算得到S、M和E点的坐标建立局部坐标系,计算所述空间轨迹在所述局部坐标系下的转弯区的轨迹方程,其中,所述轨迹方程为平滑的转弯区的二次曲线。Step S4, establish a local coordinate system according to the calculated coordinates of points S, M and E, and calculate the trajectory equation of the turning area of the space trajectory in the local coordinate system, wherein the trajectory equation is a smooth turning area quadratic curve.
进一步,在所述步骤S2中,采用下式判断所述预设转弯区半径r是否超过所述第一简单轨迹的长度的一半和所述第二简单轨迹的长度的一半,Further, in the step S2, the following formula is used to judge whether the radius r of the preset turning area exceeds half the length of the first simple trajectory and half the length of the second simple trajectory,
其中,是由起点Ps指向中点Pm的向量,是由中点Pm指向终点Pe的向量。in, is a vector from the starting point Ps to the midpoint Pm, is a vector from the midpoint Pm to the end point Pe.
进一步,在所述步骤S3中,当选取的转弯方式为等长度转弯时,计算S、M和E点坐标包括如下步骤:Further, in the step S3, when the selected turning mode is equal-length turning, calculating the coordinates of S, M and E points includes the following steps:
根据等长度转弯需要满足采用向量叠加方法,由中点M的坐标分别叠加两个方向上长度为r的向量,即可得转弯区的起点坐标S、终点坐标E,其中,中点M即为点Pm,计算出点S和E点坐标如下:According to the equal length turn needs to meet Using the vector superposition method, the coordinates of the midpoint M are superimposed respectively The vectors with length r in the two directions can be used to obtain the starting point coordinate S and the ending point coordinate E of the turning area, where the midpoint M is the point Pm, and the coordinates of points S and E are calculated as follows:
进一步,在所述步骤S3中,当选取的转弯方式为等时间转弯时,包括如下步骤:Further, in the step S3, when the selected turning mode is an equal time turning, the following steps are included:
根据等时间转弯需要满足t1=t2,其中,t1为SM段转弯时间,t2为ME段转弯时间,Turning according to equal time needs to satisfy t 1 =t 2 , where t 1 is the turning time of SM section, t 2 is the turning time of ME section,
t=min(t1,t2),t=min(t 1 , t 2 ),
代入速度规划,计算得到S、E点距M点距离dists、dists,Substituting into the speed planning, calculate the distances dist s and dist s from points S and E to point M,
进一步,在所述步骤S4中,所述计算所述空间轨迹在所述局部坐标系下的转弯区的轨迹方程,包括如下步骤:Further, in the step S4, the calculation of the trajectory equation of the turning area of the spatial trajectory in the local coordinate system includes the following steps:
步骤S41,计算坐标变换参数θ和A,包括如下步骤:Step S41, calculating the coordinate transformation parameters θ and A, includes the following steps:
其中,0为坐标轴进行旋转变换的角度,A为旋转矩阵,xSM为根据所述步骤S3中计算出的S点和M点在坐标系的x轴方向上的距离,xME为根据所述步骤S3中计算出的M点和E点在坐标系的x轴方向上的距离,ySM为根据所述步骤S3中计算出的S点和M点在坐标系的y轴方向上的距离,yME为根据所述步骤S3中计算出的M点和E点在坐标系的y轴方向上的距离;Wherein, 0 is the angle at which the coordinate axes are rotated, A is a rotation matrix, and xSM is the distance between the S point and the M point calculated in the step S3 in the x-axis direction of the coordinate system, and xME is based on the calculated The distance between the M point and the E point calculated in the step S3 on the x-axis direction of the coordinate system, and ySM is the distance between the S point calculated in the step S3 and the M point in the y-axis direction of the coordinate system , y ME is the distance between the M point and the E point in the y-axis direction of the coordinate system calculated according to the step S3;
步骤S42,导出向量坐标和包括如下步骤:Step S42, derive vector coordinates with Including the following steps:
其中,为在所述局部坐标系下的表示,为在所述局部坐标系下的表示,in, for Representation in the local coordinate system, for Representation in the local coordinate system,
步骤43,计算所述空间轨迹在所述局部坐标系下的转弯区的轨迹方程y为:Step 43, calculating the trajectory equation y of the turning area of the space trajectory in the local coordinate system as:
y=ax2,y=ax 2 ,
其中,a为所述轨迹方程对应的二次曲线的参数, O=S-As,r为预设转弯半径,,p、q为抛物线参数,O为所述局部坐标系的坐标原点在全局坐标系下的表示,As为坐标变换过程中的平移部分,s(xs,ys),m(xm,ym),分别为转弯区的起点、中间点、终点坐标。in, a is the parameter of the quadratic curve corresponding to the trajectory equation, O=S-As, r is the default turning radius, p, q are parabolic parameters, O is the representation of the coordinate origin of the local coordinate system in the global coordinate system, As is the translation part in the coordinate transformation process, s (x s , y s ), m(x m , y m ), are the coordinates of the starting point, middle point, and end point of the turning area, respectively.
根据本发明实施例的基于速度最优控制的空间轨迹平滑方法,可以将机器人机械臂运行空间轨迹的二次曲线经坐标变换生成平滑转弯区表达式,从而保证速度方向的连续性,通过平滑过渡两直线轨迹,结合S型速度规划,得到加速度、速度、位移平滑的转弯方案,轨迹简单直观,可方便定位机械臂的末端执行器在任意时刻的空间位置,便于控制。同时由于轨迹为简单的二次曲线,因此可简便计算出障碍规避空间。此外,本发明可以适应等距与等时两种转弯需求,用户可根据实际情况,方便地比较与选取更优的方案。According to the space trajectory smoothing method based on speed optimal control according to the embodiment of the present invention, the quadratic curve of the space trajectory of the robot manipulator can be converted into a smooth turning area expression through coordinate transformation, thereby ensuring the continuity of the velocity direction, through smooth transition Two straight-line trajectories, combined with S-shaped speed planning, can obtain a turning plan with smooth acceleration, speed, and displacement. The trajectory is simple and intuitive, which can easily locate the spatial position of the end effector of the robotic arm at any time, and is easy to control. At the same time, because the trajectory is a simple quadratic curve, the obstacle avoidance space can be easily calculated. In addition, the present invention can adapt to both equidistant and isochronous turning requirements, and the user can conveniently compare and select a better solution according to the actual situation.
本发明附加的方面和优点将在下面的描述中部分给出,部分将从下面的描述中变得明显,或通过本发明的实践了解到。Additional aspects and advantages of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention.
附图说明Description of drawings
本发明的上述和/或附加的方面和优点从结合下面附图对实施例的描述中将变得明显和容易理解,其中:The above and/or additional aspects and advantages of the present invention will become apparent and comprehensible from the description of the embodiments in conjunction with the following drawings, wherein:
图1为根据本发明一个实施例的基于速度最优控制的空间轨迹平滑方法的流程图;Fig. 1 is the flow chart of the space trajectory smoothing method based on speed optimal control according to one embodiment of the present invention;
图2为根据本发明实施例的第一和第二简单轨迹的示意图;Figure 2 is a schematic diagram of first and second simple trajectories according to an embodiment of the present invention;
图3根据本发明另一个实施例的基于速度最优控制的空间轨迹平滑方法的流程图。Fig. 3 is a flowchart of a method for smoothing a space trajectory based on speed optimal control according to another embodiment of the present invention.
具体实施方式detailed description
下面详细描述本发明的实施例,实施例的示例在附图中示出,其中自始至终相同或类似的标号表示相同或类似的元件或具有相同或类似功能的元件。下面通过参考附图描述的实施例是示例性的,旨在用于解释本发明,而不能理解为对本发明的限制。Embodiments of the present invention are described in detail below, and examples of the embodiments are shown in the drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below by referring to the figures are exemplary and are intended to explain the present invention and should not be construed as limiting the present invention.
本发明提一种基于速度最优控制的空间轨迹平滑方法,利用二次曲线的平滑特性,根据两直线路径起点、终点及所夹转弯区的转弯半径,生成二次曲线,平滑连接两直线路径,将二次曲线经坐标变换生成平滑转弯区表达式,从而保证速度方向的连续性。The present invention provides a space trajectory smoothing method based on optimal speed control, which utilizes the smoothing characteristics of the quadratic curve to generate a quadratic curve according to the starting point, the end point, and the turning radius of the enclosed turning area of the two straight-line paths, and smoothly connects the two straight-line paths , transform the quadratic curve to generate a smooth turning area expression, so as to ensure the continuity of the speed direction.
如图1所示,本发明实施例的基于速度最优控制的空间轨迹平滑方法,包括如下步骤:As shown in Figure 1, the space trajectory smoothing method based on speed optimal control of the embodiment of the present invention includes the following steps:
步骤S1,获取机器人机械臂运行的空间轨迹的起点Ps、中点Pm、终点Pe、预设转弯区半径r和预设参数flag_dist。其中,起点Ps和中点Pm之间构成第一简单轨迹,中点Pm和终点Pe之间构成第二简单轨迹。预设参数flag_dist为采取等距转弯或等时转弯的参数,其值为1时为等距转弯,否则为等时转弯。Step S1, obtaining the starting point Ps, the midpoint Pm, the ending point Pe, the radius r of the preset turning area and the preset parameter flag_dist of the spatial trajectory of the robot arm. Among them, the first simple trajectory is formed between the starting point Ps and the midpoint Pm, and the second simple trajectory is formed between the midpoint Pm and the end point Pe. The preset parameter flag_dist is a parameter for taking an equidistant turn or an isochronous turn. When its value is 1, it is an equidistant turn, otherwise it is an isochronous turn.
图2为根据本发明实施例的第一和第二简单轨迹的示意图。Figure 2 is a schematic diagram of first and second simple trajectories according to an embodiment of the present invention.
首先对转弯区的定义进行说明:在两个简单轨迹相交形成的过渡点M处,以过渡点为原点,以某一特定值R为半径做圆,相交两简单轨迹于S,E两点,由线段SM,ME,圆弧ES围成的区域即为转弯区。参考图2,第一简单轨迹的起点为Ps,终点为过渡点M;第二简单轨迹的起点为M,终点为Pe。第一和第二简单轨迹均为直线轨迹。First, the definition of the turning area is explained: At the transition point M formed by the intersection of two simple trajectories, the transition point is taken as the origin, and a certain value R is used as the radius to make a circle, and the two simple trajectories intersect at S and E. The area enclosed by the line segments SM, ME, and arc ES is the turning area. Referring to FIG. 2 , the starting point of the first simple trajectory is Ps, and the ending point is transition point M; the starting point of the second simple trajectory is M, and the ending point is Pe. Both the first and second simple trajectories are straight-line trajectories.
在开始规划转弯区轨迹之前,需由两相交简单轨迹确定当前路径所在的平面,并建立二维平面与三维空间的坐标转换方程,然后确定各关键点在二维平面的坐标。后续步骤均在该平面上进行。Before starting to plan the trajectory of the turning area, it is necessary to determine the plane of the current path from the two intersecting simple trajectories, and establish the coordinate conversion equation between the two-dimensional plane and the three-dimensional space, and then determine the coordinates of each key point on the two-dimensional plane. Subsequent steps are all carried out on this plane.
步骤S2,将预设转弯区半径r与第一简单轨迹和第二简单轨迹的长度进行比较,如果预设转弯区半径r没有超过第一简单轨迹的长度的一半,且没有超过的第二简单轨迹的长度的一半,则执行步骤S3。Step S2, comparing the preset turning zone radius r with the lengths of the first simple trajectory and the second simple trajectory, if the preset turning zone radius r does not exceed half of the length of the first simple trajectory, and does not exceed the length of the second simple trajectory half of the length of the track, execute step S3.
在本步骤中,采用下式判断预设转弯区半径r是否超过第一简单轨迹的长度的一半和第二简单轨迹的长度的一半,In this step, the following formula is used to judge whether the radius r of the preset turning area exceeds half of the length of the first simple trajectory and half of the length of the second simple trajectory,
其中,是由起点Ps指向中点Pm的向量,即原轨迹中的第一简单轨迹,是由中点Pm指向终点Pe的向量,即原轨迹中的第二简单轨迹。in, is the vector from the starting point Ps to the midpoint Pm, that is, the first simple trajectory in the original trajectory, is the vector from the midpoint Pm to the end point Pe, that is, the second simple trajectory in the original trajectory.
步骤S3,选取机器人的转弯方式为等长度转弯或等时间转弯,计算得到第一和第二简单轨迹相交形成的过渡点M的坐标、第一和第二简单轨迹分别与预设圆形相交的S和E点的坐标。Step S3, select the turning mode of the robot as an equal-length turn or an equal-time turn, and calculate the coordinates of the transition point M formed by the intersection of the first and second simple trajectories, and the intersection points of the first and second simple trajectories with the preset circle respectively. The coordinates of points S and E.
具体地,根据起点Ps、中点Pm、终点Pe、预设转弯区半径r进行等距规划或等时规划。其中,等距规划可以由转弯半径r直接求得。对于等时规划,由S型速度规划得到转弯起点到过渡点的时间,以此计算转弯终点位置,由此得到转弯区起点终点坐标。即,本发明可以基于S型速度规划且同时支持等时与等距两种规划的转弯区算法。Specifically, equidistant planning or isochronous planning is performed according to the starting point Ps, the midpoint Pm, the ending point Pe, and the radius r of the preset turning area. Among them, the equidistant planning can be obtained directly from the turning radius r. For isochronous planning, the time from the starting point of the turn to the transition point is obtained from the S-shaped speed planning, and the position of the end point of the turn is calculated based on this, so as to obtain the coordinates of the starting point and end point of the turning area. That is, the present invention can be based on S-type speed planning and simultaneously support two kinds of turning area algorithms, isochronous and equidistance planning.
下面分别对等距规划和等时规划进行说明。The isometric planning and isochronous planning are described respectively below.
当选取的转弯方式为等长度转弯时,计算S、M和E点坐标包括如下步骤:When the selected turning mode is equal-length turning, the calculation of the coordinates of S, M and E points includes the following steps:
等长度方式转弯要求转弯区起点到转弯区中间点、转弯区中间点到转弯区终点长度相等,即根据等长度转弯需要满足采用向量叠加方法,由中点M(中点M即为点Pm)的坐标分别叠加两个方向上长度为r的向量,即可得转弯区的起点S的坐标、终点E的坐标。Equal-length turns require that the lengths from the start point of the turn zone to the middle point of the turn zone, and from the middle point of the turn zone to the end point of the turn zone are equal, that is, According to the equal length turn needs to meet Using the vector superposition method, the coordinates of the midpoint M (the midpoint M is the point Pm) are superimposed respectively The vectors with length r in the two directions can be used to obtain the coordinates of the starting point S and the ending point E of the turning area.
当选取的转弯方式为等时间转弯时,包括如下步骤:When the selected turning method is an equal-time turn, the following steps are included:
等时间转弯方式要求转弯区起点到转弯区中间点、转弯区中间点到转弯区终点用时相等,即t1=t2,其中,t1为SM段转弯时间,t2为ME段转弯时间,The equal-time turning method requires that the time from the starting point of the turning area to the middle point of the turning area, and from the middle point of the turning area to the end point of the turning area be equal, that is, t 1 =t 2 , where t 1 is the turning time of the SM section, and t 2 is the turning time of the ME section.
t=min(t1,t2),(4)t=min(t 1 , t 2 ), (4)
代入速度规划,计算得到S、E点距M点距离dists、dists,Substituting into the speed planning, calculate the distances dist s and dist s from points S and E to point M,
根据步骤S3计算得到的S、M、E三点坐标,建立局部坐标系,通过坐标变换将该问题转移到局部坐标系下解决,使得求得的轨迹在局部坐标系下的转弯区的轨迹方程是简单的二次曲线。下面为计算满足平滑条件的转弯区曲线方程的求解过程。According to the S, M, E three-point coordinates calculated in step S3, a local coordinate system is established, and the problem is transferred to the local coordinate system through coordinate transformation to solve, so that the obtained trajectory is in the trajectory equation of the turning area under the local coordinate system is a simple quadratic curve. The following is the solution process of calculating the curve equation of the turning area satisfying the smooth condition.
步骤S4,根据计算得到S、M和E点的坐标建立局部坐标系,计算空间轨迹在局部坐标系下的转弯区的轨迹方程,即转弯区轨迹方程。其中,轨迹方程为平滑的转弯区的二次曲线。Step S4, establish a local coordinate system based on the calculated coordinates of points S, M and E, and calculate the trajectory equation of the turning area of the spatial trajectory in the local coordinate system, that is, the trajectory equation of the turning area. Among them, the trajectory equation is a smooth quadratic curve in the turning area.
在算法流程中,对二次曲线方程的表述建立在局部坐标系下,与全局坐标系通过线性变换进行映射。In the algorithm flow, the expression of the quadratic curve equation is established in the local coordinate system, which is mapped with the global coordinate system through linear transformation.
步骤S41,计算坐标变换参数θ和A,包括如下步骤:Step S41, calculating the coordinate transformation parameters θ and A, includes the following steps:
其中,θ为坐标轴进行旋转变换的角度,A为旋转矩阵,xSM为根据所述步骤S3中计算出的S点和M点在坐标系的x轴方向上的距离,xME为根据所述步骤S3中计算出的M点和E点在坐标系的x轴方向上的距离,ySM为根据所述步骤S3中计算出的S点和M点在坐标系的y轴方向上的距离,yME为根据所述步骤S3中计算出的M点和E点在坐标系的y轴方向上的距离;Wherein, θ is the angle at which the coordinate axis is rotated, A is a rotation matrix, and xSM is the distance between the S point and the M point calculated in the step S3 in the x-axis direction of the coordinate system, and xME is the distance between the point S and the M point in the coordinate system according to the specified The distance between the M point and the E point calculated in the step S3 on the x-axis direction of the coordinate system, and ySM is the distance between the S point calculated in the step S3 and the M point in the y-axis direction of the coordinate system , y ME is the distance between the M point and the E point in the y-axis direction of the coordinate system calculated according to the step S3;
步骤S42,导出向量坐标和包括如下步骤:Step S42, derive vector coordinates with Including the following steps:
其中,为在局部坐标系下的表示,为在局部坐标系下的表示,坐标变换可解耦为平移与旋转两部分。对于向量的变换而言,坐标变换的平移部分被消去了,只剩下旋转部分,因此两坐标下的表示可由变换矩阵A直接联系起来。in, for Representation in the local coordinate system, for Represented in the local coordinate system, the coordinate transformation can be decoupled into translation and rotation. For the transformation of the vector, the translation part of the coordinate transformation is eliminated, and only the rotation part remains, so the representations under the two coordinates can be directly linked by the transformation matrix A.
步骤S43,计算空间轨迹在局部坐标系下的转弯区的轨迹方程y为:Step S43, calculating the trajectory equation y of the turning area of the space trajectory in the local coordinate system is:
y=ax2,y=ax 2 ,
其中,a为轨迹方程对应的二次曲线的参数, O=S-As,r为预设转弯半径,p、q为抛物线参数,O为局部坐标系的坐标原点在全局坐标系下的表示,As为坐标变换过程中的平移部分,s(xs,ys),m(xn,ym),c(xe,ye)分别为转弯区的起点、中间点、终点坐标。in, a is the parameter of the quadratic curve corresponding to the trajectory equation, O=S-As, r is the preset turning radius, p, q are parabolic parameters, O is the representation of the coordinate origin of the local coordinate system in the global coordinate system, As is the translation part in the process of coordinate transformation, s(x s , y s ), m(x n , y m ), c(x e , y e ) are the coordinates of the starting point, middle point and end point of the turning area respectively.
图3根据本发明另一个实施例的基于速度最优控制的空间轨迹平滑方法的流程图。Fig. 3 is a flowchart of a method for smoothing a space trajectory based on speed optimal control according to another embodiment of the present invention.
步骤S301,输入Ps、Pm、r、flag_dist。Step S301, input Ps, Pm, r, flag_dist.
步骤S302,对转弯半径进行判断,不超过任一简单轨迹的一半。Step S302, judging the turning radius, which is not more than half of any simple trajectory.
具体地,判断转弯区半径r没有超过第一简单轨迹的长度的一半,且没有超过的第二简单轨迹的长度的一半,Specifically, judging that the radius r of the turning area does not exceed half of the length of the first simple trajectory, and does not exceed half of the length of the second simple trajectory,
步骤S303,采用等长度转弯策略。Step S303, using an equal-length turn strategy.
等长度方式转弯要求转弯区起点到转弯区中间点、转弯区中间点到转弯区终点长度相等,即 Equal-length turns require that the lengths from the start point of the turn zone to the middle point of the turn zone, and from the middle point of the turn zone to the end point of the turn zone are equal, that is,
步骤S304,采用等时间转弯策略。Step S304, using an equal-time turning strategy.
等时间转弯方式要求转弯区起点到转弯区中间点、转弯区中间点到转弯区终点用时相等,即t1=t2。Equal time turning mode requires equal time from the starting point of the turning area to the middle point of the turning area, and from the middle point of the turning area to the end point of the turning area, that is, t1=t2.
需要说明的是,步骤S303和步骤S304可以择一执行。It should be noted that, step S303 and step S304 can be performed alternatively.
步骤S305,得到S、M、E三点坐标。In step S305, three coordinates of S, M and E are obtained.
步骤S306,求解坐标变换矩阵。Step S306, solving the coordinate transformation matrix.
其中, in,
步骤S307,求解SM、ME向量的局部坐标。Step S307, solving the local coordinates of the SM and ME vectors.
其中, in,
步骤S308,由公式导出抛物线参数,各点坐标,局部坐标系原点相对坐标。Step S308, deriving the parameters of the parabola, the coordinates of each point, and the relative coordinates of the origin of the local coordinate system from the formula.
步骤S309,输出轨迹参数和坐标变换参数。Step S309, outputting trajectory parameters and coordinate transformation parameters.
y=ax2,y=ax 2 ,
其中,a为轨迹方程对应的二次曲线的参数, O=S-As,r为预设转弯半径,p、q为抛物线参数,O为局部坐标系的坐标原点在全局坐标系下的表示,As为坐标变换过程中的平移部分,s(xa,ya),m(xn,ym),e(xe,ye)分别为转弯区的起点、中间点、终点坐标。in, a is the parameter of the quadratic curve corresponding to the trajectory equation, O=S-As, r is the preset turning radius, p and q are parabolic parameters, O is the representation of the coordinate origin of the local coordinate system in the global coordinate system, As is the translation part in the process of coordinate transformation, s(x a , y a ), m(x n , y m ), e(x e , y e ) are the coordinates of the starting point, middle point and end point of the turning area respectively.
根据本发明实施例的基于速度最优控制的空间轨迹平滑方法,可以将机器人机械臂运行空间轨迹的二次曲线经坐标变换生成平滑转弯区表达式,从而保证速度方向的连续性,通过平滑过渡两直线轨迹,结合S型速度规划,得到加速度、速度、位移平滑的转弯方案,轨迹简单直观,可方便定位机械臂的末端执行器在任意时刻的空间位置,便于控制。同时由于轨迹为简单的二次曲线,因此可简便计算出障碍规避空间。此外,本发明可以适应等距与等时两种转弯需求,用户可根据实际情况,方便地比较与选取更优的方案。According to the space trajectory smoothing method based on speed optimal control according to the embodiment of the present invention, the quadratic curve of the space trajectory of the robot manipulator can be converted into a smooth turning area expression through coordinate transformation, thereby ensuring the continuity of the speed direction, through smooth transition Two straight-line trajectories, combined with S-shaped speed planning, can obtain a turning plan with smooth acceleration, speed, and displacement. The trajectory is simple and intuitive, which can easily locate the spatial position of the end effector of the robotic arm at any time, and is easy to control. At the same time, because the trajectory is a simple quadratic curve, the obstacle avoidance space can be easily calculated. In addition, the present invention can adapt to both equidistant and isochronous turning requirements, and the user can conveniently compare and select a better solution according to the actual situation.
在本说明书的描述中,参考术语“一个实施例”、“一些实施例”、“示例”、“具体示例”、或“一些示例”等的描述意指结合该实施例或示例描述的具体特征、结构、材料或者特点包含于本发明的至少一个实施例或示例中。在本说明书中,对上述术语的示意性表述不一定指的是相同的实施例或示例。而且,描述的具体特征、结构、材料或者特点可以在任何的一个或多个实施例或示例中以合适的方式结合。In the description of this specification, descriptions referring to the terms "one embodiment", "some embodiments", "example", "specific examples", or "some examples" mean that specific features described in connection with the embodiment or example , structure, material or feature is included in at least one embodiment or example of the present invention. In this specification, schematic representations of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
尽管上面已经示出和描述了本发明的实施例,可以理解的是,上述实施例是示例性的,不能理解为对本发明的限制,本领域的普通技术人员在不脱离本发明的原理和宗旨的情况下在本发明的范围内可以对上述实施例进行变化、修改、替换和变型。本发明的范围由所附权利要求及其等同限定。Although the embodiments of the present invention have been shown and described above, it can be understood that the above embodiments are exemplary and cannot be construed as limitations to the present invention. Variations, modifications, substitutions, and modifications to the above-described embodiments are possible within the scope of the present invention. The scope of the invention is defined by the appended claims and their equivalents.
Claims (5)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201510493101.1A CN105082156B (en) | 2015-08-12 | 2015-08-12 | Space trajectory smoothing method based on speed optimum control |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201510493101.1A CN105082156B (en) | 2015-08-12 | 2015-08-12 | Space trajectory smoothing method based on speed optimum control |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN105082156A CN105082156A (en) | 2015-11-25 |
| CN105082156B true CN105082156B (en) | 2017-04-12 |
Family
ID=54563926
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201510493101.1A Active CN105082156B (en) | 2015-08-12 | 2015-08-12 | Space trajectory smoothing method based on speed optimum control |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN105082156B (en) |
Families Citing this family (15)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN105573315B (en) * | 2015-12-01 | 2020-04-10 | 珞石(北京)科技有限公司 | Geometric smoothing method for Cartesian space trajectory of industrial robot |
| CN106313047B (en) * | 2016-09-28 | 2018-08-21 | 华中科技大学 | A kind of real-time turning transition method of robot based on Bezier battens |
| CN106346478A (en) * | 2016-11-09 | 2017-01-25 | 广州视源电子科技股份有限公司 | control method and device of mechanical arm |
| CN107030697B (en) * | 2017-04-28 | 2019-05-28 | 广州大学 | A kind of planing method of robot cartesian space smooth track |
| CN108438003B (en) * | 2018-01-05 | 2020-03-17 | 吉林大学 | Layered control method for optimizing speed of road vehicle |
| CN108594815B (en) * | 2018-04-20 | 2021-02-02 | 武汉大学 | A Staged Method for Moving Path Planning of Wheeled Robots |
| CN108724189B (en) * | 2018-06-22 | 2020-10-30 | 金蝶软件(中国)有限公司 | Method and device for controlling robot to move and robot control equipment |
| CN109063349B (en) * | 2018-08-08 | 2023-07-14 | 北京道亨软件股份有限公司 | Cable space turning track calculation method |
| CN108940759B (en) * | 2018-09-06 | 2021-08-31 | 深圳市雷赛控制技术有限公司 | Method and system for controlling constant glue amount of continuous processing path |
| CN109976336A (en) * | 2019-03-08 | 2019-07-05 | 上海精星物流设备工程有限公司 | A kind of unmanned fork lift motion profile generation method based on biquadratic curve |
| CN112540602B (en) * | 2019-11-27 | 2024-06-25 | 深圳优地科技有限公司 | Robot local path optimization method and robot |
| CN113478495B (en) * | 2021-09-08 | 2022-03-11 | 南京蓝昊智能科技有限公司 | A multi-dimensional smooth path planning method for robotic arms |
| CN115270040B (en) * | 2022-06-21 | 2025-10-03 | 上海捷勃特机器人有限公司 | Trajectory smooth transition method, device and computer-readable medium |
| CN116330286B (en) * | 2023-03-28 | 2023-11-07 | 重庆智能机器人研究院 | Method for inhibiting jitter through dynamic track and attitude planning of industrial robot |
| CN116728437B (en) * | 2023-08-08 | 2023-10-13 | 江苏集萃智能制造技术研究所有限公司 | Health care robot trajectory sampling filtering method and system based on Euclidean space distance |
Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN1754664A (en) * | 2004-09-29 | 2006-04-05 | 发那科株式会社 | Robot movement control method |
| CN101077578A (en) * | 2007-07-03 | 2007-11-28 | 北京控制工程研究所 | Mobile Robot local paths planning method on the basis of binary environmental information |
| CN101251905A (en) * | 2008-01-22 | 2008-08-27 | 西北工业大学 | A Pattern Generation Method Based on Hopf Oscillator |
| CN102374866A (en) * | 2011-08-25 | 2012-03-14 | 光庭导航数据(武汉)有限公司 | Destructive road shape fusion method based on traveling direction |
| CN103914629A (en) * | 2014-04-23 | 2014-07-09 | 东南大学 | A real-time simulation method of non-stationary target motion trajectory based on B-spline fitting |
| CN104191428A (en) * | 2014-08-27 | 2014-12-10 | 深圳科瑞技术股份有限公司 | Movement path planning method and system based on SCARA |
Family Cites Families (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPS57211605A (en) * | 1981-06-22 | 1982-12-25 | Fujitsu Ltd | Controlling system for track of robot |
| JP5724919B2 (en) * | 2012-03-22 | 2015-05-27 | トヨタ自動車株式会社 | Orbit generation device, moving body, orbit generation method and program |
-
2015
- 2015-08-12 CN CN201510493101.1A patent/CN105082156B/en active Active
Patent Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN1754664A (en) * | 2004-09-29 | 2006-04-05 | 发那科株式会社 | Robot movement control method |
| CN101077578A (en) * | 2007-07-03 | 2007-11-28 | 北京控制工程研究所 | Mobile Robot local paths planning method on the basis of binary environmental information |
| CN101251905A (en) * | 2008-01-22 | 2008-08-27 | 西北工业大学 | A Pattern Generation Method Based on Hopf Oscillator |
| CN102374866A (en) * | 2011-08-25 | 2012-03-14 | 光庭导航数据(武汉)有限公司 | Destructive road shape fusion method based on traveling direction |
| CN103914629A (en) * | 2014-04-23 | 2014-07-09 | 东南大学 | A real-time simulation method of non-stationary target motion trajectory based on B-spline fitting |
| CN104191428A (en) * | 2014-08-27 | 2014-12-10 | 深圳科瑞技术股份有限公司 | Movement path planning method and system based on SCARA |
Also Published As
| Publication number | Publication date |
|---|---|
| CN105082156A (en) | 2015-11-25 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN105082156B (en) | Space trajectory smoothing method based on speed optimum control | |
| CN105500354B (en) | Transition track planning method applied to industrial robot | |
| CN105353725B (en) | Auxiliary point-passing attitude space circular interpolation method for industrial robot | |
| CN104933228B (en) | Unmanned vehicle real-time track planing method based on Speed Obstacles | |
| CN105843234B (en) | A kind of two-dimentional Route planner that UUV detours to round barrier geometry | |
| CN110260867A (en) | Method, equipment and the device that pose is determining in a kind of robot navigation, corrects | |
| CN102662350A (en) | Track teaching and planning method of master-slave mode multi-robot cooperative system | |
| Huang et al. | Velocity obstacle for polytopic collision avoidance for distributed multi-robot systems | |
| De Maeyer et al. | Cartesian path planning for arc welding robots: Evaluation of the descartes algorithm | |
| CN102795544A (en) | Online trajectory planning based efficient bridge crane swing elimination control method | |
| Lindemann et al. | Real time feedback control for nonholonomic mobile robots with obstacles | |
| CN111645079B (en) | A live working robot manipulator arm path planning control device and method thereof | |
| Li et al. | Improved artificial potential field-based simultaneous forward search method for robot path planning in complex environment | |
| Somani et al. | Constraint-based task programming with CAD semantics: From intuitive specification to real-time control | |
| Yang et al. | Generation of dynamically feasible and collision free trajectory by applying six-order Bezier curve and local optimal reshaping | |
| CN105867372A (en) | Turning motion planning method and system of omni-directional mobile robot under narrow right-angled bend condition | |
| Zhang et al. | Optimal motion planning of all position autonomous mobile welding robot system for fillet seams | |
| CN105904458B (en) | A kind of incomplete remote operating about beam control method based on complex operations task | |
| CN106003055A (en) | Movement joint angle solution method based on bending machine manipulator | |
| Zhang et al. | Kuka youbot arm shortest path planning based on geodesics | |
| CN111515954A (en) | Method for generating high-quality motion path of mechanical arm | |
| Zheng et al. | A novel approach for multiple mobile robot path planning in dynamic unknown environment | |
| CN109188915A (en) | The speed planning method of embedded movenent performance adjustment mechanism | |
| Wang et al. | Three-robot minimum-time optimal line formation | |
| Ju et al. | Real-time velocity alteration strategy for collision-free trajectory planning of two articulated robot manipulators |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| C06 | Publication | ||
| PB01 | Publication | ||
| C10 | Entry into substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant | ||
| CB03 | Change of inventor or designer information |
Inventor after: Hua Hua Inventor after: Wang Zhifeng Inventor before: Wang Zhifeng |
|
| CB03 | Change of inventor or designer information | ||
| CP03 | Change of name, title or address |
Address after: 272000, No. 888 Huarun Road, Zhongxin Electromechanical Industrial Park, Zhongdian Town, Zoucheng City, Jining City, Shandong Province Patentee after: Luoshi (Shandong) Robot Group Co.,Ltd. Country or region after: China Address before: Room 502, unit 4, building 57, Zone D, new Silicon Valley, Xier banner, Haidian District, Beijing 100085 Patentee before: ROKAE, Inc. Country or region before: China |
|
| CP03 | Change of name, title or address | ||
| CP03 | Change of name, title or address |
Address after: 272000, No. 888 Huarun Road, Zhongxin Electromechanical Industrial Park, Zhongdian Town, Zoucheng City, Jining City, Shandong Province Patentee after: Luoshi (Shandong) Robot Group Co.,Ltd. Country or region after: China Address before: 272000, No. 888 Huarun Road, Zhongxin Electromechanical Industrial Park, Zhongdian Town, Zoucheng City, Jining City, Shandong Province Patentee before: Luoshi (Shandong) Robot Group Co.,Ltd. Country or region before: China |
|
| CP03 | Change of name, title or address |