Animation of previous result for a two-link manipulator

Compute trajectory as interpolation functions

Interpolation spacing

dt = 1/10 ;

Convert path specification to radians

pathRadians = ({First[#]} ~ Join ~ (Drop[#, 1] Degree)) & /@ path //N ;

Path conversion

traj1 = CreateDesiredTrajectory[pathRadians, {tmin, tmax, dt}] // First ; traj2 = CreateDesire ... Radians, {tmin, tmax, dt}, MultipleCubicPolyTrajectoriesWithVelocityHeuristic] // First ;

Kinematic parameters (variable = DH)

DH = {{0, 0, 0, θ1, 0}, {0, 1, 0, θ2, 0}, {0, 1/2, 0, 0, 0}} ;

Animation specifications

2d or 3d?

dim = 2 ;

Number of frames

nFrames = 50 ;

Animation

The blue manipulator shows the continous acceleration trajectory, while the yellow manipulator shows the trajectory with the velocity heuristic.

AnimateTwoTrajectories[DH, traj2, traj1, dim, nFrames, tmax] ;

[Graphics:../anim1.gif]


Created by Mathematica  (November 12, 2003)