-
Notifications
You must be signed in to change notification settings - Fork 31
Install on Ubuntu 16.04 LTS with ROS Kinetic
Bárbara Barros Carlos edited this page Jul 6, 2024
·
3 revisions
-
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 ~/catkin_ws/src/crazyflie_nmpc/acados/
$ git submodule update --init --recursive
- Build and install
acados
:
$ mkdir -p build
$ cd build
$ cmake -DACADOS_WITH_QPOASES=ON .. # add more optional arguments e.g. -DACADOS_WITH_OSQP=OFF/ON -DACADOS_INSTALL_DIR=<path_to_acados_installation_folder> above
$ make install -j4
- Install
acados
Python interface. Recommended: Create a Python virtual environment usingvenv
:
$ python3 -m venv env
$ source env/bin/activate # source the environment
$ cd ~/catkin_ws/src/crazyflie_nmpc/acados/interfaces/acados_template/
$ pip3 install -e
- Add the path to the compiled shared libraries
libacados.so
,libblasfeo.so
,libhpipm.so
toLD_LIBRARY_PATH
(default path is <acados_root/lib>) by including these lines to your.bashrc
/.zshrc
:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:"<acados_root>/lib"
export ACADOS_SOURCE_DIR="<acados_root>"
- 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.