All Courses
All Courses
Courses by Software
Courses by Semester
Courses by Domain
Tool-focused Courses
Machine learning
POPULAR COURSES
Success Stories
Simulation of forward kinematic 2R robotic arm. clear all close all clc % robotic arm linkage % inputs l1=2 l2=1 % cordinates theta1=linspace(0,90,10); theta2=linspace(0,90,10); ct=1 for i=1:length(theta1) THETA1=theta1(i); for j=1:length(theta2) THETA2=theta1(j); x0=0; y0=0; x1=l1*cosd(THETA1); y1=l1*sind(THETA1); x2=x1+l2*cosd(THETA2);…
Arun Reddy
updated on 12 Dec 2021
Simulation of forward kinematic 2R robotic arm.
clear all
close all
clc
% robotic arm linkage
% inputs
l1=2
l2=1
% cordinates
theta1=linspace(0,90,10);
theta2=linspace(0,90,10);
ct=1
for i=1:length(theta1)
THETA1=theta1(i);
for j=1:length(theta2)
THETA2=theta1(j);
x0=0;
y0=0;
x1=l1*cosd(THETA1);
y1=l1*sind(THETA1);
x2=x1+l2*cosd(THETA2);
y2=y1+l2*sind(THETA2);
%ploting
plot([x0 x1],[y0 y1],[x1 x2],[y1 y2],'linewidth',3)
axis([-0.2 3.5 0 3.5])
pause(0.03)
m(ct)=getframe(gcf);
ct=ct+1;
end
end
movie(m)
videofile=VideoWriter("exam_armlink.m",'Uncompressed AVI')
open(videofile)
writeVideo(videofile,m);
close(videofile)
google drive link
https://drive.google.com/file/d/1SIDghYnfAKWGbG4_C1rvhPlHykc59qRe/view?usp=sharing
EXPLANATION :
Here we have taken the inputs
l1=2 & l2=1
with cordinates as link one is fixed at (0,0) at one point and second point (x1 y1)
we have taken the theta between 0 to 90 with 10 difference by useing matlab function linspace as shown in insert command.
after inputing cordinates we can calculate the x1 x2 y1 y2 cordinates so then after calculating we can plot the graph.
we can plot the graph by using plot function in matlab aslo showing asis range with pause time and making it into frame.
* PROBLEM I FACED
1=understanding the function of { i=1:lenth(theta1)}
well i understand it by watching video again and again
2= making the movie(m) and video
is was showeing....... writevideo(videofile,m); ......file error
well i rectified it by using clear all, colse all, clc command and run the function again.
Leave a comment
Thanks for choosing to leave a comment. Please keep in mind that all the comments are moderated as per our comment policy, and your email will not be published for privacy reasons. Please leave a personal & meaningful conversation.
Other comments...
Project 1-Meshing of Rear Wheel Holder challenge
Aim :- Meshing of Rear Wheel Holder with mentioned quality criteria. OBJECTIVE: Extract the mid surface Geometry cleanup Meshing given door model using the given quality criteria checks Good mesh flow. Assign thickness PROCEDURE : Import the component and click F to see the component in the GUI area as shown below. As…
10 Jun 2023 03:22 PM IST
Week 7- Meshing of Backdoor Challenge
AIM: Mesh the backdoor model as per the given quality criteria using Hypermesh. OBJECTIVE: Extract the mid surface Geometry cleanup Meshing given hood model using the given quality criteria checks Good mesh flow. Assign thickness PROCEDURE : Import the component and click F to see the component in the GUI area as shown…
10 Jun 2023 03:21 PM IST
Week 6-Meshing of Hood Challenge
AIM: To extract the mid surface of the given component individually, mesh the obtained mid surface, and assign the thickness. The given model has to be imported and auto cleanup has to be done on the component then the mid surface has to be extracted from the components and have to be meshed individually with an average…
22 Jan 2023 12:06 PM IST
Week 4-1D Element Creation Challenge
THEORY: PROJECT METHODOLOGY: 1. MID SURFACE: Auto mid surface has been used to extract the midsurface for this simple bracket. Components has been created and assigned to the particular mid surfaces. 2. ASSIGN MATERIAL: Create material. Here I have created a material and assigned to steel. …
04 Jan 2023 11:52 AM IST
Related Courses
0 Hours of Content
Skill-Lync offers industry relevant advanced engineering courses for engineering students by partnering with industry experts.
© 2025 Skill-Lync Inc. All Rights Reserved.