Question: Consider the 2-link robot arm in Figure 1 with link of length L_1 fixed at the origin and connected to the second link of length

 Consider the 2-link robot arm in Figure 1 with link of

Consider the 2-link robot arm in Figure 1 with link of length L_1 fixed at the origin and connected to the second link of length L_2. The first link makes and angle theta with the horizontal and the second link is rotated an angle phi from the direction of the first link. The link angles theta and phi are controlled by servo motors, and this case study will determine how to adjust the angles to achieve motion of the robot end effector (x_2, y_2) from the starting position (x_0, y_0) to the final position (x_f, y_f) along a straight line. The motion will be simulated in Python and displayed on the screen. This problem will be specified by fixing values for L_1 and L_2, initial arm angles theta and phi and the desired final position of point f, such as those found in Table 1. Create the following functions in Python and use them to draw the robot arm with values in Table 1. The function getPoint1 accepts L_1 and theta, and returns the x_1, y_1 point as in Equation1. The function getPoint2 accepts L_1, L_2, theta, and phi and, returns the x_2y_2 point as in Equation 2 by first using the previous function to find point x_1, y_1. The function drawArm accepts L_1, L_2, theta points 0 and f, and returns nothing other than drawing the two robot arm links on the screen and the desired path. This function should call the previous two in order to locate points 1 and 2. x_1 = L_1 cos theta and y_1 = L_1 sin theta x_2 = x_1 + L_2 cos (theta + phi) and y_2 = y_1 + L_2 sin (theta + phi)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!