Question
The lengths of the two links are a1 = 3 ft and a2 = 2 ft. The desired position of the endpoint of the two-link
The lengths of the two links are a1 = 3 ft and a2 = 2 ft. The desired position of the endpoint of the two-link robot needs to move from 3i 4j to 3i + 4j as a straight line.
1. Set the orientation of the robot at start point as a straight line to locate endpoint at 3i 4j. With this configuration, calculate the angles of 1 and 2. In the code listed in the next page, replace the value of theta11 with 1 and theta21 with 1. These two angles are the starting points.
2. Calculate the angles of 1 and 2 with the second link lies horizontally. Keep in mind that the endpoint of the two-link mechanism must be located at x = 3 ft. In the code listed in the next page, replace the value of theta12 with 1 and theta22 with 1. These two angles are the starting points.
3. Use the following code with the calculated results to simulate the angular movement of the two joints. Observe the movement of the endpoint of the mechanism.
4. Determine if the endpoint moves along a straightline.
clear; clc; L1 = 3; L2 = 2; theta11 =
p0 = [0 0 0];
theta1 = theta11:(theta12-theta11)/20:theta12; theta2 = theta21:(theta22-theta21)/20:theta22;
framemax = 20; M=moviein(framemax); set(gcf,'Position',[100 100 640 480]);
for k = 1:20 T1=RobotConv(theta1(k), 0, L1, 0); T2=RobotConv(theta2(k), 0, L2, 0);
% Forward kinematics p0 = [0 0 0]; p1 = RobotPosition(T1); p2 = RobotPosition(T1*T2);
figure(1) X = [p0(1) p1(1) p2(1)]; Y = [p0(2) p1(2) p2(2)]; plot(X,Y,'o-') axis([-L1-L2 L1+L2 -L1-L2 L1+L2]); grid M(k) = getframe(gcf); end
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started