This series of blogs marks the journey of my F1/10 Autonomous Racing Cars.
All my source codes can be accessed here.
This lab focuses on implementing an AEB (Automatic Emergency Braking) in ROS node for F1/10 racing cars. AEB is widely used in autonomous vehicles as a basic safety guarantee to avoid collisions with objects.
The lab materials can be accessed here. A PDF version is also attached below.
The lab was built on the F1Tenth Simulator, which can be accessed here.
TTC (Time-To-Collision) is the time it would take for the vehicle to collide with an obstacle given its current heading and velocity. TTC can be calculated with the following format:
where is the distance between vehicle and obstacle, is its 1st derivative with respect to time, and the symbol denotes .
In practice, we use LiDAR results to calculate TTC for each beam. Specifically, we project the current vehicle velocity onto the direction of each beam as , namely .
sensor_msgs/LaserScan provides us with LiDAR beams in all directions. In each
LaserScan message, we have
angle_increment, which corresponds to the starting angle, the ending angle, and the step angle between two adjacent laser beams. All the angles are given in the local coordinate frame (positive direction is the vehicle’s heading) and positive direction is marked as angle value .
We also have
float32 ranges in each
LaserScan message, which gives us the distance to obstacle in the corresponding direction angle. Namely,
ranges[i] <--> angle_min + i * angle_increment.
Given the above information, it is not difficult for us to write our AEB ROS node.
F1/10 Autonomous Racing Lecture recordings: