-
Notifications
You must be signed in to change notification settings - Fork 31
How to
-
Install ROS Kinetic (recommended: “Desktop-Full Install”) following these instructions.
-
We work with Catkin Command Line Tools to build packages in the workspace. They can be installed with apt-get following these instructions.
-
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
- Clone the
crazyflie_nmpc
project into your catkin workspace:
$ cd ~/catkin_ws/src/
$ git clone https://github.com/bcbarbara/crazyflie_nmpc
- Initialize all submodules:
$ cd acados/
$ git submodule update --init --recursive
- Build and install
acados
:
$ make -j4
Note Set the appropriate
BLASFEO_TARGET
andHPIPM_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 flagACADOS_WITH_QPOASES=1
to theMakefile.local
.
- Install
acados
Python interface with Python 3.6
$ cd ~/catkin_ws/src/crazyflie_nmpc/acados/interfaces/acados_template/
$ pip3 install .
- 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.
-
Run
export ACADOS_SOURCE_DIR=<acados_root>
such that the location of acados will be known to the Python package at run time. -
Additionally, you will have to make sure that the environment variable
LD_LIBRARY_PATH
contains the path tolibacados.so
(default path is<acados_root/lib>
). -
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
- Then use the
catkin build
command to compile your workspace.