Week 2- 2R Robotic Arm Challenge
report on animation of forward kinematic 2R robotic arm manipulator
2R robotic arm manipulator is a fixed robot which is used in the industries for welding cutting purpose.
it was fixed on the base and it contain two links and a manipulator.
the arm moves in different direction to promote different operations.
the manipulator and arms makes angels with fixed base that are linkL1 makes (theta1) and link2 makes 30(theta2).
finding the position of manipulator.
step1:calcaluting the position of link1
l1=1
l2=0.5
theta1=45
theta2=30
coordinates of link1:
staring(x0,y0)=(0,0)
ending (x1,y1)=(lcos theta1,lsin theta1)=(0.7071,0.3536)
step2: starting point of link2 is ending point of link1
starting (x1,y1)
ending (x2,y2)=(x1+lcos theta2,y1+lsin theta2)=(1.2071,0.3536)
step3: plotting by using line command linewidth of 3 and color blue and red.
link (x0,x1) (y0,y1)
link2 (x1,x2) (y1,y2)
step4: animating the plot for different positions by varing angle.
taking theta1 and theta2 0 to 90 in 10 positions with command linspace(0,90,10).
using for loop to calculate and plot 10 different positions of arm.
step5: adding a counter ct and commends, plotting with plot command.
then we get the error of plotting 16 different plots.
we make the plot 2 commands to single command, the plot looks like different colors in single plot.
we use the hold on command to adjust the color.
plot comes in single window
step6: we use pause commend to for the speed moment of arm positions.
and saving it in genframe(gcf)
converting the frame into movie(m)by saving it as avi file by using videowritwe command.
then the avi file will be in saved location
https://www.youtube.com/watch?v=qRxml-UOV8I