How to generate 3D surface or robot workspace?
Afficher commentaires plus anciens
I have a 4 DOF robot with variables t1,t2,d3 and t4. I used linspace to generate values for the variables, and also I calculated the positions, resulting 90x90x90 matrices (for X, Y and Z). Now how could I do a work-space with this data? Obviously plot3 or surf does not work. I searched the answers and the one with example is no longer valid. Can please help me with some examples or code?
l1=500;l2=600;l3=400;l4=191.03;
t1=linspace(-180,180,90)*pi/180;
t2=linspace(-90,90,90)*pi/180;
d3=linspace(-200,200,90);
t4=linspace(-180,180,90)*pi/180;
nt1=length(t1);
nt2=length(t2);
nd3=length(d3);
for i=1:nt1
for j=1:nt2
for k=1:nd3
xM(i,j,k)=round((-cos(t1(i)).*cos(t2(j))).*((d3(k) + l2 + l3 + l4)));
yM(i,j,k)= round((-cos(t2(j)).*sin(t1(i))).*(d3(k) + l2 + l3 + l4));
zM(i,j,k)=round((l1 - l4.*sin(t2(j)) - sin(t2(j)).*(d3(k) + l2 + l3)));
end
end
end
Clarifications:
- What is workspace of a robot? Forward kinematics uses the kinematic equations of a robot to compute the position of the end-effector from specified values for the joint parameters. The dimensions of the robot and its kinematics equations define the volume of space reachable by the robot, known as its workspace. Or, as Amid said: the space that the robot gripper can reach, all way around (visualize all the points that the robot could reach, giving us a 3D space).
- The workspace using these dimensions will be a sphere. Why? The robot is a spherical robot (with two rotary joints and one prismatic).
- The parameter t4 does not appear in the equations, it's just the orientation of the final element (end-effector), thus it does not influence the workspace.
- The values of the variable parameters (t1,t2,d3) are maximum. This does not happen in real life, due to mechanical restrictions or space consideration. Modifying these parameters with more realistic values will result in a sphere with cut off top and bottom. This is normal, and that's how it should look.
Thank you very much for the help!
3 commentaires
Stephen23
le 8 Mai 2017
" Now how could I do a work-space with this data?"
What do you mean by "do a workspace" ? Do you want to plot, display, or otherwise visualize this data somehow?
Cristina Magda
le 9 Mai 2017
Mihir Andharia
le 14 Avr 2018
Can you please tell me how to plot workspace of Stewart platform?
Réponse acceptée
Plus de réponses (3)
Omer Oztoprak
le 22 Déc 2020
0 votes
Hi Cristina and everyone
do you know now how to plot workspace
Cristina Magda
le 23 Déc 2020
0 votes
Daniele Poli
le 6 Jan 2022
0 votes
Ciao, purtroppo non mi torna il plot allegato, dovrei fare un workspace di un robot delta.
Catégories
En savoir plus sur Trajectory Generation dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!