Robot simulation of RRR robot
Show older comments
http://www.youtube.com/watch?v=QMkykqeSVWg&feature=related Anyone can tell me how to this simulation? I think it is in the field of mechatronics student. I just want to know how to plot the 3 links robot, the tracing part is not an important issue.
Accepted Answer
More Answers (2)
Chirag Gupta
on 8 Mar 2011
There are numerous ways to plot the 3 links. A simple way would be to use the line function. Assuming you always know the end positions of your links. A crude simple example(2 links):
figure;
h = plot3(0,0,0);
p = get(h,'Parent');
xlim(p,'manual');
xlim(p,[0 2]);
ylim(p,'manual');
ylim(p,[0 2]);
zlim(p,'manual');
zlim(p,[0 2]);
axis vis3d;
grid on;
point1.x =0;
point1.y = 0;
point1.z = 0;
point2.x = 1;
point2.y = 1;
point2.z = 1;
point3.x = 1.5;
point3.y = 1;
point3.z = 1.2;
l= line([point1.x, point2.x],[point1.y,point2.y],[point1.z,point2.z],'Color','r','LineWidth',4);
l1 = line([point2.x, point3.x],[point2.y,point3.y],[point2.z,point3.z],'Color','b','LineWidth',4);
for i =0.1:0.1:1
set(l,'ZData',[point1.z,i],'YData',[point1.y,i]);
set(l1,'ZData',[i,point3.z],'YData',[i,point3.y]);
pause(0.1);
end
6 Comments
Cheng Yoong
on 9 Mar 2011
Chirag Gupta
on 9 Mar 2011
What information do you have? If you know the trajectories of the robot, then possibly you know the individual angles of the links. Knowing the angles, you should be able to compute the end points your links, if you have the D-H parameters.
Cheng Yoong
on 10 Mar 2011
Chirag Gupta
on 11 Mar 2011
If you have the D-H parameters, then you can get the individual Rotation matrices around X axis ( Alphas of the D-H params), you know the rotation about the Z axis (thetas which you are going to key in) and the vector that you can form from a and r's [a;0;r]
Let Rotation Matrix about the X axis be V = [1 0 0;0 cos(alpha) -sin(alpha); 0 sin(alpha) cos(alpha)]
This value is known as you know each alpha. These can be V1 (alpha1), V2 and V3
Similarly Rotation Matrix about Z axis be U = [cos(theta) -sin(theta) 0; ....]
s vectors from a's and r's [a;0;r]
Then: link1 = U1*V1*s1
link2 = U2*V2*U1*V1*s2 + U1*V1*s1
link3 = U3*V3*U2*V2*U1*V1*s3 + U2*V2*U1*V1*s2 + U1*V1*s1
These will give you the end positions from the same frame of reference.
Abraham Serrano
on 18 Apr 2017
Hello! I´m trying to do this but with a 4R manipulator, right know I have the D-H parameters and the FK equations. I know this thread is 6 years old but I hope anyone can help me. What do I have to do to add another joint and link? I don´t know anything about matlab. Thanks in advance.
Sabrine Ouhichi
on 15 Feb 2021
I have the same problem do you solve it
reyam ahmed
on 11 Nov 2017
0 votes
i want to plot 2-link robot manipulator using dynamic equation , can you help me?
Categories
Find more on Spline Postprocessing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!