Skip to content

PuYuuu/vehicle-interaction-decision-making

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Vehicle Interaction Decision Making

The repository implements the decision-making of multiple vehicles at intersections based on level-k game, and uses MCTS to accelerate search. The code is fully implemented in C++ and Python respectively.

How to run🏃‍♂️

Clone the repository to local path:

git clone git@github.com:PuYuuu/vehicle-interaction-decision-making.git

The following is the development and testing environment of this repository , for your information:

  • System: Ubuntu 20.04 ( WSL2 )
  • Python 3.8.10: numpy == 1.24.4 matplotlib == 3.7.4
  • C++ Toolchain: GCC 9.4.0 CMake 3.23.0

🐍Run using Python

1.1.1 Requirement

Make sure your python version is 3.6.12 or above. Then use the following instructions to install the required third-party libraries, or install them manually.

pip install -r scripts/requirements.txt

1.1.2 Run it

Firstly, you can run it directly using the default parameters.

python scripts/run.py

Or specify parameters for example:

python scripts/run.py -r 5 --log_level debug --config ./config/triple_interact.yaml

For detailed usage help, use python scripts/run.py -h to view.

🦏Run using C++

Running C++ requires python dependencies, refer to 1.1.1. By the way, the C++ implement of this repository is more than 10 times faster🚀 than the Python. Therefore, strongly recommend you do further development on the basis of C++.

1.2.1 Requirement

  1. Install eigen3 for matrix calculation, fmt for string format , and spdlog for log print :
sudo apt update
sudo apt install libeigen3-dev libspdlog-dev libfmt-dev
  1. Install yaml-cpp for parsing yaml file :
git clone https://github.com/jbeder/yaml-cpp.git
cd yaml-cpp
mkdir build && cd build
cmake -DBUILD_SHARED_LIBS=ON ..
make -j6
sudo make install
  1. Install matplotlib-cpp for visualization :
git clone git@github.com:PuYuuu/matplotlib-cpp.git
sudo cp -r matplotlib-cpp /usr/local/include

1.2.2 Build it

cd ${path_to_project}
mkdir build && cd build
cmake ..
make -j6

1.2.3 Run it

The executable file can be found in the build folder, run it directly using the default parameters:

./decision_making

More usage information can be found through -h or code.

🛠Configuration file usage

The configuration file of program running parameters is in ${Project}/config and strictly uses the yaml file format.

Reference📝

  1. Game Theoretic Modeling of Vehicle Interactions at Unsignalized Intersections and Application to Autonomous Vehicle Control [link]
  2. Receding Horizon Motion Planning for Automated Lane Change and Merge Using Monte Carlo Tree Search and Level-K Game Theory [link]

About

The decision-making of multiple vehicles at intersection bases on level-k game and MCTS

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published