You are expected to design a simulation environment for a bicycle with a kinematic model. The parameters for this simulation are as follows: The distance between the front and rear wheels is 16 cm (l = 16cm). The vehicle has a width of 8 cm (w = 8cm). The front wheel's center to the midpoint of the vehicle is 8 cm (lf = 8cm). The rear wheel's center to the midpoint of the vehicle is 8 cm (l,.= 8cm). The timestep for the simulation (At = 0.1) You should have 3 seperate code blocks as follows: state_computation(.c/.cpp/.py/m): this function takes the current state [xk, yk, Ok] T, applied input vector [v, 8] and the global constant given above; and calculates the next state [xk+1, Yk+1,0k+1] and returns the value plot_state(.c/.cpp/.py/.m): this function takes the state as an input and plot the position, orientation and steering angle of the robot. Also overall traveled path should be plotted with a line from the starting to the current point. main(.c/.cpp/.py/.m): main function reads a .csv file that contains the timestep, velocity and steering angle, for each time step. An example .csv file is given in the class web- site. Main function calls the state_computation function with the updated states and the given inputs from .csv for each time step. After calculating the next state, main function calls the plot_state function to simulate environment. Expected simulation plot result is given below. You are free to use different plot styles but traveled path, position, orientation and steering angle should be understandable.

Elements Of Electromagnetics
7th Edition
ISBN:9780190698614
Author:Sadiku, Matthew N. O.
Publisher:Sadiku, Matthew N. O.
ChapterMA: Math Assessment
Section: Chapter Questions
Problem 1.1MA
icon
Related questions
Question

please solve quckly and clearly

 

3. You are expected to design a simulation environment for a bicycle with a kinematic
model. The parameters for this simulation are as follows:
The distance between the front and rear wheels is 16 cm (1 = 16cm). The vehicle
has a width of 8 cm (w = 8cm). The front wheel's center to the midpoint of the
vehicle is 8 cm (lf = 8cm). The rear wheel's center to the midpoint of the vehicle
is 8 cm (l, = 8cm). The timestep for the simulation (At = 0.1)
You should have 3 seperate code blocks as follows:
state_computation(.c/.cpp/.py/.m): this function takes the current state [Tk, yk, Ok]T,
applied input vector [v, 8] and the global constant given above; and calculates the next
state [xk+1, Yk+1,0k+1] and returns the value
plot_state(.c/.cpp/.py/.m): this function takes the state as an input and plot the
position, orientation and steering angle of the robot. Also overall traveled path should
be plotted with a line from the starting to the current point.
main(.c/.cpp/.py/.m): main function reads a .csv file that contains the timestep, velocity
and steering angle, for each time step. An example .csv file is given in the class web-
site. Main function calls the state_computation function with the updated states and
the given inputs from .csv for each time step. After calculating the next state, main
function calls the plot_state function to simulate environment. Expected simulation
plot result is given below. You are free to use different plot styles but traveled path,
position, orientation and steering angle should be understandable.
y
start
traveled path
steering
angle
Transcribed Image Text:3. You are expected to design a simulation environment for a bicycle with a kinematic model. The parameters for this simulation are as follows: The distance between the front and rear wheels is 16 cm (1 = 16cm). The vehicle has a width of 8 cm (w = 8cm). The front wheel's center to the midpoint of the vehicle is 8 cm (lf = 8cm). The rear wheel's center to the midpoint of the vehicle is 8 cm (l, = 8cm). The timestep for the simulation (At = 0.1) You should have 3 seperate code blocks as follows: state_computation(.c/.cpp/.py/.m): this function takes the current state [Tk, yk, Ok]T, applied input vector [v, 8] and the global constant given above; and calculates the next state [xk+1, Yk+1,0k+1] and returns the value plot_state(.c/.cpp/.py/.m): this function takes the state as an input and plot the position, orientation and steering angle of the robot. Also overall traveled path should be plotted with a line from the starting to the current point. main(.c/.cpp/.py/.m): main function reads a .csv file that contains the timestep, velocity and steering angle, for each time step. An example .csv file is given in the class web- site. Main function calls the state_computation function with the updated states and the given inputs from .csv for each time step. After calculating the next state, main function calls the plot_state function to simulate environment. Expected simulation plot result is given below. You are free to use different plot styles but traveled path, position, orientation and steering angle should be understandable. y start traveled path steering angle
Expert Solution
steps

Step by step

Solved in 5 steps with 1 images

Blurred answer
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Elements Of Electromagnetics
Elements Of Electromagnetics
Mechanical Engineering
ISBN:
9780190698614
Author:
Sadiku, Matthew N. O.
Publisher:
Oxford University Press
Mechanics of Materials (10th Edition)
Mechanics of Materials (10th Edition)
Mechanical Engineering
ISBN:
9780134319650
Author:
Russell C. Hibbeler
Publisher:
PEARSON
Thermodynamics: An Engineering Approach
Thermodynamics: An Engineering Approach
Mechanical Engineering
ISBN:
9781259822674
Author:
Yunus A. Cengel Dr., Michael A. Boles
Publisher:
McGraw-Hill Education
Control Systems Engineering
Control Systems Engineering
Mechanical Engineering
ISBN:
9781118170519
Author:
Norman S. Nise
Publisher:
WILEY
Mechanics of Materials (MindTap Course List)
Mechanics of Materials (MindTap Course List)
Mechanical Engineering
ISBN:
9781337093347
Author:
Barry J. Goodno, James M. Gere
Publisher:
Cengage Learning
Engineering Mechanics: Statics
Engineering Mechanics: Statics
Mechanical Engineering
ISBN:
9781118807330
Author:
James L. Meriam, L. G. Kraige, J. N. Bolton
Publisher:
WILEY