Auto.Platoon.Demo.webm
-
Create a Python virtual environment to install the dependencies for the project.
python3 -m venv <path_to_virtual_env> source <path_to_virtual_env>/bin/activate -
Install the dependencies using the following command:
pip3 install -r requirements.txt -
Download the weights for the following models using the provided links:
-
Create a folder named weights and place the downloaded weights in the folder.
-
Leader-Follower
- To execute the program, first change the IP address on line 31 in the file
main.pyto the IP address of your computer. - To execute the program for this problem, navigate to the submission folder and use the following commands
python3 main.py
- To execute the program, first change the IP address on line 31 in the file
sort.pyis referred to fromsort_v2.pyin the tracking branch.
- Once the main server is started, the follower.py code is run.
- To run the "follower.py" code in Rasberry Pi, first you need to ssh into Rasberry pi of the follower robot using "ssh username@password".
- Transfer the script file to the Rasberry Pi and install all necessary libraries such as opencv, flask, socket, imutils, numpy, gpio.
- Open a terminal and run the "follower.py" file while the main server of the socket is running.
- Once the main server is started, the leader.py code is run.
- To Run the "leader.py" code in the Raspberry Pi, first you need to SSH into the Raspberry Pi of the Leader robot using "ssh username@password".
- Transfer the script file to the Rasberry Pi and install all necessary libraries such as opencv, flask, socket, imutils, numpy, gpio.
- Open a terminal and run the "leader.py" file while the main server of the socket is running.
- Results: The follower will be following the leader with a threshold distance as long as it tracks the leader. If a Dynamic Obstacle comes into play, the follower pauses the motion and communicates with the leader and other followers to stop. Once the obstacle goes out of the frame and the follower is tracking the leader, the whole platoon system starts moving again. Link