This repo is for the autonomous driving system (ADS) developed for BFMC2021. The system is simulated in ROS and tested on a 1:10 scaling vehicle.
ADS
|__ Input layer
|__ Planning layer
|__ Localization layer
|__ Perception layer
|__ Decision-making layer
|__ Control layer
|__ Output layer
We used yolov5 architecture to train a model on a self-collected dataset. The model can detect 15 classes of objects, including car, pedestrian, traffic light, and different traffic signs. Best [email protected] = 87.2%.
~/Documents
|__ bfmc_workspace
|__ startup_workspace
|__ python3_ws
# requires python3.8 or later installed in default system
$ sudo apt-get install python-catkin-tools python3-dev python3-numpy
$ sudo pip install virtualenv
$ cd ~/Documents
$ mkdir -p python3_ws/src
$ cd python3_ws
$ virtualenv py3venv --python=python3.8
$ source ~/Documents/python3_ws/py3venv/bin/activate
$ cd ~/Documents/python3_ws/src
# copy the yolov5 folder to src
$ cd yolov5
$ pip install -r requirements.txt
$ pip install -e .
$ pip install gym
$ cd ~/Documents/python3_ws/src
# copy geometry and vision_opencv folders to src
$ pip install pyaml
$ pip install rospkg
$ pip install empy
$ cd ~/Documents/python3_ws
$ catkin_make -DPYTHON_EXECUTABLE:FILEPATH=/home/<user>/Documents/python3_ws/py3venv/bin/python
$ source devel/setup.bash
$ cd ~/Documents/startup_workspace
$ rm -rf build devel
$ catkin_make -DPYTHON_EXECUTABLE:FILEPATH=/home/<user>/Documents/python3_ws/py3venv/bin/python
$ source devel/setup.bash
# put below line as first line of each .py file
#!/usr/bin/env python
# Terminal 1
$ source ~/Documents/python3_ws/py3venv/bin/activate
$ cd ~/Documents/bfmc_workspace
$ roslaunch sim_pkg map_with_all_objects.launch
# Terminal 2
$ source ~/Documents/python3_ws/py3venv/bin/activate
$ cd ~/Documents/startup_workspace
$ rosrun startup_package main.py