diff --git a/cubic-configuration.html b/cubic-configuration.html index c3cec35..96cc75a 100644 --- a/cubic-configuration.html +++ b/cubic-configuration.html @@ -4,7 +4,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - + Cubic configuration for the Stewart Platform @@ -268,48 +268,29 @@ for the JavaScript code in this tag.

Table of Contents

@@ -332,13 +313,7 @@ According to 5). -

- -
-

1 Questions we wish to answer with this analysis

-
-

+To generate and study the Cubic configuration, generateCubicConfiguration is used (description in section 3.1). The goal is to study the benefits of using a cubic configuration:

-
-
-
-

2 TODO Configuration Analysis - Stiffness Matrix

-
+
+

1 TODO Configuration Analysis - Stiffness Matrix

+
-
-

2.1 Cubic Stewart platform centered with the cube center - Jacobian estimated at the cube center

-
+
+

1.1 Cubic Stewart platform centered with the cube center - Jacobian estimated at the cube center

+

-We create a cubic Stewart platform (figure 1) in such a way that the center of the cube (black dot) is located at the center of the Stewart platform (blue dot). +We create a cubic Stewart platform (figure 1) in such a way that the center of the cube (black dot) is located at the center of the Stewart platform (blue dot). The Jacobian matrix is estimated at the location of the center of the cube.

-
+

3d-cubic-stewart-aligned.png

Figure 1: Centered cubic configuration

@@ -466,11 +439,11 @@ save('./mat/stewart.mat', -

2.2 Cubic Stewart platform centered with the cube center - Jacobian not estimated at the cube center

-
+
+

1.2 Cubic Stewart platform centered with the cube center - Jacobian not estimated at the cube center

+

-We create a cubic Stewart platform with center of the cube located at the center of the Stewart platform (figure 1). +We create a cubic Stewart platform with center of the cube located at the center of the Stewart platform (figure 1). The Jacobian matrix is not estimated at the location of the center of the cube.

@@ -570,16 +543,16 @@ stewart = computeGeometricalProperties(stewart, opts);
-
-

2.3 Cubic Stewart platform not centered with the cube center - Jacobian estimated at the cube center

-
+
+

1.3 Cubic Stewart platform not centered with the cube center - Jacobian estimated at the cube center

+

-Here, the “center” of the Stewart platform is not at the cube center (figure 2). +Here, the “center” of the Stewart platform is not at the cube center (figure 2). The Jacobian is estimated at the cube center.

-
+

3d-cubic-stewart-misaligned.png

Figure 2: Not centered cubic configuration

@@ -692,9 +665,9 @@ We obtain \(k_x = k_y = k_z\) and \(k_{\theta_x} = k_{\theta_y}\), but the Stiff
-
-

2.4 Cubic Stewart platform not centered with the cube center - Jacobian estimated at the Stewart platform center

-
+
+

1.4 Cubic Stewart platform not centered with the cube center - Jacobian estimated at the Stewart platform center

+

Here, the “center” of the Stewart platform is not at the cube center. The Jacobian is estimated at the center of the Stewart platform. @@ -807,9 +780,9 @@ We obtain \(k_x = k_y = k_z\) and \(k_{\theta_x} = k_{\theta_y}\), but the Stiff

-
-

2.5 Conclusion

-
+
+

1.5 Conclusion

+
  • The cubic configuration permits to have \(k_x = k_y = k_z\) and \(k_{\theta\x} = k_{\theta_y}\)
  • @@ -821,9 +794,9 @@ We obtain \(k_x = k_y = k_z\) and \(k_{\theta_x} = k_{\theta_y}\), but the Stiff
-
-

3 TODO Cubic size analysis

-
+
+

2 TODO Cubic size analysis

+

We here study the effect of the size of the cube used for the Stewart configuration.

@@ -897,7 +870,7 @@ xlabel('Cube Size [mm]'); ylabel( +

stiffness_cube_size.png

Figure 3: \(k_{\theta_x} = k_{\theta_y}\) and \(k_{\theta_z}\) function of the size of the cube

@@ -918,19 +891,19 @@ In that case, the legs will the further separated. Size of the cube is then limi
-
-

4 Functions

-
+
+

3 Functions

+

- +

-
-

4.1 generateCubicConfiguration: Generate a Cubic Configuration

-
+
+

3.1 generateCubicConfiguration: Generate a Cubic Configuration

+

- +

@@ -938,9 +911,9 @@ This Matlab function is accessible he

-
-

Function description

-
+
+

Function description

+
-
-

Documentation

-
+
+

Documentation

+
- -
-

Optional Parameters

-
+
+

Optional Parameters

+
-
-

Position of the Cube

-
+
+

Position of the Cube

+

We define the useful points of the cube with respect to the Cube’s center. \({}^{C}C\) are the 6 vertices of the cubes expressed in a frame {C} which is @@ -1020,9 +993,9 @@ CCm = [Cc(:,2), Cc(:

-
-

Compute the pose

-
+
+

Compute the pose

+

We can compute the vector of each leg \({}^{C}\hat{\bm{s}}_{i}\) (unit vector from \({}^{C}C_{f}\) to \({}^{C}C_{m}\)).

@@ -1044,442 +1017,6 @@ stewart.Mb = CCf + [0; 0; args.FOc -

5 TODO initializeCubicConfiguration

-
- -
-

5.1 Function description

-
-
-
function [stewart] = initializeCubicConfiguration(opts_param)
-
-
-
-
- -
-

5.2 Optional Parameters

-
-

-Default values for opts. -

-
-
opts = struct(...
-    'H_tot', 90,  ... % Total height of the Hexapod [mm]
-    'L',     110, ... % Size of the Cube [mm]
-    'H',     40,  ... % Height between base joints and platform joints [mm]
-    'H0',    75   ... % Height between the corner of the cube and the plane containing the base joints [mm]
-    );
-
-
- -

-Populate opts with input parameters -

-
-
if exist('opts_param','var')
-    for opt = fieldnames(opts_param)'
-        opts.(opt{1}) = opts_param.(opt{1});
-    end
-end
-
-
-
-
- -
-

5.3 Cube Creation

-
-
-
points = [0, 0, 0; ...
-          0, 0, 1; ...
-          0, 1, 0; ...
-          0, 1, 1; ...
-          1, 0, 0; ...
-          1, 0, 1; ...
-          1, 1, 0; ...
-          1, 1, 1];
-points = opts.L*points;
-
-
- -

-We create the rotation matrix to rotate the cube -

-
-
sx = cross([1, 1, 1], [1 0 0]);
-sx = sx/norm(sx);
-
-sy = -cross(sx, [1, 1, 1]);
-sy = sy/norm(sy);
-
-sz = [1, 1, 1];
-sz = sz/norm(sz);
-
-R = [sx', sy', sz']';
-
-
- -

-We use to rotation matrix to rotate the cube -

-
-
cube = zeros(size(points));
-for i = 1:size(points, 1)
-  cube(i, :) = R * points(i, :)';
-end
-
-
-
-
- -
-

5.4 Vectors of each leg

-
-
-
leg_indices = [3, 4; ...
-               2, 4; ...
-               2, 6; ...
-               5, 6; ...
-               5, 7; ...
-               3, 7];
-
-
- -

-Vectors are: -

-
-
legs = zeros(6, 3);
-legs_start = zeros(6, 3);
-
-for i = 1:6
-  legs(i, :) = cube(leg_indices(i, 2), :) - cube(leg_indices(i, 1), :);
-  legs_start(i, :) = cube(leg_indices(i, 1), :);
-end
-
-
-
-
- -
-

5.5 Verification of Height of the Stewart Platform

-
-

-If the Stewart platform is not contained in the cube, throw an error. -

- -
-
Hmax = cube(4, 3) - cube(2, 3);
-if opts.H0 < cube(2, 3)
-  error(sprintf('H0 is not high enought. Minimum H0 = %.1f', cube(2, 3)));
-else if opts.H0 + opts.H > cube(4, 3)
-  error(sprintf('H0+H is too high. Maximum H0+H = %.1f', cube(4, 3)));
-  error('H0+H is too high');
-end
-
-
-
-
- -
-

5.6 Determinate the location of the joints

-
-

-We now determine the location of the joints on the fixed platform w.r.t the fixed frame \(\{A\}\). -\(\{A\}\) is fixed to the bottom of the base. -

-
-
Aa = zeros(6, 3);
-for i = 1:6
-  t = (opts.H0-legs_start(i, 3))/(legs(i, 3));
-  Aa(i, :) = legs_start(i, :) + t*legs(i, :);
-end
-
-
- -

-And the location of the joints on the mobile platform with respect to \(\{A\}\). -

-
-
Ab = zeros(6, 3);
-for i = 1:6
-  t = (opts.H0+opts.H-legs_start(i, 3))/(legs(i, 3));
-  Ab(i, :) = legs_start(i, :) + t*legs(i, :);
-end
-
-
- -

-And the location of the joints on the mobile platform with respect to \(\{B\}\). -

-
-
Bb = zeros(6, 3);
-Bb = Ab - (opts.H0 + opts.H_tot/2 + opts.H/2)*[0, 0, 1];
-
-
- -
-
h = opts.H0 + opts.H/2 - opts.H_tot/2;
-Aa = Aa - h*[0, 0, 1];
-Ab = Ab - h*[0, 0, 1];
-
-
-
-
- -
-

5.7 Returns Stewart Structure

-
-
-
  stewart = struct();
-  stewart.Aa = Aa;
-  stewart.Ab = Ab;
-  stewart.Bb = Bb;
-  stewart.H_tot = opts.H_tot;
-end
-
-
-
-
-
- -
-

6 TODO Tests

-
-
-
-

6.1 First attempt to parametrisation

-
- -
-

stewart_bottom_plate.png -

-

Figure 5: Schematic of the bottom plates with all the parameters

-
- -

-The goal is to choose \(\alpha\), \(\beta\), \(R_\text{leg, t}\) and \(R_\text{leg, b}\) in such a way that the configuration is cubic. -

- - -

-The configuration is cubic if: -\[ \overrightarrow{a_i b_i} \cdot \overrightarrow{a_j b_j} = 0, \ \forall i, j = [1, \hdots, 6], i \ne j \] -

- -

-Lets express \(a_i\), \(b_i\) and \(a_j\): -

-\begin{equation*} - a_1 = \begin{bmatrix}R_{\text{leg,b}} \cos(120 - \alpha) \\ R_{\text{leg,b}} \cos(120 - \alpha) \\ 0\end{bmatrix} ; \quad - a_2 = \begin{bmatrix}R_{\text{leg,b}} \cos(120 + \alpha) \\ R_{\text{leg,b}} \cos(120 + \alpha) \\ 0\end{bmatrix} ; \quad -\end{equation*} - -\begin{equation*} - b_1 = \begin{bmatrix}R_{\text{leg,t}} \cos(120 - \beta) \\ R_{\text{leg,t}} \cos(120 - \beta\\ H\end{bmatrix} ; \quad - b_2 = \begin{bmatrix}R_{\text{leg,t}} \cos(120 + \beta) \\ R_{\text{leg,t}} \cos(120 + \beta\\ H\end{bmatrix} ; \quad -\end{equation*} - -

-\[ \overrightarrow{a_1 b_1} = b_1 - a_1 = \begin{bmatrix}R_{\text{leg}} \cos(120 - \alpha) \\ R_{\text{leg}} \cos(120 - \alpha) \\ 0\end{bmatrix}\] -

-
-
- -
-

6.2 Second attempt

-
-

-We start with the point of a cube in space: -

-\begin{align*} - [0, 0, 0] ; \ [0, 0, 1]; \ ... -\end{align*} - -

-We also want the cube to point upward: -\[ [1, 1, 1] \Rightarrow [0, 0, 1] \] -

- -

-Then we have the direction of all the vectors expressed in the frame of the hexapod. -

- -
-
points = [0, 0, 0; ...
-          0, 0, 1; ...
-          0, 1, 0; ...
-          0, 1, 1; ...
-          1, 0, 0; ...
-          1, 0, 1; ...
-          1, 1, 0; ...
-          1, 1, 1];
-
-
- -
-
figure;
-plot3(points(:,1), points(:,2), points(:,3), 'ko')
-
-
- -
-
sx = cross([1, 1, 1], [1 0 0]);
-sx = sx/norm(sx);
-
-sy = -cross(sx, [1, 1, 1]);
-sy = sy/norm(sy);
-
-sz = [1, 1, 1];
-sz = sz/norm(sz);
-
-R = [sx', sy', sz']';
-
-
- -
-
cube = zeros(size(points));
-for i = 1:size(points, 1)
-  cube(i, :) = R * points(i, :)';
-end
-
-
- -
-
figure;
-hold on;
-plot3(points(:,1), points(:,2), points(:,3), 'ko');
-plot3(cube(:,1), cube(:,2), cube(:,3), 'ro');
-hold off;
-
-
- -

-Now we plot the legs of the hexapod. -

-
-
leg_indices = [3, 4; ...
-               2, 4; ...
-               2, 6; ...
-               5, 6; ...
-               5, 7; ...
-               3, 7]
-
-figure;
-hold on;
-for i = 1:6
-  plot3(cube(leg_indices(i, :),1), cube(leg_indices(i, :),2), cube(leg_indices(i, :),3), '-');
-end
-hold off;
-
-
- -

-Vectors are: -

-
-
legs = zeros(6, 3);
-legs_start = zeros(6, 3);
-
-for i = 1:6
-  legs(i, :) = cube(leg_indices(i, 2), :) - cube(leg_indices(i, 1), :);
-  legs_start(i, :) = cube(leg_indices(i, 1), :)
-end
-
-
- -

-We now have the orientation of each leg. -

- -

-We here want to see if the position of the “slice” changes something. -

- -

-Let’s first estimate the maximum height of the Stewart platform. -

-
-
Hmax = cube(4, 3) - cube(2, 3);
-
-
- -

-Let’s then estimate the middle position of the platform -

-
-
Hmid = cube(8, 3)/2;
-
-
-
-
- -
-

6.3 Generate the Stewart platform for a Cubic configuration

-
-

-First we defined the height of the Hexapod. -

-
-
H = Hmax/2;
-
-
- -
-
Zs = 1.2*cube(2, 3); % Height of the fixed platform
-Ze = Zs + H; % Height of the mobile platform
-
-
- -

-We now determine the location of the joints on the fixed platform. -

-
-
Aa = zeros(6, 3);
-for i = 1:6
-  t = (Zs-legs_start(i, 3))/(legs(i, 3));
-  Aa(i, :) = legs_start(i, :) + t*legs(i, :);
-end
-
-
- -

-And the location of the joints on the mobile platform -

-
-
Ab = zeros(6, 3);
-for i = 1:6
-  t = (Ze-legs_start(i, 3))/(legs(i, 3));
-  Ab(i, :) = legs_start(i, :) + t*legs(i, :);
-end
-
-
- -

-And we plot the legs. -

-
-
figure;
-hold on;
-for i = 1:6
-  plot3([Ab(i, 1),Aa(i, 1)], [Ab(i, 2),Aa(i, 2)], [Ab(i, 3),Aa(i, 3)], 'k-');
-end
-hold off;
-xlim([-1, 1]);
-ylim([-1, 1]);
-zlim([0, 2]);
-
-
-
-
-
-

Bibliography

@@ -1491,7 +1028,7 @@ zlim([0, 2]);

Author: Dehaeze Thomas

-

Created: 2020-02-06 jeu. 17:25

+

Created: 2020-02-06 jeu. 17:29

diff --git a/cubic-configuration.org b/cubic-configuration.org index e48721c..9a92416 100644 --- a/cubic-configuration.org +++ b/cubic-configuration.org @@ -31,7 +31,11 @@ The cubic (or orthogonal) configuration of the Stewart platform is now widely us According to cite:preumont07_six_axis_singl_stage_activ, the cubic configuration provides a uniform stiffness in all directions and *minimizes the crosscoupling* from actuator to sensor of different legs (being orthogonal to each other). -To generate and study the Cubic configuration, =initializeCubicConfiguration= is used (description in section [[sec:initializeCubicConfiguration]]). +To generate and study the Cubic configuration, =generateCubicConfiguration= is used (description in section [[sec:generateCubicConfiguration]]). +The goal is to study the benefits of using a cubic configuration: +- Equal stiffness in all the degrees of freedom? +- No coupling between the actuators? +- Is the center of the cube an important point? * Matlab Init :noexport:ignore: #+begin_src matlab :tangle no :exports none :results silent :noweb yes :var current_dir=(file-name-directory buffer-file-name) @@ -46,12 +50,6 @@ To generate and study the Cubic configuration, =initializeCubicConfiguration= is simulinkproject('./'); #+end_src -* Questions we wish to answer with this analysis -The goal is to study the benefits of using a cubic configuration: -- Equal stiffness in all the degrees of freedom? -- No coupling between the actuators? -- Is the center of the cube an important point? - * TODO Configuration Analysis - Stiffness Matrix ** Cubic Stewart platform centered with the cube center - Jacobian estimated at the cube center We create a cubic Stewart platform (figure [[fig:3d-cubic-stewart-aligned]]) in such a way that the center of the cube (black dot) is located at the center of the Stewart platform (blue dot). @@ -400,316 +398,6 @@ We now which to compute the position of the joints $a_{i}$ and $b_{i}$. stewart.Mb = CCf + [0; 0; args.FOc-stewart.H] + ((stewart.H-args.MHb-(args.FOc-args.Hc/2))./CSi(3,:)).*CSi; #+end_src -* TODO initializeCubicConfiguration -:PROPERTIES: -:HEADER-ARGS:matlab+: :exports code -:HEADER-ARGS:matlab+: :comments no -:HEADER-ARGS:matlab+: :eval no -:HEADER-ARGS:matlab+: :tangle src/initializeCubicConfiguration.m -:END: -<> - -** Function description -#+begin_src matlab - function [stewart] = initializeCubicConfiguration(opts_param) -#+end_src - -** Optional Parameters -Default values for opts. -#+begin_src matlab - opts = struct(... - 'H_tot', 90, ... % Total height of the Hexapod [mm] - 'L', 110, ... % Size of the Cube [mm] - 'H', 40, ... % Height between base joints and platform joints [mm] - 'H0', 75 ... % Height between the corner of the cube and the plane containing the base joints [mm] - ); -#+end_src - -Populate opts with input parameters -#+begin_src matlab - if exist('opts_param','var') - for opt = fieldnames(opts_param)' - opts.(opt{1}) = opts_param.(opt{1}); - end - end -#+end_src - -** Cube Creation -#+begin_src matlab :results none - points = [0, 0, 0; ... - 0, 0, 1; ... - 0, 1, 0; ... - 0, 1, 1; ... - 1, 0, 0; ... - 1, 0, 1; ... - 1, 1, 0; ... - 1, 1, 1]; - points = opts.L*points; -#+end_src - -We create the rotation matrix to rotate the cube -#+begin_src matlab :results none - sx = cross([1, 1, 1], [1 0 0]); - sx = sx/norm(sx); - - sy = -cross(sx, [1, 1, 1]); - sy = sy/norm(sy); - - sz = [1, 1, 1]; - sz = sz/norm(sz); - - R = [sx', sy', sz']'; -#+end_src - -We use to rotation matrix to rotate the cube -#+begin_src matlab :results none - cube = zeros(size(points)); - for i = 1:size(points, 1) - cube(i, :) = R * points(i, :)'; - end -#+end_src - -** Vectors of each leg -#+begin_src matlab :results none - leg_indices = [3, 4; ... - 2, 4; ... - 2, 6; ... - 5, 6; ... - 5, 7; ... - 3, 7]; -#+end_src - -Vectors are: -#+begin_src matlab :results none - legs = zeros(6, 3); - legs_start = zeros(6, 3); - - for i = 1:6 - legs(i, :) = cube(leg_indices(i, 2), :) - cube(leg_indices(i, 1), :); - legs_start(i, :) = cube(leg_indices(i, 1), :); - end -#+end_src - -** Verification of Height of the Stewart Platform -If the Stewart platform is not contained in the cube, throw an error. - -#+begin_src matlab :results none - Hmax = cube(4, 3) - cube(2, 3); - if opts.H0 < cube(2, 3) - error(sprintf('H0 is not high enought. Minimum H0 = %.1f', cube(2, 3))); - else if opts.H0 + opts.H > cube(4, 3) - error(sprintf('H0+H is too high. Maximum H0+H = %.1f', cube(4, 3))); - error('H0+H is too high'); - end -#+end_src - -** Determinate the location of the joints -We now determine the location of the joints on the fixed platform w.r.t the fixed frame $\{A\}$. -$\{A\}$ is fixed to the bottom of the base. -#+begin_src matlab :results none - Aa = zeros(6, 3); - for i = 1:6 - t = (opts.H0-legs_start(i, 3))/(legs(i, 3)); - Aa(i, :) = legs_start(i, :) + t*legs(i, :); - end -#+end_src - -And the location of the joints on the mobile platform with respect to $\{A\}$. -#+begin_src matlab :results none - Ab = zeros(6, 3); - for i = 1:6 - t = (opts.H0+opts.H-legs_start(i, 3))/(legs(i, 3)); - Ab(i, :) = legs_start(i, :) + t*legs(i, :); - end -#+end_src - -And the location of the joints on the mobile platform with respect to $\{B\}$. -#+begin_src matlab :results none - Bb = zeros(6, 3); - Bb = Ab - (opts.H0 + opts.H_tot/2 + opts.H/2)*[0, 0, 1]; -#+end_src - -#+begin_src matlab :results none - h = opts.H0 + opts.H/2 - opts.H_tot/2; - Aa = Aa - h*[0, 0, 1]; - Ab = Ab - h*[0, 0, 1]; -#+end_src - -** Returns Stewart Structure -#+begin_src matlab :results none - stewart = struct(); - stewart.Aa = Aa; - stewart.Ab = Ab; - stewart.Bb = Bb; - stewart.H_tot = opts.H_tot; -end -#+end_src - -* TODO Tests -** First attempt to parametrisation -#+name: fig:stewart_bottom_plate -#+caption: Schematic of the bottom plates with all the parameters -[[file:./figs/stewart_bottom_plate.png]] - -The goal is to choose $\alpha$, $\beta$, $R_\text{leg, t}$ and $R_\text{leg, b}$ in such a way that the configuration is cubic. - - -The configuration is cubic if: -\[ \overrightarrow{a_i b_i} \cdot \overrightarrow{a_j b_j} = 0, \ \forall i, j = [1, \hdots, 6], i \ne j \] - -Lets express $a_i$, $b_i$ and $a_j$: -\begin{equation*} - a_1 = \begin{bmatrix}R_{\text{leg,b}} \cos(120 - \alpha) \\ R_{\text{leg,b}} \cos(120 - \alpha) \\ 0\end{bmatrix} ; \quad - a_2 = \begin{bmatrix}R_{\text{leg,b}} \cos(120 + \alpha) \\ R_{\text{leg,b}} \cos(120 + \alpha) \\ 0\end{bmatrix} ; \quad -\end{equation*} - -\begin{equation*} - b_1 = \begin{bmatrix}R_{\text{leg,t}} \cos(120 - \beta) \\ R_{\text{leg,t}} \cos(120 - \beta\\ H\end{bmatrix} ; \quad - b_2 = \begin{bmatrix}R_{\text{leg,t}} \cos(120 + \beta) \\ R_{\text{leg,t}} \cos(120 + \beta\\ H\end{bmatrix} ; \quad -\end{equation*} - -\[ \overrightarrow{a_1 b_1} = b_1 - a_1 = \begin{bmatrix}R_{\text{leg}} \cos(120 - \alpha) \\ R_{\text{leg}} \cos(120 - \alpha) \\ 0\end{bmatrix}\] - -** Second attempt -We start with the point of a cube in space: -\begin{align*} - [0, 0, 0] ; \ [0, 0, 1]; \ ... -\end{align*} - -We also want the cube to point upward: -\[ [1, 1, 1] \Rightarrow [0, 0, 1] \] - -Then we have the direction of all the vectors expressed in the frame of the hexapod. - -#+begin_src matlab :results none - points = [0, 0, 0; ... - 0, 0, 1; ... - 0, 1, 0; ... - 0, 1, 1; ... - 1, 0, 0; ... - 1, 0, 1; ... - 1, 1, 0; ... - 1, 1, 1]; -#+end_src - -#+begin_src matlab :results none - figure; - plot3(points(:,1), points(:,2), points(:,3), 'ko') -#+end_src - -#+begin_src matlab :results none - sx = cross([1, 1, 1], [1 0 0]); - sx = sx/norm(sx); - - sy = -cross(sx, [1, 1, 1]); - sy = sy/norm(sy); - - sz = [1, 1, 1]; - sz = sz/norm(sz); - - R = [sx', sy', sz']'; -#+end_src - -#+begin_src matlab :results none - cube = zeros(size(points)); - for i = 1:size(points, 1) - cube(i, :) = R * points(i, :)'; - end -#+end_src - -#+begin_src matlab :results none - figure; - hold on; - plot3(points(:,1), points(:,2), points(:,3), 'ko'); - plot3(cube(:,1), cube(:,2), cube(:,3), 'ro'); - hold off; -#+end_src - -Now we plot the legs of the hexapod. -#+begin_src matlab :results none - leg_indices = [3, 4; ... - 2, 4; ... - 2, 6; ... - 5, 6; ... - 5, 7; ... - 3, 7] - - figure; - hold on; - for i = 1:6 - plot3(cube(leg_indices(i, :),1), cube(leg_indices(i, :),2), cube(leg_indices(i, :),3), '-'); - end - hold off; -#+end_src - -Vectors are: -#+begin_src matlab :results none - legs = zeros(6, 3); - legs_start = zeros(6, 3); - - for i = 1:6 - legs(i, :) = cube(leg_indices(i, 2), :) - cube(leg_indices(i, 1), :); - legs_start(i, :) = cube(leg_indices(i, 1), :) - end -#+end_src - -We now have the orientation of each leg. - -We here want to see if the position of the "slice" changes something. - -Let's first estimate the maximum height of the Stewart platform. -#+begin_src matlab :results none - Hmax = cube(4, 3) - cube(2, 3); -#+end_src - -Let's then estimate the middle position of the platform -#+begin_src matlab :results none - Hmid = cube(8, 3)/2; -#+end_src - -** Generate the Stewart platform for a Cubic configuration - -First we defined the height of the Hexapod. -#+begin_src matlab :results none - H = Hmax/2; -#+end_src - -#+begin_src matlab :results none - Zs = 1.2*cube(2, 3); % Height of the fixed platform - Ze = Zs + H; % Height of the mobile platform -#+end_src - -We now determine the location of the joints on the fixed platform. -#+begin_src matlab :results none - Aa = zeros(6, 3); - for i = 1:6 - t = (Zs-legs_start(i, 3))/(legs(i, 3)); - Aa(i, :) = legs_start(i, :) + t*legs(i, :); - end -#+end_src - -And the location of the joints on the mobile platform -#+begin_src matlab :results none - Ab = zeros(6, 3); - for i = 1:6 - t = (Ze-legs_start(i, 3))/(legs(i, 3)); - Ab(i, :) = legs_start(i, :) + t*legs(i, :); - end -#+end_src - -And we plot the legs. -#+begin_src matlab :results none - figure; - hold on; - for i = 1:6 - plot3([Ab(i, 1),Aa(i, 1)], [Ab(i, 2),Aa(i, 2)], [Ab(i, 3),Aa(i, 3)], 'k-'); - end - hold off; - xlim([-1, 1]); - ylim([-1, 1]); - zlim([0, 2]); -#+end_src - -* Bibliography :ignore: +* Bibliography :ignore: bibliographystyle:unsrtnat bibliography:ref.bib diff --git a/src/initializeCubicConfiguration.m b/src/initializeCubicConfiguration.m deleted file mode 100644 index 6817217..0000000 --- a/src/initializeCubicConfiguration.m +++ /dev/null @@ -1,89 +0,0 @@ -function [stewart] = initializeCubicConfiguration(opts_param) - -opts = struct(... - 'H_tot', 90, ... % Total height of the Hexapod [mm] - 'L', 110, ... % Size of the Cube [mm] - 'H', 40, ... % Height between base joints and platform joints [mm] - 'H0', 75 ... % Height between the corner of the cube and the plane containing the base joints [mm] - ); - -if exist('opts_param','var') - for opt = fieldnames(opts_param)' - opts.(opt{1}) = opts_param.(opt{1}); - end -end - -points = [0, 0, 0; ... - 0, 0, 1; ... - 0, 1, 0; ... - 0, 1, 1; ... - 1, 0, 0; ... - 1, 0, 1; ... - 1, 1, 0; ... - 1, 1, 1]; -points = opts.L*points; - -sx = cross([1, 1, 1], [1 0 0]); -sx = sx/norm(sx); - -sy = -cross(sx, [1, 1, 1]); -sy = sy/norm(sy); - -sz = [1, 1, 1]; -sz = sz/norm(sz); - -R = [sx', sy', sz']'; - -cube = zeros(size(points)); -for i = 1:size(points, 1) - cube(i, :) = R * points(i, :)'; -end - -leg_indices = [3, 4; ... - 2, 4; ... - 2, 6; ... - 5, 6; ... - 5, 7; ... - 3, 7]; - -legs = zeros(6, 3); -legs_start = zeros(6, 3); - -for i = 1:6 - legs(i, :) = cube(leg_indices(i, 2), :) - cube(leg_indices(i, 1), :); - legs_start(i, :) = cube(leg_indices(i, 1), :); -end - -Hmax = cube(4, 3) - cube(2, 3); -if opts.H0 < cube(2, 3) - error(sprintf('H0 is not high enought. Minimum H0 = %.1f', cube(2, 3))); -else if opts.H0 + opts.H > cube(4, 3) - error(sprintf('H0+H is too high. Maximum H0+H = %.1f', cube(4, 3))); - error('H0+H is too high'); -end - -Aa = zeros(6, 3); -for i = 1:6 - t = (opts.H0-legs_start(i, 3))/(legs(i, 3)); - Aa(i, :) = legs_start(i, :) + t*legs(i, :); -end - -Ab = zeros(6, 3); -for i = 1:6 - t = (opts.H0+opts.H-legs_start(i, 3))/(legs(i, 3)); - Ab(i, :) = legs_start(i, :) + t*legs(i, :); -end - -Bb = zeros(6, 3); -Bb = Ab - (opts.H0 + opts.H_tot/2 + opts.H/2)*[0, 0, 1]; - -h = opts.H0 + opts.H/2 - opts.H_tot/2; -Aa = Aa - h*[0, 0, 1]; -Ab = Ab - h*[0, 0, 1]; - -stewart = struct(); - stewart.Aa = Aa; - stewart.Ab = Ab; - stewart.Bb = Bb; - stewart.H_tot = opts.H_tot; -end