2019-03-22 12:03:59 +01:00
|
|
|
#+TITLE: Kinematic Study of the Stewart Platform
|
2019-03-25 18:12:43 +01:00
|
|
|
:DRAWER:
|
|
|
|
#+STARTUP: overview
|
|
|
|
|
|
|
|
#+HTML_HEAD: <link rel="stylesheet" type="text/css" href="css/htmlize.css"/>
|
|
|
|
#+HTML_HEAD: <link rel="stylesheet" type="text/css" href="css/readtheorg.css"/>
|
|
|
|
#+HTML_HEAD: <script src="js/jquery.min.js"></script>
|
|
|
|
#+HTML_HEAD: <script src="js/bootstrap.min.js"></script>
|
|
|
|
#+HTML_HEAD: <script type="text/javascript" src="js/jquery.stickytableheaders.min.js"></script>
|
|
|
|
#+HTML_HEAD: <script type="text/javascript" src="js/readtheorg.js"></script>
|
|
|
|
|
|
|
|
#+LATEX_CLASS: cleanreport
|
|
|
|
#+LaTeX_CLASS_OPTIONS: [tocnp, secbreak, minted]
|
|
|
|
#+LaTeX_HEADER: \usepackage{svg}
|
|
|
|
#+LaTeX_HEADER: \newcommand{\authorFirstName}{Thomas}
|
|
|
|
#+LaTeX_HEADER: \newcommand{\authorLastName}{Dehaeze}
|
|
|
|
#+LaTeX_HEADER: \newcommand{\authorEmail}{dehaeze.thomas@gmail.com}
|
|
|
|
|
|
|
|
#+PROPERTY: header-args:matlab :session *MATLAB*
|
|
|
|
#+PROPERTY: header-args:matlab+ :comments org
|
|
|
|
#+PROPERTY: header-args:matlab+ :exports both
|
|
|
|
#+PROPERTY: header-args:matlab+ :eval no-export
|
|
|
|
#+PROPERTY: header-args:matlab+ :output-dir figs
|
|
|
|
#+PROPERTY: header-args:matlab+ :mkdirp yes
|
|
|
|
:END:
|
2019-03-22 12:03:59 +01:00
|
|
|
|
|
|
|
* Functions
|
|
|
|
:PROPERTIES:
|
|
|
|
:HEADER-ARGS:matlab+: :exports code
|
|
|
|
:HEADER-ARGS:matlab+: :comments no
|
|
|
|
:HEADER-ARGS:matlab+: :mkdir yes
|
|
|
|
:HEADER-ARGS:matlab+: :eval no
|
|
|
|
:END:
|
|
|
|
** getMaxPositions
|
|
|
|
:PROPERTIES:
|
|
|
|
:HEADER-ARGS:matlab+: :tangle src/getMaxPositions.m
|
|
|
|
:END:
|
|
|
|
#+begin_src matlab
|
|
|
|
function [X, Y, Z] = getMaxPositions(stewart)
|
|
|
|
Leg = stewart.Leg;
|
|
|
|
J = stewart.J;
|
|
|
|
theta = linspace(0, 2*pi, 100);
|
|
|
|
phi = linspace(-pi/2 , pi/2, 100);
|
|
|
|
dmax = zeros(length(theta), length(phi));
|
|
|
|
|
|
|
|
for i = 1:length(theta)
|
|
|
|
for j = 1:length(phi)
|
|
|
|
L = J*[cos(phi(j))*cos(theta(i)) cos(phi(j))*sin(theta(i)) sin(phi(j)) 0 0 0]';
|
|
|
|
dmax(i, j) = Leg.stroke/max(abs(L));
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
X = dmax.*cos(repmat(phi,length(theta),1)).*cos(repmat(theta,length(phi),1))';
|
|
|
|
Y = dmax.*cos(repmat(phi,length(theta),1)).*sin(repmat(theta,length(phi),1))';
|
|
|
|
Z = dmax.*sin(repmat(phi,length(theta),1));
|
|
|
|
end
|
|
|
|
#+end_src
|
|
|
|
|
|
|
|
** getMaxPureDisplacement
|
|
|
|
:PROPERTIES:
|
|
|
|
:HEADER-ARGS:matlab+: :tangle src/getMaxPureDisplacement.m
|
|
|
|
:END:
|
|
|
|
#+begin_src matlab
|
|
|
|
function [max_disp] = getMaxPureDisplacement(Leg, J)
|
|
|
|
max_disp = zeros(6, 1);
|
|
|
|
max_disp(1) = Leg.stroke/max(abs(J*[1 0 0 0 0 0]'));
|
|
|
|
max_disp(2) = Leg.stroke/max(abs(J*[0 1 0 0 0 0]'));
|
|
|
|
max_disp(3) = Leg.stroke/max(abs(J*[0 0 1 0 0 0]'));
|
|
|
|
max_disp(4) = Leg.stroke/max(abs(J*[0 0 0 1 0 0]'));
|
|
|
|
max_disp(5) = Leg.stroke/max(abs(J*[0 0 0 0 1 0]'));
|
|
|
|
max_disp(6) = Leg.stroke/max(abs(J*[0 0 0 0 0 1]'));
|
|
|
|
end
|
|
|
|
#+end_src
|