wiki:simplefleet

Version 6 (modified by Sanahuja Guillaume, 5 years ago) ( diff )

--

NOTE: For Flair version <= 0.2.2, see this page.

Testing Flair on a fleet of 2 uavs example (using motion capture)

This page explains how to compile and test a program using Flair. It simulates 2 UAVs moving in a room with motion capture system. Uav are doing a choregraphy.

This demonstration is composed of a unique simulator program, which simulates 2 UAVs. The UAV program is also unique, but it is executed two times (with different command lines argument), one time for each UAV. An argument is used by the program to distinguish the UAV id (1 or 2).

Compilation

There is various ways to compile/recompile it:

Execution on a PC

ground control station

$ $FLAIR_ROOT/flair-bin/tools/scripts/launch_flairgcs.sh

x4 simulator

Open a terminal and execute the simulator:

$ cd $FLAIR_ROOT/flair-bin/demos/core2-64/SimpleFleet
$ ./simulator_x4.sh

This script, as for ground control station, launches the program with some arguments.

Note that the script also detects if the system uses Xenomai or not, in order to launch the corresponding program version (real time or not).

x8 simulator

Open a terminal and execute the simulator:

$ cd $FLAIR_ROOT/flair-bin/demos/core2-64/SimpleFleet
$ ./simulator_x8.sh

This script, as for ground control station, launches the program with some arguments.

Note that the script also detects if the system uses Xenomai or not, in order to launch the corresponding program version (real time or not).

x4 UAVs

Open 2 terminals and execute each program through its script:

$ cd $FLAIR_ROOT/flair-bin/demos/core2-64/SimpleFleet
$ ./x4_0.sh

and

$ cd $FLAIR_ROOT/flair-bin/demos/core2-64/SimpleFleet
$ ./x4_1.sh

These scripts, as for ground control station, launch the programs with some arguments.

Note that the scripts also detect if the system uses Xenomai or not, in order to launch the corresponding program version (real time or not).

x8 UAVs

Open 2 terminals and execute each program through its script:

$ cd $FLAIR_ROOT/flair-bin/demos/core2-64/SimpleFleet
$ ./x8_0.sh

and

$ cd $FLAIR_ROOT/flair-bin/demos/core2-64/SimpleFleet
$ ./x8_1.sh

These scripts, as for ground control station, launch the programs with some arguments.

Note that the scripts also detect if the system uses Xenomai or not, in order to launch the corresponding program version (real time or not).

DualShock3 controller (optional)

If you have a DualShock3, you can use it to control the UAV. Make sur you have configured the bluetooth first (see this page).

$ $FLAIR_ROOT/flair-bin/tools/scripts/dualshock3_local_bt.sh

If 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.

If you do not have bluetooth on your computer, you can use the USB connection of the DualShock3 with the following command:

$ $FLAIR_ROOT/flair-bin/tools/scripts/dualshock3_local_usb.sh

setup

When executing the programs, the ground control station should construct itself and show setup and graphs for the programs.

In the tab x4_0/uav press the take off button to take off the uavs.

In the simulator window, you can change the camera (if configured) with page up/down keys. You can also press a to change the axis indicator.

Changing 3D environment

The 3D environment of the simulator is fixed by the launcher script (simulator_x8.sh); to change this environment edit the script and change the prameter -s.

For exemple, you can change it from

-s $FLAIR_ROOT/flair-bin/models/indoor_flight_arena.xml

to

-s $FLAIR_ROOT/flair-bin/models/city_tile.xml

Execution on target

TODO

Note: See TracWiki for help on using the wiki.