Lab 4 - Trajectory Interpolation Reference Guide
Lab 4 - Trajectory Interpolation Reference Guide
By Jonathan Woolfrey
There are two ways to approach moving a robot arm: joint space, or end-effector/task space. In specifying
end-effector motion, we still have to resolve the necessary joint velocities to achieve the task. This can get
complicated. For now, we’ll look at how to smoothly transition a joint from one position to another.
We don’t want our joint motors to be working too hard, so if the joint positions transition smoothly, then the
joint velocities will also be smooth.
We can define an intermediate joint position between two joint angles and as a function of a
smooth scalar .
= 1− + = 0,1 ❶
when s = 0
=
when s = 1
= + + + + +! ❷
"=5 +4 +3 +2 +
' = 20 + 12 +6 +2
When = 0
) =!
") =
') = 2
+ = * + * + * + * + *+!
" =5 * +4 * +3 * +2 *+
+
+' = 20 * + 12 * + 6 * + 2
) 0 0 0 0 0 1
. ") 1 . 0 0 0 0 1 01 . 1
- ') 0 - 0- 0
- 0 - 0 0 0 2 0 00 - 0
We pack these in a matrix for easier handling: + =
- 0 - * * * * * 10 - 0
- +" 0 - 5* 4* 3* 2* 1 00 - 0
, + ' / ,20* 12* 6* 2 0 0/ , ! /
0 0 0 0 0 1 23 )
. 0 . ") 1
. 1 0 0 0 1 01
- 0 - 0 - ') 0
Then solve for the polynomial coefficients: - 0= - 0 0 0 2 0 00 - 0 ❸
- 0 - * * * * * 10 - +
0
- 0 - 5* 4* 3* 2* 1 00 - +" 0
,! / ,20* 12* 6* 2 0 0/ , + ' /
The velocity profile using Quintic Polynomials peaks for a brief instance in time which leads to two problems:
0 for = )
7
5 ;< − ) + ½> − )
23
+ for ) < < 3
@;< 3 − ) + ½> 3 − ) + ;A − 3 B 23
+ for 3 ≤ <
6
5 ;< − + ½> − + ;A − + ;A − − ½> − for ≤ <
23
3 ) 3 ) 3 + +
4 1 for t ≥ +
s = lspb(0,1,steps);
qMatrix = nan(steps,6);
for i = 1:steps
qMatrix(i,:) = (1-s(i))*q1 + s(i)*q2;
end