Update Stewart Platform functions
This commit is contained in:
parent
de3c8b6ec9
commit
2389e6ba8e
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1051,9 +1051,9 @@ This Matlab function is accessible [[file:../src/initializeJointDynamics.m][here
|
||||
case 'spherical'
|
||||
stewart.joints_F.type = 2;
|
||||
case 'universal_p'
|
||||
stewart.joints_F.type = 3;
|
||||
stewart.joints_F.type = 1;
|
||||
case 'spherical_p'
|
||||
stewart.joints_F.type = 4;
|
||||
stewart.joints_F.type = 2;
|
||||
case 'universal_3dof'
|
||||
stewart.joints_F.type = 5;
|
||||
end
|
||||
@ -1064,38 +1064,56 @@ This Matlab function is accessible [[file:../src/initializeJointDynamics.m][here
|
||||
case 'spherical'
|
||||
stewart.joints_M.type = 2;
|
||||
case 'universal_p'
|
||||
stewart.joints_M.type = 3;
|
||||
stewart.joints_M.type = 1;
|
||||
case 'spherical_p'
|
||||
stewart.joints_M.type = 4;
|
||||
stewart.joints_M.type = 2;
|
||||
case 'spherical_3dof'
|
||||
stewart.joints_M.type = 6;
|
||||
end
|
||||
#+end_src
|
||||
|
||||
** Initialize Stiffness
|
||||
#+begin_src matlab
|
||||
stewart.joints_M.Kx = zeros(6,1);
|
||||
stewart.joints_M.Ky = zeros(6,1);
|
||||
stewart.joints_M.Kz = zeros(6,1);
|
||||
stewart.joints_F.Kx = zeros(6,1);
|
||||
stewart.joints_F.Ky = zeros(6,1);
|
||||
stewart.joints_F.Kz = zeros(6,1);
|
||||
|
||||
stewart.joints_M.Kf = zeros(6,1);
|
||||
stewart.joints_M.Kt = zeros(6,1);
|
||||
stewart.joints_F.Kf = zeros(6,1);
|
||||
stewart.joints_F.Kt = zeros(6,1);
|
||||
|
||||
stewart.joints_M.Cx = zeros(6,1);
|
||||
stewart.joints_M.Cy = zeros(6,1);
|
||||
stewart.joints_M.Cz = zeros(6,1);
|
||||
stewart.joints_F.Cx = zeros(6,1);
|
||||
stewart.joints_F.Cy = zeros(6,1);
|
||||
stewart.joints_F.Cz = zeros(6,1);
|
||||
|
||||
stewart.joints_M.Cf = zeros(6,1);
|
||||
stewart.joints_M.Ct = zeros(6,1);
|
||||
stewart.joints_F.Cf = zeros(6,1);
|
||||
stewart.joints_F.Ct = zeros(6,1);
|
||||
#+end_src
|
||||
|
||||
** Add Stiffness and Damping in Translation of each strut
|
||||
:PROPERTIES:
|
||||
:UNNUMBERED: t
|
||||
:END:
|
||||
Translation Stiffness
|
||||
#+begin_src matlab
|
||||
stewart.joints_M.Kx = zeros(6,1);
|
||||
stewart.joints_M.Ky = zeros(6,1);
|
||||
if ~strcmp(args.type_M, 'universal_p') || ~strcmp(args.type_M, 'spherical_p')
|
||||
stewart.joints_M.Kz = args.Kz_M;
|
||||
|
||||
stewart.joints_F.Kx = zeros(6,1);
|
||||
stewart.joints_F.Ky = zeros(6,1);
|
||||
stewart.joints_F.Kz = args.Kz_F;
|
||||
#+end_src
|
||||
|
||||
Translation Damping
|
||||
#+begin_src matlab
|
||||
stewart.joints_M.Cx = zeros(6,1);
|
||||
stewart.joints_M.Cy = zeros(6,1);
|
||||
stewart.joints_M.Cz = args.Cz_M;
|
||||
end
|
||||
|
||||
stewart.joints_F.Cx = zeros(6,1);
|
||||
stewart.joints_F.Cy = zeros(6,1);
|
||||
if ~strcmp(args.type_F, 'universal_p') || ~strcmp(args.type_F, 'spherical_p')
|
||||
stewart.joints_F.Kz = args.Kz_F;
|
||||
stewart.joints_F.Cz = args.Cz_F;
|
||||
end
|
||||
#+end_src
|
||||
|
||||
** Add Stiffness and Damping in Rotation of each strut
|
||||
@ -1104,21 +1122,21 @@ Translation Damping
|
||||
:END:
|
||||
Rotational Stiffness
|
||||
#+begin_src matlab
|
||||
if ~strcmp(args.type_M, 'universal_p') || ~strcmp(args.type_M, 'spherical_p')
|
||||
stewart.joints_M.Kf = args.Kf_M;
|
||||
stewart.joints_M.Kt = args.Kf_M;
|
||||
|
||||
stewart.joints_F.Kf = args.Kf_F;
|
||||
stewart.joints_F.Kt = args.Kf_F;
|
||||
#+end_src
|
||||
|
||||
|
||||
Rotational Damping
|
||||
#+begin_src matlab
|
||||
stewart.joints_M.Cf = args.Cf_M;
|
||||
stewart.joints_M.Ct = args.Cf_M;
|
||||
|
||||
stewart.joints_M.Kt = args.Kt_M;
|
||||
stewart.joints_M.Ct = args.Ct_M;
|
||||
end
|
||||
|
||||
if ~strcmp(args.type_F, 'universal_p') || ~strcmp(args.type_F, 'spherical_p')
|
||||
stewart.joints_F.Kf = args.Kf_F;
|
||||
stewart.joints_F.Cf = args.Cf_F;
|
||||
stewart.joints_F.Ct = args.Cf_F;
|
||||
|
||||
stewart.joints_F.Kt = args.Kt_F;
|
||||
stewart.joints_F.Ct = args.Ct_F;
|
||||
end
|
||||
#+end_src
|
||||
|
||||
* =initializeInertialSensor=: Initialize the inertial sensor in each strut
|
||||
|
@ -46,10 +46,6 @@ switch stewart.joints_F.type
|
||||
fprintf('- The joints on the fixed based are universal joints\n')
|
||||
case 2
|
||||
fprintf('- The joints on the fixed based are spherical joints\n')
|
||||
case 3
|
||||
fprintf('- The joints on the fixed based are perfect universal joints\n')
|
||||
case 4
|
||||
fprintf('- The joints on the fixed based are perfect spherical joints\n')
|
||||
end
|
||||
|
||||
switch stewart.joints_M.type
|
||||
@ -57,10 +53,6 @@ switch stewart.joints_M.type
|
||||
fprintf('- The joints on the mobile based are universal joints\n')
|
||||
case 2
|
||||
fprintf('- The joints on the mobile based are spherical joints\n')
|
||||
case 3
|
||||
fprintf('- The joints on the mobile based are perfect universal joints\n')
|
||||
case 4
|
||||
fprintf('- The joints on the mobile based are perfect spherical joints\n')
|
||||
end
|
||||
|
||||
fprintf('- The position of the joints on the fixed based with respect to {F} are (in [mm]):\n')
|
||||
|
@ -55,9 +55,9 @@ switch args.type_F
|
||||
case 'spherical'
|
||||
stewart.joints_F.type = 2;
|
||||
case 'universal_p'
|
||||
stewart.joints_F.type = 3;
|
||||
stewart.joints_F.type = 1;
|
||||
case 'spherical_p'
|
||||
stewart.joints_F.type = 4;
|
||||
stewart.joints_F.type = 2;
|
||||
case 'universal_3dof'
|
||||
stewart.joints_F.type = 5;
|
||||
end
|
||||
@ -68,37 +68,59 @@ switch args.type_M
|
||||
case 'spherical'
|
||||
stewart.joints_M.type = 2;
|
||||
case 'universal_p'
|
||||
stewart.joints_M.type = 3;
|
||||
stewart.joints_M.type = 1;
|
||||
case 'spherical_p'
|
||||
stewart.joints_M.type = 4;
|
||||
stewart.joints_M.type = 2;
|
||||
case 'spherical_3dof'
|
||||
stewart.joints_M.type = 6;
|
||||
end
|
||||
|
||||
stewart.joints_M.Kx = zeros(6,1);
|
||||
stewart.joints_M.Ky = zeros(6,1);
|
||||
stewart.joints_M.Kz = args.Kz_M;
|
||||
|
||||
stewart.joints_M.Kz = zeros(6,1);
|
||||
stewart.joints_F.Kx = zeros(6,1);
|
||||
stewart.joints_F.Ky = zeros(6,1);
|
||||
stewart.joints_F.Kz = args.Kz_F;
|
||||
stewart.joints_F.Kz = zeros(6,1);
|
||||
|
||||
stewart.joints_M.Kf = zeros(6,1);
|
||||
stewart.joints_M.Kt = zeros(6,1);
|
||||
stewart.joints_F.Kf = zeros(6,1);
|
||||
stewart.joints_F.Kt = zeros(6,1);
|
||||
|
||||
stewart.joints_M.Cx = zeros(6,1);
|
||||
stewart.joints_M.Cy = zeros(6,1);
|
||||
stewart.joints_M.Cz = args.Cz_M;
|
||||
|
||||
stewart.joints_M.Cz = zeros(6,1);
|
||||
stewart.joints_F.Cx = zeros(6,1);
|
||||
stewart.joints_F.Cy = zeros(6,1);
|
||||
stewart.joints_F.Cz = args.Cz_F;
|
||||
stewart.joints_F.Cz = zeros(6,1);
|
||||
|
||||
stewart.joints_M.Kf = args.Kf_M;
|
||||
stewart.joints_M.Kt = args.Kf_M;
|
||||
stewart.joints_M.Cf = zeros(6,1);
|
||||
stewart.joints_M.Ct = zeros(6,1);
|
||||
stewart.joints_F.Cf = zeros(6,1);
|
||||
stewart.joints_F.Ct = zeros(6,1);
|
||||
|
||||
stewart.joints_F.Kf = args.Kf_F;
|
||||
stewart.joints_F.Kt = args.Kf_F;
|
||||
if ~strcmp(args.type_M, 'universal_p') || ~strcmp(args.type_M, 'spherical_p')
|
||||
stewart.joints_M.Kz = args.Kz_M;
|
||||
stewart.joints_M.Cz = args.Cz_M;
|
||||
end
|
||||
|
||||
stewart.joints_M.Cf = args.Cf_M;
|
||||
stewart.joints_M.Ct = args.Cf_M;
|
||||
if ~strcmp(args.type_F, 'universal_p') || ~strcmp(args.type_F, 'spherical_p')
|
||||
stewart.joints_F.Kz = args.Kz_F;
|
||||
stewart.joints_F.Cz = args.Cz_F;
|
||||
end
|
||||
|
||||
stewart.joints_F.Cf = args.Cf_F;
|
||||
stewart.joints_F.Ct = args.Cf_F;
|
||||
if ~strcmp(args.type_M, 'universal_p') || ~strcmp(args.type_M, 'spherical_p')
|
||||
stewart.joints_M.Kf = args.Kf_M;
|
||||
stewart.joints_M.Cf = args.Cf_M;
|
||||
|
||||
stewart.joints_M.Kt = args.Kt_M;
|
||||
stewart.joints_M.Ct = args.Ct_M;
|
||||
end
|
||||
|
||||
if ~strcmp(args.type_F, 'universal_p') || ~strcmp(args.type_F, 'spherical_p')
|
||||
stewart.joints_F.Kf = args.Kf_F;
|
||||
stewart.joints_F.Cf = args.Cf_F;
|
||||
|
||||
stewart.joints_F.Kt = args.Kt_F;
|
||||
stewart.joints_F.Ct = args.Ct_F;
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user