Skip to content

Software dependencies

Ajay Shankar edited this page Mar 14, 2021 · 2 revisions

Freyja is written entirely in C++ and has the following build dependencies.

  1. Robot Operating System (ROS)
    Most required packages can be installed by ros-<distro>-desktop-full. Freyja is known to work with Debian (8/9/10), Ubuntu (16.04-20.04) and all corresponding ROS versions. Follow official ROS install process (external site).

  2. Eigen3
    This is usually "installed" during a ros-<distro>-desktop-full install. If you're following a different install process, make Eigen3 available as a cmake.module on the system path. Eigen is used internally by Freyja to represent vectors and matrices, and to utilise efficient operations on them. For standard "install", you can:
    sudo apt-get install libeigen3-dev

  3. mavros
    You may need to manually install mavros in spite of ros-<distro>-desktop-full. There are build and run dependencies on mavros, so please follow the binary instructions documented here (external site). Alternatively, you can clone mavros locally (alongside Freyja) and catkin_make will build it as well.

    Note that building mavros takes significantly longer, and needs a much larger RAM space. For small computers (Odroid, RPi, Gumstix etc), you should either allocate decent amount of swap space, or pass -jN to catkin_make, where N is the number of allowed concurrent jobs (choose 2 or 3).

    In any case, mavros depends on geoids datasets, libgeographic and other listed libraries, so make sure to install those as well. The typical instructions are summarised here (from the external link above):

    # install mavros and mavros-extras:
    sudo apt-get install ros-<distro>-mavros  ros-<distro>-mavros-extras
    # install geographiclib datasets:
    wget https://raw.githubusercontent.com/mavlink/mavros/master/mavros/scripts/install_geographiclib_datasets.sh
    sudo bash ./install_geographiclib_datasets.sh 

    Don't like mavros?
    Perhaps you write your own mavlink interface, or perhaps your autopilot has a different communication stack. Freyja includes an apm_handler package to talk to ArduPilot/px4, and it depends on mavros during compile. To circumvent this build dependency, pass -DNO_PIXHAWK option to catkin_make.

  4. c++11, gcc5 or later
    Simply update your packages (specifically, gcc). Explicit compile options (-std=c++11) are invoked within Freyja, and some functions in the filter library use STL utilities. If you are not using c++11 or later, consider it today!

That is it!