Question: Generate using MATLAB (2) Write the code for a new forward kinematics function, this transformation matrices to find the end effector position if the number
Generate using MATLAB
(2) Write the code for a new forward kinematics function, this transformation matrices to find the end effector position if the number of links and joint angles are given. Name your function fkh. You should design your function so that is capable of computing the forward kinematic mappings for a 3-D arm with an arbitrary number of links, although here we will simply use it to define the configuration of a 2-D/planar manipulator with 3-links. For clarification on our specific problem, assume that the rotations will always be about the z-axis, and translations will always be about the resulting x-axis. And, half-hint/hal-'the- book-has-a-typo, Spong equation 2.98 should be a rotation time using about Z of gamma, NOT a rotation about X gamma. a. First, use your homogeneous transformation matrix function (refer to the header below) to reproduce the solution to Part 1, specifically for joint angles corresponding to part 1b. Plot the results. Use the joint angles you computed in Part lb as inputs to the function, along with the same link lengths as problem 1. Make sure that the two plots (1b and 2a) are identical. function H fkh(L, q) % Forward kinematics using homogeneous transformations. % L ( 1 x n): lengths of links, n is the number of links; % q ( 1 x n): relative joint angles; % H (4 x 4): homogeneous representation of the end effector w.r.t. the base frame. b. Next, use your function to compute the x-y position of each joint in a 3-link manipulator for the following two angular configurations: q,-and qThe link lengths are 0.32, 0.3, and 0.4m, respectively. Plot the configurations; your result should look something like Figure 2, below (2) Write the code for a new forward kinematics function, this transformation matrices to find the end effector position if the number of links and joint angles are given. Name your function fkh. You should design your function so that is capable of computing the forward kinematic mappings for a 3-D arm with an arbitrary number of links, although here we will simply use it to define the configuration of a 2-D/planar manipulator with 3-links. For clarification on our specific problem, assume that the rotations will always be about the z-axis, and translations will always be about the resulting x-axis. And, half-hint/hal-'the- book-has-a-typo, Spong equation 2.98 should be a rotation time using about Z of gamma, NOT a rotation about X gamma. a. First, use your homogeneous transformation matrix function (refer to the header below) to reproduce the solution to Part 1, specifically for joint angles corresponding to part 1b. Plot the results. Use the joint angles you computed in Part lb as inputs to the function, along with the same link lengths as problem 1. Make sure that the two plots (1b and 2a) are identical. function H fkh(L, q) % Forward kinematics using homogeneous transformations. % L ( 1 x n): lengths of links, n is the number of links; % q ( 1 x n): relative joint angles; % H (4 x 4): homogeneous representation of the end effector w.r.t. the base frame. b. Next, use your function to compute the x-y position of each joint in a 3-link manipulator for the following two angular configurations: q,-and qThe link lengths are 0.32, 0.3, and 0.4m, respectively. Plot the configurations; your result should look something like Figure 2, below
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
