Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

a) Write 2 Matlab functions to implement the forward and inverse kinematics of the differential drive robot to be used in the labs Use SI

image text in transcribed

a) Write 2 Matlab functions to implement the forward and inverse kinematics of the differential drive robot to be used in the labs Use SI units Need to have 3 files: one for the forward kinematics, one for the inverse kinematics, and a main.m to test your code Employ the following function prototypes for the vehicle kinematics [vx,w] - fwdKinematics(thr_dot,thl_dot,robot) [thr_dot,thl dot]invKinematics(vx,w,robot) where, vx is the robot velocity in m/s, w is the angular velocity of the robot in rad/s, thr_dot and thl_dot are the angular velocities of the wheels in rad/s robot is a struct with the following fields wheelR wheel radius in [mj halfWidth half the track width in [m]. Note: track width is measured between centers of the wheels. In the main file, test your functions using the following inputs % Test Cases wheel velocities in rad/s % Fwd Motion thr dot-5; thl dot5; [vx,w]FwdKinematics (thr_dot, thl_dot, robot) fprintf (' straight, vx: %fm/ s w: %frad/sin',vx , w); [thr dot,thl dot]-InvKinematics (vx,w, robot) fprintf( ' straight, thr-dot: %frad/s th1-dot: %frad/s ',thr, dot , th-dot); fprintf (; % Turn about left wheel thrdot5 thl_dot - 0; vx, wEwdKinematics (thr_dot, thl_dot, robot); fprintf (' Turn about left wheel, vx : %fm/sw:rad/s ',VX,w); thr_dot,thl_dot] -InvKinematics (vx, w, robot) fprintf( 'straight, thr, dot: %frad/s thL-dot : Afrad/s ',thr, dot , thi, dot); fprintf (-) % Turn about right wheel thr dot-0; thl dot-5; [vx,w] FwdKinematics (thr dot, thl dot, robot) fprintf( 'Turn about right wheel, vx: %fm/s w: %frad/s '.vx , w); thr dot,thl dot] InvKinematics (vx, w, robot); fprintt( 'straight, thrdot : %frad/s th, dot : %frad/s ',thr-dot , thl-dot); fprintf (n %Turn about center point thr dot-5; thl dot5; vx, w]EwdKinematics (thr_dot, thl_dot, robot); fprintf( 'Turn in place, vx : %fm/sw: %frad/sin',vx , w); [thr dot, thl dot] = InvKinematics (vx,v, robot); tprintf( 'straight, thr-dot: %frad/s th1-dot: %frad/s ''thr-dot , thl-dot); fprintf ("---) a) Write 2 Matlab functions to implement the forward and inverse kinematics of the differential drive robot to be used in the labs Use SI units Need to have 3 files: one for the forward kinematics, one for the inverse kinematics, and a main.m to test your code Employ the following function prototypes for the vehicle kinematics [vx,w] - fwdKinematics(thr_dot,thl_dot,robot) [thr_dot,thl dot]invKinematics(vx,w,robot) where, vx is the robot velocity in m/s, w is the angular velocity of the robot in rad/s, thr_dot and thl_dot are the angular velocities of the wheels in rad/s robot is a struct with the following fields wheelR wheel radius in [mj halfWidth half the track width in [m]. Note: track width is measured between centers of the wheels. In the main file, test your functions using the following inputs % Test Cases wheel velocities in rad/s % Fwd Motion thr dot-5; thl dot5; [vx,w]FwdKinematics (thr_dot, thl_dot, robot) fprintf (' straight, vx: %fm/ s w: %frad/sin',vx , w); [thr dot,thl dot]-InvKinematics (vx,w, robot) fprintf( ' straight, thr-dot: %frad/s th1-dot: %frad/s ',thr, dot , th-dot); fprintf (; % Turn about left wheel thrdot5 thl_dot - 0; vx, wEwdKinematics (thr_dot, thl_dot, robot); fprintf (' Turn about left wheel, vx : %fm/sw:rad/s ',VX,w); thr_dot,thl_dot] -InvKinematics (vx, w, robot) fprintf( 'straight, thr, dot: %frad/s thL-dot : Afrad/s ',thr, dot , thi, dot); fprintf (-) % Turn about right wheel thr dot-0; thl dot-5; [vx,w] FwdKinematics (thr dot, thl dot, robot) fprintf( 'Turn about right wheel, vx: %fm/s w: %frad/s '.vx , w); thr dot,thl dot] InvKinematics (vx, w, robot); fprintt( 'straight, thrdot : %frad/s th, dot : %frad/s ',thr-dot , thl-dot); fprintf (n %Turn about center point thr dot-5; thl dot5; vx, w]EwdKinematics (thr_dot, thl_dot, robot); fprintf( 'Turn in place, vx : %fm/sw: %frad/sin',vx , w); [thr dot, thl dot] = InvKinematics (vx,v, robot); tprintf( 'straight, thr-dot: %frad/s th1-dot: %frad/s ''thr-dot , thl-dot); fprintf ("---)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Principles Programming And Performance

Authors: Patrick O'Neil, Elizabeth O'Neil

2nd Edition

1558605800, 978-1558605800

More Books

Students also viewed these Databases questions

Question

1. Signs and symbols of the map Briefly by box ?

Answered: 1 week ago

Question

Types of physical Maps?

Answered: 1 week ago

Question

Explain Intermediate term financing in detail.

Answered: 1 week ago