Project

General

Profile

Installation » History » Version 17

Rafael Bailon-Ruiz, 2020-11-16 16:20

1 1 Rafael Bailon-Ruiz
h1. Installation
2
3 16 Rafael Bailon-Ruiz
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 a regular user and you should proceed with the [[Installation#Regular user installation process|Regular user installation process]]. If you are a developer, follow the [[Installation#Developer installation process|Developer installation process]].*
4 1 Rafael Bailon-Ruiz
5 5 Rafael Bailon-Ruiz
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.
6 1 Rafael Bailon-Ruiz
7 5 Rafael Bailon-Ruiz
{{toc}}
8 1 Rafael Bailon-Ruiz
9
h2. Regular user installation process
10
11 2 Rafael Bailon-Ruiz
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.
12 1 Rafael Bailon-Ruiz
13
h3. Paparazzi framework
14
15 2 Rafael Bailon-Ruiz
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.
16 1 Rafael Bailon-Ruiz
17 2 Rafael Bailon-Ruiz
Add the environment variables PAPARAZZI_HOME and PAPARAZZI_SRC to your command line interpreter. The code below should work for most users **if you used the one-liner installation**:
18 1 Rafael Bailon-Ruiz
19
<pre><code class="shell">
20
echo "export PAPARAZZI_HOME=~/paparazzi" >> ~/.bashrc
21
echo "export PAPARAZZI_SRC=~/paparazzi" >> ~/.bashrc
22
</code></pre>
23
24 2 Rafael Bailon-Ruiz
Otherwise, you can find more information "here":https://wiki.paparazziuav.org/wiki/Installation#Environment_Variables.
25 1 Rafael Bailon-Ruiz
26 2 Rafael Bailon-Ruiz
h3. CAMS
27 1 Rafael Bailon-Ruiz
28 2 Rafael Bailon-Ruiz
Make sure that curl is installed:
29
<pre><code class="shell">
30 7 Rafael Bailon-Ruiz
sudo apt install curl
31 2 Rafael Bailon-Ruiz
</code></pre>
32
33 1 Rafael Bailon-Ruiz
Make sure that redis is installed:
34
<pre><code class="shell">
35 7 Rafael Bailon-Ruiz
sudo apt install redis-server
36 6 Rafael Bailon-Ruiz
</code></pre>
37 1 Rafael Bailon-Ruiz
38
Install pip3 and update it:
39
<pre><code class="shell">
40 7 Rafael Bailon-Ruiz
sudo apt install python3-pip
41 1 Rafael Bailon-Ruiz
pip3 install --user --upgrade pip
42
</code></pre>
43
44 2 Rafael Bailon-Ruiz
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.
45 1 Rafael Bailon-Ruiz
46
<pre><code class="shell">
47 14 Rafael Bailon-Ruiz
git clone git://redmine.laas.fr/laas/users/simon/nephelae/nephelae-devel/nephelae_gui.git nephelae_gui
48 1 Rafael Bailon-Ruiz
cd nephelae_gui
49 9 Rafael Bailon-Ruiz
make --trace install pip_options=--user
50 1 Rafael Bailon-Ruiz
</code></pre>
51
52
To check the installation, launch the server:
53
54
<pre><code class="shell">
55
make demo
56
</code></pre>
57
58
This will (hopefully) start the replay of a UAV flight.
59
60 13 Simon Lacroix
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/.
61 1 Rafael Bailon-Ruiz
62 2 Rafael Bailon-Ruiz
h2. Developer installation process
63 1 Rafael Bailon-Ruiz
64 2 Rafael Bailon-Ruiz
h3. System requirements
65
66
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.
67
68
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.
69
70
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.
71
72
The client side application is web-based and should work on a modern web browser. (Only tested with Mozilla Firefox and Safari).
73
74 15 Rafael Bailon-Ruiz
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*
75
76 1 Rafael Bailon-Ruiz
h3. Paparazzi framework
77
78
Make sure that curl is installed:
79
<pre><code class="shell">
80 6 Rafael Bailon-Ruiz
apt install curl
81 1 Rafael Bailon-Ruiz
</code></pre>
82
83
h4. System dependencies (for Ubuntu 16.04)
84
85
<pre><code class="shell">
86
add-apt-repository ppa:team-gcc-arm-embedded/ppa
87 6 Rafael Bailon-Ruiz
apt update
88
apt install gcc-arm-linux-gnueabi gcc-arm-none-eabi
89 1 Rafael Bailon-Ruiz
</code></pre>
90
91
<pre><code class="shell">
92
add-apt-repository ppa:paparazzi-uav/ppa
93 6 Rafael Bailon-Ruiz
apt update
94
apt install paparazzi-dev paparazzi-jsbsim
95 1 Rafael Bailon-Ruiz
</code></pre>
96
97
h4. System dependencies (for Ubuntu 18.04)
98
99
<pre><code class="shell">
100 6 Rafael Bailon-Ruiz
apt install gcc-arm-none-eabi
101 1 Rafael Bailon-Ruiz
</code></pre>
102
103
<pre><code class="shell">
104
add-apt-repository ppa:paparazzi-uav/ppa
105 6 Rafael Bailon-Ruiz
apt update
106
apt install paparazzi-dev paparazzi-jsbsim
107 1 Rafael Bailon-Ruiz
</code></pre>
108
109
h4. Repository
110
<pre><code class="shell">
111 11 Rafael Bailon-Ruiz
git clone -b laas_wip ssh://git@redmine.laas.fr/laas/users/simon/nephelae/nephelae-devel/paparazzi.git paparazzi
112 1 Rafael Bailon-Ruiz
cd paparazzi
113
make
114
</code></pre>
115
116 2 Rafael Bailon-Ruiz
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.
117 1 Rafael Bailon-Ruiz
118
<pre><code class="shell">
119
export PAPARAZZI_HOME="paparazzi_path"
120
export PAPARAZZI_SRC="paparazzi_path"
121
</code></pre>
122
123 2 Rafael Bailon-Ruiz
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.
124 1 Rafael Bailon-Ruiz
125 2 Rafael Bailon-Ruiz
h3. CAMS
126 1 Rafael Bailon-Ruiz
127
Install pip3 and update it:
128
<pre><code class="shell">
129 6 Rafael Bailon-Ruiz
apt install python3-pip
130 1 Rafael Bailon-Ruiz
pip3 install --user --upgrade pip
131
</code></pre>
132
133
If you want to update it for all users:
134
<pre><code class="shell">
135
pip3 install --upgrade pip
136
</code></pre>
137
138 12 Rafael Bailon-Ruiz
Clone and install the core packages (in developer mode with the -e pip3 option):
139 1 Rafael Bailon-Ruiz
140
"nephelae_base":https://redmine.laas.fr/projects/nephelae-devel/repository/nephelae_base.
141
<pre><code class="shell">
142 14 Rafael Bailon-Ruiz
git clone ssh://git@redmine.laas.fr/laas/users/simon/nephelae/nephelae-devel/nephelae_base.git nephelae_base
143 1 Rafael Bailon-Ruiz
cd nephelae_base
144
pip3 install --user -e .
145
</code></pre>
146
147
"nephelae_mesonh":https://redmine.laas.fr/projects/nephelae-devel/repository/nephelae_mesonh.
148
<pre><code class="shell">
149 14 Rafael Bailon-Ruiz
git clone ssh://git@redmine.laas.fr/laas/users/simon/nephelae/nephelae-devel/nephelae_mesonh.git nephelae_mesonh
150 1 Rafael Bailon-Ruiz
cd nephelae_mesonh
151
pip3 install --user -e .
152
</code></pre>
153
154
"nephelae_paparazzi":https://redmine.laas.fr/projects/nephelae-devel/repository/nephelae_paparazzi.
155
<pre><code class="shell">
156 14 Rafael Bailon-Ruiz
git clone ssh://git@redmine.laas.fr/laas/users/simon/nephelae/nephelae-devel/nephelae_paparazzi.git nephelae_paparazzi
157 1 Rafael Bailon-Ruiz
cd nephelae_paparazzi
158
pip3 install --user -e .
159
</code></pre>
160
161 10 Rafael Bailon-Ruiz
"nephelae_planner":https://redmine.laas.fr/projects/nephelae-planner/repository/nephelae_planner.
162
<pre><code class="shell">
163 14 Rafael Bailon-Ruiz
git clone ssh://git@redmine.laas.fr/laas/users/simon/nephelae/nephelae-devel/nephelae_planner.git nephelae_planner
164 10 Rafael Bailon-Ruiz
cd nephelae_planner
165
pip3 install --user -e .
166
</code></pre>
167
168 1 Rafael Bailon-Ruiz
Make sure that redis is installed:
169
<pre><code class="shell">
170 6 Rafael Bailon-Ruiz
apt install redis-server
171 1 Rafael Bailon-Ruiz
</code></pre>
172
173
Clone and install the "nephelae_gui":https://redmine.laas.fr/projects/nephelae-devel/repository/nephelae_gui package in developer mode:
174
<pre><code class="shell">
175 14 Rafael Bailon-Ruiz
git clone ssh://git@redmine.laas.fr/laas/users/simon/nephelae/nephelae-devel/nephelae_gui.git nephelae_gui
176 1 Rafael Bailon-Ruiz
cd nephelae_gui
177 17 Rafael Bailon-Ruiz
make install
178 1 Rafael Bailon-Ruiz
</code></pre>
179
180
To check the installation, launch the server:
181
182
<pre><code class="shell">
183
make demo
184
</code></pre>
185 17 Rafael Bailon-Ruiz
186
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  !
187 1 Rafael Bailon-Ruiz
188
This will (hopefully) start the replay of a UAV flight.
189
190 2 Rafael Bailon-Ruiz
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/.