Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The code is very similar to Simulation runner where the only difference is the absence of the inverse kinematics calculations. The A1_position..A5_position are computed directly and then fed to the simulation

Motion Examples

Only A1

By only moving A1 we are mostly controlling the pitch of the strongback. The drawback is that we have a parasitic motion on Y. This is why we need the inverse kinematics in place to keep all the degree of freedom in the cartesian space as close as possible to the target configuration

Multimedia
nameSCU_FULL.mp4
autostarttrue


Circle

Combined motions can be executed. In this case, I'm simulating a rotary motion in the joint space.

Code Block
titleRotary motion code
linenumberstrue
collapsetrue
% generate a circular trajectory
R = 2;
time_norm = time / time(end);
theta = time_norm * 4*pi;
x = R*cos(theta);
y = R*sin(theta);
% Generate trajectory
A1 = A1_start + time / time(end) * (A1_end - A1_start);
A2 = A2_start + time / time(end) * (A2_end - A2_start);
A3 = A3_start + time / time(end) * (A3_end - A3_start);
A4 = A4_start + time / time(end) * (A4_end - A4_start);
A5 = A5_start + time / time(end) * (A5_end - A5_start);

% Create position arrays for each actuator
A1_position = [time' A1'];
A2_position = [time' y'];
A3_position = [time' y'];
A4_position = [time' A4'];
A5_position = [time' x'];


Multimedia
nameSCU_FULL_rot.mp4
autostarttrue

Image Added

Image AddedImage Added