Hallo,
mein Problem besteht darin dass mein Drawing-Robot aus dem Arduino Engineering Kit nicht zu der gewünschten Position geht wenn ich bei dem "Task3.mlx" auf Run klicke.
Das Programm läuft in Matlab und ich finde im Hilfe Fenster nichts hilfreiches.
Bis zum "Move to target position" läuft alles ohne Probleme aber dann passiert einfach nichts.
Obwohl das Programm doch eigentlich die Servos vom Roboter bewegen sollte.
Ich kann die .mlx und .mat leider nicht anhängen.
Aber die Fehlermeldung kommt hier:
function moveToCounts(counts,m1,m2,e1,e2)
wRef = 20; %rpm
hitRadius = 20; %counts
start(m1)
start(m2)
% Loop through all points
nPoints = size(counts,1);
for ii = 1:nPoints
% Determine destination point
countTarget = counts(ii,:);
% Loop until at destination
while true
% Update count measurement
countNew = [readCount(e1) readCount(e2)];
% Check distance to final position and break if close enough
countRemain = countTarget - countNew;
countNorm = sqrt(sum((countRemain).^2));
if countNorm <= hitRadius
break
end
% Compute and set target angular speed for each motor
wSet = (countRemain/countNorm)*wRef;
stop(m1),start(m1),setSpeed(m1,round(wSet(1)));
stop(m2),start(m2),setSpeed(m2,round(wSet(2)));
end
end
stop(m1)
stop(m2)
end
Matlab sagt "Error in moveToCounts (line 6)
start(m1)"
Aber ich verstehe nicht was an "Starte motor 1 falsch ist"
Und hier noch der Workspace:
Base = 0.3350
counts = [0.1675,0.1829]
countsPerRadian = 190.9859
countsPerRevolution = 1200
dStrinLenght = [-0.0608,-0.1400]
dZ = [-0.0304,-0.0700]
phi = [-3.0393,-6.9997]
x = [0.1500,0.2000,0.2000,0.1500,0.1500
xy = [0.1500,0.1500,0.2000,0.1500,0.2000,0.2500,0.1500,0.2500,0.1500,0.1500]
y = [0.1500,0.1500;0.2500,0.2500;0.1500]
Z = [0.2236,0.1680]
Z_i = [0.2540,0.2380]