The car's initial position is at a negative x value like -1.2 . Based on the following…
- User
The car's initial position is at a negative x value like -1.2 . Based on the following information, implement an end to end PID controller.# Tasks
1. Plot the reference in `RVIZ` as a yellow line. $$ Reference = y = f(x) = \begin{cases} 0, & \text{for } 0\leq x\leq 15\\ 2, & \text{for } 15\leq x\leq 30\\ 5, & \text{for } 30\leq x\leq 45\\ 10, & \text{for } 45\leq x\leq 60\\ 15, & \text{for } 60\leq x\leq 200\\ STOP, & \text{for } 200\le x\\ \end{cases} $$ Marker Details: Scale → `0.1` Action → `ADD` Type → `LINE_STRIP` Frame_id → `odom` 2. Control the steering of the car using a `PID` controller. Steps 1. Get current `y` of the car. 2. Calculate y `error` to reference, `derivative` of the error and `integral` of the error. 3. Combine the errors calculated with the `PID` methodology to generate steering input with `PID gains` [ You will tune these gains in part d. ]. 4. Command the car using calculated `steering` input. - Car Dynamics [ Please ensure these constraints are followed. ] - Speed → `2 m/s` [ Use `rosparam` to set this speed in your launch file. We should be able to change the speed to verify the response for slower and faster speeds. Parameter Name → `Vmax` Type → `double` ] - Steering angle → `[-25 deg, 25 deg]` 3. Car should STOP at the end of the reference. - This can be done by commanding speed of `0 m/s` 4. Tune PID controller to get a reasonable rise time, overshoot, settling time and steady state. - In the context of this assignment, reasonable implies that the reference is followed with an error `≤ 0.5m` by the end of current section and steady-state error `≤ 0.1 m` [ i.e at the end of section 2 of the reference → `x = 30`, the y error `≤ 0.5m` and at `x = 200`, the y error `≤ 0.1 m` ]. - You can plot the error using `rqt_plot` to visualize the PID parameters. - You can also change the speed of the car between `1 m/s` and `3 m/s` to tune your controller for all speeds between `1 m/s` to `3 m/s`. (self-study task) - You can calculate the performance of you controller using the `MAE` metric. (self-study task) [reasonable → `MAE ≤ 0.6` at the end of all sections. ] - You can also turn the integral component on after the reference stabilizes for some time. This is how most real world PID controller work. This will improve the performance of your controller. (self-study task)Deliverable → The car must be able to follow the reference with reasonable PID parameters.**
At
x = 70, the car is quite far from the provided reference. But as the reference doesn't change tillx = 200, the error reduces to 0. This is what is referred to as steady-state error. - Assistant
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.