grasp
All Data Structures Namespaces Functions Modules
transformation.m
1 function V=transformation(V,p,joints,i,finger,hand,rot_ee)
2  pos0=fkiCub(finger,hand,[0 0 0]',0,rot_ee,i);
3  [n,or0]=fkiCub(finger,hand,[0 0 0]',0,rot_ee,i+1);
4 
5  pos=fkiCub(finger,hand,joints',0,rot_ee,i);
6  [n,or]=fkiCub(finger,hand,joints',0,rot_ee,i+1);
7 
8  rot_base=axis2dcm(or0);
9  rot_base(1:3,4)=pos0;
10  V=rototranslation(V,inv(rot_base),p);
11  rotnew=axis2dcm(or);
12  rotnew(1:3,4)=pos;
13  V=rototranslation(V,rotnew,p);
14 end
15