wiki:circlefollower

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

--

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

Testing simulator on a circle follower example (using motion capture)

This page explains how to compile and test a program using Flair. It simulates an UAV (x4 or x8) and a man mowing in a room with motion capture system. The uav is making a circle around the man, following its position.

Compilation

Execution on a PC

ground control station

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

programs for a x4

On the first terminal (simulator program):

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

On a second one (control program):

$ cd $FLAIR_ROOT/flair-bin/demos/core2-64/CircleFollower
$ ./x4.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).

programs for a x8

On the first terminal (simulator program):

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

On a second one (control program):

$ cd $FLAIR_ROOT/flair-bin/demos/core2-64/CircleFollower
$ ./x8.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 sure 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 uav, and then the start_circle button to start the trajectory.

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