Drive By Wire Node - Ridgebeck/CarND-Capstone-Team-Herbie GitHub Wiki
Calculating braking torque:
- Torque = Force * radius / T = F * r
- Force = mass * acceleration / F = m * a
- Torque = mass * acceleration * radius / T = m * a * r
Where can we change the target speed (speed limit)?
The speed limit can be changed in the waypoint_loader.launch file, line 5. The standard value is 40 km/h, which is equivalent to 24.85 mph. Udacity will test at different speeds, so we should verify that our code works for both slower and faster speeds.
<param name="velocity" value="40" />
PID controller for speed
The control loop for the velocity follows the same principle as a cruise control. The in and outputs are shown in the following diagram.
Tuning PID controller values
For tuning the PID controllers it is always great to plot the input and the response to see how the controller reacts. This can be done via the rqt_plot
command. More info here:
https://github.com/Ridgebeck/CarND-Capstone-Team-Herbie/wiki/ROS-tips-and-tricks
The output should look similar to this:
Possible input of motion profile in form of waypoints:
See: https://github.com/Ridgebeck/CarND-Capstone-Team-Herbie/wiki/Waypoint-Updater-Node