机器人学基础-第7章-机器人轨迹规划-蔡自兴.ppt
中南大学中南大学蔡自兴,谢蔡自兴,谢 斌斌zxcai,2010机器人学基础机器人学基础第七章第七章 机器人轨迹规划机器人轨迹规划1Ch.7 Trajectory Planning of RobotsFundamentals of RoboticsCh.7 Trajectory Planning of Robots 2Ch.7 Trajectory Planning of RobotsCh.7 Trajectory Planning of Robots 3Ch.7 Trajectory Planning of Robots7.1 General Considerations in Trajectory Planning 轨迹规划应考虑的问题轨迹规划应考虑的问题Basic Problem:Move the manipulator arm from some initial position to some desired final position(May be going through some via points).47.1 General considerations7.1 General Considerations in Trajectory PlanningTrajectory:Time history of position,velocity and acceleration for each DOFPath points:Initial,final and via pointsConstraints:Spatial,time,smoothness57.1 General considerationsJoint spaceEasy to go through via points(Solve inverse kinematics at all path points)No problems with singularitiesLess calculationsCan not follow straight lineCartesian spaceWe can track a shape(for orientation:equivalent axes,Euler angles,)More expensive at run time(after the path is calculated need joint angles in a lot of points)Discontinuity problems6General Considerations-Solution Space7.1 General considerationsCartesian planning difficulties:7General Considerations-Solution Space7.1 General considerationsInitial(A)and Goal(B)Points are reachable,but intermediate points(C)unreachable.Ch.7 Trajectory Planning of Robots 8Ch.7 Trajectory Planning of RobotsJoint-Space SchemesEach path point is converted into a set of desired joint angles by application of the inverse kinematics.A smooth function is found for each of the n joints which pass through the via points and end at the goal point.Time required for each segment is the same for each joint.The determination of the desired joint angle function for a particular joint is independent with other joints.97.2 Interpolated Calculation of Joint Trajectories 关节轨迹的插值计算关节轨迹的插值计算7.2 JointSpace SchemesChoice of interpolation function is not unique!10Joint-Space Schemes 7.2 JointSpace SchemesSeveral possible path shapes for a single joint.Some possible interpolation functions:Cubic polynomials Cubic polynomials for a path with via pointsHigher-order polynomials Linear function with parabolic blendsLinear function with parabolic blends for a path with via points11Joint-Space Schemes 7.2 JointSpace SchemesIn making a single smooth motion,at least four constraints on are evident:127.2.1 Cubic Polynomials 三次多项式插值三次多项式插值7.2 JointSpace SchemesCombining the four constraints yields four equations with four unknowns:137.2.1 Cubic Polynomials7.2 JointSpace SchemesThese four constraints uniquely specify a particular cubic:147.2.1 Cubic PolynomialsThe joint velocity and acceleration along this path are:7.2 JointSpace SchemesEg.7.1 A single-link robot with a rotary joint is motionless at =15 degrees.It is desired to move the joint in a smooth manner to=75 degrees in 3 seconds.Find the coefficients of a cubic which accomplishes this motion and brings the manipulator to rest at the goal.Plot the position,velocity,and acceleration of the joint as a function of time.157.2.1 Cubic Polynomials7.2 JointSpace SchemesSolution:Plugging 0=15,f=75,tf=3 into(7.6),we find167.2.1 Cubic Polynomials7.2 JointSpace SchemesSolution:177.2.1 Cubic Polynomials7.2 JointSpace SchemesStarts at 15 degrees and ends at 75 degrees!Solution:187.2.1 Cubic Polynomials7.2 JointSpace SchemesStarts and ends at rest!Solution:197.2.1 Cubic Polynomials7.2 JointSpace SchemesAcceleration profile is linear!If we come to rest at each pointuse formula from previous slideor continuous motion(no stops)need velocities at intermediate points:Initial Conditions:207.2.2 Cubic polynomials with via points 过路径点的三次多项式插值过路径点的三次多项式插值7.2 JointSpace SchemesSolutions:How to specify velocity at the via points:The user specifies the desired velocity at each via point in terms of a Cartesian linear and angular velocity of the tool frame at that instant.The system automatically chooses the velocities at the via points by applying a suitable heuristic in either Cartesian space or joint space(average of 2 sides etc.).The system automatically chooses the velocities at the via points in such a way as to cause the acceleration at the via points to be continuous.217.2 JointSpace Schemes7.2.2 Cubic polynomials with via pointsHigher order polynomials are sometimes used for path segments.For example,if we wish to be able to specify the position,velocity,and acceleration at the beginning and end of a path segment,a quintic polynomial is required:227.2.3 Higher-order polynomials高阶多项式插值高阶多项式插值7.2 JointSpace SchemesWhere the constraints are given as:237.2.3 Higher-order polynomials7.2 JointSpace SchemesSolution to these equations:247.2.3 Higher-order polynomials7.2 JointSpace SchemesLinear interpolation(Straight line):Note:Although the motion of each joint in this scheme is linear,the end-effector in general does not move in a straight line in space.257.2.4 Linear function with parabolic blends 用抛物线过渡的线性插值用抛物线过渡的线性插值7.2 JointSpace SchemesDiscontinuous velocity-can not be controlled!To create a smooth path with continous position and velocity,we start with the linear function but add a parabolic blend region at each path point.Constant acceleration is used during the blend portion to change velocity smoothly.267.2.4 Linear function with parabolic blends7.2 JointSpace SchemesAssume that the parabolic blends both have the same duration,and therefore the same constant acceleration(modulo a sign).There are many solutions to the problem-but the answer is always symmetric about the halfway point.277.2.4 Linear function with parabolic blends7.2 JointSpace SchemesThe velocity at the end of the blend region must equal the velocity of the linear section:287.2.4 Linear function with parabolic blends7.2 JointSpace SchemesLet t=2th,combining(7.13)and(7.14)297.2.4 Linear function with parabolic blendsThe acceleration chosen must be sufficiently high,to ensure the existence of a solution:7.2 JointSpace SchemesBelow shows a set of joint space via points for some joints.Linear functions connect the via points,and parabolic blend regions are added around each via point.307.2.5 Linear function with parabolic blendsfor a path with via points过路径点的用抛物线过渡的线性插值过路径点的用抛物线过渡的线性插值7.2 JointSpace SchemesMulti-segment linear path with blends.Given:positionsdesired time durations the magnitudes of the accelerationsCompute:blends timesstraight segment times slopes(velocities)signed accelerations317.2 JointSpace Schemes7.2.5 Linear function with parabolic blendsfor a path with via pointsInside segment:327.2 JointSpace Schemes7.2.5 Linear function with parabolic blendsfor a path with via pointsFirst segment:337.2 JointSpace Schemes7.2.5 Linear function with parabolic blendsfor a path with via pointsLast segment:347.2 JointSpace Schemes7.2.5 Linear function with parabolic blendsfor a path with via pointsTo go through the actual via points:Introduce“Pseudo Via Points”Use sufficiently high acceleration357.2 JointSpace Schemes7.2.5 Linear function with parabolic blendsfor a path with via pointsCh.7 Trajectory Planning of Robots 36Ch.7 Trajectory Planning of RobotsWhen path shapes are described in terms of functions of Cartesian position and orientation,we can also specify the spatial shape of the path between path points.The most common path shape is a straight line;but circular,sinusoidal,or other path shapes could be used.Cartesian schemes are more computationally expensive to execute since at run time,inverse kinematics must be solved at the path update rate.7.3 Cartesian-Space Schemes377.3 Cartesian-Space SchemesDescription of a task7.3 Cartesian-Space Schemes387.3 Cartesian-Space SchemesCartesian straight line motionMove from point Pi to Pi+1,which described by relative homogenous transformation:7.3 Cartesian-Space Schemes397.3 Cartesian-Space SchemesIn order to ensure continuous velocities in trajectory,a spline of linear functions with parabolic blends is always used.During the linear portion of each segment,since all three components of position change in a linear fashion,the end-effector will move along a linear path in space.7.3 Cartesian-Space Schemes407.3 Cartesian-Space SchemesCartesian planning difficulties(1/3):41Initial(A)and Goal(B)Points are reachable,but intermediate points(C)unreachable.7.3 Cartesian-Space Schemes7.3 Cartesian-Space Schemes42Approaching singularities some joint velocities go to causing deviation from the path.7.3 Cartesian-Space Schemes7.3 Cartesian-Space SchemesCartesian planning difficulties(2/3):43Start point(A)and goal point(B)are reachable in different joint space solutions(The middle points are reachable from below.)7.3 Cartesian-Space Schemes7.3 Cartesian-Space SchemesCartesian planning difficulties(3/3):Ch.7 Trajectory Planning of Robots 44Ch.7 Trajectory Planning of Robots7.4 Path Generation at Real-TimeAt run time the path generator routine constructs the trajectory,usually in terms of ,and feeds this information to the manipulators control system.This path generator computes the trajectory at the path update rate.7.4 Path Generation at Run Time457.4.1 Generation of joint space pathsIn the case of cubic splines,the path generator simply computes(7.3)and(7.4)as t is advanced.When the end of one segment is reached,a new set of cubic coefficients is recalled,t is set back to zero,and the generation continues.7.4 Path Generation at Run Time46In the case of linear splines with parabolic blends,the value of time,t,is checked on each update to determine whether we are currently in the linear or the blend portion of the segment.In the linear portion,the trajectory for each joint is calculated as7.4 Path Generation at Run Time477.4.1 Generation of joint space pathsIn the case of linear splines with parabolic blends,the value of time,t,is checked on each update to determine whether we are currently in the linear or the blend portion of the segment.In the blend region,the trajectory for each joint is calculated as7.4 Path Generation at Run Time487.4.1 Generation of joint space pathsIn the case of linear spline with parabolic blends path.Rewrite(7.45)and(7.46)with the symbol X representing a component of the Cartesian position and orientation vector.In the linear portion of the segment,each degree of freedom in X is calcuated as7.4 Path Generation at Run Time497.4.2 Generation of Cartesian space pathsIn the case of linear spline with parabolic blends path.Rewrite(7.45)and(7.46)with the symbol X representing a component of the Cartesian position and orientation vector.In the blend region,the trajectory for each degree of freedom is calculated as7.4 Path Generation at Run Time507.4.2 Generation of Cartesian space pathsFinally,this Cartesian trajectory()must be converted into equivalent joint space quantities.A complete analytical solution to this problem would use:inverse kinematics to calculate joint positions,inverse Jacobian for velocities,inverse Jacobian plus its derivative for accelerations.7.4 Path Generation at Run Time517.4.2 Generation of Cartesian space paths527.5 Summary 小结小结General Considerations in Robot Trajectory PlanningJoint-Space SchemesCubic polynomials Cubic polynomials for a path with via pointsHigher-order polynomials Linear function with parabolic blendsLinear function with parabolic blends for a path with via pointsCartesian-Space SchemesTrack of any desired shapeMore expensive at run timeDiscontinuity problemsReal Time Generation of Planning Trajectories7.5 SummaryThank youFor Attention!Fundamentals of Robotics53