Home > other >  The movement of mechanical arm in MATLAB
The movement of mechanical arm in MATLAB

Time:09-16

The clear;
clc;
close all;



% robot modeling% define d-h parameters of connecting rod
% d theta a alpha offset
ML1=Link ([0 0 0 0 0], 'modified');
ML2=Link ([0 0 0] PI/2 0.200, 'modified');
ML3=Link ([0 0 0 0] 0.880, 'modified');
ML4=Link (0.800 PI/2 0 0 0 and 3, 'modified');
ML5=Link ([0 0 0 0 PI/2], 'modified');
ML6=Link ([0 0 0 0 PI/2], 'modified');
Robot=SerialLink ([ML1 ML2 ML3 ML4 ML5 ML6], 'name', 'BA006', 'modified');

Path=[0,0,10; 58.5340, 89.3660, 10; 64.7440, 90.6080, 10; 74.8600, 87.2420, 10; 80.3500, 86.7200, 10; 78.7480, 96.8180, 10; 88.8640, 109.7780, 10; 100.3600, 112.6350, 10; 108.0340, 111.0200, 10;
97.3780, 96.9980, 10; 91.7080, 85.6580, 10; 98.2780, 87.9620, 10; 109.7980, 84.0560, 10; 116.7280, 84.4160, 10; 116.8900, 97.5380, 10; 2 2 1; 128.3740, 111.9200, 10; 137.4460, 99.4640, 10; 136.6720, 93.7580, 10;
129.6700, 83.1200, 10; 137.1940, 85.1900, 10; 149.9200, 81.3020, 10; 158.2360, 82.3460, 10; 175.8580, 80.4380, 10; 192.9040, 78.8000, 10; 221.4520, 77.4860, 10; 220.4620, 99.7880, 10; 220.4620, 99.7880, 10;
205.3780, 97.3320, 10; 186.0280, 119.4620, 10; 177.8200, 116.8340, 10; 164.7160, 122.8100, 10; 156.4180, 113.7380, 10; 152.2600, 127.9940, 10; 172.9060, 152.5640, 10; 173.5540, 161.0960, 10; 165.3460, 172.2380, 10;
151.4860, 152.6360, 10; 130.6960, 153.6800, 10; 111.2200, 153.1580, 10; 109.2760, 135.4820, 10; 106.2520, 130.5140, 10; 98.0980, 134.4200, 10; 88.3420, 129.1100, 10; 87.4420, 133.8980, 10; 76.8040, 132.1160, 10;
69.4960, 126.9860, 10; 63.3220, 118.2920, 10; 71.4760, 109.0580, 10; 56.0500, 108.1760, 10; 61.7200, 96.6380, 10; 52.6840, 96.6380, 10; 46.1140, 95.5760, 10; 43.0900, 90.6080, 10; 0,0,10] * [200 0 0, 0, 200; 0 0 200].

P=the path '
For I=at 1:55
M=[1 0 0] '; % motion vector
A=[0, 0, 1] '; % path plane vector
VecN=m/norm (m);
VecA=a/norm (a);
VecO=cross (VecA, VecN);
Pos (:, :, I)=[VecN VecO VecA (: I) * 0.000025; p
0 0 0 1);
End
X=size (Pos, 3);
QIkine=zeros (55, 6);
i=1;
While (iTT0=Pos (:, :, I);
QIkine (I)=Robot. Ikine (TT0);
I=I + 1;
End
Robot. The plot (QIkine (1: end, :), 'workspace' [0.8 3.5 0.8 0.8 0.5 2.8])
With a subscript assignment dimension does not match how to solve?
  • Related