As final course project, we programmed the autonomous vehicle to follow a selected person.
- The vehicle first scans for pedestrians in its view.
- The user then marks a specific pedestrian and as that pedestrian moves, the vehicle tracks that specific person.
- The vehicle can take turns (left, right), accelerate, brake, reverse.
- Implemented with 2 PID controllers (steering angle and speed of vehicle) + Dlib (for object tracking)
- For steering angle calculation, we use horizontal deviation of the bounding box from center.
- To speed control, we estimate the pedestrian position from the height of the bounding box.
Install DLib for object tracking. Note that DLib has some CUDA toolkit dependencies as well. You might have to install them separately.
$ pip install dlib
Start up ROS Core Node on Terminal 1
$ roscore
Start up RViz on Terminal 2
$ rviz
Run the code on Terminal 3
python pedestrian_follower.py
Press 's
' key on keyboard and click and drag a bounding box around the pedestrian to follow.
Press 'p
' key on keyboard to enable PID controller and DLib to start tracking.
You are good to go!