add FK at each joint
This commit is contained in:
parent
9274ea0a1a
commit
837813a88e
|
|
@ -25,9 +25,12 @@ function Tlist = FKinSpaceExpand(Mlist, Slist, thetalist)
|
||||||
% 0 0 0 1.0000
|
% 0 0 0 1.0000
|
||||||
|
|
||||||
Tlist = zeros(4,4,size(thetalist,1));
|
Tlist = zeros(4,4,size(thetalist,1));
|
||||||
% Tlist(:,:,size(thetalist,1)) = M;
|
Mi = eye(4);
|
||||||
% T=M;
|
|
||||||
for i = size(thetalist): -1: 1
|
for i = size(thetalist): -1: 1
|
||||||
Tlist(:,:,i) = FKinSpace(Mlist(:,:,i), Slist(:,1:i), thetalist(1:i));
|
for j = 1:i
|
||||||
|
Mi = Mi * Mlist(:, :, j);
|
||||||
|
end
|
||||||
|
Tlist(:,:,i) = FKinSpace(Mi, Slist(:,1:i), thetalist(1:i));
|
||||||
|
Mi = eye(4);
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
function Tlist = FKinSpaceExpand(Mlist, Slist, thetalist)
|
function Tlist = FKinSpaceExpand_Sym(Mlist, Slist, thetalist)
|
||||||
% *** CHAPTER 4: FORWARD KINEMATICS ***
|
% *** CHAPTER 4: FORWARD KINEMATICS ***
|
||||||
% Takes M: the home configuration (position and orientation) of the
|
% Takes M: the home configuration (position and orientation) of the
|
||||||
% end-effector,
|
% end-effector,
|
||||||
|
|
@ -24,10 +24,13 @@ function Tlist = FKinSpaceExpand(Mlist, Slist, thetalist)
|
||||||
% 0 0 -1.0000 1.6858
|
% 0 0 -1.0000 1.6858
|
||||||
% 0 0 0 1.0000
|
% 0 0 0 1.0000
|
||||||
|
|
||||||
Tlist = zeros(4,4,size(thetalist,1));
|
Tlist = sym(zeros(4,4,size(thetalist,1)));
|
||||||
% Tlist(:,:,size(thetalist,1)) = M;
|
Mi = sym(eye(4));
|
||||||
% T=M;
|
|
||||||
for i = size(thetalist): -1: 1
|
for i = size(thetalist): -1: 1
|
||||||
Tlist(:,:,i) = FKinSpace_Sym(Mlist(:,:,i), Slist(:,1:i), thetalist(1:i));
|
for j = 1:i
|
||||||
|
Mi = Mi * Mlist(:, :, j);
|
||||||
|
end
|
||||||
|
Tlist(:,:,i) = FKinSpace_Sym(Mi, Slist(:,1:i), thetalist(1:i));
|
||||||
|
Mi = sym(eye(4));
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
Loading…
Reference in New Issue