Make a plot with a 3-link arm. The arm links should be 1, 1, and 0.5 units long. Each should be along the x axis of the local frame, and the joint angles between the link frames should be be - and In addition to standard Matlab functions, your code may assume that you have access to the functions you created in previous assignments (some of these you will call directly in this assignment, some will only be ca other functions that you call). Remember that for these functions, the grading script will use the instructor's copy of the functions: vector_set_rotate vector_set_cumulative_sum planar_rotation_set planar_robot_arm_endpoints .R_planar rotation_set_cumulative_product .create_axes 08 If your code is correct, the output should resemble the figure below. Note that your parameters(joint_angles, link_vector or link_color) may differ from those in the example.

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question
Make a plot with a 3-link arm. The arm links should be 1, 1, and 0.5 units long. Each should be along the x axis of the local frame, and the joint angles between the link frames should be
₁-1, and 1.
In addition to standard Matlab functions, your code may assume that you have access to the functions you created in previous assignments (some of these you will call directly in this assignment, some will only be called by
other functions that you call). Remember that for these functions, the grading script will use the instructor's copy of the functions:
▪ vector_set_rotate
▪ vector_set_cumulative_sum
planar_rotation_set
▪ planar_robot_arm_endpoints
■
▪ rotation_set_cumulative_product
■ create_axes
If your code is correct, the output should resemble the figure below. Note that your parameters (joint_angles, link_vector or link_color) may differ from those in the example.
0.8
R_planar
0.6
0.4
od
0.2
0.4
0.8
1
1.2
1.4
Transcribed Image Text:Make a plot with a 3-link arm. The arm links should be 1, 1, and 0.5 units long. Each should be along the x axis of the local frame, and the joint angles between the link frames should be ₁-1, and 1. In addition to standard Matlab functions, your code may assume that you have access to the functions you created in previous assignments (some of these you will call directly in this assignment, some will only be called by other functions that you call). Remember that for these functions, the grading script will use the instructor's copy of the functions: ▪ vector_set_rotate ▪ vector_set_cumulative_sum planar_rotation_set ▪ planar_robot_arm_endpoints ■ ▪ rotation_set_cumulative_product ■ create_axes If your code is correct, the output should resemble the figure below. Note that your parameters (joint_angles, link_vector or link_color) may differ from those in the example. 0.8 R_planar 0.6 0.4 od 0.2 0.4 0.8 1 1.2 1.4
Function
1 function [link_vectors,...
joint angles,...
link_ends,...
3
4
6% Draw the arm as one line
7
8
9
10
11 link_vectors={[1:0], [1:0],[.5:0]);
12
15
13
14 joint_angles= [ (2*pi/5); (-pi/2); (pi/4)];
6 7 18 10 28 1 2 3 24 25 25 7 28 29 38 31
16
XXXXXXXXX
17 % Get the endpoints of the links, in a cell array named 'link_ends'
link_ends=planar_robot_arm_endpoints (link_vectors, joint_angles);
19
20
ax,...
1] = ME317_Assignment_draw_planar_arm
21
22
% Specify link vectors as a 1x3 cell array of 2x1 vectors, named
% 'link_vectors'
% Specify joint angles as a 3x1 vector, named 'joint_angles'
27
31 end
23 [ax, f]=create_axes (link_ends);
70/0/0/0/0/2/X%
% Create figure and axes for the plot, and store the handle in a
% variable named 'ax'
26 % Draw a line from the data, with circles at the endpoints, and save
% the handle to this line in a variable named '1'
x=link_ends
(1,:);
y=link_ends (2,:);
30 1-line('Parents', ax, 'xdata',x, 'Ydata',y);
Code to call your function
1 [link_vectors,...
joint_angles,...
link_ends,...
ax,...
1] = ME317_Assignment_draw_planar_arm;
Transcribed Image Text:Function 1 function [link_vectors,... joint angles,... link_ends,... 3 4 6% Draw the arm as one line 7 8 9 10 11 link_vectors={[1:0], [1:0],[.5:0]); 12 15 13 14 joint_angles= [ (2*pi/5); (-pi/2); (pi/4)]; 6 7 18 10 28 1 2 3 24 25 25 7 28 29 38 31 16 XXXXXXXXX 17 % Get the endpoints of the links, in a cell array named 'link_ends' link_ends=planar_robot_arm_endpoints (link_vectors, joint_angles); 19 20 ax,... 1] = ME317_Assignment_draw_planar_arm 21 22 % Specify link vectors as a 1x3 cell array of 2x1 vectors, named % 'link_vectors' % Specify joint angles as a 3x1 vector, named 'joint_angles' 27 31 end 23 [ax, f]=create_axes (link_ends); 70/0/0/0/0/2/X% % Create figure and axes for the plot, and store the handle in a % variable named 'ax' 26 % Draw a line from the data, with circles at the endpoints, and save % the handle to this line in a variable named '1' x=link_ends (1,:); y=link_ends (2,:); 30 1-line('Parents', ax, 'xdata',x, 'Ydata',y); Code to call your function 1 [link_vectors,... joint_angles,... link_ends,... ax,... 1] = ME317_Assignment_draw_planar_arm;
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY