Project

General

Profile

Installation » History » Revision 18

Revision 17 (Rafael Bailon-Ruiz, 2020-11-16 16:20) → Revision 18/24 (Rafael Bailon-Ruiz, 2020-11-16 17:20)

h1. Installation 

 This is a quick tutorial on how to install CAMS on your computer. Instructions are different depending on your needs: *If you don't know how to code you are using ubuntu 20.04 a regular user and you should proceed with the [[Installation#One-step install|one-step install]]. [[Installation#Regular user installation process|Regular user installation process]]. If you are a developper that wants to control the setup process, developer, follow the [[Installation#Advanced install|Advanced install]] instructions.* [[Installation#Developer installation process|Developer installation process]].* 

 In any case, CAMS server requires a PC running a recent GNU/Linux operating system, preferably Ubuntu 18.04 or 20.04. Windows and MacOS are not supported. On the contrary, access to the graphical user interface is possible from any device running a modern web browser. 

 {{toc}} 

 h2. One-step Regular user installation process 

 This guide assumes you are using Ubuntu 18.04. If you are using another operating system make sure that Python 3.5 or later is installed. 

 h3. Paparazzi framework 

 First, install the Paparazzi framework using the "one-liner installation process":https://wiki.paparazziuav.org/wiki/Installation#Quickstart_for_Ubuntu_users. If you are not an Ubuntu user follow the "OS specific instructions":https://wiki.paparazziuav.org/wiki/Installation#OS_Specific_Instructions. 

 Download Add the script from the url below environment variables PAPARAZZI_HOME and PAPARAZZI_SRC to your home directory: command line interpreter. The code below should work for most users **if you used the one-liner installation**: 

 *<pre> <pre><code class="shell"> 
 https://redmine.laas.fr/projects/nephelae-devel/repository/nephelae_utils/revisions/master/raw/cams_user_install.sh echo "export PAPARAZZI_HOME=~/paparazzi" >> ~/.bashrc 
 </pre>* echo "export PAPARAZZI_SRC=~/paparazzi" >> ~/.bashrc 
 </code></pre> 

 Open a terminal Otherwise, you can find more information "here":https://wiki.paparazziuav.org/wiki/Installation#Environment_Variables. 

 h3. CAMS 

 Make sure that curl is installed: 
 <pre><code class="shell"> 
 sudo apt install curl 
 </code></pre> 

 Make sure that redis is installed: 
 <pre><code class="shell"> 
 sudo apt install redis-server 
 </code></pre> 

 Install pip3 and run: update it: 
 <pre><code class="shell"> 
 sudo apt install python3-pip 
 pip3 install --user --upgrade pip 
 </code></pre> 

 *<pre><code For now the easiest way to install CAMS is to clone the "git repository of the graphical user interface":https://redmine.laas.fr/projects/nephelae-devel/repository/nephelae_gui and run its installation script. 

 <pre><code class="shell"> 
 chmod +x cams_user_install.sh git clone git://redmine.laas.fr/laas/users/simon/nephelae/nephelae-devel/nephelae_gui.git nephelae_gui 
 ./cams_user_install.sh cd nephelae_gui 
 </code></pre>* make --trace install pip_options=--user 
 </code></pre> 

 To check the installation, launch the server: 

 <pre><code class="shell"> 
 make demo 
 </code></pre> 

 This will (hopefully) start the replay of a UAV flight. 

 You should now be able to connect to the graphical user interface with your web browser on "http://0.0.0.0:8000/":http://0.0.0.0:8000/. 

 h2. Advanced install Developer installation process 

 h3. System requirements 

 The main programming language is **Python 3.5**. "Official support for Python 2.7 ending by the beginning of 2020":https://pythonclock.org/, no development efforts were made to support Python 2.7. 

 Most of development and testing where made on "Ubuntu 16.04 LTS Xenial Xerus":http://releases.ubuntu.com/16.04/ on which Python 3.5 is the default Python version. 

 All server side applications should work on a Unix-based system provided it supports Python 3.5 or later. Compatibility with Microsoft Windows has not been tested. 

 The client side application is web-based and should work on a modern web browser. (Only tested with Mozilla Firefox and Safari). 

 p{border: solid 1px #00008B; padding: 1em; margin: 1em; background: #EEF}. %{color:darkblue; font-weight: bold; font-size: large}Note:% *Check https://redmine.laas.fr/my/account to confirm that your ssh key is correctly set up ! *Otherwise you will need to replace all the <code class="shell">git clone ssh://git@redmine.laas.fr/ . . .</code> urls below by <code class="shell">git://redmine.laas.fr/ . . .</code> but you will not be able to make commits* 

 h3. Paparazzi framework 

 Make sure that curl is installed: 
 <pre><code class="shell"> 
 apt install curl 
 </code></pre> 

 h4. System dependencies (for Ubuntu 16.04) 

 <pre><code class="shell"> 
 add-apt-repository ppa:team-gcc-arm-embedded/ppa 
 apt update 
 apt install gcc-arm-linux-gnueabi gcc-arm-none-eabi 
 </code></pre> 

 <pre><code class="shell"> 
 add-apt-repository ppa:paparazzi-uav/ppa 
 apt update 
 apt install paparazzi-dev paparazzi-jsbsim 
 </code></pre> 

 h4. System dependencies (for Ubuntu 18.04) 

 <pre><code class="shell"> 
 apt install gcc-arm-none-eabi 
 </code></pre> 

 <pre><code class="shell"> 
 add-apt-repository ppa:paparazzi-uav/ppa 
 apt update 
 apt install paparazzi-dev paparazzi-jsbsim 
 </code></pre> 

 h4. Repository 
 <pre><code class="shell"> 
 git clone -b laas_wip ssh://git@redmine.laas.fr/laas/users/simon/nephelae/nephelae-devel/paparazzi.git paparazzi 
 cd paparazzi 
 make 
 </code></pre> 

 CAMS LAAS-Nephelae software needs the environment variables PAPARAZZI_HOME and PAPARAZZI_SRC to be set to the root paparazzi folder (where you cloned it). Add these lines to your .bashrc, replacing "paparazzi_path" to where you cloned paparazzi repository. 

 <pre><code class="shell"> 
 export PAPARAZZI_HOME="paparazzi_path" 
 export PAPARAZZI_SRC="paparazzi_path" 
 </code></pre> 

 Once Paparazzi installed, launch ./paparazzi. In the paparazzi center, build every aircraft you need to use by selecting an item in the _A/C_ menu and then clicking on the _build_ button. 

 h3. CAMS 

 Install pip3 and update it: 
 <pre><code class="shell"> 
 apt install python3-pip 
 pip3 install --user --upgrade pip 
 </code></pre> 

 If you want to update it for all users: 
 <pre><code class="shell"> 
 pip3 install --upgrade pip 
 </code></pre> 

 Clone and install the core packages (in developer mode with the -e pip3 option): 

 "nephelae_base":https://redmine.laas.fr/projects/nephelae-devel/repository/nephelae_base. 
 <pre><code class="shell"> 
 git clone ssh://git@redmine.laas.fr/laas/users/simon/nephelae/nephelae-devel/nephelae_base.git nephelae_base 
 cd nephelae_base 
 pip3 install --user -e . 
 </code></pre> 

 "nephelae_mesonh":https://redmine.laas.fr/projects/nephelae-devel/repository/nephelae_mesonh. 
 <pre><code class="shell"> 
 git clone ssh://git@redmine.laas.fr/laas/users/simon/nephelae/nephelae-devel/nephelae_mesonh.git nephelae_mesonh 
 cd nephelae_mesonh 
 pip3 install --user -e . 
 </code></pre> 

 "nephelae_paparazzi":https://redmine.laas.fr/projects/nephelae-devel/repository/nephelae_paparazzi. 
 <pre><code class="shell"> 
 git clone ssh://git@redmine.laas.fr/laas/users/simon/nephelae/nephelae-devel/nephelae_paparazzi.git nephelae_paparazzi 
 cd nephelae_paparazzi 
 pip3 install --user -e . 
 </code></pre> 

 "nephelae_planner":https://redmine.laas.fr/projects/nephelae-planner/repository/nephelae_planner. 
 <pre><code class="shell"> 
 git clone ssh://git@redmine.laas.fr/laas/users/simon/nephelae/nephelae-devel/nephelae_planner.git nephelae_planner 
 cd nephelae_planner 
 pip3 install --user -e . 
 </code></pre> 

 Make sure that redis is installed: 
 <pre><code class="shell"> 
 apt install redis-server 
 </code></pre> 

 Clone and install the "nephelae_gui":https://redmine.laas.fr/projects/nephelae-devel/repository/nephelae_gui package in developer mode: 
 <pre><code class="shell"> 
 git clone ssh://git@redmine.laas.fr/laas/users/simon/nephelae/nephelae-devel/nephelae_gui.git nephelae_gui 
 cd nephelae_gui 
 make install 
 </code></pre> 

 To check the installation, launch the server: 

 <pre><code class="shell"> 
 make demo 
 </code></pre> 

 p{border: solid 1px #FF8C00; padding: 1em; margin: 1em; background: #FEE}. %{color:darkorange; font-weight: bold; font-size: large}Warning:% (16/11/2020) <code class="shell">make demo</code> does not work    ! 

 This will (hopefully) start the replay of a UAV flight. 

 You should now be able connect to the graphical user interface with your web browser on "http://0.0.0.0:8000/":http://0.0.0.0:8000/.