Question: 1. Write a function with the following prototype function robot- this function should update the robot pose, dt seconds into the future. Assume robot has

 1. Write a function with the following prototype function robot- this

1. Write a function with the following prototype function robot- this function should update the robot pose, dt seconds into the future. Assume robot has the following fields: robot.X, (x position) (y position) robot Phi, (heading in rad [pipil) robotvel, (linear velocity in m/s) (angular velocity in rad/s) 2. Write a simple script to test your fwdSim functiorn. 3. Using the following template, implement a controller for the Ackerman steered vehicle so that it can follow the road. a. Use a PD control law b. Add a drift term to the steering angle, what do you observe? c. Improve your control law. clear all close all %% Controller gains % write here your controller gains %% Simulation Pacers. ma 10: %simulation time in seconds desX= 0; % desired Y location (if following road, set to zero) t-0; % initial time d,-0.1 ; % simulation step time obowel 1.0; %velocity in m/s %% Start with a drift of zero - 0*pi/180; % for part 3.b of the activity you will add % a nonzero drift term, simulating % misaligned wheels % Robot Global Pose tobotX 0; % X Global robot position in m robot. Y 3; % Y Global robot position in m % Global orientation in radians, measured with respect to X axis %steering angle %% Define Robot wetlength-3; %[m] Po steering limits in radians robot gammaMas-pi/3; robot gaumasu -pi/3; kk -1; % iteration index %% Implement your simulation here % make sure the applied steering angle is within the allowable limits % you need to angles are always between-pi and pi % in a separate file write a function robot wdSim(roboto); % which upatesthe robot pose (x,y,heading) dt seconds into the future, while (t

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!