Make a plot of a planar a 3-link arm, with each link drawn as an individual line. 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 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 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 . . R_planar • . create_axes . build_links • place_links . . draw_links 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 ** 44 42 planar_robot_arm_links . as ** 12 14 14

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

MATLAB plss help !!!

Make a plot of a planar a 3-link arm, with each link drawn as an individual line. 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, 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 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
I R_planar
.
.
.build_links
. place_links
.
. draw_links
44
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.
44
create_axes
04
02
planar_robot_arm_links
.
02
04
06
44
12
14
16
Transcribed Image Text:Make a plot of a planar a 3-link arm, with each link drawn as an individual line. 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, 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 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 I R_planar . . .build_links . place_links . . draw_links 44 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. 44 create_axes 04 02 planar_robot_arm_links . 02 04 06 44 12 14 16
Function
1 function [link_vectors,...
joint_angles,...
link_colors,...
link_set,...
3
4
5
ax,...
6
1] = ME317_Assignment_draw_planar_arm_individual_links
7 % Draw the arm as a set of lines, one per link and each of a different color
8
9
18
W W N N N NNNNNNNEEEE
11
12
13.
14
15
16
17
18
19
28
21
22
23
24
25
26
27
28
29
38
32
33
34
35
41
42
43
44
45
46
47
48
49 end
**********
% Specify link vectors as a 1x3 cell array of 2x1 vectors, named
% 'link_vectors'
link_vectors = cell(1,3);
link_vectors{1} = [1;0];
link_vectors{2} = [1;0];
link_vectors{3} = [0.5;0];
3
4
XXXXXXXXXX
% Specify joint angles as a 3x1 vector, named 'joint_angles"
joint angles [2*pi/5; -pi/2; pi/4];
5
6
% Specify colors of links as a 1x3 cell array named "link_colors". Each
% entry can be either a standard matlab color string (e.g., "k' or 'r').
% or a 1x3 vector of the RGB values for the color (range from 0 to 1)
link_colors= {'k', 'b', 'k'};
36
37 link_end_set_with_base] = planar_robot_arm_links (link_vectors, joint_angles);
38
39
XXXXXXXXX
% Generate a cell array named 'link_set' containing start-and-end
% points for the links, named link_set
[link_set,...
R_joints,...
R_links,...
link_set_local,...
link_vectors_in_world,...
links_in_world,...
link_end_set,...
XXXXXXXXX
% Create figure and axes for the plot, and store the handle in a
% variable named 'ax"
[ax, f] = create_axes (69420);
Code to call your function >
% Use "draw_links' to draw the link set, saving the output as a
% variable '1'
1 = planar_draw_links (link_set, link_colors, ax);
1 [link_vectors,...
2
joint angles,...
link_colors,...
link_set,...
ax,...
1] = ME317_Assignment_draw_planar_arm_individual_links;
Transcribed Image Text:Function 1 function [link_vectors,... joint_angles,... link_colors,... link_set,... 3 4 5 ax,... 6 1] = ME317_Assignment_draw_planar_arm_individual_links 7 % Draw the arm as a set of lines, one per link and each of a different color 8 9 18 W W N N N NNNNNNNEEEE 11 12 13. 14 15 16 17 18 19 28 21 22 23 24 25 26 27 28 29 38 32 33 34 35 41 42 43 44 45 46 47 48 49 end ********** % Specify link vectors as a 1x3 cell array of 2x1 vectors, named % 'link_vectors' link_vectors = cell(1,3); link_vectors{1} = [1;0]; link_vectors{2} = [1;0]; link_vectors{3} = [0.5;0]; 3 4 XXXXXXXXXX % Specify joint angles as a 3x1 vector, named 'joint_angles" joint angles [2*pi/5; -pi/2; pi/4]; 5 6 % Specify colors of links as a 1x3 cell array named "link_colors". Each % entry can be either a standard matlab color string (e.g., "k' or 'r'). % or a 1x3 vector of the RGB values for the color (range from 0 to 1) link_colors= {'k', 'b', 'k'}; 36 37 link_end_set_with_base] = planar_robot_arm_links (link_vectors, joint_angles); 38 39 XXXXXXXXX % Generate a cell array named 'link_set' containing start-and-end % points for the links, named link_set [link_set,... R_joints,... R_links,... link_set_local,... link_vectors_in_world,... links_in_world,... link_end_set,... XXXXXXXXX % Create figure and axes for the plot, and store the handle in a % variable named 'ax" [ax, f] = create_axes (69420); Code to call your function > % Use "draw_links' to draw the link set, saving the output as a % variable '1' 1 = planar_draw_links (link_set, link_colors, ax); 1 [link_vectors,... 2 joint angles,... link_colors,... link_set,... ax,... 1] = ME317_Assignment_draw_planar_arm_individual_links;
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Knowledge Booster
Probability Problems
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education