Project on Robotic arm lying on the centre of a square where my end effector lying on one corner and it should move from one corner to other corner and pause for 10 milli seconds until it reaches its initial position.

1 view (last 30 days)
Hello Sir/Madam,
This is Sumanth reddy i was facing a problem regarding an algorithm of square with 20cm sides and my robotic arm is in centre of square and need to move from each corner to corner and achieve its initial position.
But my end effector should start at point (0.1,0.1,0.233) and at every corner it needs to pause for 100 milli sec and restart. could you please help me.with 6 DOF
DH is a=[ 0 0.21 0 0.03 0 0], alpha = [ 90 0 90 -90 90 0] d= [ 0.183 0 0 0.2215 0 0.0237] theta=[30; 30; 45; 0; 90; 10]
Thank you.
  7 Comments

Sign in to comment.

Accepted Answer

darova
darova on 18 Feb 2021
Here is an example
clc,clear
D1 = 0.2;
D2 = 0.15;
t = pi/4+(0:pi/2:2*pi);
[x,y] = pol2cart(t,sqrt(2)*0.2);
% create more points on the square side (interpolation)
tt = linspace(t(1),t(end),100);
x2 = interp1(t,x,tt);
y2 = interp1(t,y,tt);
z2 = 0*x2;
D = hypot(x2,y2);
a1 = acos( (D2^2-D1^2-D.^2)./(2*D*D1) );
x1 = x2./D*D1;
y1 = y2./D*D1;
z1 = D1*sin(a1);
plot3(x2,y2,z2,'.r')
hold on
for i = 1:length(x1)
plot3([0 x1(i) x2(i)],...
[0 y1(i) y2(i)],...
[0 z1(i) z2(i)])
pause(0.1)
end
hold off
Read about law_cosinus

More Answers (0)

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!