필터 지우기
필터 지우기

Need help in plotting a robot position and orientation using plot

조회 수: 8 (최근 30일)
N/A
N/A 2021년 12월 29일
댓글: N/A 2021년 12월 29일
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
Meg Noah
Meg Noah 2021년 12월 29일
Where is the function Link defined?
N/A
N/A 2021년 12월 29일
It is a built-in funcion that comes with the Peter Corke Robotics Toolbox

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Robotics에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by