Skip to content

A bio-inspired leader-follower framework for connected vehicle system.

Notifications You must be signed in to change notification settings

tvpian/Auto-Platoon

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Auto Platoon

A bio-inspired leader-follower framework for connected vehicle system.

Setup

  • 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.


Execution

  • Leader-Follower

    • To execute the program, first change the IP address on line 31 in the file main.py to 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
      

Details

  • sort.py is referred from sort_v2.py in the tracking branch.

Instructions To Run The Follower Code

  1. Once the main server is started, follower.py code is run.
  2. To Run "follower.py" code in Rasberry Pi, first you need to ssh into Rasberry pi of the follower robot using "ssh username@password".
  3. Transfer the script file to the Rasberry Pi and install all necessary libraries such as opencv, flask, socket, imutils, numpy, gpio.
  4. Open a terminal and run the "follower.py" file while the main server of socket is running.

Instructions To Run The Leader Code

  1. Once the main server is started, leader.py code is run.
  2. To Run "leader.py" code in Rasberry Pi, first you need to ssh into Rasberry pi of the Leader robot using "ssh username@password".
  3. Transfer the script file to the Rasberry Pi and install all necessary libraries such as opencv, flask, socket, imutils, numpy, gpio.
  4. Open a terminal and run the "leader.py" file while the main server of socket is running.

Videos

  • 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 the 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
Auto.Platoon.Demo.webm

Releases

No releases published

Packages

No packages published

Languages

  • Python 99.3%
  • Other 0.7%