Skip to content

Install from source code

Martin Molina edited this page Oct 1, 2021 · 4 revisions

How to download Aerostack from source code

This installation method downloads the source code of Aerostack and builds the modules in your computer. This installation method is especially appropriate for software developers who want to make changes of Aerostack components.

  • Requirements: Linux Ubuntu 20.04 with ROS Noetic.

Installation method (specific application)

This installation method is appropriate when a subset of Aerostack components are necessary for a particular application. The installation method only downloads the code that is needed for the application.

Some examples of Aerostack applications can be found in the following link:

  • Example applications

  • Change directory where the application is going to be downloaded (for example, the directory $HOME/Desktop):

      $ cd $HOME/Desktop
    
  • Download the installation files:

      $ git clone https://github.com/aerostack/install
    
  • Download the code corresponding to an Aerostack application. This code should include a file with the extension .repos that contains the list of repositories used by the application using the format used by vcstool. For example, if this code is in the repository https://github.com/aerostack/basic_mission_pixhawk_gazebo, write the following command:

      $ git clone https://github.com/aerostack/basic_mission_pixhawk_gazebo
    
  • Change directory:

      $ cd install
    
  • Execute installation command. The first argument of this command is the name of the file with the extension .repos (with the absolute path):

      $ ./install_from_source.sh $HOME/Desktop/basic_mission_pixhawk_gazebo/application.repos
    

This command installs the Aerostack workspace in a default directory (the default directory is $HOME). If you want to install the code in a different directory, you can write the installation command including the name of the directory (with the absolute path) as a second argument. For example, the following command installs the Aerostack workspace in the directory /opt:

    $ ./install_from_source.sh $HOME/Desktop/basic_mission_pixhawk_gazebo/application.repos /opt

Installation method (full version)

This method downloads and builds all the components of Aerostack. This method is useful, for example, to verify that all components of Aerostack can be built in your computer.

  • Change directory where the application is going to be downloaded (for example, the directory $HOME/Desktop):

      $ cd $HOME/Desktop
    
  • Download the installation files:

      $ git clone https://github.com/aerostack/install
    
  • Download the code corresponding to the Aerostack reference application. This code includes a file called full_aerostack.repos that contains the complete list of repositories of Aerostack in the format used by vcstool:

      $ git clone https://github.com/aerostack/reference_app
    
  • Change directory:

      $ cd install
    
  • Execute installation command. The first argument of this command is the name of the file full_aerostack.repos (with the absolute path) that contains the list of repositories used by the application.

      $ ./install_from_source.sh $HOME/Desktop/reference_app/full_aerostack.repos
    

This command installs the Aerostack workspace in a default directory (the default directory is $HOME). If you want to install the code in a different directory, you can write the installation command including the name of the directory (with the absolute path) as a second argument. For example, the following command installs the Aerostack workspace in the directory /opt:

    $ ./install_from_source.sh $HOME/Desktop/reference_app/full_aerostack.repos /opt

Update the code

In order to update the components of an application, you can execute again the installation command install_from_source.sh.