Filter löschen
Filter löschen

Need help in plotting a robot position and orientation using plot

8 Ansichten (letzte 30 Tage)
N/A
N/A am 29 Dez. 2021
Kommentiert: N/A am 29 Dez. 2021
I have the position and orientation for a planar robot and I want to perform simulation by altering the joint angles. When I am trying to plot these different orientations using the subplot command, I am not able to generate different results. I get the same orientation of the robot for all the plots. Here is my code below:
%Given link lengths:
L1=4
L2=3
L3=2
%DH parameters are found as follows:
DH = [0 0 0 0; 0 L1 0 0; 0 L2 0 0; ];
%Defining the links:
L(1) = Link('revolute','d',DH(1,3),'a',DH(1,2),'alpha',DH(1,1),'modified')
L(2) = Link('revolute','d',DH(2,3),'a',DH(2,2),'alpha',DH(2,1),'modified')
L(3) = Link('revolute','d',DH(3,3),'a',DH(3,2),'alpha',DH(3,1),'modified')
Robot = SerialLink(L,'name','This is a planar robot')
%These are the custom angles to change the robot's position and orientation
i = [0 0 0]
ii = [10*pi/180 20*pi/180 30*pi/180]
iii = [90*pi/180 90*pi/180 90*pi/180]
subplot(3,1,1)
Robot.plot(i)
subplot(3,1,2)
Robot.plot(ii)
subplot(3,1,3)
Robot.plot(iii)
  2 Kommentare
Meg Noah
Meg Noah am 29 Dez. 2021
Where is the function Link defined?
N/A
N/A am 29 Dez. 2021
It is a built-in funcion that comes with the Peter Corke Robotics Toolbox

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Kategorien

Mehr zu Robotics finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by