GithubHelp home page GithubHelp logo

maicbf's Introduction

maicbf

Installation

Create a virtual environment with Anaconda:

conda create -n maicbf python=3.6

Activate the virtual environment:

sourve activate maicbf

Clone this repository:

git clone https://github.com/abj247/maicbf.git

Enter the main folder and install the dependencies:

pip install -r requirements.txt

Training

To train the ma-icbf model specified number of agents (e.g. 4) use this command,

python train.py --num_agents 4

This will train the model for 4 agents

To bulk train the model with different number of agents, different loss weights for inpiut constraints and agility use this command,

python main.py --num_agents 4

this will train the ma-icbf model for 4, 8, 16, 32 agenst with 0.5, 1.0, 1.5, 2.0 loss weights for input constraints and 0.1, 0.5, 1.0, 2.0 loss weights for agility.

Training logs can be found in train_logs. For training and evaluating the baselines models see baselines.

Evaluation

For evaluation of ma-icbf model use this command,

python evaluate.py --num_agents 16 --model_path models/agile_u_max_0.2/model_ours_weight_1.0_agents_4_v_max_0.2_u_max_0.2_sigma_0.05_default_iter_69999 --vis 1

This will evaluate the model for 16 agents with pretrained weights for 4 agents, save the cbf data to csv and show the visualization, for pretrained weights see models.

For evaluation with more advanced capabilities use this command,

python eval.py --num_agents 16 --model_path models/agile_u_max_0.2/model_ours_weight_1.0_agents_4_v_max_0.2_u_max_0.2_sigma_0.05_default_iter_69999 --vis 1

This will evaluate the pretrained model of 4 agents for 16 agents and will detect deadlock, resolve deadlock track collision, resolve collision for all agents using mpc-cbf controller save cbf data and time to goal for each agents in a csv file, for all csv data see csv_data. The evaluation will give the h(u), velocity and acceleration plots for each agent and all plots will be saved in plots.

To plot the trajectory for each agent for further visualization use this command,

python plot_traj.py

This script will plot the trajectory for each agent and it will be required to input the .pkl file for trajectory data which will be saved after evaluation completes see trajectory. wandb logs could be found at wandb.

maicbf's People

Contributors

abj247 avatar vrushabh27 avatar

Stargazers

 avatar

Watchers

Rohan Chandra avatar  avatar

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.