JinnnK / BNBRLplus

[IROS 2024] Public sourcecode for Belief-Aided Socially-Aware Navigation using Bayesian Reinforcement Learning for Avoiding Humans in Blind Spots
MIT License
5 stars 0 forks source link

Belief-Aided-Navigation using Bayesian Neural Networks and Deep Reinforcement Learning for Avoiding Humans in Blind Spots

This repository contains the codes for our paper titled "Belief-Aided-Navigation using Bayesian Neural Networks and Deep Reinforcement Learning for Avoiding Humans in Blind Spots". The original simulation setting and sourcecode come from here. If you want to see the original version, please refer to the link above. For more details, here is arXiv preprint and Youtube.

🔥News

Abstract

Setup

  1. In a conda environment or virtual environment with Python 3.x, install the required python package

    conda env create -f environment.yaml

    or

    pip install -r requirements.txt
  2. Install OpenAI Baselines

    git clone https://github.com/openai/baselines.git
    cd baselines
    pip install -e .
  3. Install Python-RVO2 library

  4. Our source code does not work with numpy 1.26.3. Please install version 1.20.3.

    pip install numpy==1.20.3

Overview

This repository is organized in five parts:

Note that this repository does not include codes for training a trajectory prediction network. Please refer to from this repo instead.

Run the code

Training

Testing

Please modify the test arguments in line 20-33 of test.py (Don't set the argument values in terminal!), and run

python test.py

Note that the config.py and arguments.py in the testing folder will be loaded, instead of those in the root directory. The testing results are logged in trained_models/your_output_dir/test/ folder, and are also printed on terminal. If you set visualize=True in test.py, you will be able to see visualizations.

Plot the training curves

python plot.py

Simulation

Scenario 1 (No blink, 20 humans)

Scenario 2 (blink for 0.5 sec, 20 humans)

Disclaimer

  1. I only tested my code in Ubuntu with Python 3.9.16 The code may work on other OS or other versions of Python, but I do not have any guarantee.

  2. The performance of my code can vary depending on the choice of hyperparameters and random seeds (see this reddit post). Unfortunately, I do not have time or resources for a thorough hyperparameter search. Thus, if your results are slightly worse than what is claimed in the paper, it is normal. To achieve the best performance, I recommend some manual hyperparameter tuning.

Citation

If you find the code or the paper useful for your research, please cite the following papers:

@inproceedings{kim2024belief,
  title={Belief Aided Navigation using Bayesian Reinforcement Learning for Avoiding Humans in Blind Spots},
  author={Kim, J. and Kwak, D. and Rim, H. and Kim, D.},
  booktitle={Proceedings of the Conference on AI and Robotics},
  year={2024},
  organization={arXiv preprint arXiv:2403.10105}
}

Credits

Jinyeob Kim Email : wls2074@khu.ac.kr

Part of the code is based on the following repositories:

[1] J. Kim, S. Kang, S. Yang, B. Kim, J. Yura, and D. Kim, “Transformable Gaussian Reward Function for Socially Aware Navigation Using Deep Reinforcement Learning,” Sensors, vol. 24,no. 14, p. 4540, 2024. [Online]. Available: https://doi.org/10.3390/s24144540

[2] P. Chang, N. Chakraborty, and Z. Huang, "Intention Aware Robot Crowd Navigation with Attention-Based Interaction Graph," in IEEE International Conference on Robotics and Automation (ICRA), 2023. (Github: https://github.com/Shuijing725/CrowdNav_Prediction_AttnGraph)