Giter Club home page Giter Club logo

ram-ruts's Introduction

Risk-Aware Stochastic MPC for Run-Time Specifications in Signal Temporal Logic (RAM-RuTS)

Author: Zengjie Zhang ([email protected]), Maico H.W. Engelaar ([email protected])

A Python library used to perform Model Predictive Control (MPC) for a stochastic linear system with runtime Signal Temporal Logic specifications.

Quick Information

This library is used to facilitate the capability of robotic systems to execute dynamically assigned tasks with strict risk limitations.

Scenario

This library considers an essential case handling scenario as follows, where a robot is required to:

  • Start from HOME;
  • Reach a TARGET on request;
  • Reach the CHARGER on request;
  • Visit HOME sufficiently often on request;
  • Stay inside the workspace.

On request means that the corresponding tasks are dynamically assigned without prior notice. The robot is required to accomplish these dynamically assigned tasks with a strict safety guarantee in a probabilistic sense.

Map

Associated Research Work

This library is associated with the Arxiv article in https://arxiv.org/abs/2402.03165 which is to be presented in the 8th IFAC Conference on Analysis and Design of Hybrid Systems, July 1-3, 2024.

Relation with Existing Toolbox

The probstlpy library in this project is modified from the stlpy toolbox.

Installation

System Requirements

Operating system

  • Windows (compatible in general, succeed on 11)
  • Linux (compatible in general, succeed on 20.04)
  • MacOS (compatible in general, succeed on 13.4.1)

Python Environment

  • Python version: test passed on python=3.11
  • Recommended: IDE (VS code or Pycharm) and Conda
  • Required Packages: numpy, treelib, matplotlib, scipy.

Required Libraries

Quick Installation

  1. Install conda following this instruction;

  2. Open the conda shell, and create an independent project environment;

conda create --name ram-ruts python=3.11
  1. In the same shell, activate the created environment
conda activate ram-ruts
  1. In the same shell, within the ram-ruts environment, install the dependencies one by one
conda install -c anaconda numpy
conda install -c conda-forge treelib
conda install -c conda-forge matplotlib
conda install -c anaconda scipy
  1. In the same shell, within the ram-ruts environment, install the libraries
python -m pip install gurobipy
pip install control
  1. Last but not least, activate the gurobi license (See How To). Note that this project is compatible with gurobi Released version 11.0.1. Keep your gurobi updated in case of incompatibility.

Running Instructions

  • Run the main script main.py;
  • Watch the terminal for runtime information;
  • The figures will show up at the end of running; They are also automatically saved in the root directory;
  • The figures may impede each other; Drag the figures for a better view;
  • Check out the logging file INFO.log for the runtime information.

Fine-Tuning the Code

Feel free to try out the code with different parameter settings in the commons/configs.py file.

  • Change the coordinates of the regions in the RG dictionary to construct a different map;
  • Change the color map in the CM dictionary for preferred layout;
  • Change the standard deviation variable Sigma for different noise levels;
  • Change the initial position of the robot in x0;
  • Customize the lists of runtime specifications specs and their instants in times for various tasks.

License

This project is with a BSD-3 license, refer to LICENSE for details.

ram-ruts's People

Contributors

bandfourteen avatar maicoengelaar1996 avatar zhang-zengjie avatar

Watchers

 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.