GithubHelp home page GithubHelp logo

giegloop / acados Goto Github PK

View Code? Open in Web Editor NEW

This project forked from acados/acados

0.0 1.0 0.0 27.79 MB

Fast and embedded solvers for nonlinear optimal control

License: GNU Lesser General Public License v3.0

Shell 0.41% CMake 5.05% Makefile 1.01% C 69.57% C++ 16.77% MATLAB 4.74% Python 2.35% Batchfile 0.04% HTML 0.06%

acados's Introduction

acados

Travis Status Appveyor status codecov

Fast and embedded solvers for nonlinear optimal control.

Installation

If you are on Ubuntu (tested with 16.04), you can run ./install.sh. You can also follow the manual installation instructions below.

  • soon: binaries for all operating systems available for download (see Releases)

Getting started

MATLAB

First, add CasADi and acados to your MATLAB path. From a MATLAB command window

addpath <path_to_acados_root_folder>/external/casadi-matlabR2014b-v3.4.0
addpath <path_to_acados_installation_folder>
% To permanently add these paths:
savepath

Run an acados example, from <path_to_acados_root_folder>/examples/matlab/:

ocp_qp_example.m

Python

acados only supports Python3. Add CasADi and acados to the PYTHONPATH environment variable (add those lines to your .bashrc or .zshrc to set the paths permanently):

export PYTHONPATH=<path_to_acados_root_folder>/external/casadi-py35-v3.4.0-64bit:$PYTHONPATH
export PYTHONPATH=<path_to_acados_installation_folder>:$PYTHONPATH

To run a Python example from the acados root folder:

python examples/python/ocp_nlp.py

Manual Installation

Otherwise, follow the steps below:

  1. Install the dependencies:

    sudo apt-get install libgsl0-dev liblapack-dev libopenblas-dev liboctave-dev libeigen3-dev python3-tk
    sudo apt-get install byacc # for swig
    sudo apt-get install python3-scipy python3-numpy python3-matplotlib
    
  2. Download CasADi into the <acados_root_folder>/external folder:

    cd external
    wget -q -nc http://files.casadi.org/download/3.4.0/casadi-linux-octave-v3.4.0.tar.gz
    mkdir -p casadi-octave-v3.4.0
    tar -xf casadi-linux-octave-v3.4.0.tar.gz -C casadi-octave-v3.4.0
    
    wget -q -nc http://files.casadi.org/download/3.4.0/casadi-linux-py35-v3.4.0-64bit.tar.gz
    mkdir -p casadi-py35-v3.4.0-64bit
    tar -xf casadi-linux-py35-v3.4.0-64bit.tar.gz -C casadi-py35-v3.4.0-64bit
    
    wget -q -nc http://files.casadi.org/download/3.4.0/casadi-linux-matlabR2014b-v3.4.0.tar.gz
    mkdir -p casadi-matlabR2014b-v3.4.0
    tar -xf casadi-linux-matlabR2014b-v3.4.0.tar.gz -C casadi-matlabR2014b-v3.4.0
    cd ..
    
  3. Initialize all submodules

    git submodule update --recursive --init
    
  4. Build and install swig. Make sure you don't have an older version installed (e.g. via the package system):

    cd external/swig
    ./autogen.sh
    ./configure --prefix=$(pwd)/swig_install --enable-silent-rules
    make
    make install > /dev/null    # quiet installation
    export PATH=$(pwd):$PATH    # add swig to PATH
    cd ../.. # back to acados root folder
    
  5. Build and install acados. By default, acados is installed in $HOME/local/lib. If you want to install acados elsewhere, pass -D ACADOS_INSTALL_DIR=<path_to_acados_installation_folder> to cmake below.

    mkdir -p build
    cd build
    cmake -D SWIG_MATLAB=1 -D SWIG_PYTHON=1 ..   # set SWIG_MATLAB=0 if you don't have MATLAB installed
    make install
    

acados's People

Contributors

bnovoselnik avatar chenyutao36 avatar dkouzoup avatar doanminhdang avatar freyjo avatar ghorn avatar giaf avatar nielsvd avatar rienq avatar roversch avatar rqelibari avatar tmmsartor avatar zanellia 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.