Changes between Initial Version and Version 1 of simplefleet


Ignore:
Timestamp:
02/06/19 17:40:29 (5 years ago)
Author:
Sanahuja Guillaume
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • simplefleet

    v1 v1  
     1[[PageOutline]]
     2
     3__NOTE__: For Flair version <= 0.2.1, see [wiki:simplefleet_old this page].
     4
     5= Test du simulateur sur une flotte de 2 drones (avec motion capture) =
     6
     7Cette page explique comment compiler et tester un programme utilisant Fl-AIR et son simulateur. Celui-ci simule 2 drones x8 se déplaçant dans une salle de motion capture. Les drones effectuent une chorégraphie.
     8
     9This demonstration is composed of a unique simulator program, which simulate 2 UAVs. The UAV program is also unique, but it is executed two times (with different command lines argument), one for time for each UAV. An argument is used by the program to distinguish the UAV id (1 or 2).
     10
     11== Compilation ==
     12
     13Les programmes vont être compilés pour la cible et pour le PC. Pour cela le script ''cmake_codelite.sh'' va faire un projet !CodeLite pour le PC dans le répertoire ''build'' et un projet pour la cible dans le répertoire ''build_arm''.
     14* compiler le simulateur
     15{{{
     16$ cd $FLAIR_ROOT/flair-src/demos/SimpleFleet/simulator
     17$ $FLAIR_ROOT/flair-dev/scripts/cmake_codelite.sh
     18$ cd build
     19$ make -j4
     20$ cd ../build_arm
     21$ make -j4
     22}}}
     23* compiler le programme de commande
     24{{{
     25$ cd $FLAIR_ROOT/flair-src/demos/SimpleFleet/uav
     26$ $FLAIR_ROOT/flair-dev/scripts/cmake_codelite.sh
     27$ cd build
     28$ make -j4
     29$ cd ../build_arm
     30$ make -j4
     31}}}
     32
     33__NB__: you can also use the script of this [wiki:compile_all page] to compile the programs.
     34
     35== Exécution des programmes sur le PC ==
     36
     37=== station sol ===
     38
     39{{{
     40$ $FLAIR_ROOT/flair-bin/tools/scripts/launch_flairgcs.sh
     41}}}
     42
     43=== simulator ===
     44
     45Ouvrir un terminal et exécuter le programme via son script:
     46{{{
     47$ cd $FLAIR_ROOT/flair-src/demos/SimpleFleet/simulator/build/bin
     48$ ./simulator_x8.sh
     49}}}
     50
     51Ce script permet de lancer le programmes avec un certain nombre d'arguments.
     52
     53A noter que ce script détecte également la présence ou non de Xenomai afin de lancer le bon programme (temps réel ou non temps réel).
     54
     55=== UAVs ===
     56
     57Ouvrir deux terminaux et exécuter chacun des programmes via leur script:
     58{{{
     59$ cd $FLAIR_ROOT/flair-src/demos/SimpleFleet/uav/build/bin
     60$ ./x8_0.sh
     61}}}
     62et
     63{{{
     64$ cd $FLAIR_ROOT/flair-src/demos/SimpleFleet/uav/build/bin
     65$ ./x8_1.sh
     66}}}
     67Ces scripts,  permettent de lancer les programmes avec un certain nombre d'arguments.
     68
     69A noter que ces scripts détectent également la présence ou non de Xenomai afin de lancer le bon programme (temps réel ou non temps réel).
     70
     71=== DualShock3 controller (optional) ===
     72
     73If you have a DualShock3, you can use it to control the UAV. Make sur you have configured the bluetooth first (see [wiki:setup#SetupbluetoothforDualShock3controlleroptional this page]).
     74{{{
     75$ $FLAIR_ROOT/flair-bin/tools/scripts/dualshock3_local_bt.sh
     76}}}
     77If it is the first time you use it with your computer, plug it first with an USB cable in order to pair it. Then you can use bluetooth connection.
     78
     79If you do not have bluetooth on your computer, you can use the USB connection of the DualShock3 with the following command:
     80{{{
     81$ $FLAIR_ROOT/flair-bin/tools/scripts/dualshock3_local_usb.sh
     82}}}
     83
     84=== réglages ===
     85
     86A l’exécution des programmes, la station sol doit se construire et faire apparaître les réglages et les graphes des programmes.
     87
     88Sur l'onglet x8_0/uav, appuyer sur ''take off'' pour faire décoller les drones.
     89
     90=== Changing 3D environment ===
     91
     92The 3D environment of the simulator is fixed by the launcher script (''simulator_x4.sh''); to change this environment edit the script and change the prameter ''-s''.
     93
     94For exemple, you can change it from
     95{{{
     96-s $FLAIR_ROOT/flair-bin/models/indoor_flight_arena.xml
     97}}}
     98to
     99{{{
     100-s $FLAIR_ROOT/flair-bin/models/city_tile.xml
     101}}}
     102
     103== Exécution des programmes sur la cible ==
     104
     105TODO: à documenter