Creating a realistic robot workspace using Peter Corke Toolbox (Matlab)?
19 views (last 30 days)
Show older comments
0 down vote favorite
I am trying to make a workspace plot representation for a 7 DOF robot. The robot has limited ranges for each joint angle and I wish to incorporate these ranges to plot a workspace representation. As of now, the robot is at its datum orientation. The code below helps create that orientation. I am using the Peter Corke Robotics toolbox.
%Theta Inputs
T1= 0;
T2= 45;
T3= 0;
T4= -90; % or 270 degrees
T5= 0;
T6= 0;
T7= 0;
%Input Conversion
T1 = T1*pi/180;
T2 = T2*pi/180;
T3 = T3*pi/180;
T4 = T4*pi/180;
T5 = T5*pi/180;
T6 = T6*pi/180;
T7 = T7*pi/180;
T = [T1,T2,T3,T4,T5,T6,T7];
L1 = 0.270350;
L2 = 0.069;
L3 = 0.36435;
L4 = 0.069;
L5 = 0.37429;
L6 = 0.01;
L7 = 0.229525;
LL(1) = Link([0,L1,0,0]);
LL(2) = Link([0,0,L2,pi/2]);
LL(3) = Link([0,L3,0,-pi/2]);
LL(4) = Link([0,0,L4,pi/2]);
LL(5) = Link([0,L5,0,-pi/2]);
LL(6) = Link([0,0,L6,pi/2]);
LL(7) = Link([0,L7,0,-pi/2]);
%DH table
R7 = SerialLink(LL)
R7.name = 'BAXTER'
%Plot
R7.plot(T)
The ranges for each theta values are as followed (in degrees):
%T1 = from -97.494 to +97.494
%T2 = from -123 to +160
%T3 = from -174.987 to +174.987
%T4 = from -2.864 to +150
%T5 = from -175.25 to +175.25
%T6 = from -90 to +120
%T7 = from -175.25 to +175.25
I would like the plot be composed as dotted points if possible. Also if it can be shown to animate to create the workspace that would be nice. I apologize since I know this is a lot to ask for anybody who views this question. So I will be truly grateful to whoever answers this question. Much would be appreciated!
3 Comments
Yong Zen Seah
on 3 Jun 2020
What does it mean by "Dot indexing is not supported for variables of this type."
Answers (0)
See Also
Categories
Find more on Performance and Memory 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!