Skip to content
Bárbara Barros Carlos edited this page Jan 5, 2020 · 1 revision

Install on Ubuntu 16.04 LTS with ROS Kinetic


  1. Install ROS Kinetic (recommended: “Desktop-Full Install”) following these instructions.

  2. We work with Catkin Command Line Tools to build packages in the workspace. They can be installed with apt-get following these instructions.

  3. Setup your catkin workspace:

$ mkdir -p ~/catkin_ws/src
$ cd ~/catkin_ws/src/
$ catkin_init_workspace
$ cd ~/catkin_ws/
$ catkin build
$ source devel/setup.bash
$ echo "source ~/catkin_ws/devel/setup.bash" >> ~/.bashrc
$ source ~/.bashrc
  1. Clone the crazyflie_nmpc project into your catkin workspace:
$ cd ~/catkin_ws/src/
$ git clone https://github.com/bcbarbara/crazyflie_nmpc
  1. Initialize all submodules:
$ cd acados/
$ git submodule update --init --recursive
  1. Build and install acados:
$ make -j4

Note Set the appropriate BLASFEO_TARGET and HPIPM_TARGET via <acados_root>/Makefile.local file. For a list of supported targets, we refer to the BLASFEO documentation. It is also recommended to add the flag ACADOS_WITH_QPOASES=1 to the Makefile.local.

  1. Install acados Python interface with Python 3.6
$ cd ~/catkin_ws/src/crazyflie_nmpc/acados/interfaces/acados_template/
$ pip3 install .
  1. In order to be able to successfully render C code templates, you need to download the t_renderer binaries for your platform from here and place them in <acados_root>/bin.

Note Please strip the version and platform from the binaries (e.g. t_renderer-v0.0.20 -> t_renderer).

Note Notice that you might need to make t_renderer executable.

  1. Run export ACADOS_SOURCE_DIR=<acados_root> such that the location of acados will be known to the Python package at run time.

  2. Additionally, you will have to make sure that the environment variable LD_LIBRARY_PATH contains the path to libacados.so (default path is <acados_root/lib>).

  3. Now you are able to generate the RTI instance tailored for the crazyflie NMPC in the scripts folder:

$ cd ~/catkin_ws/src/crazyflie_nmpc/crazyflie_controller/scripts/crazyflie_full_model/
$ python3 generate_c_code.py
  1. Then use the catkin build command to compile your workspace.