Determine the workspace for 2DOF parallel arms
Show older comments
For the below code I have the following questions
- I want to determine the allowed worspace for both 2DOF arm. Both arm links are 1 m. base of the first arm (R1) is set in x-axis to -0.5 and the second arm (R2) is set to 0.5. distance of bases should be 1m. The end effector final pos shoul be between -0.5 to 0.5 in x-axis and 0.5 to 1.8 in y axis.Final pos coordinates are variable inputs.
- If my workarea exceeds the limits that I set can print a message and call the same program (my program name is New_2R)
fprintf ('Position coords exceed robot working area .Insert new coordinates')
pause (3)
New_2R
3. How can I extract the angles from the Ikine block ?
% Two Link Robotic Arm R1
% DH (Denavit–Hartenberg) Table
% theta d a alpha R/P offset
L1(1) = Link([0 0 1 0 0 0]);
L1(2) = Link([0 0 1 0 0 0]);
% Build a serial robot object
R1 = SerialLink(L1(1:2), 'name', 'R1');
% Robot base coordinates (cartesian space)
R1.base=transl(-0.5,0,0);
% Two Link Robotic Arm R2
% DH (Denavit–Hartenberg) Table
% theta d a alpha R/P offset
L2(1) = Link([0 0 1 0 0 0]);
L2(2) = Link([0 0 1 0 0 0]);
% Build a serial robot object
R2 = SerialLink(L2(1:2), 'name', 'R2');
% Robot base coordinates (cartesian space)
R2.base=transl(0.5,0,0);
x= input('type x coordinate := ');
y= input('type y coordinate := ');
% fprintf ('Position coords exceed robot working area .Insert new coordinates')
% pause (3)
% hold on
view(-2,2);
xlim([-2,2]);ylim([-2,2]); zlim([-2,2]);
% Desired position for R1
p11 = transl(-1.5,0.2, 0); % define the start pose
p12 = transl(-x,y,0); % define the end pose
% calculate the trajectory from p11 to p12
T1 = ctraj(p11,p12,30);
% calculate inverse kinematics for R1
T1_Ikine = R1.ikine(T1,'mask',[1 1 0 0 0 0]);
R1.plot(T1_Ikine)
% Desired position for R2
p21 = transl(1.5, 0.2, 0); % define the start pose
p22 = transl(x,y,0); % define the end pose
% calculate the trajectory from p21 to p22
T2 = ctraj(p21,p22,30);
% calculate inverse kinematics for R2
T2_Ikine = R2.ikine(T2,'mask',[1 1 0 0 0 0]);
R2.plot(T2_Ikine)
Accepted Answer
More Answers (0)
Categories
Find more on Robotics 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!