Huge Update
- Modify the joints for Ty, Ry, Rz to have only one bushing joint. - Compensation of gravity
This commit is contained in:
@@ -97,7 +97,7 @@ The three rotations that we define thus corresponds to the Euler U-V-W angles.
|
||||
We should have the *same behavior* for the Micro-Hexapod on Simscape (same inputs at least).
|
||||
However, the Bushing Joint makes rotations around mobiles axes (X, Y' and then Z'') and not fixed axes (X, Y and Z).
|
||||
|
||||
*** TODO Using Inverse Kinematics and Leg Actuators
|
||||
*** Using Inverse Kinematics and Leg Actuators
|
||||
Here, we can use the Inverse Kinematic of the Hexapod to determine the length of each leg in order to obtain some defined translation and rotation of the mobile platform.
|
||||
|
||||
The advantages are:
|
||||
@@ -147,20 +147,20 @@ Otherwise, when the limbs' lengths derived yield complex numbers, then the posit
|
||||
**** Matlab Implementation
|
||||
We open the Simulink file.
|
||||
#+begin_src matlab
|
||||
|
||||
open('nass_model.slx')
|
||||
#+end_src
|
||||
|
||||
We load the configuration and set a small =StopTime=.
|
||||
#+begin_src matlab
|
||||
load('mat/conf_simulink.mat');
|
||||
set_param(conf_simulink, 'StopTime', '0.5');
|
||||
set_param(conf_simulink, 'StopTime', '0.1');
|
||||
#+end_src
|
||||
|
||||
We define the wanted position/orientation of the Hexapod under study.
|
||||
#+begin_src matlab
|
||||
tx = 0.1; % [rad]
|
||||
ty = 0.2; % [rad]
|
||||
tz = 0.05; % [rad]
|
||||
tx = 0.05; % [rad]
|
||||
ty = 0.1; % [rad]
|
||||
tz = 0.02; % [rad]
|
||||
|
||||
Rx = [1 0 0;
|
||||
0 cos(tx) -sin(tx);
|
||||
@@ -175,34 +175,47 @@ We define the wanted position/orientation of the Hexapod under study.
|
||||
0 0 1];
|
||||
|
||||
ARB = Rz*Ry*Rx;
|
||||
AP = [0.01; 0.02; 0.03]; % [m]
|
||||
AP = [0.1; 0.005; 0.01]; % [m]
|
||||
#+end_src
|
||||
|
||||
hexapod = initializeMicroHexapod('AP', AP, 'ARB', ARB);
|
||||
#+begin_src matlab
|
||||
initializeSimscapeConfiguration('gravity', false);
|
||||
initializeGround('type', 'none');
|
||||
initializeGranite('type', 'none');
|
||||
initializeTy('type', 'none');
|
||||
initializeRy('type', 'none');
|
||||
initializeRz('type', 'none');
|
||||
initializeMicroHexapod('type', 'rigid', 'AP', AP, 'ARB', ARB);
|
||||
initializeAxisc('type', 'none');
|
||||
initializeMirror('type', 'none');
|
||||
initializeNanoHexapod('type', 'none');
|
||||
initializeSample('type', 'none');
|
||||
initializeLoggingConfiguration('log', 'all');
|
||||
#+end_src
|
||||
|
||||
We run the simulation.
|
||||
#+begin_src matlab
|
||||
sim()
|
||||
sim('nass_model');
|
||||
#+end_src
|
||||
|
||||
And we verify that we indeed succeed to go to the wanted position.
|
||||
#+begin_src matlab :results table replace
|
||||
[simout.x.Data(end) ; simout.y.Data(end) ; simout.z.Data(end)] - AP
|
||||
[simout.Dhm.x.Data(end) ; simout.Dhm.y.Data(end) ; simout.Dhm.z.Data(end)] - AP
|
||||
#+end_src
|
||||
|
||||
#+RESULTS:
|
||||
| 1.611e-10 |
|
||||
| -1.3748e-10 |
|
||||
| 8.4879e-11 |
|
||||
| 8.4655e-16 |
|
||||
| 1.5586e-15 |
|
||||
| -2.1337e-16 |
|
||||
|
||||
#+begin_src matlab :results table replace
|
||||
simout.R.Data(:, :, end)-ARB
|
||||
simout.Dhm.R.Data(:, :, end)-ARB
|
||||
#+end_src
|
||||
|
||||
#+RESULTS:
|
||||
| -1.2659e-10 | 6.5603e-11 | 6.2183e-10 |
|
||||
| 1.0354e-10 | -5.2439e-11 | -5.2425e-10 |
|
||||
| -5.9816e-10 | 5.532e-10 | -1.7737e-10 |
|
||||
| -1.1102e-16 | -1.36e-15 | 4.2744e-15 |
|
||||
| 1.0651e-15 | 6.6613e-16 | 5.1278e-15 |
|
||||
| -4.2882e-15 | -4.9336e-15 | 1.1102e-16 |
|
||||
|
||||
* TODO Tests on the transformation from reference to wanted position :noexport:
|
||||
:PROPERTIES:
|
||||
|
Reference in New Issue
Block a user