Fast and embedded solvers for nonlinear optimal control.
Some functionalities in acados require CasADi (version 3.4.0) to be installed on your system. To install CasADi, you can follow the installation instructions here
If you have any acados-related question, feel free to post on our forum.
Both a CMake and a Makefile based build system are supported at the moment.
-
Initialize all submodules
git submodule update --recursive --init -
Download CasADi into the
<acados_root_folder>/externalfolder:cd externaland, depending on your preferred CasADi interface (Python, MATLAB, Octave):
wget -q -nc --show-progress https://github.com/casadi/casadi/releases/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 cd ..wget -q -nc --show-progress https://github.com/casadi/casadi/releases/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 ..wget -q -nc --show-progress https://github.com/casadi/casadi/releases/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 cd .. -
Build and install
acados. When using the CMake-based build sytem:mkdir -p build cd build cmake .. (with optional arguments e.g. -DACADOS_WITH_OSQP=OFF/ON -DACADOS_INSTALL_DIR=<path_to_acados_installation_folder>) make installWhen using the Makefile-based build sytem:
make acados_shared export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:<path_to_acados_folder>/lib make examples_c make run_examples_c
If the compilation/linking fails because -lblas or -llapack can not be found, you might want to do:
sudo apt-get install libblas-dev liblapack-dev
- soon: binaries for all operating systems available for download (see Releases) Minh's edit
cmake.exe -G "MSYS Makefiles" -D BLASFEO_TARGET=GENERIC -D HPIPM_TARGET=GENERIC -D ACADOS_INSTALL_DIR=.. -DBUILD_SHARED_LIBS=OFF -DACADOS_EXAMPLES=OFF -DACADOS_UNIT_TESTS=OFF ..
cmake .. -G "MSYS Makefiles" -DBLASFEO_TARGET=GENERIC -DHPIPM_TARGET=GENERIC -DACADOS_INSTALL_DIR=/d/acados-install -DBUILD_SHARED_LIBS=OFF -DACADOS_MATLAB=ON -DACADOS_WITH_OPENMP=ON -DACADOS_NUM_THREADS=16
Error && fix
compiling C:\acados\examples\acados_matlab_octave\..\..\interfaces\acados_matlab_octave\ocp_create.c
Building with 'MinGW64 Compiler (C)'.
Error using mex
C:\acados\examples\acados_matlab_octave\..\..\lib\qpOASES_e.lib(MessageHandling.c.obj):MessageHandling.c:(.text+0x93):
undefined reference to `__imp___acrt_iob_func'
mingw-w64-x86_64-crt-git-5.0.0.5002.34a7c1c0-1 \\\
mingw-w64-x86_64-headers-git-5.0.0.5002.34a7c1c0-1
in this link
https://repo.msys2.org/mingw/x86_64/