Giter Site home page Giter Site logo

multi-robot-svbp's Introduction

Stein Variational Belief Propagation for Multi-Robot Coordination

This repository is an application using torch-bp. The code contains Python scripts that run experiments for multi-robot collision tests in different environments using the belief propagation algorithms in torch-bp. This code accompanies the paper Stein variational belief propagation for multi-robot coordination. Please cite us if you use this code for your research.

Visit Project Webpage for more details about the project.

Installation

prerequisite:

  • Python >=3.8 (tested with 3.8.18)
  • PyTorch >=2.0 (tested with up to v2.2 with CUDA 12.1)
  • torch-bp (follow link to install)

After clone the repo, under /multi-robot-svbp run:

pip install -e .

Recommend installation:

# create folder for svbp project
mkdir svbp_workspace
cd svbp_workspace

# create python virtual environment
python3 -m venv svbp_venv
source svbp_venv/bin/activate
######### TODO: install suitable pytorch version #########
# for 12.1 eg. pip3 install torch torchvision torchaudio #

# clone the necessary repo
git clone https://github.com/janapavlasek/torch-bp.git
git clone https://github.com/janapavlasek/multi-robot-svbp.git

# install torch-bp
pip install -e torch-bp/
pip install -e multi-robot-svbp/

# may need additional package
pip install matplotlib

Usage

The main experiment scripts are under scripts folder.

Basic use of the scripts:

# in the folder /multi-robo-svbp
# run stein mpc controller for point robot in simple scene
python scripts/point_robot_stein_mpc.py

# recommend to use cuda when running experiments with gabp or svbp
# use save flag to save images of the experiments during each step
python scripts/run_collision_avoid_gabp.py --cuda --save
python scripts/run_collision_avoid_svbp.py --cuda --save

All experiment outputs (data, visualization) will be sotred under ouput folder.

To use a different scene/map of the experiment, use the --scene flag and specify a .yml file in data/scenes folder. For example,

# run the experiment using gabp in the map 'swap_rooms'
python scripts/run_collision_avoid_gabp.py --cuda --save --scene multi-robot-svbp/data/scenes/swap_rooms.yml

Citation

This code accompanies the paper Stein variational belief propagation for multi-robot coordination (Robotics and Automation Letters, 2024). If you use it in your research, please cite:

@inproceedings{pavlasek2024stein,
  title={Stein Variational Belief Propagation for Multi-Robot Coordination},
  author={Pavlasek, Jana and Mah, Joshua Jing Zhi and Xu, Ruihan and Jenkins, Odest Chadwicke and Ramos, Fabio},
  booktitle={Robotics and Automation Letters (RA-L)},
  year={2024}
}

multi-robot-svbp's People

Contributors

multyxu avatar janapavlasek avatar mushroonhead avatar

Stargazers

h(x) avatar Qingzhao Liu avatar  avatar

Watchers

 avatar  avatar

multi-robot-svbp's Issues

HIgh memory usage from `jacrev` operations

  • run_collision_avoid_svbp.py example uses alot of memory
    image

  • proposed problem linked to jacrev mapping every single output to every single input which is not required for our usage in BatchKernel

Proposed fix:

  • implement manual gradients that uses significantly less memory

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.