0 ratings0% found this document useful (0 votes) 149 views38 pagesRobotics Lab Manual AIML
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here.
Available Formats
Download as PDF or read online on Scribd
Exp no: 1
AIM:
To determine the maximum and minimum position of links using MATLAB
SOFTWARE REQUIRED:
MATLAB R2021 (Robotics system toolbox and Simscape toolbox).
PROCEDURE:
1
2,
Open Matlab.
In home select Simulink>Blank workspace>Create Model.
Open Library browser.
. Select Simscape> Foundation Library>Utilities>PS-Simulink converter(2), Simulink ~ PS
Converter(2), Solver Configuration(1).
Select Simscape>Multibody>Utilities> Mechanism Configuration.
. Select Simscape>Multibody>Frames and transforms>World Frame(1), Rigid transform(7),
Select Simscape>Multibody>Body elements>Brick Solid(3), Cylindrical solid(1),
Select Simscape>Multibody>Joints>Revolute joint(2), Weld joint(1).
). Rename and connect the components as shown in the figure(1)..
Note: Invert the component (Base, Link ~ 1,2,3) using etrl+I command.
DETERMINATION OF MAXIMUM AND MINIMUM POSITION OF LINKS10. Double click the RT1. Under the translation section change the offset as [0 0 0.05).
11, Double click the Base. Under the geometry section change the radius as 0.05m and length as,
0.1m, Choose any colour from Graphic >Visual Properties>Colour to distinguish between
links. Similarly change the parameters of the links with respect to their dimensions.
12, Similarly change the parameters of other rigid transforms corresponding to the dimensions.
13, Double click RII. Under Limits>Specify the bound for lower limit as -90 and upper limit as 90
‘Under actuation> Torque - Automatically computed and Motion — Provided by input
Under sensing> Check only the position
Select apply>Ok
14, Similarly for R12, set the bound lower limit as -60 and upper limit as 60.
15. Change the parameters for Simulink-PS converter and PS-Simulink converter
=e aed ‘
See Jee ieshashoomerrerenvaven
“ae nga mar ptr ec ee Rovopeay ah take arcana erent eetucmetevememercs
Se EGQEaeeceeaetince's tna: emmeanm um Deu dte salou
Sentra oy beta ire sa eter ere ee
= Pas enced
ee peter tn Ce cin
(Caer ae ee oe (ere nth |r16. Connect input of RJ to the Simulink-PS converter and the output to PS-Simulink converter.
17. Save the file in .sIx format.
18, Open the Matlab> Load the location of saved Simulink file> New Script> enter the code given
below in the editor window. In importrobot() command, enter the name of the Simulink file you
stored previously.
19. Save the code in .m format and run, also run the Simulink file.20. Observe the graphical output of the robot link in various standard views.
21. Open new Simulink file and copy-paste all the components from the previous Simulink file.
22. Group RT7 and Link3 using Ctrl+G command. A subsystem will be created.
23. Group RTS, Link 2, RT6.
24, Similarly create subsystem for Link | and Base.
& —
25, Create a new subsystem grouping all the components in the system. Rename the subsystem as
‘Robot’, input as QI and Q2, output as QIM and Q2M.
a1 QiM
a2 Q2M
Robot
26, Open library browser>Robotics system toolbox>Manipulator Algorithm>Get transform,
27. Open library browser>Robotics system toolbox>Utilities>Coordinate transformation conversion,28. Change the Parameters of the get transform and coordinate transformation conversion.
29, Connect the get transform and coordinate transformation conversion and group them, name the
subsystem as ‘Forward Kinematics’
30, Search Sine Wave(2), Mux(3), Scope‘).
31. Change the Paramaters of Sine Wave.
° ours ° = ow ne
32. Change the properties of scope by double clicking the scope and selecting the setting icon.
Change
the Number of input ports (3 inputs).33. Make the connections as shown in the figure.
oI
34, Run the Simulink and observe the forward kinematics of the robot.
RESULT:
‘Thus the determination of maximum and minimum position of links using the MATLAB R2021a
was done successfully.TRAJECTORY CONTROL MODELING WITH
Exp no: 2 INVERSE KINEMATICS USING SIMULINK
AIM:
To design a trajectory control modeling with inverse kinematics using MATLAB.
SOFTWARE REQUIRED:
MATLAB R2021a.
PROCEDURE:
1. Take rigid body tree from the forward kinematics.
2. Insert Signal Builder(1), MUX(1), Coordinate Transformation Conversion(1), Constant(2),
Inverse Kinematics(1), Demux(1), Terminator(1).
3. Double click Signal Builder.
4, Delete the pre-existing Signal 1
5. Insert a new signal by:
Signal> New>Custom>Enter Time values=[0 1 23 4 5]; ¥ values=[0.35 0.25 0.25 0.15 0.15
0.25]
Rename the signal as ‘X”
Tae ara
“Yt gasasr asso ove029
6. Insert another signal by:
Signal>New Custom>Enter Time values=[0 12 3 4 5]; Y values=[0 0.1 0.11 0.11 0.01 0.01]
Rename the signal as °Y”Yoerabes 012548)
poremeneoised
ox | mea
7. Insert another signal by:
Signal>New >Constant>Rename it as *Z’
Left Point>Y: 0.11 ;
ight Point=T: 10.
8, Change the parameters of Coordinate Transform Conversion as shown in figure.
9. Change the no of inputs of the MUX(3 inputs).
[ienitennanntaet
o
10. Rename the constants as Constant | and Constant 2 and change the values respectively.o =
ia
ten
11. Change the parameters of Inverse Kinematics as shown in figure.
ieckasecs
ee
ae
Peace
Soeetneteareaenctoetate
‘mney sane esses
yaiayoee om
Borsa sore
(Cree) ree
12, After changing the parameters of all the components, modify the connections as shown in the
figure.
= Q, - mar = Lis
ml =
13. Run the Simulink and observe the output,
RESULT:
Thus the trajectory control modeling with inverse kinematics using MATLAB R2021a was done
successfully,Exp no: 3 TRAJECTORY PATH PLANING OF 2R MANIPULATOR
AIM:
To design trajectory path planning of 2R manipulator using MATLAB.
SOFTWARE REQUIRED:
MATLAB R2021a.
PROCEDURE:
Open the MATLAB R202Ia software.
Go to Home > New script. A new editor window will open.
Type the program in the editor window.
Save the MATLAB file.
Go to editor > Run.
Observe the output.
AWARE
PROGRAM:
cle
clear all
robot = rigidBodyTree(DataFormat’
solumn',MaxNumBodies,3);
L1=03;
12=03;
body = rigidBody(‘link!');
joint = rigidBodyJoint(joint!’, revolute’);
setFixedTransform(joint,trvee2tform({0 0 0);
joint JointAxis = [0 0 1];
body.Joint = joint;
addBody(robot, body, ‘base’);
body = rigidBody(‘link2");
joint = rigidBodyJoint(‘joint2' revolute’),
setFixedTransform(joint, trvec2tform([L1,0,0]));
joint JointAxis = [0 0 1];
body Joint = joint;addBody(robot, body, ‘link!');
body = rigidBody(too!’);
joint = rigidBodySoint('fix1'sfixed’);
setFixedTransform(joint, trvec2tform({L2, 0, 0]));
body Joint = joint;
addBody(robot, body, 'link2");
showdetails(robot)
t= (0:0.2:10); % Time
count = length(t);
center = [0.20.1 0];
radius = 0.15;
thetal = t*(2*pi/t(end));
theta2 ~ t*(2*pist(end));
points = center + radius*[cos(theta2) sin(thetal) zeros(size(thetal))];
440 = homeConfiguration(robot);
ndof = length(q0);
qs = zeros(count, ndof);
ik = inverseKinematics(‘RigidBodyTree’, robot);
weights = (0, 0, 0, 1, 1, 0};
endEffector = 'too!';
alnitial = q0; % Use home configuration as the initial guess
for i= I:count
% Solve for the configuration sati
’ position
point = points(i,:);
Sol = ik(endEffector,trvec2tform(point), weights qInitial);
% Store the configuration
asGi,:) = qSol;
% Start from prior solution
alnitial = gSol;
end
ing the desired end effector
figure
show(robot,qs(1:))s
view(2)
ax = gea;
ax.Projection = ‘orthographic’,
hold on,
plot(points(:,1),points(:,2),'")
axis([-0.1 0.9 -0.3 0.5])
framesPerSecond = 15;
r= rateControl (framesPerSecond);
for i= I:count
show(robot,qsti,)
drawnow
waitfor(r);
end
reservePlot' false);OUTPU’
@ Fiowes =o x
He [6 Van nae Toole Deitop Window Help :
Dsas| S08 s5
41
x
RESULT:
‘Thus the trajectory path planning of 2R manipulator using MATLAB R2021a was done successfullyCHECK FOR ENVIRONMENTAL COLLISIONS WITH
Exp no: 4 MANIPULATOR
AIM:
To check for the environmental collisions with manipulator using MATLAB.
SOFTWARE REQUIRED:
MATLAB R2021a,
PROCEDURE:
1. Open the MATLAB R2021a software.
2. Go to Home > New script. A new editor window will open,
3. Type the program in the editor window.
4. Save the MATLAB file.
5. Go to editor > Run,
6. Observe the output.
PROGRAM:
cle
clear all
% Create two platforms
platform! = collisionBox(0.5,0.5,0.25)
platform! Pose = trvec2tform([-0.5 0.4 0.2])
platform2 = collisionBox(0.5,0.5,0.25);
platform2,Pose = trvec2tform((0.5 0.2 0.2]);
% Add a light fixture, modeled as a sphere
lightFixture = collisionSphere(0.1);
lightFixture. Pose = trvec2tform({.2 0 1));
% Store in a cell array for collision-checking
worldCollisionArray = {platform! platform2 lightFixture};
% ax = exa(worldCollisionArre
ax = exampleHelperVisualizeCollisionEnvironment(worldCollisionArray);
figHandle = figure;% Show the first object
show(worldCollisionArray{1});
% Get axis properties and set hold
ax = goa;
hold all;
% Show remaining objects
for i = 2:numel(worldCollisionArray)
show(worldCollisionArray {i}, "Parent", ax);
end
% Set axis properties
axis equal;
robot = loadrobot("kinovaGen3","DataFormat","column’,"Gravity",[0 0 -9.81));
‘% Show the robot in the environment using the same axes as the collision objects.
‘% The robot base is fixed to the origin of the world.
show(robot,homeConfiguration(robot),"Parent”,ax);
startPose = trvec2tform({[-0.5,0.5,0.4])*axang2tform({ 0 0 pi);
endPose = trvec2tform({0.5,0.2,0.4])*axang2tform({1 0 0 pil);
% Use a fixed random seed to ensure repeatable results
mg(0);
ik = inverseKinematics("RigidBodyTree" robot);
weights = ones(1,6);
startConfig = ik("EndEffector Link" startPose, weights,robot homeConfiguration);
endConfig = ik("EndEffector_Link" endPose,weights,robot homeConfiguration);
% Show initial and final positions
show(robot,startConfig);
show(robot,endConfig);
[4,94,qd4,t] = trapveltraj([homeConfiguration(robot) startConfig,endConfig},200,"EndTime",2);
% Loop through the other positions
for i I:length(q)
show(robot,
:,i)," Parent",ax,"PreservePlot", false);
% Update the figure
drawnow
end
disp("program over")OUTPUT:
Fie tt Vow teen Teoh Deby dow Hp :
Osus a0 ar
Plot of q Plot of qd
Plot of qdd
RESULT:
‘Thus the environmental collision with manipulator is checked using MATLAB R2021aCHECK FOR WORLD COLLISION PAIR WITH
Exp no: 5 7-AXIS KINOVA GEN3 ROBOT
AIM:
To check for world collision pair with 7-axis Kinova Gen3 Robot using MATLAB,
SOFTWARE REQUIRED:
MATLAB R2021a.
PROCEDURE:
Open the MATLAB R2021a software
Go to Home > New script. A new editor window will open.
Type the program in the editor window.
Save the MATLAB file.
Go to editor > Run,
Observe the output.
auaene
PROGRAM:
cle
clear all
% Create two platforms
platform! = collisionBox(0.5,0.5,0.25);
platform Pose = trvec2tform([-0.5 0.4 0.2]);
platform2 = collisionBox(0.5,0.5,0.25);
platform2.Pose = trvec2tform((0.5 0.2 0.2]);
% Add a light fixture, modeled as a sphere
lightFixture = collisionSphere(0.1);
lightFixture.Pose = trvec2tform({.2 0 1));
% Store in a cell array for collision-checking
worldCollisionArray = {platform1 platform? lightFixture);
Visualize the environment using a helper function that iterates through the collision array.
ax = exampleHelperVisualizeCollisionEnvironment(worldCollisionArray);
figHandle = figure;
% Show the first objectshow(worldCollisionArray{1});
% Get axis properties and set hold
ax = gea;
hold all;
% Show remaining objects
for i = 2:numel(worldCollisionArray)
show(worldCollisionArray {i}, "Parent", ax);
end
% Set axis properties
axis equal;
robot = loadrobot("kinovaGen:
DataFormat","column","Gravity",[0 0 -9.81]);
show(robot,homeConfiguration(robot),"Parent" ax);
startPose = trvec2tform([-0.5,0.5,0.4])*axang2tform({1 0 0 pil):
endPose = trvec2tform({0.5,0.2,0.4])*axang2tform({1 0 0 pi));
% Use a fixed random seed to ensure repeatable results
mg(0);
ik = inverseKinematics("RigidBodyTree" robot);
weights = ones(1,6);
startConfig = ik(""EndE ffector_Link" startPose, weights,robot hameConfiguration);
endConfig = ik("EndEffector_Link" endPose, weights,robot homeConfiguration);
'% Show initial and final positions
show(robot, startConfig);
show(robot,endConfig);
= trapveltraj([homeConfiguration(robot),startConfig,endConfig},200,"EndTime",2);
% Initialize outputs
inCollision = false(length(q), 1); % Check whether each pose is in collision
worldCollisionPairldx = cell(length(q),1); % Provide the bodies that are in collision
for i= I:length(q)
[inCollision(i),sepDist] =
checkCollision(robot,q(:,i),worldCollisionArray,"IgnoreSelfCollision”,"on","Exhaustive","on");
{bodyldx,worldCollisionObjldx] = find(isnan(sepDist)); % Find collision pairs
worldCollidingPairs = [bodyldx,worldCollisionObjldx];
worldCollisionPairldx {i} = worldCollidingPairs;
end
isTrajectoryInCollision = any(inCollision)
= find(inCollision,1)
collidingldx2 = find(inCollision,1,"last")
% Identify the colliding rigid bodies,
collidingBodies1 = worldCollisionPairldx {collidingldx1}*[1 0);
collidingBodies2 = worldCollisionPairldx {collidingldx2}*[1 0);% Visualize the environment.
ax = exampleHelper VisualizeCollisionEnvironment(worldCollisionArray);
% Add the robotconfigurations & highlight the colliding bodies.
show(robot,q(:,collidingldx 1),"Parent",ax,"PreservePlot", false);
exampleHelperHighlightCollisionBodies(robot,collidingBodies! + 1,ax);
show(robot,q(:,collidingldx2),"Parent" ax);
exampleHelperHighlightCollisionBodies(robot,collidingBodies2 + 1,ax);
WORKSPACE:
Hasoanaraot,
Ea eecgtca
=
Fae zone
ruta
se
WORLD COLLISION PAIR:
—$— enRESULT:
Thus the world collision pair with 7-axis Kinova Gen3 Robot is che
ed using MATLAB R2021a.ROBOT PROGRAMMING AND SIMULATION FOR,
Exp no: 6 PICK AND PLACE
AIM:
To program and simulate the robot for pick and place using Dobot.
REQUIREMENTS:
Dobot, DobotStudio-V 1.9.4
PROCEDURE:
1. Check the connections of the Dobot.
Incusrial abot
= ‘Air supey
‘vacuum elector &
Proportional valve
6-D force sensor
Vacuum gripper
Test objects
Cok
2. Connect the Dobot with the DobotStudio-V 1.9.4 software using the connect option in the
software.
3. Set the Dobot in home position.
4, Select the suction cup tool.
5. Select the teaching and playback method.6. Open a new workspace
7. To manually teach a Dobot, press the lock button in the Dobot and move the arm step by step of
‘we can control the movement by adjusting the coordinates (World and Joint Coordinates).
8, The coordinates of each movement will be recorded.
9. If it is a linear movement set the motion style as MOVL, if it is a free movement set the motion
style as MOVI.
10. Once the arm touches the object, the suetion cup should be ON to pick the object, the suction
cup should be OFF to place the object.
11. The end position must be set to the home position.
12. Once the coordinates are fixed, run and observe the pick and place movement.
RESULT
Thus, the programming and simulation of Dobot for pick and place was done successfully.ROBOT PROGRAMMING AND SIMULATION FOR,
Exp no: 7 PICK AND PLACE — USING PROXIMITY SENSOR
BY BLOCKLY METHOD
AIM:
To program and simulate the robot for pick and place by blockly method using Dobot and
proximity sensor.
REQUIREMENTS:
Dobot, DobotStudio-V1.9.4, Conveyor with proximity sensor.
PROCEDURE:
1, Conneet the Dobot with conveyor.
Incustril obot
‘Air supply
Vacuum sector 8
Proportional valve
6-0 fore sensor
Vacuum gripper
Test objects
2. Connect the Dobot with DobotStudio-V1.9.4 using connect option in the software.
3. Set the Dobot to home position.
4, Select the suction cup tool.
5, Select the blockly method.6. Open a new work space.
7. Select the required blockly module on the left pane of the blockly page to the program (logic,
loops, variables).
Loic
Loops
Math
Text
Lists
Colour
Venables
Functions
DobotAP!
8, Add the coordinates of home position.
9. ON the photoelectric sensor.
10. Set the speed of the stepper motor of the conveyor to 50 mm/s,
pe =
O mms.14, Use a break out block to stop the loop.
15, Run and observe the pick and place movement.
PROGRAM:
RESULT:
Thus, the programming and simulation to pick and place the object by blockly method using Dobot
with conveyor and proximity sensor was done successfully.ROBOT PROGRAMMING AND SIMULATION FOR,
Exp no: 8 PICK AND PLACE — USING PROXIMITY SENSOR
BY SCRIPT METHOD
AIM:
To program and simulate the robot for pick and place by script method using Dobot and
proximity sensor.
REQUIREMENTS:
Dobot, DobotStudio-V1.9.4, Conveyor with proximity sensor.
PROCEDURE:
1, Conneet the Dobot with conveyor.
Inurl abot
‘Air supply
Vacuum sector 8
Proportional valve
6-0 fore sensor
Vacuum gripper
Test objects
2. Connect the Dobot with DobotStudio-V 1.9.4 using connect option in the software.
3. Set the Dobot to home position.
4, Select the suction cup tool
5, Select the script method,6. Open a new work space.
7. Type the program in the workspace.
8, Run and observe the pick and place movement.
PROGRAM:
Uwrile True:
cuzrent_pose = dfype.GetPose(api}
3 dtype.SetPTPCmdkx(api, 2, 225.632, 22.0845, 5€.9407, current pose[3], 1)
4 atype.Setinfraredsensor api, 1,2, 1)
‘5 STEPPER CRICLE = 360.0 / 1.8 * 10.0 4 16.0
© Mi BER CRICLE = 3.14lsazesssege * 3¢.0
7 vel = Host 50) * STEPPER CRICLE / 104 PER CRICLE
@ atype.SeetcroeEs (opi,
°
10
; ane (vel), 2)
while Tea
LE (atype.CotInfraredsensor (api, 2) {0]) — 1
i STEP_PERCRICLE = 360.0 / 1.2 10.0 + 16.0
12 © PER_CRICEE = 3.141592sss5e08 * 36.0
13 vel = Float (0) * STEP_PER CRICLE / mt PER CRICLE
4 dype.SetEMotorEx(api, 0, 0, int(vell, 1)
15 break
16 current_pose = dtype.CetPose (api)
TZ aType.Set¥TFOmdEx(api, 2, 264.0041, (-97.9962), 30.4682, curzent_pose[3], 1)
18 Type. SetEndéftectorSuctionCupex (api, 0, 1)
Ig current_pose = dType.GetPose (api)
20 atype.seceTEOmdEx(api, 2, 264.0041, (-97.3962), 17.7962, curvent_pose[3], 1)
BL type. SetEnd ftectorSuctionCupex (api, 1, 1)
22 current_pose = atype.cetrose (ap)
3 atype.secETEOMMEx(apt, 2, 264.0041, (-97.3962), 79.3961, current_pose[3], 2)
24 type. Setenarerectorsuctioncupex (apt, 1, 1)
curzent_pose = dType-GetPose (api)
AType.SetPTEOmdEx(api, 2, 245.0027, 67-8914, 50.5515, curzenz_pose[3], 1)
Type. SetEndiftectorSuerioaCupes (api, 1, 1)
current_pese = dType.GetPore (api)
aType. SeePTPOmdEx(api, 2, 24¢.15@8, 86.1864, 18.5901, curzent_pose[3], 1)
Type. SetEndtftectorSuerionCepes (api, 0, 1)
current_pose = dType-GetPose (api)
Type. Set¥TPOmdEx(api, 2, 249.9875, 77.2886, €1.75€9, curzent_pose (31. 1)
Type. SetEndEffectorSuctionCwEx (api, 0, 1)
current_pose = dType.GetPose (api)
sive Serrated, 2,208. 814 78 G6 BO.SU0, earzent-paceials 11
type. SetEnd ffectorSuctionCupEx(api, 0
RGRSRVSBBVRG
SSS
RESULT:
Thus, the programming and simulation to pick and place the object by script method using Dobot
with conveyor and proximity sensor was done successfully.DETERMINATION OF MAXIMUM AND MINIMUM
Exp no: 9 POSITION OF LINKS — SPATIAL MANIPULATOR
AIM:
To determine the maximum and minimum position of links of a spatial manipulator.
SOFTWARE REQUIRED:
MATLAB R2021a.
PROCEDURE:
1. Open the MATLAB R2021a software.
2. Go to Home > New script. A new editor window will open.
3. Type the program in the editor window.
4. Save the MATLAB file.
5. Goto editor> Run.
6. Observe the output.
PROGRAM:
cle
clear all
gen3=loadrobot("kinovaGen3");
gen3.DataFormat='column’;
4q_home=[0 15 180-130 0 55 90)*pi/180;
eeName~EndEffector_Link';
T_home=getTransform(gen3,q_home,
show(gen3,q_home);
axis auto;
view([60,10]);
k-tform2trvec(getTransform(gen3,q_home,eeName));
[isColliding sepDist]=checkCollision(gen3,q_home,'Exhaustive' on’)
ik=inverseKinematies(’RigidBodyTree’,gen3),
ik SolverParameters.AllowRandomRestart=false;
weights=[1,1,1,1,1,1]);
¢_init=q_home;
T des-T home:
Name)kI-k;
figure;set(gef, Visible’,
k1=k-0.1;
= A)-k1;
[q_sol,q_info]=ik(eeName,T_des,weights,q_init)
ax=show(gen3,q_sol);
ax.CameraPositionMode='auto’,
view({60,10));
WORKSPACE:
Workspace
Name = Vate
ane ed vee
= hd Aves
ecllame “EndEffector Link
gen 1 rigidBodTree
ik it ineereetinernatice
iecotising °
k [nas4700013.043371
Ki [0.3547 -00867, 0.3337
auhome np2eiea 1416-226
acto ed etvct
int ozeie.ta1e-228
a0 [n.30t6,121603.574,
sepDist 3x9 daubie
Tider det daibie
Thome et doutie
wats haa
OUTPUT:
info =
struct with lds:
erations: 107
NumRandomRestart: 0
PoseErrriorm: 0.0053
BitFeg:
‘Status: best avaiable!
fe>>
RESULT:
Thus the determination of maximum and minimum position of links of a spatial manipulator using
MATLAB R2021a was done successfully.INVERSE KINEMATICS OF KINOVA GEN3 ROBOT
Exp no: 10 TO DRAW A CIRCULAR PATH
AIM:
To draw a circular path with Kinova Gen3 Robot using inverse kinematics.
SOFTWARE REQUIRED:
MATLAB R2021a.
PROCEDURE:
1. Open the MATLAB R2021a software.
2. Go to Home > New script. A new editor window will open.
3. Type the program in the editor window.
4. Save the MATLAB file.
5. Go to editor > Run.
6. Observe the output.
PROGRAM:
cle
clear all
gen3 = loadrobot("kinovaGen3");
gen3 DataFormat = ‘column’;
4_home =[0 15 180 -130 0 55 90)"*pi/180
eeName = 'EndEffector_Link’
T_home = getTransform(gen3, q_home, eeName);
show(gen3,q_home);
axis auto;
view([60,10);
ik = inverseKinematics(‘RigidBodyTree’,gen3);
ik SolverParameters. AllowRandomRestart = false;
weights =[1, 1, 1, 1,1, 15
«init = q_home;
center = [0.5 0 0.4]; %[x y 2]
radius = 0.1;
dt= 0.25;
.dt:10)';theta = t*(2*pist(end))-(pi/2);
theta = t*(2*pist(end));
points = center + radius*[0*ones(size(theta)) cos(theta) sin(theta)];
hold on;
plot3(points(:,1),points(:,2),points(:,3),-*2'Line Width’, 1.5);
numJoints = size(q_home,1);
numWaypoints = size(points,1);
gs = zeros(numWaypoints,numJoints);
for i= I:mumWaypoints
T_des = T_home;
des(1:3,4) = points(i,:)'
[q_sol, q_info] = ik(eeName, T_des, weights, q_init);
gs(i,:) = q_sol(I:numJoints);
q init = q sol;
end
°%Visualize the Animation of the Solution
figure; set(gef,'Visible'’on');
ax = show(gen3,qs(1,2)");
ax.CameraPositionMode=‘auto’;
hold on;
% Plot waypoints
plot3(points(:,1),points(:,2).points(:,3),'-2','LineWidth',2);
axis auto;
view([60,10]);
grid(‘minor’);
hold on;
title‘Simulated Movement of the Robot’);
% Animate
framesPerSecond = 30;
r= robotics Rate( framesPerSecond);
for i= L:numWaypoints
show(gen3, qs(i,:)/PreserveP Lot false);
drawnow;
waitfor(r);
end
xlabel('x’)
ylabel('y);
label’
axis auto;
view({60,10]);
grid(‘minor');OUTPUT:
Deus/s/oe ro
| i
RESULT:
‘Thus, the circular path with Kinova Gen3 Robot using inverse kinematics was done successfully.INVERSE KINEMATICS OF KINOVA GEN3 ROBOT
Exp no: 11 TO DRAW A TRIANGULAR PATH
AIM:
To draw a triangular path with Kinova Gen3 Robot using inverse kinematics.
SOFTWARE REQUIRED:
MATLAB R2021a.
PROCEDURE:
1. Open the MATLAB R2021a software.
2. Go to Home > New script. A new editor window will open.
3. Type the program in the editor window.
4, Save the MATLAB file.
5. Go to editor > Run.
6. Observe the output.
PROGRAM:
cle
clear all
gen3 = loadrobot("kinovaGen3");
gen3.DataFormat = ‘column’;
q_home = [0 15 180 -130 0 55 90)"*pi/180;
eeName = 'EndEffector_Link’
T_home = getTransform(gen3, q_home, eeName);
show(gen3,q_home);
axis auto;
view([60,10));
ik = inverseKinematics(‘RigidBodyTree’, gen3);
ik SolverParameters. AllowRandomRestart = false;
weights = (1, 1, 1, 1,1, 15
«init = q_home;
points(1,:)=[0.5 00.4],
k
for i= 0.1:0.1:0.3
kek:points (k,:)= points(1,:)+[0 i 0);
end
for j=0.1:0.1:0.3
kek+1;
points (k,:)= points(k1,:)+[0 0};
end
k2-k;
for j-0.1:0.1:0.3,
k+l;
points (k,:)= points(k2,:)}+[0 -j =:
hold on;
plot3(points(:,1),points(:,2),points(:,3),-*2’, ‘LineWidth’, 1.5);
end
numJoints ~ size(q_home,1);
numWaypoints = size(points,1);
4s = zeros(numWaypoints,numJoints);
for i= I:numWaypoints
T_des = T_home;
T_des(1:3,4) = points(i,.);
[q_sol, q_info] = ik(eeName, T_des, weights, q_init);
if q_infoExitFlag—2
disp(‘not reached the point',T_des(:,4))
end
qs(i,:) = q_sol(1:numJoints);
init = q_sol;
end
%Nisualize the Animation of the Solution
figure; set(gef,'Visible'on’);
ax = show(gen3,qs(1,:)';
ax.CameraPositionMode='auto',
hold on;
% Plot waypoints
plot3(points(:,1),points(:,2),points(:,3),-2'LineWidth'.2);
axis auto;
view({60,10]);
grid(‘minor’);
hold on;
title('Simulated Movement of the Robot’);
% Animate
% framesPerSecond =20;
% = robotics Rate(framesPerSecond);
for i= I:numWaypoints
show(gen3, qs(i,:)',PreserveP lot’ false);
drawnow;
% waitfor(0.1);
end
xlabel(’x)s
ylabel('y’);
alabel('2);
axis auto;
view([60,10));,
grid(‘minor');jeuy a /08) eo
RESULT:
Thus, the triangular path with Kinova Gen3 Robot using inverse kinematics was done successfully.6-AXIS MITSUBISHI ROBOT (INDUSTRIAL ROBOT)
Exp no: 12 PROGRAMMING FOR PICK AND PLACE
AIM:
To program the 6-axis Mitsubishi Robot for pick and place movement.
SOFTWARE REQUIRED:
6 —axis Mitsubishi Robot, RT ToolBox3, Teaching Pendant
PROCEDURE:
1. Check the connections and switch on the 6-axis Mitsubishi Robot,
2. Connect the 6-axis Mitsubishi Robot with RT ToolBox3 software.
3. In RT ToolBox3 go to Home > Online > program > (right click) new > name the file.
4. Type the program.
5. To add the positions of each point, we need to teach the robot using teach pendant and add the
position to the software.
6. First set the home position of robot using the teach pendant by the following steps:
a. On the manual mode in the PLC.
b. Turn on the TB enable button at the back of the teach pendant.
¢, Hold the scroll button to a limited angle and click the servo button
(The servo will be off when the scroll is over pressed or when it is released).4, Click the jog button > select the appropriate function (tool or joint).
¢. Now by using the coordinates (x,y,2) set the position.
7. Now in the software click add and the coordinates will be displayed, now name the coordinates as
PHOME and click get current position so that your current position will be stored
8, Likewise move the coordinates using teach pendant and set the P1 point and store the position.
9. Repeat this process for all the positions ( PHOME, P1, P2, PICK1,PLACE1)
Sp ae)
==
apeaieai
10, Once the positions are added, save the program.11. To teach the program to the robot we need to do the following steps:
a, Under workspace click parameter > program parameter > slot table,
fe]
want |
ves (aaa)
12, Once the program is loaded, turn off the TB enable.
13. Switch to auto mode in PLC and start the cycle.
14, Observe the pick and place movement.
Note: If there is any emergency situation press the emergency button in PLC.PROGRAM:
i] Sezvo On
2) ved,
3) Accel 50,50
4) Mov PHOME
5) Mov F2
6 Mov PICKI
7) M_Out (10)
8) M_ Out (1.
9) Diy 0.5
10, Mow P2
Mov PHOME
Mov PLACEL
¥M_Out (1)
M_Out (11)=:
Diy 0.5
Mov PHOME
Mov
nen
8 Mov PHOME
8) Mov P2
30, Mow PICK3
31) Mout (1
32) M Out (11)=:
33, Diy
34 Mow P2
35, Mow PHOME
36, Mow PLACES
37) Mout (1
38) M Out (1
39 Diy 0.5
20, Mow PHOME
41) Hic
RESULT:
Thus, the pick and place movement of 6-axis Mitsubishi Robot was done successfully