Index: trunk/demos/CircleFollower/simulator/CMakeLists.txt
===================================================================
--- trunk/demos/CircleFollower/simulator/CMakeLists.txt	(revision 21)
+++ trunk/demos/CircleFollower/simulator/CMakeLists.txt	(revision 21)
@@ -0,0 +1,35 @@
+PROJECT(CircleFollower_simulator)
+cmake_minimum_required(VERSION 2.8)
+
+SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
+SET(FRAMEWORK_USE_SIMULATOR TRUE)
+SET(FRAMEWORK_USE_SIMULATOR_GL TRUE)
+
+include($ENV{IGEP_ROOT}/uav_dev/cmake_modules/GlobalCmakeUAV.cmake)
+include(${FRAMEWORK_USE_FILE})
+
+SET(SRC_FILES
+	${CMAKE_SOURCE_DIR}/src/main.cpp
+)
+
+LINK_DIRECTORIES (
+	${FRAMEWORK_LIBRARY_DIR}
+)
+
+INCLUDE_DIRECTORIES(
+	${FRAMEWORK_INCLUDE_DIR}
+)
+
+#real time executable
+ADD_EXECUTABLE(${PROJECT_NAME}_rt
+	${SRC_FILES}
+)
+
+TARGET_LINK_LIBRARIES(${PROJECT_NAME}_rt ${FRAMEWORK_LIBRARIES_RT})
+
+#non real time executable
+ADD_EXECUTABLE(${PROJECT_NAME}_nrt
+	${SRC_FILES}
+)
+
+TARGET_LINK_LIBRARIES(${PROJECT_NAME}_nrt ${FRAMEWORK_LIBRARIES_NRT})
Index: trunk/demos/CircleFollower/simulator/build
===================================================================
--- trunk/demos/CircleFollower/simulator/build	(revision 21)
+++ trunk/demos/CircleFollower/simulator/build	(revision 21)
@@ -0,0 +1,1 @@
+link build_x86_64
Index: trunk/demos/CircleFollower/simulator/build_arm/bin/reglages.xml
===================================================================
--- trunk/demos/CircleFollower/simulator/build_arm/bin/reglages.xml	(revision 21)
+++ trunk/demos/CircleFollower/simulator/build_arm/bin/reglages.xml	(revision 21)
@@ -0,0 +1,243 @@
+<!DOCTYPE remote_ui_xml>
+<root name="interface">
+ <Tab name="simu">
+  <TabWidget name="simu">
+   <Tab name="Reglages">
+    <DoubleSpinBox value="0.001" name="Tech (s):"/>
+    <DoubleSpinBox value="1" name="masse (kg):"/>
+    <DoubleSpinBox value="0.2" name="bras (m):"/>
+    <DoubleSpinBox value="0.05" name="k_driver:"/>
+    <DoubleSpinBox value="0.001" name="k_mot:"/>
+    <DoubleSpinBox value="0.01" name="c_mot:"/>
+    <DoubleSpinBox value="0.05" name="f_air_vert:"/>
+    <DoubleSpinBox value="0.5" name="f_air_lat:"/>
+    <DoubleSpinBox value="0.006" name="j_roll:"/>
+    <DoubleSpinBox value="0.006" name="j_pitch:"/>
+    <PushButton value="0" name="reset"/>
+   </Tab>
+  </TabWidget>
+ </Tab>
+ <Tab name="x4">
+  <PushButton value="0" name="kill"/>
+  <PushButton value="0" name="start_log"/>
+  <PushButton value="0" name="stop_log"/>
+  <PushButton value="0" name="take_off"/>
+  <PushButton value="0" name="landing"/>
+ </Tab>
+ <Tab name="SRF08">
+  <TabWidget name="SRF08">
+   <Tab name="Reglages">
+    <GroupBox name="SRF08">
+     <SpinBox value="8" name="gain:"/>
+     <SpinBox value="46" name="range:"/>
+    </GroupBox>
+    <GridLayout name="setup">
+     <GroupBox name="Passe bas">
+      <DoubleSpinBox value="0" name="periode (s), 0 for auto:"/>
+      <DoubleSpinBox value="1" name="fc (Hz):"/>
+     </GroupBox>
+     <GroupBox name="Passe bas v">
+      <DoubleSpinBox value="0" name="periode (s), 0 for auto:"/>
+      <DoubleSpinBox value="1" name="fc (Hz):"/>
+     </GroupBox>
+     <GroupBox name="Vz">
+      <DoubleSpinBox value="0" name="periode (s), 0 for auto:"/>
+     </GroupBox>
+     <GroupBox name="alt cons">
+      <DoubleSpinBox value="0" name="periode (s), 0 for auto:"/>
+      <DoubleSpinBox value="0.4" name="velocity max (absolute):"/>
+      <DoubleSpinBox value="0.2" name="acceleration (absolute):"/>
+     </GroupBox>
+     <GroupBox name="decollage">
+      <DoubleSpinBox value="1.1" name="alt decollage (m):"/>
+      <DoubleSpinBox value="0" name="alt atterissage (m):"/>
+     </GroupBox>
+    </GridLayout>
+   </Tab>
+   <Tab name="Mesures">
+    <DataPlot name="z">
+     <Setup period="100" enabled="1"/>
+    </DataPlot>
+    <DataPlot name="vz">
+     <Setup period="100" enabled="1"/>
+    </DataPlot>
+   </Tab>
+  </TabWidget>
+ </Tab>
+ <Tab name="3dmgx3">
+  <TabWidget name="3dmgx3">
+   <Tab name="Reglages">
+    <GroupBox name="3dmgx3">
+     <PushButton value="0" name="gyros bias"/>
+     <SpinBox value="100" name="data rate (Hz):"/>
+     <SpinBox value="1" name="gyro and acc filter win size:"/>
+     <SpinBox value="1" name="mag filter win size:"/>
+     <SpinBox value="1" name="up compensation (s):"/>
+     <SpinBox value="1" name="north compensation (s):"/>
+     <CheckBox value="true" name="enable Coning&amp;Sculling:"/>
+     <CheckBox value="true" name="disable magnetometer:"/>
+     <CheckBox value="true" name="disable magnetic north compensation:"/>
+     <CheckBox value="true" name="disable gravity compensation:"/>
+    </GroupBox>
+    <GroupBox name="post rotation">
+     <DoubleSpinBox value="0" name="valeur (degre):"/>
+     <ComboBox value="0" name="axe:"/>
+    </GroupBox>
+    <GridLayout name="setup"/>
+   </Tab>
+   <Tab name="Mesures">
+    <DataPlot name="roll">
+     <Setup period="100" enabled="1"/>
+    </DataPlot>
+    <DataPlot name="pitch">
+     <Setup period="100" enabled="1"/>
+    </DataPlot>
+    <DataPlot name="yaw">
+     <Setup period="100" enabled="1"/>
+    </DataPlot>
+    <DataPlot name="droll">
+     <Setup period="100" enabled="1"/>
+    </DataPlot>
+    <DataPlot name="dpitch">
+     <Setup period="100" enabled="1"/>
+    </DataPlot>
+    <DataPlot name="dyaw">
+     <Setup period="100" enabled="1"/>
+    </DataPlot>
+   </Tab>
+  </TabWidget>
+ </Tab>
+ <Tab name="loi de commande">
+  <TabWidget name="loi">
+   <Tab name="Reglages">
+    <GroupBox name="uroll">
+     <DoubleSpinBox value="0" name="periode (s), 0 for auto:"/>
+     <DoubleSpinBox value="500000" name="kp:"/>
+     <DoubleSpinBox value="1e+06" name="ki:"/>
+     <DoubleSpinBox value="50000" name="kd:"/>
+    </GroupBox>
+    <GroupBox name="upitch">
+     <DoubleSpinBox value="0" name="periode (s), 0 for auto:"/>
+     <DoubleSpinBox value="500000" name="kp:"/>
+     <DoubleSpinBox value="1e+06" name="ki:"/>
+     <DoubleSpinBox value="50000" name="kd:"/>
+    </GroupBox>
+    <GroupBox name="uyaw">
+     <DoubleSpinBox value="0" name="periode (s), 0 for auto:"/>
+     <DoubleSpinBox value="20000" name="kp:"/>
+     <DoubleSpinBox value="0" name="ki:"/>
+     <DoubleSpinBox value="5000" name="kd:"/>
+    </GroupBox>
+    <GroupBox name="ugaz">
+     <DoubleSpinBox value="0" name="periode (s), 0 for auto:"/>
+     <DoubleSpinBox value="500000" name="kp:"/>
+     <DoubleSpinBox value="100000" name="ki:"/>
+     <DoubleSpinBox value="200000" name="kd:"/>
+    </GroupBox>
+   </Tab>
+   <Tab name="Graphes">
+    <DataPlot name="uroll">
+     <Setup period="100" enabled="1"/>
+    </DataPlot>
+    <DataPlot name="upitch">
+     <Setup period="100" enabled="1"/>
+    </DataPlot>
+    <DataPlot name="uyaw">
+     <Setup period="100" enabled="1"/>
+    </DataPlot>
+    <DataPlot name="ugaz">
+     <Setup period="100" enabled="1"/>
+    </DataPlot>
+   </Tab>
+  </TabWidget>
+ </Tab>
+ <Tab name="ps3eye">
+  <TabWidget name="ps3eye">
+   <Tab name="Reglages">
+    <GroupBox name="ps3eye">
+     <DoubleSpinBox value="0" name="gain:"/>
+     <DoubleSpinBox value="0" name="exposure:"/>
+     <DoubleSpinBox value="0" name="bright:"/>
+     <DoubleSpinBox value="0" name="contrast:"/>
+     <DoubleSpinBox value="0" name="hue:"/>
+     <DoubleSpinBox value="0" name="sharpness:"/>
+     <CheckBox value="true" name="autogain:"/>
+     <CheckBox value="true" name="awb:"/>
+     <Picture name="image source">
+      <Setup period="200" enabled="0"/>
+     </Picture>
+    </GroupBox>
+    <GridLayout name="setup">
+     <GroupBox name="flux optique">
+      <SpinBox value="64" name="max features:"/>
+     </GroupBox>
+    </GridLayout>
+   </Tab>
+   <Tab name="flux optique">
+    <DataPlot name="vx">
+     <Setup period="100" enabled="1"/>
+    </DataPlot>
+    <DataPlot name="vy">
+     <Setup period="100" enabled="1"/>
+    </DataPlot>
+   </Tab>
+  </TabWidget>
+ </Tab>
+ <Tab name="moteurs">
+  <TabWidget name="moteurs">
+   <Tab name="Reglages">
+    <GroupBox name="moteurs">
+     <SpinBox value="0" name="min:"/>
+     <SpinBox value="2000" name="max:"/>
+     <SpinBox value="0" name="test value:"/>
+     <SpinBox value="950" name="valeur demarrage:"/>
+     <DoubleSpinBox value="0.1" name="pas decollage:"/>
+     <ComboBox value="0" name="avant gauche:"/>
+     <PushButton value="0" name="test avg"/>
+     <ComboBox value="1" name="avant droite:"/>
+     <PushButton value="0" name="test avd"/>
+     <ComboBox value="2" name="arriere gauche:"/>
+     <PushButton value="0" name="test arg"/>
+     <ComboBox value="3" name="arriere droite:"/>
+     <PushButton value="0" name="test ard"/>
+     <ComboBox value="0" name="pas helice avant gauche:"/>
+    </GroupBox>
+   </Tab>
+  </TabWidget>
+ </Tab>
+ <Tab name="dualshock3">
+  <TabWidget name="dualshock3">
+   <Tab name="Reglages">
+    <GroupBox name="consignes joy">
+     <DoubleSpinBox value="20" name="debattement roll (deg)"/>
+     <DoubleSpinBox value="20" name="debattement pitch (deg)"/>
+     <DoubleSpinBox value="90" name="debattement dyaw (deg/s)"/>
+     <DoubleSpinBox value="0.7" name="debattement dz (m/s)"/>
+     <SpinBox value="10" name="trim:"/>
+     <Label name="trim roll"/>
+     <PushButton value="0" name="reset roll trim"/>
+     <Label name="trim pitch"/>
+     <PushButton value="0" name="reset pitch trim"/>
+    </GroupBox>
+    <GroupBox name="dualshock3">
+     <SpinBox value="10" name="dead zone:"/>
+     <Label name="batterie"/>
+    </GroupBox>
+   </Tab>
+   <Tab name="Mesures">
+    <DataPlot name="roll">
+     <Setup period="100" enabled="1"/>
+    </DataPlot>
+    <DataPlot name="pitch">
+     <Setup period="100" enabled="1"/>
+    </DataPlot>
+    <DataPlot name="yaw">
+     <Setup period="100" enabled="1"/>
+    </DataPlot>
+    <DataPlot name="gaz">
+     <Setup period="100" enabled="1"/>
+    </DataPlot>
+   </Tab>
+  </TabWidget>
+ </Tab>
+</root>
Index: trunk/demos/CircleFollower/simulator/build_i686/bin/setup_x4.xml
===================================================================
--- trunk/demos/CircleFollower/simulator/build_i686/bin/setup_x4.xml	(revision 21)
+++ trunk/demos/CircleFollower/simulator/build_i686/bin/setup_x4.xml	(revision 21)
@@ -0,0 +1,102 @@
+<?xml version="1.0"?>
+<!DOCTYPE remote_ui_xml>
+<root name="interface">
+  <TabWidget name="Main_TabWidget">
+ <Tab name="x4_0">
+  <TabWidget name="tabs">
+   <Tab name="sampling">
+    <DoubleSpinBox value="0.001" name="Tech (s):"/>
+   </Tab>
+   <Tab name="optitrack">
+    <CheckBox value="1" name="enabled"/>
+   </Tab>
+   <Tab name="init">
+    <DoubleSpinBox value="-1.5" name="x:"/>
+    <DoubleSpinBox value="0" name="y:"/>
+    <DoubleSpinBox value="-3.5" name="z:"/>
+    <SpinBox value="90" name="yaw (deg):"/>
+   <Vector3DSpinBox name="position" value_x="-1.5" value_y="0" value_z="-1"/></Tab>
+   <Tab name="model">
+    <DoubleSpinBox value="1.2" name="mass (kg):"/>
+    <DoubleSpinBox value="0.2" name="arm length (m):"/>
+    <DoubleSpinBox value="0.001" name="k_mot:"/>
+    <DoubleSpinBox value="0.001" name="c_mot:"/>
+    <DoubleSpinBox value="0.01" name="f_air_vert:"/>
+    <DoubleSpinBox value="0.4" name="f_air_lat:"/>
+    <DoubleSpinBox value="0.006" name="j_roll:"/>
+    <DoubleSpinBox value="0.006" name="j_pitch:"/>
+    <DoubleSpinBox value="0.1" name="j_yaw:"/>
+   </Tab>
+   <Tab name="us">
+    <GroupBox name="position">
+     <DoubleSpinBox value="0" name="x:"/>
+     <DoubleSpinBox value="0" name="y:"/>
+     <DoubleSpinBox value="0.04" name="z:"/>
+    </GroupBox>
+    <GroupBox name="direction">
+     <DoubleSpinBox value="0" name="x:"/>
+     <DoubleSpinBox value="0" name="y:"/>
+     <DoubleSpinBox value="1" name="z:"/>
+    </GroupBox>
+    <DoubleSpinBox value="6" name="range:"/>
+   <Vector3DSpinBox name="position" value_x="0.00" value_y="0.00" value_z="0.04"/><Vector3DSpinBox name="direction" value_x="0.00" value_y="0.00" value_z="1.00"/></Tab>
+   <Tab name="bottom camera">
+    <GroupBox name="position">
+     <DoubleSpinBox value="0" name="x:"/>
+     <DoubleSpinBox value="0" name="y:"/>
+     <DoubleSpinBox value="0" name="z:"/>
+    </GroupBox>
+    <GroupBox name="direction">
+     <DoubleSpinBox value="0" name="x:"/>
+     <DoubleSpinBox value="0" name="y:"/>
+     <DoubleSpinBox value="1" name="z:"/>
+    </GroupBox>
+    <GroupBox name="up">
+     <DoubleSpinBox value="1" name="x:"/>
+     <DoubleSpinBox value="0" name="y:"/>
+     <DoubleSpinBox value="0" name="z:"/>
+    </GroupBox>
+    <DoubleSpinBox value="70" name="fov:"/>
+   <Vector3DSpinBox name="position" value_x="0.00" value_y="0.00" value_z="0.00"/><Vector3DSpinBox name="direction" value_x="0.00" value_y="0.00" value_z="1.00"/><Vector3DSpinBox name="up" value_x="1.00" value_y="0.00" value_z="0.00"/></Tab>
+   <Tab name="front camera">
+    <GroupBox name="position">
+     <DoubleSpinBox value="0" name="x:"/>
+     <DoubleSpinBox value="0" name="y:"/>
+     <DoubleSpinBox value="0" name="z:"/>
+    </GroupBox>
+    <GroupBox name="direction">
+     <DoubleSpinBox value="1" name="x:"/>
+     <DoubleSpinBox value="0" name="y:"/>
+     <DoubleSpinBox value="0" name="z:"/>
+    </GroupBox>
+    <GroupBox name="up">
+     <DoubleSpinBox value="0" name="x:"/>
+     <DoubleSpinBox value="0" name="y:"/>
+     <DoubleSpinBox value="-1" name="z:"/>
+    </GroupBox>
+    <DoubleSpinBox value="70" name="fov:"/>
+   <Vector3DSpinBox name="position" value_x="0" value_y="0" value_z="0"/><Vector3DSpinBox name="direction" value_x="1.00" value_y="0.00" value_z="0.00"/><Vector3DSpinBox name="up" value_x="0.00" value_y="0.00" value_z="-1.00"/></Tab>
+  </TabWidget>
+ </Tab>
+ <Tab name="target">
+  <TabWidget name="tabs">
+   <Tab name="sampling">
+    <DoubleSpinBox value="0.02" name="Tech (s):"/>
+   </Tab>
+   <Tab name="optitrack">
+    <CheckBox value="1" name="enabled"/>
+   </Tab>
+   <Tab name="init">
+    <DoubleSpinBox value="-1.5" name="x:"/>
+    <DoubleSpinBox value="1" name="y:"/>
+    <DoubleSpinBox value="0" name="z:"/>
+    <SpinBox value="90" name="yaw (deg):"/>
+   <Vector3DSpinBox name="position" value_x="-1.5" value_y="1" value_z="0"/></Tab>
+   <Tab name="model">
+    <DoubleSpinBox value="1.3" name="translational speed (m/s):"/>
+    <DoubleSpinBox value="60" name="rotational speed (deg/s):"/>
+   </Tab>
+  </TabWidget>
+</Tab>
+  </TabWidget>
+<TabWidget name="App_TabWidget"><Tab name="simulator"><PushButton name="save config on target" value="1"/></Tab></TabWidget><PushButton name="save config on target (simulator)" value="1"/></root>
Index: trunk/demos/CircleFollower/simulator/build_i686/bin/setup_x8.xml
===================================================================
--- trunk/demos/CircleFollower/simulator/build_i686/bin/setup_x8.xml	(revision 21)
+++ trunk/demos/CircleFollower/simulator/build_i686/bin/setup_x8.xml	(revision 21)
@@ -0,0 +1,106 @@
+<?xml version="1.0"?>
+<!DOCTYPE remote_ui_xml>
+<root name="interface">
+  <TabWidget name="Main_TabWidget">
+ <Tab name="x8_0">
+  <TabWidget name="tabs">
+   <Tab name="sampling">
+    <DoubleSpinBox value="0.001" name="Tech (s):"/>
+   </Tab>
+   <Tab name="optitrack">
+    <CheckBox value="1" name="enabled"/>
+   </Tab>
+   <Tab name="init">
+    <DoubleSpinBox value="-1.5" name="x:"/>
+    <DoubleSpinBox value="0" name="y:"/>
+    <DoubleSpinBox value="-1.2" name="z:"/>
+    <SpinBox value="90" name="yaw (deg):"/>
+   <Vector3DSpinBox name="position" value_x="-1.50" value_y="0.00" value_z="-1.00"/></Tab>
+   <Tab name="model">
+    <DoubleSpinBox value="1.6" name="mass (kg):"/>
+    <DoubleSpinBox value="0.2" name="arm length (m):"/>
+    <DoubleSpinBox value="0" name="position G (m):"/>
+    <DoubleSpinBox value="0.001" name="k_mot:"/>
+    <DoubleSpinBox value="0.001" name="c_mot:"/>
+    <DoubleSpinBox value="0.01" name="f_air_vert:"/>
+    <DoubleSpinBox value="0.4" name="f_air_lat:"/>
+    <DoubleSpinBox value="0.006" name="j_roll:"/>
+    <DoubleSpinBox value="0.006" name="j_pitch:"/>
+    <DoubleSpinBox value="0.1" name="j_yaw:"/>
+    <DoubleSpinBox value="0" name="j_r:"/>
+    <DoubleSpinBox value="0.72" name="sigma:"/>
+    <DoubleSpinBox value="1" name="S:"/>
+   </Tab>
+   <Tab name="us">
+    <GroupBox name="position">
+     <DoubleSpinBox value="0" name="x:"/>
+     <DoubleSpinBox value="0" name="y:"/>
+     <DoubleSpinBox value="0.04" name="z:"/>
+    </GroupBox>
+    <GroupBox name="direction">
+     <DoubleSpinBox value="0" name="x:"/>
+     <DoubleSpinBox value="0" name="y:"/>
+     <DoubleSpinBox value="1" name="z:"/>
+    </GroupBox>
+    <DoubleSpinBox value="6" name="range:"/>
+   <Vector3DSpinBox name="position" value_x="0.00" value_y="0.00" value_z="0.04"/><Vector3DSpinBox name="direction" value_x="0.00" value_y="0.00" value_z="1.00"/></Tab>
+   <Tab name="bottom camera">
+    <GroupBox name="position">
+     <DoubleSpinBox value="0" name="x:"/>
+     <DoubleSpinBox value="0" name="y:"/>
+     <DoubleSpinBox value="0" name="z:"/>
+    </GroupBox>
+    <GroupBox name="direction">
+     <DoubleSpinBox value="0" name="x:"/>
+     <DoubleSpinBox value="0" name="y:"/>
+     <DoubleSpinBox value="1" name="z:"/>
+    </GroupBox>
+    <GroupBox name="up">
+     <DoubleSpinBox value="1" name="x:"/>
+     <DoubleSpinBox value="0" name="y:"/>
+     <DoubleSpinBox value="0" name="z:"/>
+    </GroupBox>
+    <DoubleSpinBox value="70" name="fov:"/>
+   <Vector3DSpinBox name="position" value_x="0" value_y="0" value_z="0"/><Vector3DSpinBox name="direction" value_x="0.00" value_y="0.00" value_z="1.00"/><Vector3DSpinBox name="up" value_x="1.00" value_y="0.00" value_z="0.00"/></Tab>
+   <Tab name="front camera">
+    <GroupBox name="position">
+     <DoubleSpinBox value="0" name="x:"/>
+     <DoubleSpinBox value="0" name="y:"/>
+     <DoubleSpinBox value="0" name="z:"/>
+    </GroupBox>
+    <GroupBox name="direction">
+     <DoubleSpinBox value="1" name="x:"/>
+     <DoubleSpinBox value="0" name="y:"/>
+     <DoubleSpinBox value="0" name="z:"/>
+    </GroupBox>
+    <GroupBox name="up">
+     <DoubleSpinBox value="0" name="x:"/>
+     <DoubleSpinBox value="0" name="y:"/>
+     <DoubleSpinBox value="-1" name="z:"/>
+    </GroupBox>
+    <DoubleSpinBox value="70" name="fov:"/>
+   <Vector3DSpinBox name="position" value_x="0" value_y="0" value_z="0"/><Vector3DSpinBox name="direction" value_x="1.00" value_y="0.00" value_z="0.00"/><Vector3DSpinBox name="up" value_x="0.00" value_y="0.00" value_z="-1.00"/></Tab>
+  </TabWidget>
+ </Tab>
+ <Tab name="target">
+  <TabWidget name="tabs">
+   <Tab name="sampling">
+    <DoubleSpinBox value="0.02" name="Tech (s):"/>
+   </Tab>
+   <Tab name="optitrack">
+    <CheckBox value="1" name="enabled"/>
+   </Tab>
+   <Tab name="init">
+    <DoubleSpinBox value="0" name="x:"/>
+    <DoubleSpinBox value="0" name="y:"/>
+    <DoubleSpinBox value="0" name="z:"/>
+    <SpinBox value="90" name="yaw (deg):"/>
+   <Vector3DSpinBox name="position" value_x="-1.50" value_y="1.00" value_z="0.00"/></Tab>
+   <Tab name="model">
+    <DoubleSpinBox value="1.3" name="translational speed (m/s):"/>
+    <DoubleSpinBox value="60" name="rotational speed (deg/s):"/>
+   </Tab>
+  </TabWidget>
+ </Tab>
+</TabWidget>
+<TabWidget name="App_TabWidget"><Tab name="simulator"><PushButton name="save config on target" value="1"/></Tab></TabWidget><PushButton name="save config on target (simulator)" value="1"/></root>
Index: trunk/demos/CircleFollower/simulator/build_i686/bin/simulator_x4.sh
===================================================================
--- trunk/demos/CircleFollower/simulator/build_i686/bin/simulator_x4.sh	(revision 21)
+++ trunk/demos/CircleFollower/simulator/build_i686/bin/simulator_x4.sh	(revision 21)
@@ -0,0 +1,11 @@
+#! /bin/bash
+
+. $IGEP_ROOT/uav_dev/bin/noarch/ubuntu_cgroup_hack.sh
+
+if [ -f /proc/xenomai/version ];then
+	EXEC=./CircleFollower_simulator_rt
+else
+	EXEC=./CircleFollower_simulator_nrt
+fi
+
+$EXEC -n x4_0 -t x4 -a 127.0.0.1 -p 9000 -x setup_x4.xml -o 10 -m $IGEP_ROOT/uav_dev/media -s $IGEP_ROOT/uav_dev/media/optitrack_b122.xml
Index: trunk/demos/CircleFollower/simulator/build_i686/bin/simulator_x8.sh
===================================================================
--- trunk/demos/CircleFollower/simulator/build_i686/bin/simulator_x8.sh	(revision 21)
+++ trunk/demos/CircleFollower/simulator/build_i686/bin/simulator_x8.sh	(revision 21)
@@ -0,0 +1,11 @@
+#! /bin/bash
+
+. $IGEP_ROOT/uav_dev/bin/noarch/ubuntu_cgroup_hack.sh
+
+if [ -f /proc/xenomai/version ];then
+	EXEC=./CircleFollower_simulator_rt
+else
+	EXEC=./CircleFollower_simulator_nrt
+fi
+
+$EXEC -n x8_0 -t x8 -a 127.0.0.1 -p 9000 -x setup_x8.xml -o 10 -m $IGEP_ROOT/uav_dev/media -s $IGEP_ROOT/uav_dev/media/optitrack_b122.xml
Index: trunk/demos/CircleFollower/simulator/build_x86_64/bin/setup_x4.xml
===================================================================
--- trunk/demos/CircleFollower/simulator/build_x86_64/bin/setup_x4.xml	(revision 21)
+++ trunk/demos/CircleFollower/simulator/build_x86_64/bin/setup_x4.xml	(revision 21)
@@ -0,0 +1,102 @@
+<?xml version="1.0"?>
+<!DOCTYPE remote_ui_xml>
+<root name="interface">
+  <TabWidget name="Main_TabWidget">
+ <Tab name="x4_0">
+  <TabWidget name="tabs">
+   <Tab name="sampling">
+    <DoubleSpinBox value="0.001" name="Tech (s):"/>
+   </Tab>
+   <Tab name="optitrack">
+    <CheckBox value="1" name="enabled"/>
+   </Tab>
+   <Tab name="init">
+    <DoubleSpinBox value="-1.5" name="x:"/>
+    <DoubleSpinBox value="0" name="y:"/>
+    <DoubleSpinBox value="-3.5" name="z:"/>
+    <SpinBox value="90" name="yaw (deg):"/>
+   <Vector3DSpinBox name="position" value_x="-1.5" value_y="0" value_z="-1"/></Tab>
+   <Tab name="model">
+    <DoubleSpinBox value="1.2" name="mass (kg):"/>
+    <DoubleSpinBox value="0.2" name="arm length (m):"/>
+    <DoubleSpinBox value="0.001" name="k_mot:"/>
+    <DoubleSpinBox value="0.001" name="c_mot:"/>
+    <DoubleSpinBox value="0.01" name="f_air_vert:"/>
+    <DoubleSpinBox value="0.4" name="f_air_lat:"/>
+    <DoubleSpinBox value="0.006" name="j_roll:"/>
+    <DoubleSpinBox value="0.006" name="j_pitch:"/>
+    <DoubleSpinBox value="0.1" name="j_yaw:"/>
+   </Tab>
+   <Tab name="us">
+    <GroupBox name="position">
+     <DoubleSpinBox value="0" name="x:"/>
+     <DoubleSpinBox value="0" name="y:"/>
+     <DoubleSpinBox value="0.04" name="z:"/>
+    </GroupBox>
+    <GroupBox name="direction">
+     <DoubleSpinBox value="0" name="x:"/>
+     <DoubleSpinBox value="0" name="y:"/>
+     <DoubleSpinBox value="1" name="z:"/>
+    </GroupBox>
+    <DoubleSpinBox value="6" name="range:"/>
+   <Vector3DSpinBox name="position" value_x="0.00" value_y="0.00" value_z="0.04"/><Vector3DSpinBox name="direction" value_x="0.00" value_y="0.00" value_z="1.00"/></Tab>
+   <Tab name="bottom camera">
+    <GroupBox name="position">
+     <DoubleSpinBox value="0" name="x:"/>
+     <DoubleSpinBox value="0" name="y:"/>
+     <DoubleSpinBox value="0" name="z:"/>
+    </GroupBox>
+    <GroupBox name="direction">
+     <DoubleSpinBox value="0" name="x:"/>
+     <DoubleSpinBox value="0" name="y:"/>
+     <DoubleSpinBox value="1" name="z:"/>
+    </GroupBox>
+    <GroupBox name="up">
+     <DoubleSpinBox value="1" name="x:"/>
+     <DoubleSpinBox value="0" name="y:"/>
+     <DoubleSpinBox value="0" name="z:"/>
+    </GroupBox>
+    <DoubleSpinBox value="70" name="fov:"/>
+   <Vector3DSpinBox name="position" value_x="0.00" value_y="0.00" value_z="0.00"/><Vector3DSpinBox name="direction" value_x="0.00" value_y="0.00" value_z="1.00"/><Vector3DSpinBox name="up" value_x="1.00" value_y="0.00" value_z="0.00"/></Tab>
+   <Tab name="front camera">
+    <GroupBox name="position">
+     <DoubleSpinBox value="0" name="x:"/>
+     <DoubleSpinBox value="0" name="y:"/>
+     <DoubleSpinBox value="0" name="z:"/>
+    </GroupBox>
+    <GroupBox name="direction">
+     <DoubleSpinBox value="1" name="x:"/>
+     <DoubleSpinBox value="0" name="y:"/>
+     <DoubleSpinBox value="0" name="z:"/>
+    </GroupBox>
+    <GroupBox name="up">
+     <DoubleSpinBox value="0" name="x:"/>
+     <DoubleSpinBox value="0" name="y:"/>
+     <DoubleSpinBox value="-1" name="z:"/>
+    </GroupBox>
+    <DoubleSpinBox value="70" name="fov:"/>
+   <Vector3DSpinBox name="position" value_x="0" value_y="0" value_z="0"/><Vector3DSpinBox name="direction" value_x="1.00" value_y="0.00" value_z="0.00"/><Vector3DSpinBox name="up" value_x="0.00" value_y="0.00" value_z="-1.00"/></Tab>
+  </TabWidget>
+ </Tab>
+ <Tab name="target">
+  <TabWidget name="tabs">
+   <Tab name="sampling">
+    <DoubleSpinBox value="0.02" name="Tech (s):"/>
+   </Tab>
+   <Tab name="optitrack">
+    <CheckBox value="1" name="enabled"/>
+   </Tab>
+   <Tab name="init">
+    <DoubleSpinBox value="-1.5" name="x:"/>
+    <DoubleSpinBox value="1" name="y:"/>
+    <DoubleSpinBox value="0" name="z:"/>
+    <SpinBox value="90" name="yaw (deg):"/>
+   <Vector3DSpinBox name="position" value_x="-1.5" value_y="1" value_z="0"/></Tab>
+   <Tab name="model">
+    <DoubleSpinBox value="1.3" name="translational speed (m/s):"/>
+    <DoubleSpinBox value="60" name="rotational speed (deg/s):"/>
+   </Tab>
+  </TabWidget>
+</Tab>
+  </TabWidget>
+<TabWidget name="App_TabWidget"><Tab name="simulator"><PushButton name="save config on target" value="1"/></Tab></TabWidget><PushButton name="save config on target (simulator)" value="1"/></root>
Index: trunk/demos/CircleFollower/simulator/build_x86_64/bin/setup_x8.xml
===================================================================
--- trunk/demos/CircleFollower/simulator/build_x86_64/bin/setup_x8.xml	(revision 21)
+++ trunk/demos/CircleFollower/simulator/build_x86_64/bin/setup_x8.xml	(revision 21)
@@ -0,0 +1,106 @@
+<?xml version="1.0"?>
+<!DOCTYPE remote_ui_xml>
+<root name="interface">
+  <TabWidget name="Main_TabWidget">
+ <Tab name="x8_0">
+  <TabWidget name="tabs">
+   <Tab name="sampling">
+    <DoubleSpinBox value="0.001" name="Tech (s):"/>
+   </Tab>
+   <Tab name="optitrack">
+    <CheckBox value="1" name="enabled"/>
+   </Tab>
+   <Tab name="init">
+    <DoubleSpinBox value="-1.5" name="x:"/>
+    <DoubleSpinBox value="0" name="y:"/>
+    <DoubleSpinBox value="-1.2" name="z:"/>
+    <SpinBox value="90" name="yaw (deg):"/>
+   <Vector3DSpinBox name="position" value_x="-1.50" value_y="0.00" value_z="-1.00"/></Tab>
+   <Tab name="model">
+    <DoubleSpinBox value="1.6" name="mass (kg):"/>
+    <DoubleSpinBox value="0.2" name="arm length (m):"/>
+    <DoubleSpinBox value="0" name="position G (m):"/>
+    <DoubleSpinBox value="0.001" name="k_mot:"/>
+    <DoubleSpinBox value="0.001" name="c_mot:"/>
+    <DoubleSpinBox value="0.01" name="f_air_vert:"/>
+    <DoubleSpinBox value="0.4" name="f_air_lat:"/>
+    <DoubleSpinBox value="0.006" name="j_roll:"/>
+    <DoubleSpinBox value="0.006" name="j_pitch:"/>
+    <DoubleSpinBox value="0.1" name="j_yaw:"/>
+    <DoubleSpinBox value="0" name="j_r:"/>
+    <DoubleSpinBox value="0.72" name="sigma:"/>
+    <DoubleSpinBox value="1" name="S:"/>
+   </Tab>
+   <Tab name="us">
+    <GroupBox name="position">
+     <DoubleSpinBox value="0" name="x:"/>
+     <DoubleSpinBox value="0" name="y:"/>
+     <DoubleSpinBox value="0.04" name="z:"/>
+    </GroupBox>
+    <GroupBox name="direction">
+     <DoubleSpinBox value="0" name="x:"/>
+     <DoubleSpinBox value="0" name="y:"/>
+     <DoubleSpinBox value="1" name="z:"/>
+    </GroupBox>
+    <DoubleSpinBox value="6" name="range:"/>
+   <Vector3DSpinBox name="position" value_x="0.00" value_y="0.00" value_z="0.04"/><Vector3DSpinBox name="direction" value_x="0.00" value_y="0.00" value_z="1.00"/></Tab>
+   <Tab name="bottom camera">
+    <GroupBox name="position">
+     <DoubleSpinBox value="0" name="x:"/>
+     <DoubleSpinBox value="0" name="y:"/>
+     <DoubleSpinBox value="0" name="z:"/>
+    </GroupBox>
+    <GroupBox name="direction">
+     <DoubleSpinBox value="0" name="x:"/>
+     <DoubleSpinBox value="0" name="y:"/>
+     <DoubleSpinBox value="1" name="z:"/>
+    </GroupBox>
+    <GroupBox name="up">
+     <DoubleSpinBox value="1" name="x:"/>
+     <DoubleSpinBox value="0" name="y:"/>
+     <DoubleSpinBox value="0" name="z:"/>
+    </GroupBox>
+    <DoubleSpinBox value="70" name="fov:"/>
+   <Vector3DSpinBox name="position" value_x="0" value_y="0" value_z="0"/><Vector3DSpinBox name="direction" value_x="0.00" value_y="0.00" value_z="1.00"/><Vector3DSpinBox name="up" value_x="1.00" value_y="0.00" value_z="0.00"/></Tab>
+   <Tab name="front camera">
+    <GroupBox name="position">
+     <DoubleSpinBox value="0" name="x:"/>
+     <DoubleSpinBox value="0" name="y:"/>
+     <DoubleSpinBox value="0" name="z:"/>
+    </GroupBox>
+    <GroupBox name="direction">
+     <DoubleSpinBox value="1" name="x:"/>
+     <DoubleSpinBox value="0" name="y:"/>
+     <DoubleSpinBox value="0" name="z:"/>
+    </GroupBox>
+    <GroupBox name="up">
+     <DoubleSpinBox value="0" name="x:"/>
+     <DoubleSpinBox value="0" name="y:"/>
+     <DoubleSpinBox value="-1" name="z:"/>
+    </GroupBox>
+    <DoubleSpinBox value="70" name="fov:"/>
+   <Vector3DSpinBox name="position" value_x="0" value_y="0" value_z="0"/><Vector3DSpinBox name="direction" value_x="1.00" value_y="0.00" value_z="0.00"/><Vector3DSpinBox name="up" value_x="0.00" value_y="0.00" value_z="-1.00"/></Tab>
+  </TabWidget>
+ </Tab>
+ <Tab name="target">
+  <TabWidget name="tabs">
+   <Tab name="sampling">
+    <DoubleSpinBox value="0.02" name="Tech (s):"/>
+   </Tab>
+   <Tab name="optitrack">
+    <CheckBox value="1" name="enabled"/>
+   </Tab>
+   <Tab name="init">
+    <DoubleSpinBox value="0" name="x:"/>
+    <DoubleSpinBox value="0" name="y:"/>
+    <DoubleSpinBox value="0" name="z:"/>
+    <SpinBox value="90" name="yaw (deg):"/>
+   <Vector3DSpinBox name="position" value_x="-1.50" value_y="1.00" value_z="0.00"/></Tab>
+   <Tab name="model">
+    <DoubleSpinBox value="1.3" name="translational speed (m/s):"/>
+    <DoubleSpinBox value="60" name="rotational speed (deg/s):"/>
+   </Tab>
+  </TabWidget>
+ </Tab>
+</TabWidget>
+<TabWidget name="App_TabWidget"><Tab name="simulator"><PushButton name="save config on target" value="1"/></Tab></TabWidget><PushButton name="save config on target (simulator)" value="1"/></root>
Index: trunk/demos/CircleFollower/simulator/build_x86_64/bin/simulator_x4.sh
===================================================================
--- trunk/demos/CircleFollower/simulator/build_x86_64/bin/simulator_x4.sh	(revision 21)
+++ trunk/demos/CircleFollower/simulator/build_x86_64/bin/simulator_x4.sh	(revision 21)
@@ -0,0 +1,11 @@
+#! /bin/bash
+
+. $IGEP_ROOT/uav_dev/bin/noarch/ubuntu_cgroup_hack.sh
+
+if [ -f /proc/xenomai/version ];then
+	EXEC=./CircleFollower_simulator_rt
+else
+	EXEC=./CircleFollower_simulator_nrt
+fi
+
+$EXEC -n x4_0 -t x4 -p 9000 -a 127.0.0.1 -x setup_x4.xml -o 10 -m $IGEP_ROOT/uav_dev/media -s $IGEP_ROOT/uav_dev/media/optitrack_b122.xml
Index: trunk/demos/CircleFollower/simulator/build_x86_64/bin/simulator_x8.sh
===================================================================
--- trunk/demos/CircleFollower/simulator/build_x86_64/bin/simulator_x8.sh	(revision 21)
+++ trunk/demos/CircleFollower/simulator/build_x86_64/bin/simulator_x8.sh	(revision 21)
@@ -0,0 +1,11 @@
+#! /bin/bash
+
+. $IGEP_ROOT/uav_dev/bin/noarch/ubuntu_cgroup_hack.sh
+
+if [ -f /proc/xenomai/version ];then
+	EXEC=./CircleFollower_simulator_rt
+else
+	EXEC=./CircleFollower_simulator_nrt
+fi
+
+$EXEC -n x8_0 -t x8 -p 9000 -a 127.0.0.1 -x setup_x8.xml -o 10 -m $IGEP_ROOT/uav_dev/media -s $IGEP_ROOT/uav_dev/media/optitrack_b122.xml
Index: trunk/demos/CircleFollower/simulator/src/main.cpp
===================================================================
--- trunk/demos/CircleFollower/simulator/src/main.cpp	(revision 21)
+++ trunk/demos/CircleFollower/simulator/src/main.cpp	(revision 21)
@@ -0,0 +1,133 @@
+//  created:    2012/04/18
+//  filename:   main.cpp
+//
+//  author:     Guillaume Sanahuja
+//              Copyright Heudiasyc UMR UTC/CNRS 6599
+//
+//  version:    $Id: $
+//
+//  purpose:    main simulateur
+//
+//
+/*********************************************************************/
+
+#include <tclap/CmdLine.h>
+#include <Simulator.h>
+#include <X4.h>
+#include <X8.h>
+#include <SimuImu.h>
+#ifdef GL
+#include <SimuCameraGL.h>
+#include <Parser.h>
+#include <Man.h>
+#include <SimuUsGL.h>
+#endif
+
+
+using namespace TCLAP;
+using namespace std;
+using namespace framework::simulator;
+using namespace framework::sensor;
+
+int port;
+int opti_time;
+string xml_file;
+string media_path;
+string scene_file;
+string type;
+string name;
+string address;
+
+void parseOptions(int argc, char** argv) {
+	try {
+        CmdLine cmd("Command description message", ' ', "0.1");
+
+        ValueArg<string> nameArg("n","name","uav name, also used for vrpn",true,"x4","string");
+        cmd.add( nameArg );
+
+        ValueArg<string> xmlArg("x","xml","xml file",true,"./reglages.xml","string");
+        cmd.add( xmlArg );
+
+        ValueArg<int> portArg("p","port","ground station port",true,9002,"int");
+        cmd.add( portArg );
+
+        ValueArg<string> addressArg("a","address","ground station address",true,"127.0.0.1","string");
+        cmd.add( addressArg );
+
+        ValueArg<string> typeArg("t","type","uav type, x4 or x8",true,"x4","string");
+        cmd.add( typeArg );
+
+        ValueArg<int> optiArg("o","opti","optitrack time ms",false,0,"int");
+        cmd.add( optiArg );
+
+#ifdef GL
+        ValueArg<string> mediaArg("m","media","path to media files",true,"./","string");
+        cmd.add( mediaArg );
+
+        ValueArg<string> sceneArg("s","scene","path to scene file",true,"./voliere.xml","string");
+        cmd.add( sceneArg );
+#endif
+
+        cmd.parse( argc, argv );
+
+        // Get the value parsed by each arg.
+        port=portArg.getValue();
+        xml_file = xmlArg.getValue();
+        opti_time = optiArg.getValue();
+        type = typeArg.getValue();
+        name=nameArg.getValue();
+        address=addressArg.getValue();
+#ifdef GL
+        media_path=mediaArg.getValue();
+        scene_file=sceneArg.getValue();
+#endif
+
+	} catch (ArgException &e)  {
+	    cerr << "error: " << e.error() << " for arg " << e.argId() << endl;
+    }
+}
+
+int main(int argc, char* argv[]) {
+    Simulator *simu;
+    Model *drone;
+    SimuImu* imu;
+#ifdef GL
+    SimuUsGL* us_gl;
+
+    Camera *cam_av,*cam_bas;
+    Parser *gui;
+    Man *man;
+#endif
+    parseOptions(argc,argv);
+
+    simu= new Simulator("simulator",opti_time,90);
+    simu->SetupConnection(address,port);
+    simu->SetupUserInterface(xml_file);
+
+#ifdef GL
+    gui=new Parser(simu,960,480,640,480,media_path,scene_file);
+#endif
+
+    if(type=="x4") {
+        drone=new X4(simu,name,0);
+    } else {
+        drone=new X8(simu,name,0);
+    }
+
+    imu=new SimuImu(drone,"imu",0);
+
+#ifdef GL
+    us_gl=new SimuUsGL(drone,"us",0);
+    cam_bas=new SimuCameraGL(drone,"bottom camera",320,240,640,0,0);
+    cam_av=new SimuCameraGL(drone,"front camera",320,240,640,240,1);
+
+    man=new Man(simu,"target");
+#endif
+
+    simu->RunSimu();
+
+    delete simu;
+
+	return 0;
+}
+
Index: trunk/demos/CircleFollower/uav/CMakeLists.txt
===================================================================
--- trunk/demos/CircleFollower/uav/CMakeLists.txt	(revision 21)
+++ trunk/demos/CircleFollower/uav/CMakeLists.txt	(revision 21)
@@ -0,0 +1,38 @@
+PROJECT(CircleFollower)
+cmake_minimum_required(VERSION 2.8)
+
+SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
+SET(FRAMEWORK_USE_FILTER TRUE)
+SET(FRAMEWORK_USE_SENSOR_ACTUATOR TRUE)
+SET(FRAMEWORK_USE_META TRUE)
+SET(FRAMEWORK_USE_OPTITRACK TRUE)
+
+include($ENV{IGEP_ROOT}/uav_dev/cmake_modules/GlobalCmakeUAV.cmake)
+include(${FRAMEWORK_USE_FILE})
+
+SET(SRC_FILES
+	${CMAKE_SOURCE_DIR}/src/main.cpp
+	${CMAKE_SOURCE_DIR}/src/CircleFollower.cpp
+)
+
+LINK_DIRECTORIES (
+	${FRAMEWORK_LIBRARY_DIR}
+)
+
+INCLUDE_DIRECTORIES(
+	${FRAMEWORK_INCLUDE_DIR}
+)
+
+#real time executable
+ADD_EXECUTABLE(${PROJECT_NAME}_rt
+	${SRC_FILES}
+)
+
+TARGET_LINK_LIBRARIES(${PROJECT_NAME}_rt ${FRAMEWORK_LIBRARIES_RT})
+
+#non real time executable
+ADD_EXECUTABLE(${PROJECT_NAME}_nrt
+	${SRC_FILES}
+)
+
+TARGET_LINK_LIBRARIES(${PROJECT_NAME}_nrt ${FRAMEWORK_LIBRARIES_NRT})
Index: trunk/demos/CircleFollower/uav/build
===================================================================
--- trunk/demos/CircleFollower/uav/build	(revision 21)
+++ trunk/demos/CircleFollower/uav/build	(revision 21)
@@ -0,0 +1,1 @@
+link build_x86_64
Index: trunk/demos/CircleFollower/uav/build_arm/bin/CircleFollower_hdsx8.sh
===================================================================
--- trunk/demos/CircleFollower/uav/build_arm/bin/CircleFollower_hdsx8.sh	(revision 21)
+++ trunk/demos/CircleFollower/uav/build_arm/bin/CircleFollower_hdsx8.sh	(revision 21)
@@ -0,0 +1,1 @@
+./CircleFollower_rt -a 192.168.6.121 -p 9000 -l /tmp -x CircleFollower_hdsx8.xml -n x8_0 -t hds_x8
Index: trunk/demos/CircleFollower/uav/build_arm/bin/CircleFollower_hdsx8.xml
===================================================================
--- trunk/demos/CircleFollower/uav/build_arm/bin/CircleFollower_hdsx8.xml	(revision 21)
+++ trunk/demos/CircleFollower/uav/build_arm/bin/CircleFollower_hdsx8.xml	(revision 21)
@@ -0,0 +1,478 @@
+<?xml version="1.0"?>
+<!DOCTYPE remote_ui_xml>
+<root name="interface">
+<TabWidget name="Main_TabWidget">
+ <Tab name="dualshock3">
+  <TabWidget name="dualshock3">
+   <Tab name="Reglages">
+    <GroupBox name="dualshock3">
+     <SpinBox value="10" name="dead zone:"/>
+     <Label name="batterie"/>
+    </GroupBox>
+    <GroupBox name="consignes joy">
+     <DoubleSpinBox value="-10" name="debattement roll"/>
+     <DoubleSpinBox value="-10" name="debattement pitch"/>
+     <DoubleSpinBox value="40" name="debattement dyaw"/>
+     <DoubleSpinBox value="-0.5" name="debattement dz"/>
+     <DoubleSpinBox value="0.01" name="trim"/>
+     <Label name="trim roll"/>
+     <PushButton value="0" name="reset roll trim"/>
+     <Label name="trim pitch"/>
+     <PushButton value="0" name="reset pitch trim"/>
+    </GroupBox>
+   <GroupBox name="consignes fo"><DoubleSpinBox name="debattement x" value="-3"/><DoubleSpinBox name="debattement y" value="3"/></GroupBox></Tab>
+   <Tab name="Mesures">
+    <DataPlot1D name="roll">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="pitch">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="yaw">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="gaz">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+   </Tab>
+  </TabWidget>
+ </Tab>
+ <Tab name="uav">
+  <PushButton value="0" name="kill"/>
+  <PushButton value="0" name="start_log"/>
+  <PushButton value="0" name="stop_log"/>
+  <PushButton value="0" name="take_off"/>
+  <PushButton value="0" name="landing"/>
+  <PushButton value="0" name="start_cercle"/>
+  <PushButton value="0" name="stop_cercle"/>
+  <PushButton value="0" name="start_2D"/>
+  <PushButton value="0" name="stop_2D"/>
+  <PushButton value="0" name="Test0"/>
+  <PushButton value="0" name="Test1"/>
+  <PushButton value="0" name="Test11"/>
+  <PushButton value="0" name="Test2"/>
+  <PushButton value="0" name="Test3"/>
+  <PushButton value="0" name="Test4"/>
+  <PushButton value="0" name="Test5"/>
+  <PushButton value="0" name="f1"/>
+  <PushButton value="0" name="f2"/>
+  <PushButton value="0" name="f3"/>
+  <PushButton value="0" name="f4"/>
+  <PushButton value="0" name="f5"/>
+  <PushButton value="0" name="f6"/>
+  <PushButton value="0" name="f7"/>
+  <PushButton value="0" name="f8"/>
+  <PushButton value="0" name="Start_Obs"/>
+ <GridLayout name="buttons"><PushButton name="kill"/><PushButton name="start_log"/><PushButton name="stop_log"/><PushButton name="take_off"/><PushButton name="land"/><PushButton name="f1"/><PushButton name="f2"/><PushButton name="f3"/><PushButton name="f4"/><PushButton name="Reset"/><PushButton name="Start_Obs"/><PushButton name="Optical_flow"/><PushButton name="start_circle"/><PushButton name="stop_circle"/></GridLayout><GroupBox name="takeoff/landing"><DoubleSpinBox name="desired takeoff altitude" value="1"/><DoubleSpinBox name="desired landing altitude" value="0"/></GroupBox><GroupBox name="alt cons"><DoubleSpinBox name="period, 0 for auto:" value="0"/><DoubleSpinBox name="velocity max (absolute):" value="0.3"/><DoubleSpinBox name="acceleration (absolute):" value="0.2"/></GroupBox></Tab>
+ <Tab name="multi">
+  <TabWidget name="UavMultiplex">
+   <Tab name="Setup">
+    <GroupBox name="fault">
+     <DoubleSpinBox value="0.72" name="Coef:"/>
+     <DoubleSpinBox value="0.0025" name="coefficientKf:"/>
+    </GroupBox>
+    <GroupBox name="x8 multiplex">
+     <ComboBox value="1" name="top front left blade pitch:"/>
+    </GroupBox>
+    <GroupBox name="motor attribution">
+     <ComboBox value="0" name="top front left"/>
+     <ComboBox value="7" name="top front rigth"/>
+     <ComboBox value="4" name="top rear left"/>
+     <ComboBox value="1" name="top rear rigth"/>
+     <ComboBox value="3" name="bottom front left"/>
+     <ComboBox value="5" name="bottom front rigth"/>
+     <ComboBox value="6" name="bottom rear left"/>
+     <ComboBox value="2" name="bottom rear rigth"/>
+    </GroupBox>
+    <GroupBox name="bldc">
+     <Label name="flight time"/>
+     <DoubleSpinBox value="0.2" name="min value:"/>
+     <DoubleSpinBox value="1" name="max value:"/>
+     <DoubleSpinBox value="0.1" name="test value:"/>
+     <PushButton value="1" name="test motor 0"/>
+     <PushButton value="1" name="test motor 1"/>
+     <PushButton value="1" name="test motor 2"/>
+     <PushButton value="1" name="test motor 3"/>
+     <PushButton value="1" name="test motor 4"/>
+     <PushButton value="1" name="test motor 5"/>
+     <PushButton value="1" name="test motor 6"/>
+     <PushButton value="1" name="test motor 7"/>
+    </GroupBox>
+    <GroupBox name="battery">
+     <Label name="battery"/>
+     <DoubleSpinBox value="10" name="threshold"/>
+    </GroupBox>
+    <GroupBox name="Motors">
+     <SpinBox value="14" name="nb poles:"/>
+    </GroupBox>
+    <GroupBox name="startup">
+     <DoubleSpinBox value="0" name="prc_fault:"/>
+     <DoubleSpinBox value="0" name="prc_retab:"/>
+    </GroupBox>
+   </Tab>
+   <Tab name="Values">
+    <DataPlot1D name="top front left" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="top front right" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="top rear left" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="top rear right" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="bottom front left" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="bottom front right" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="bottom rear left" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="bottom rear right" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+   </Tab>
+   <Tab name="Speeds">
+    <DataPlot1D name="front left" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="front right" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="rear left" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="rear right" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+   </Tab>
+  </TabWidget>
+ </Tab>
+ <Tab name="SRF08">
+  <TabWidget name="SRF08">
+   <Tab name="Reglages">
+    <GroupBox name="SRF08">
+     <SpinBox value="8" name="gain:"/>
+     <SpinBox value="46" name="range:"/>
+    </GroupBox>
+    <GroupBox name="Passe bas">
+     <DoubleSpinBox value="0" name="period, 0 for auto"/>
+     <DoubleSpinBox value="5" name="cutoff frequency"/>
+    </GroupBox>
+    <GroupBox name="Vz">
+     <DoubleSpinBox value="0" name="period, 0 for auto:"/>
+    </GroupBox>
+    <GroupBox name="Passe bas v">
+     <DoubleSpinBox value="0" name="period, 0 for auto"/>
+     <DoubleSpinBox value="5" name="cutoff frequency"/>
+    </GroupBox>
+    <GroupBox name="alt cons">
+     <DoubleSpinBox value="0" name="period, 0 for auto:"/>
+     <DoubleSpinBox value="0.3" name="velocity max (absolute):"/>
+     <DoubleSpinBox value="0.2" name="acceleration (absolute):"/>
+    </GroupBox>
+    <GroupBox name="decollage">
+     <DoubleSpinBox value="0.7" name="alt decollage"/>
+     <DoubleSpinBox value="0" name="alt atterissage"/>
+    </GroupBox>
+   </Tab>
+   <Tab name="Mesures">
+    <DataPlot1D name="SRF08" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="vz" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+   </Tab>
+  </TabWidget>
+ </Tab>
+ <Tab name="imu">
+  <TabWidget name="imu">
+   <Tab name="Reglages">
+    <GroupBox name="imu">
+     <PushButton value="0" name="gyros bias"/>
+     <SpinBox value="100" name="data rate (Hz):"/>
+     <Label name="data_rate"/>
+     <SpinBox value="15" name="gyro and acc filter win size:"/>
+     <SpinBox value="17" name="mag filter win size:"/>
+     <SpinBox value="10" name="up compensation (s):"/>
+     <SpinBox value="10" name="north compensation (s):"/>
+     <CheckBox value="1" name="enable Coning&amp;Sculling:"/>
+     <CheckBox value="1" name="disable magnetometer:"/>
+     <CheckBox value="1" name="disable magnetic north compensation:"/>
+     <CheckBox value="1" name="disable gravity compensation:"/>
+    </GroupBox>
+    <GroupBox name="post rotation">
+     <DoubleSpinBox value="180" name="value"/>
+     <ComboBox value="2" name="axis"/>
+    </GroupBox>
+   </Tab>
+   <Tab name="AHRS">
+    <DataPlot1D name="roll" period="100" enabled="1">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="pitch" period="100" enabled="1">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="yaw" period="100" enabled="1">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="w_x" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="w_y" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="w_z" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+   </Tab>
+  </TabWidget>
+ </Tab>
+ <Tab name="control laws">
+  <TabWidget name="laws">
+   <Tab name="Setup">
+    <GroupBox name="u_roll">
+     <DoubleSpinBox value="10" name="sat ref:"/>
+     <DoubleSpinBox value="10" name="satf ref:"/>
+     <DoubleSpinBox value="10" name="sat2f ref:"/>
+     <DoubleSpinBox value="7" name="kp:"/>
+     <DoubleSpinBox value="7" name="kpf:"/>
+     <DoubleSpinBox value="10" name="kp2f:"/>
+     <DoubleSpinBox value="100" name="sat dref:"/>
+     <DoubleSpinBox value="110" name="satf dref:"/>
+     <DoubleSpinBox value="140" name="sat2f dref:"/>
+     <DoubleSpinBox value="0.12" name="kd:"/>
+     <DoubleSpinBox value="0.12" name="kdf:"/>
+     <DoubleSpinBox value="0.13" name="kd2f:"/>
+     <DoubleSpinBox value="0.4" name="sat u:"/>
+     <DoubleSpinBox value="0.4" name="satf u:"/>
+     <DoubleSpinBox value="0.6" name="sat2f u:"/>
+    </GroupBox>
+    <GroupBox name="u_pitch">
+     <DoubleSpinBox value="10" name="sat ref:"/>
+     <DoubleSpinBox value="10" name="satf ref:"/>
+     <DoubleSpinBox value="10" name="sat2f ref:"/>
+     <DoubleSpinBox value="7" name="kp:"/>
+     <DoubleSpinBox value="7" name="kpf:"/>
+     <DoubleSpinBox value="10" name="kp2f:"/>
+     <DoubleSpinBox value="100" name="sat dref:"/>
+     <DoubleSpinBox value="110" name="satf dref:"/>
+     <DoubleSpinBox value="140" name="sat2f dref:"/>
+     <DoubleSpinBox value="0.12" name="kd:"/>
+     <DoubleSpinBox value="0.12" name="kdf:"/>
+     <DoubleSpinBox value="0.13" name="kd2f:"/>
+     <DoubleSpinBox value="0.4" name="sat u:"/>
+     <DoubleSpinBox value="0.4" name="satf u:"/>
+     <DoubleSpinBox value="0.6" name="sat2f u:"/>
+    </GroupBox>
+    <GroupBox name="u_yaw">
+     <DoubleSpinBox value="0" name="period, 0 for auto"/>
+     <DoubleSpinBox value="1" name="kp:"/>
+     <DoubleSpinBox value="1.5" name="kpf:"/>
+     <DoubleSpinBox value="2" name="kp2f:"/>
+     <DoubleSpinBox value="0.2" name="ki:"/>
+     <DoubleSpinBox value="0.35" name="kif:"/>
+     <DoubleSpinBox value="0.5" name="ki2f:"/>
+     <DoubleSpinBox value="0.2" name="sat i:"/>
+     <DoubleSpinBox value="0.3" name="satf i:"/>
+     <DoubleSpinBox value="0.4" name="sat2f i:"/>
+     <DoubleSpinBox value="0.1" name="kd:"/>
+     <DoubleSpinBox value="0.2" name="kdf:"/>
+     <DoubleSpinBox value="0.3" name="kd2f:"/>
+     <DoubleSpinBox value="1" name="sat:"/>
+    </GroupBox>
+    <GroupBox name="x_pid">
+     <DoubleSpinBox value="0" name="period, 0 for auto"/>
+     <DoubleSpinBox value="0.01" name="kp:"/>
+     <DoubleSpinBox value="0.015" name="kpf:"/>
+     <DoubleSpinBox value="0.01" name="kp2f:"/>
+     <DoubleSpinBox value="0.03" name="ki:"/>
+     <DoubleSpinBox value="0.035" name="kif:"/>
+     <DoubleSpinBox value="0.02" name="ki2f:"/>
+     <DoubleSpinBox value="0.3" name="sat i:"/>
+     <DoubleSpinBox value="0.3" name="satf i:"/>
+     <DoubleSpinBox value="0.3" name="sat2f i:"/>
+     <DoubleSpinBox value="0" name="kd:"/>
+     <DoubleSpinBox value="0" name="kdf:"/>
+     <DoubleSpinBox value="0" name="kd2f:"/>
+     <DoubleSpinBox value="0.5" name="sat:"/>
+    </GroupBox>
+    <GroupBox name="y_pid">
+     <DoubleSpinBox value="0" name="period, 0 for auto"/>
+     <DoubleSpinBox value="0.01" name="kp:"/>
+     <DoubleSpinBox value="0.015" name="kpf:"/>
+     <DoubleSpinBox value="0.01" name="kp2f:"/>
+     <DoubleSpinBox value="0.03" name="ki:"/>
+     <DoubleSpinBox value="0.035" name="kif:"/>
+     <DoubleSpinBox value="0.02" name="ki2f:"/>
+     <DoubleSpinBox value="0.3" name="sat i:"/>
+     <DoubleSpinBox value="0.3" name="satf i:"/>
+     <DoubleSpinBox value="0.3" name="sat2f i:"/>
+     <DoubleSpinBox value="0" name="kd:"/>
+     <DoubleSpinBox value="0" name="kdf:"/>
+     <DoubleSpinBox value="0" name="kd2f:"/>
+     <DoubleSpinBox value="0.5" name="sat:"/>
+    </GroupBox>
+    <GroupBox name="u_z">
+     <DoubleSpinBox value="0" name="period, 0 for auto"/>
+     <DoubleSpinBox value="0.3" name="kp:"/>
+     <DoubleSpinBox value="0.4" name="kpf:"/>
+     <DoubleSpinBox value="0.5" name="kp2f:"/>
+     <DoubleSpinBox value="0.2" name="ki:"/>
+     <DoubleSpinBox value="0.4" name="kif:"/>
+     <DoubleSpinBox value="0.4" name="ki2f:"/>
+     <DoubleSpinBox value="0.5" name="sat i:"/>
+     <DoubleSpinBox value="0.8" name="satf i:"/>
+     <DoubleSpinBox value="0.8" name="sat2f i:"/>
+     <DoubleSpinBox value="0.1" name="kd:"/>
+     <DoubleSpinBox value="0.3" name="kdf:"/>
+     <DoubleSpinBox value="0.3" name="kd2f:"/>
+     <DoubleSpinBox value="0.4" name="offset g:"/>
+     <DoubleSpinBox value="1" name="sat:"/>
+     <DoubleSpinBox value="0.0001" name="offset step:"/>
+    </GroupBox>
+   <GroupBox name="u_x"><DoubleSpinBox name="period, 0 for auto" value="0"/><DoubleSpinBox name="kp:" value="0.010"/><DoubleSpinBox name="ki:" value="0.030"/><DoubleSpinBox name="sat i:" value="0.30"/><DoubleSpinBox name="kd:" value="0"/><DoubleSpinBox name="sat:" value="0.50"/></GroupBox><GroupBox name="u_y"><DoubleSpinBox name="period, 0 for auto" value="0"/><DoubleSpinBox name="kp:" value="0.010"/><DoubleSpinBox name="ki:" value="0.030"/><DoubleSpinBox name="sat i:" value="0.30"/><DoubleSpinBox name="kd:" value="0"/><DoubleSpinBox name="sat:" value="0.50"/></GroupBox></Tab>
+   <Tab name="Graphes">
+    <DataPlot1D name="u_roll" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="u_pitch" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="u_yaw" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="u_z" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+   <DataPlot1D name="x_pid" period="100" enabled="1"/><DataPlot1D name="y_pid" period="100" enabled="1"/><DataPlot1D name="u_x" period="100" enabled="0"/><DataPlot1D name="u_y" period="100" enabled="0"/></Tab>
+   <Tab name="HighOrder">
+    <GroupBox name="HighOrder">
+     <DoubleSpinBox value="1" name="lambda1:"/>
+     <DoubleSpinBox value="1" name="alpha1:"/>
+     <DoubleSpinBox value="1" name="lambda2:"/>
+     <DoubleSpinBox value="1" name="alpha2:"/>
+     <DoubleSpinBox value="1.5" name="lambda3:"/>
+     <DoubleSpinBox value="2" name="alpha3:"/>
+     <DoubleSpinBox value="2" name="lambda11:"/>
+     <DoubleSpinBox value="2" name="alpha11:"/>
+     <DoubleSpinBox value="2" name="lambda21:"/>
+     <DoubleSpinBox value="2" name="alpha21:"/>
+     <DoubleSpinBox value="2.5" name="lambda31:"/>
+     <DoubleSpinBox value="3" name="alpha31:"/>
+     <DoubleSpinBox value="3" name="lambda12:"/>
+     <DoubleSpinBox value="3" name="alpha12:"/>
+     <DoubleSpinBox value="3" name="lambda22:"/>
+     <DoubleSpinBox value="3" name="alpha22:"/>
+     <DoubleSpinBox value="3" name="lambda32:"/>
+     <DoubleSpinBox value="3.5" name="alpha32:"/>
+    </GroupBox>
+    <DataPlot1D name="phi/dphi">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="theta/dtheta">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="psi/dpsi">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="F">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="Filter">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+   </Tab>
+  </TabWidget>
+ </Tab>
+ <Tab name="vrpn">
+  <TabWidget name="vrpn">
+   <Tab name="Reglages">
+    <GroupBox name="post rotation 1">
+     <DoubleSpinBox value="90" name="value"/>
+     <ComboBox value="1" name="axis"/>
+    </GroupBox>
+    <GroupBox name="post rotation 2">
+     <DoubleSpinBox value="90" name="value"/>
+     <ComboBox value="0" name="axis"/>
+    </GroupBox>
+    <GroupBox name="x8_0 Passe bas">
+     <DoubleSpinBox value="0" name="period, 0 for auto"/>
+     <DoubleSpinBox value="2" name="cutoff frequency"/>
+    </GroupBox>
+    <GroupBox name="x8_0_euler">
+     <DoubleSpinBox value="0" name="period, 0 for auto:"/>
+    </GroupBox>
+    <GroupBox name="cercle">
+     <DoubleSpinBox value="0" name="period, 0 for auto"/>
+     <DoubleSpinBox value="1" name="R"/>
+     <DoubleSpinBox value="0.4" name="velocity"/>
+     <DoubleSpinBox value="0.1" name="acceleration (absolute)"/>
+    </GroupBox>
+    <GroupBox name="Cible Passe bas">
+     <DoubleSpinBox value="0" name="period, 0 for auto"/>
+     <DoubleSpinBox value="2" name="cutoff frequency"/>
+    </GroupBox>
+    <GroupBox name="Cible_euler">
+     <DoubleSpinBox value="0" name="period, 0 for auto:"/>
+    </GroupBox>
+   <GroupBox name="target Passe bas"><DoubleSpinBox name="period, 0 for auto" value="0"/><DoubleSpinBox name="cutoff frequency" value="1"/></GroupBox><GroupBox name="target_euler"><DoubleSpinBox name="period, 0 for auto:" value="0"/></GroupBox><GroupBox name="circle"><DoubleSpinBox name="period, 0 for auto" value="0"/><DoubleSpinBox name="R" value="1.00"/><DoubleSpinBox name="velocity" value="0.50"/><DoubleSpinBox name="acceleration (absolute)" value="0.10"/></GroupBox></Tab>
+   <Tab name="Mesures x8_0">
+    <DataPlot1D name="x" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="y" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="z" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="vx" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="vy" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="vz" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+   </Tab>
+   <Tab name="Mesures (xy) x8_0">
+    <DataPlot2D name="xy" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot2D>
+   </Tab>
+   <Tab name="Mesures Cible">
+    <DataPlot1D name="x">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="y">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="z">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="vx">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="vy">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="vz">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+   </Tab>
+   <Tab name="Mesures (xy) Cible">
+    <DataPlot2D name="xy">
+     <Setup period="100" enabled="1"/>
+    </DataPlot2D>
+   </Tab>
+  <Tab name="Mesures target"><DataPlot1D name="x" period="100" enabled="0"/><DataPlot1D name="y" period="100" enabled="0"/><DataPlot1D name="z" period="100" enabled="0"/><DataPlot1D name="vx" period="100" enabled="0"/><DataPlot1D name="vy" period="100" enabled="0"/><DataPlot1D name="vz" period="100" enabled="0"/></Tab><Tab name="Mesures (xy) target"><DataPlot2D name="xy" period="100" enabled="0"/></Tab></TabWidget>
+ </Tab>
+ <Tab name="camv"><TabWidget name="camv"><Tab name="Setup"><GroupBox name="camv"><DoubleSpinBox name="gain:" value="0.2"/><DoubleSpinBox name="exposure:" value="0.25"/><DoubleSpinBox name="bright:" value="0.3"/><DoubleSpinBox name="contrast:" value="0.4"/><DoubleSpinBox name="hue:" value="1"/><DoubleSpinBox name="sharpness:" value="0.5"/><DoubleSpinBox name="saturation:" value="0"/><CheckBox name="autogain:" value="0"/><CheckBox name="autoexposure:" value="0"/><CheckBox name="awb:" value="0"/><Label name="fps"/></GroupBox><GridLayout name="setup"><GroupBox name="flux optique"><GroupBox name="post rotation"><DoubleSpinBox name="value" value="-90"/><ComboBox name="axis" value="2"/></GroupBox><SpinBox name="max features:" value="64"/></GroupBox><GroupBox name="passe bas"><DoubleSpinBox name="period, 0 for auto" value="0"/><DoubleSpinBox name="cutoff frequency" value="5"/></GroupBox></GridLayout></Tab><Tab name="Picture"><Picture name="camv" period="200" enabled="0"/></Tab></TabWidget></Tab><Tab name="flux optique"><DataPlot1D name="x_velocity" period="100" enabled="0"/><DataPlot1D name="y_velocity" period="100" enabled="0"/></Tab><Tab name="motors"><TabWidget name="UavMultiplex"><Tab name="Setup"><GroupBox name="x8 multiplex"><ComboBox name="top front left blade pitch:" value="1"/></GroupBox><GroupBox name="motor attribution"><ComboBox name="top front left" value="0"/><ComboBox name="top front rigth" value="7"/><ComboBox name="top rear left" value="4"/><ComboBox name="top rear rigth" value="1"/><ComboBox name="bottom front left" value="3"/><ComboBox name="bottom front rigth" value="5"/><ComboBox name="bottom rear left" value="6"/><ComboBox name="bottom rear rigth" value="2"/></GroupBox><GroupBox name="bldc"><Label name="flight time"/><DoubleSpinBox name="min value:" value="0.20"/><DoubleSpinBox name="max value:" value="1.00"/><DoubleSpinBox name="test value:" value="0.10"/><PushButton name="test motor 0"/><PushButton name="test motor 1"/><PushButton name="test motor 2"/><PushButton name="test motor 3"/><PushButton name="test motor 4"/><PushButton name="test motor 5"/><PushButton name="test motor 6"/><PushButton name="test motor 7"/></GroupBox><GroupBox name="battery"><Label name="battery"/><DoubleSpinBox name="threshold" value="10.0"/></GroupBox><GroupBox name="Motors"><SpinBox name="nb poles:" value="14"/></GroupBox></Tab><Tab name="Values"><DataPlot1D name="front left" period="100" enabled="0"/><DataPlot1D name="front right" period="100" enabled="0"/><DataPlot1D name="rear left" period="100" enabled="0"/><DataPlot1D name="rear right" period="100" enabled="0"/></Tab><Tab name="Speeds"><DataPlot1D name="front left" period="100" enabled="0"/><DataPlot1D name="front right" period="100" enabled="0"/><DataPlot1D name="rear left" period="100" enabled="0"/><DataPlot1D name="rear right" period="100" enabled="0"/></Tab><Tab name="Currents"><DataPlot1D name="front left" period="100" enabled="0"/><DataPlot1D name="front right" period="100" enabled="0"/><DataPlot1D name="rear left" period="100" enabled="0"/><DataPlot1D name="rear right" period="100" enabled="0"/></Tab></TabWidget></Tab></TabWidget>
+<TabWidget name="App_TabWidget"><Tab name="x8_0"><PushButton name="save config on target" value="1"/></Tab></TabWidget></root>
Index: trunk/demos/CircleFollower/uav/build_arm/bin/CircleFollower_parrot.sh
===================================================================
--- trunk/demos/CircleFollower/uav/build_arm/bin/CircleFollower_parrot.sh	(revision 21)
+++ trunk/demos/CircleFollower/uav/build_arm/bin/CircleFollower_parrot.sh	(revision 21)
@@ -0,0 +1,1 @@
+./CircleFollower_nrt -a 192.168.147.193 -p 9000 -l /tmp -x CircleFollower_parrot.xml -n Drone_0 -t ardrone2
Index: trunk/demos/CircleFollower/uav/build_arm/bin/CircleFollower_parrot.xml
===================================================================
--- trunk/demos/CircleFollower/uav/build_arm/bin/CircleFollower_parrot.xml	(revision 21)
+++ trunk/demos/CircleFollower/uav/build_arm/bin/CircleFollower_parrot.xml	(revision 21)
@@ -0,0 +1,357 @@
+<?xml version="1.0"?>
+<!DOCTYPE remote_ui_xml>
+<root name="interface">
+<TabWidget name="Main_TabWidget">
+ <Tab name="x4-multiplex">
+  <TabWidget name="UavMultiplex">
+   <Tab name="Setup">
+    <GroupBox name="x4 multiplex">
+     <ComboBox value="1" name="front left blade pitch:"/>
+    </GroupBox>
+    <GroupBox name="motor attribution">
+     <ComboBox value="0" name="front left"/>
+     <ComboBox value="1" name="front rigth"/>
+     <ComboBox value="2" name="rear left"/>
+     <ComboBox value="3" name="rear rigth"/>
+    </GroupBox>
+    <GroupBox name="bldc">
+     <Label name="flight time"/>
+     <DoubleSpinBox value="0.4" name="min value:"/>
+     <DoubleSpinBox value="1" name="max value:"/>
+     <DoubleSpinBox value="0.1" name="test value:"/>
+     <PushButton value="0" name="test motor 0"/>
+     <PushButton value="0" name="test motor 1"/>
+     <PushButton value="0" name="test motor 2"/>
+     <PushButton value="0" name="test motor 3"/>
+    </GroupBox>
+   </Tab>
+   <Tab name="Values">
+    <DataPlot1D name="front left" period="100" enabled="0">
+     <Setup period="100" enabled="0"/>
+    </DataPlot1D>
+    <DataPlot1D name="front right" period="100" enabled="0">
+     <Setup period="100" enabled="0"/>
+    </DataPlot1D>
+    <DataPlot1D name="rear left" period="100" enabled="0">
+     <Setup period="100" enabled="0"/>
+    </DataPlot1D>
+    <DataPlot1D name="rear right" period="100" enabled="0">
+     <Setup period="100" enabled="0"/>
+    </DataPlot1D>
+   </Tab>
+  </TabWidget>
+ </Tab>
+ <Tab name="parrot-us">
+  <TabWidget name="parrot-us">
+   <Tab name="Reglages">
+    <GroupBox name="parrot-us"/>
+    <GroupBox name="Passe bas">
+     <DoubleSpinBox value="0.04" name="period, 0 for auto"/>
+     <DoubleSpinBox value="5" name="cutoff frequency"/>
+    </GroupBox>
+    <GroupBox name="Vz">
+     <DoubleSpinBox value="0.04" name="period, 0 for auto:"/>
+    </GroupBox>
+    <GroupBox name="Passe bas v">
+     <DoubleSpinBox value="0.04" name="period, 0 for auto"/>
+     <DoubleSpinBox value="10" name="cutoff frequency"/>
+    </GroupBox>
+    <GroupBox name="alt cons">
+     <DoubleSpinBox value="0" name="period, 0 for auto:"/>
+     <DoubleSpinBox value="1" name="velocity max (absolute):"/>
+     <DoubleSpinBox value="0.8" name="acceleration (absolute):"/>
+    </GroupBox>
+    <GroupBox name="decollage">
+     <DoubleSpinBox value="0.8" name="alt decollage"/>
+     <DoubleSpinBox value="0" name="alt atterissage"/>
+    </GroupBox>
+   </Tab>
+   <Tab name="Mesures">
+    <DataPlot1D name="parrot-us" period="100" enabled="1">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="vz" period="100" enabled="1">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+   </Tab>
+  </TabWidget>
+ </Tab>
+ <Tab name="parrot-imu">
+  <TabWidget name="parrot-imu">
+   <Tab name="Reglages">
+    <GroupBox name="parrot-imu"/>
+    <GroupBox name="post rotation">
+     <DoubleSpinBox value="0" name="value"/>
+     <ComboBox value="0" name="axis"/>
+    </GroupBox>
+    <DoubleSpinBox value="0.5" name="k_a[0]:"/>
+    <DoubleSpinBox value="0.5" name="k_a[1]:"/>
+    <DoubleSpinBox value="0" name="k_a[2]:"/>
+    <DoubleSpinBox value="0.01" name="k_b[0]:"/>
+    <DoubleSpinBox value="0.01" name="k_b[1]:"/>
+    <DoubleSpinBox value="0.01" name="k_b[2]:"/>
+   </Tab>
+   <Tab name="AHRS">
+    <DataPlot1D name="roll" period="100" enabled="1">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="pitch" period="100" enabled="1">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="yaw" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="w_x" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="w_y" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="w_z" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+   </Tab>
+   <Tab name="IMU">
+    <DataPlot1D name="acc_x" period="100" enabled="0">
+     <Setup period="100" enabled="0"/>
+    </DataPlot1D>
+    <DataPlot1D name="acc_y" period="100" enabled="0">
+     <Setup period="100" enabled="0"/>
+    </DataPlot1D>
+    <DataPlot1D name="acc_z" period="100" enabled="0">
+     <Setup period="100" enabled="0"/>
+    </DataPlot1D>
+    <DataPlot1D name="gyr_x" period="100" enabled="0">
+     <Setup period="100" enabled="0"/>
+    </DataPlot1D>
+    <DataPlot1D name="gyr_y" period="100" enabled="0">
+     <Setup period="100" enabled="0"/>
+    </DataPlot1D>
+    <DataPlot1D name="gyr_z" period="100" enabled="0">
+     <Setup period="100" enabled="0"/>
+    </DataPlot1D>
+    <DataPlot1D name="mag_x" period="100" enabled="0">
+     <Setup period="100" enabled="0"/>
+    </DataPlot1D>
+    <DataPlot1D name="mag_y" period="100" enabled="0">
+     <Setup period="100" enabled="0"/>
+    </DataPlot1D>
+    <DataPlot1D name="mag_z" period="100" enabled="0">
+     <Setup period="100" enabled="0"/>
+    </DataPlot1D>
+   </Tab>
+  </TabWidget>
+ </Tab>
+ <Tab name="battery">
+  <GroupBox name="battery">
+   <Label name="battery"/>
+   <DoubleSpinBox value="10.5" name="threshold"/>
+  </GroupBox>
+ </Tab>
+ <Tab name="vrpn">
+  <TabWidget name="vrpn">
+   <Tab name="Reglages">
+    <GroupBox name="post rotation 1">
+     <DoubleSpinBox value="90" name="value"/>
+     <ComboBox value="1" name="axis"/>
+    </GroupBox>
+    <GroupBox name="post rotation 2">
+     <DoubleSpinBox value="90" name="value"/>
+     <ComboBox value="0" name="axis"/>
+    </GroupBox>
+    <GroupBox name="Drone_0 Passe bas">
+     <DoubleSpinBox value="0" name="period, 0 for auto"/>
+     <DoubleSpinBox value="2" name="cutoff frequency"/>
+    </GroupBox>
+    <GroupBox name="Drone_0_euler">
+     <DoubleSpinBox value="0" name="period, 0 for auto:"/>
+    </GroupBox>
+    <GroupBox name="target Passe bas">
+     <DoubleSpinBox value="0" name="period, 0 for auto"/>
+     <DoubleSpinBox value="2" name="cutoff frequency"/>
+    </GroupBox>
+    <GroupBox name="target_euler">
+     <DoubleSpinBox value="0" name="period, 0 for auto:"/>
+    </GroupBox>
+    <GroupBox name="circle">
+     <DoubleSpinBox value="0" name="period, 0 for auto"/>
+     <DoubleSpinBox value="1" name="R"/>
+     <DoubleSpinBox value="0.5" name="velocity"/>
+     <DoubleSpinBox value="0.1" name="acceleration (absolute)"/>
+    </GroupBox>
+   </Tab>
+   <Tab name="Mesures Drone_0">
+    <DataPlot1D name="x" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="y" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="z" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="vx" period="100" enabled="0">
+     <Setup period="100" enabled="0"/>
+    </DataPlot1D>
+    <DataPlot1D name="vy" period="100" enabled="0">
+     <Setup period="100" enabled="0"/>
+    </DataPlot1D>
+    <DataPlot1D name="vz" period="100" enabled="0">
+     <Setup period="100" enabled="0"/>
+    </DataPlot1D>
+   </Tab>
+   <Tab name="Mesures (xy) Drone_0">
+    <DataPlot2D name="xy" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot2D>
+   </Tab>
+   <Tab name="Mesures target">
+    <DataPlot1D name="x" period="100" enabled="0">
+     <Setup period="100" enabled="0"/>
+    </DataPlot1D>
+    <DataPlot1D name="y" period="100" enabled="0">
+     <Setup period="100" enabled="0"/>
+    </DataPlot1D>
+    <DataPlot1D name="z" period="100" enabled="0">
+     <Setup period="100" enabled="0"/>
+    </DataPlot1D>
+    <DataPlot1D name="vx" period="100" enabled="0">
+     <Setup period="100" enabled="0"/>
+    </DataPlot1D>
+    <DataPlot1D name="vy" period="100" enabled="0">
+     <Setup period="100" enabled="0"/>
+    </DataPlot1D>
+    <DataPlot1D name="vz" period="100" enabled="0">
+     <Setup period="100" enabled="0"/>
+    </DataPlot1D>
+   </Tab>
+   <Tab name="Mesures (xy) target">
+    <DataPlot2D name="xy" period="100" enabled="0">
+     <Setup period="100" enabled="0"/>
+    </DataPlot2D>
+   </Tab>
+  </TabWidget>
+ </Tab>
+ <Tab name="camv">
+  <TabWidget name="camv">
+   <Tab name="Setup">
+    <GroupBox name="camv">
+     <DoubleSpinBox value="0" name="gain:"/>
+     <DoubleSpinBox value="0" name="exposure:"/>
+     <DoubleSpinBox value="0" name="bright:"/>
+     <DoubleSpinBox value="0" name="contrast:"/>
+     <DoubleSpinBox value="0" name="hue:"/>
+     <DoubleSpinBox value="0" name="sharpness:"/>
+     <DoubleSpinBox value="0" name="saturation:"/>
+     <CheckBox value="1" name="autogain:"/>
+     <CheckBox value="1" name="autoexposure:"/>
+     <CheckBox value="1" name="awb:"/>
+    <Label name="fps"/></GroupBox>
+    <GridLayout name="setup"/>
+   </Tab>
+  </TabWidget>
+ </Tab>
+ <Tab name="uav">
+  <GridLayout name="buttons">
+   <PushButton value="0" name="kill"/>
+   <PushButton value="1" name="start_log"/>
+   <PushButton value="0" name="stop_log"/>
+   <PushButton value="0" name="take_off"/>
+   <PushButton value="0" name="landing"/>
+   <PushButton value="0" name="start_circle"/>
+   <PushButton value="0" name="stop_circle"/>
+  <PushButton name="land"/></GridLayout>
+ <GroupBox name="takeoff/landing"><DoubleSpinBox name="desired takeoff altitude" value="1"/><DoubleSpinBox name="desired landing altitude" value="0"/></GroupBox><GroupBox name="alt cons"><DoubleSpinBox name="period, 0 for auto:" value="0"/><DoubleSpinBox name="velocity max (absolute):" value="1"/><DoubleSpinBox name="acceleration (absolute):" value="0.8"/></GroupBox></Tab>
+ <Tab name="control laws">
+  <TabWidget name="laws">
+   <Tab name="Setup">
+    <GroupBox name="u_roll">
+     <DoubleSpinBox value="20" name="sat ref:"/>
+     <DoubleSpinBox value="12" name="kp:"/>
+     <DoubleSpinBox value="1000" name="sat dref:"/>
+     <DoubleSpinBox value="0.2" name="kd:"/>
+     <DoubleSpinBox value="0.4" name="sat u:"/>
+    </GroupBox>
+    <GroupBox name="u_pitch">
+     <DoubleSpinBox value="20" name="sat ref:"/>
+     <DoubleSpinBox value="12" name="kp:"/>
+     <DoubleSpinBox value="1000" name="sat dref:"/>
+     <DoubleSpinBox value="0.2" name="kd:"/>
+     <DoubleSpinBox value="0.4" name="sat u:"/>
+    </GroupBox>
+    <GroupBox name="u_yaw">
+     <DoubleSpinBox value="0" name="period, 0 for auto"/>
+     <DoubleSpinBox value="0.6" name="kp:"/>
+     <DoubleSpinBox value="0.1" name="ki:"/>
+     <DoubleSpinBox value="0.2" name="sat i:"/>
+     <DoubleSpinBox value="0.2" name="kd:"/>
+     <DoubleSpinBox value="0.5" name="sat:"/>
+    </GroupBox>
+    <GroupBox name="u_x">
+     <DoubleSpinBox value="0" name="period, 0 for auto"/>
+     <DoubleSpinBox value="0.4" name="kp:"/>
+     <DoubleSpinBox value="0.4" name="ki:"/>
+     <DoubleSpinBox value="0" name="sat i:"/>
+     <DoubleSpinBox value="0.2" name="kd:"/>
+     <DoubleSpinBox value="0.4" name="sat:"/>
+    </GroupBox>
+    <GroupBox name="u_y">
+     <DoubleSpinBox value="0" name="period, 0 for auto"/>
+     <DoubleSpinBox value="0.4" name="kp:"/>
+     <DoubleSpinBox value="0.1" name="ki:"/>
+     <DoubleSpinBox value="0" name="sat i:"/>
+     <DoubleSpinBox value="0.2" name="kd:"/>
+     <DoubleSpinBox value="0.4" name="sat:"/>
+    </GroupBox>
+    <GroupBox name="u_z">
+     <DoubleSpinBox value="0" name="period, 0 for auto"/>
+     <DoubleSpinBox value="0.6" name="kp:"/>
+     <DoubleSpinBox value="0.2" name="ki:"/>
+     <DoubleSpinBox value="0.4" name="sat i:"/>
+     <DoubleSpinBox value="0.4" name="kd:"/>
+     <DoubleSpinBox value="0.6" name="offset g:"/>
+     <DoubleSpinBox value="1" name="sat:"/>
+     <DoubleSpinBox value="0.0002" name="offset step:"/>
+    </GroupBox>
+   </Tab>
+   <Tab name="Graphes">
+    <DataPlot1D name="u_roll" period="100" enabled="0">
+     <Setup period="100" enabled="0"/>
+    </DataPlot1D>
+    <DataPlot1D name="u_pitch" period="100" enabled="0">
+     <Setup period="100" enabled="0"/>
+    </DataPlot1D>
+    <DataPlot1D name="u_yaw" period="100" enabled="0">
+     <Setup period="100" enabled="0"/>
+    </DataPlot1D>
+    <DataPlot1D name="u_x" period="100" enabled="0">
+     <Setup period="100" enabled="0"/>
+    </DataPlot1D>
+    <DataPlot1D name="u_y" period="100" enabled="0">
+     <Setup period="100" enabled="0"/>
+    </DataPlot1D>
+    <DataPlot1D name="u_z" period="100" enabled="0">
+     <Setup period="100" enabled="0"/>
+    </DataPlot1D>
+   </Tab>
+  </TabWidget>
+ </Tab>
+ <Tab name="dualshock3">
+  <TabWidget name="dualshock3">
+   <Tab name="Reglages">
+    <GroupBox name="consignes joy">
+     <DoubleSpinBox value="-15" name="debattement roll"/>
+     <DoubleSpinBox value="-15" name="debattement pitch"/>
+     <DoubleSpinBox value="90" name="debattement dyaw"/>
+     <DoubleSpinBox value="-0.5" name="debattement dz"/>
+     <DoubleSpinBox value="0.02" name="trim"/>
+     <Label name="trim roll"/>
+     <PushButton value="0" name="reset roll trim"/>
+     <Label name="trim pitch"/>
+     <PushButton value="0" name="reset pitch trim"/>
+    </GroupBox>
+   </Tab>
+  </TabWidget>
+ </Tab>
+<Tab name="predictor"><DataPlot1D name="u_pitch" period="100" enabled="1"/></Tab></TabWidget>
+<TabWidget name="App_TabWidget"><Tab name="Drone_0"><PushButton name="save config on target" value="1"/></Tab></TabWidget></root>
Index: trunk/demos/CircleFollower/uav/build_i686/bin/setup_x4.xml
===================================================================
--- trunk/demos/CircleFollower/uav/build_i686/bin/setup_x4.xml	(revision 21)
+++ trunk/demos/CircleFollower/uav/build_i686/bin/setup_x4.xml	(revision 21)
@@ -0,0 +1,361 @@
+<?xml version="1.0"?>
+<!DOCTYPE remote_ui_xml>
+<root name="interface">
+<TabWidget name="Main_TabWidget">
+ <Tab name="dualshock3">
+  <TabWidget name="dualshock3">
+   <Tab name="Reglages">
+    <GroupBox name="dualshock3">
+     <SpinBox value="10" name="dead zone:"/>
+     <Label name="batterie"/>
+    </GroupBox>
+    <GroupBox name="consignes joy">
+     <DoubleSpinBox value="-20" name="debattement roll"/>
+     <DoubleSpinBox value="-20" name="debattement pitch"/>
+     <DoubleSpinBox value="90" name="debattement dyaw"/>
+     <DoubleSpinBox value="-0.7" name="debattement dz"/>
+     <DoubleSpinBox value="0" name="trim"/>
+     <Label name="trim roll"/>
+     <PushButton value="0" name="reset roll trim"/>
+     <Label name="trim pitch"/>
+     <PushButton value="0" name="reset pitch trim"/>
+    </GroupBox>
+   </Tab>
+   <Tab name="Mesures">
+    <DataPlot1D name="roll">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="pitch">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="yaw">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="gaz">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+   </Tab>
+  </TabWidget>
+ </Tab>
+ <Tab name="motors">
+  <TabWidget name="UavMultiplex">
+   <Tab name="Setup">
+    <GroupBox name="x4 multiplex">
+     <ComboBox value="0" name="front left blade pitch:"/>
+    </GroupBox>
+    <GroupBox name="motor attribution">
+     <ComboBox value="0" name="front left"/>
+     <ComboBox value="1" name="front rigth"/>
+     <ComboBox value="2" name="rear left"/>
+     <ComboBox value="3" name="rear rigth"/>
+    </GroupBox>
+    <GroupBox name="bldc">
+     <Label name="flight time"/>
+     <DoubleSpinBox value="0.4" name="min value:"/>
+     <DoubleSpinBox value="1" name="max value:"/>
+     <DoubleSpinBox value="0.1" name="test value:"/>
+     <PushButton value="0" name="test motor 0"/>
+     <PushButton value="0" name="test motor 1"/>
+     <PushButton value="0" name="test motor 2"/>
+     <PushButton value="0" name="test motor 3"/>
+    </GroupBox>
+    <GroupBox name="simubldc">
+     <DoubleSpinBox value="86" name="k driver:"/>
+    </GroupBox>
+   </Tab>
+   <Tab name="Values">
+    <DataPlot1D name="front left" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="front right" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="rear left" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="rear right" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+   </Tab>
+   <Tab name="Speeds">
+    <DataPlot1D name="front left" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="front right" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="rear left" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="rear right" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+   </Tab>
+  </TabWidget>
+ </Tab>
+ <Tab name="us">
+  <TabWidget name="us">
+   <Tab name="Reglages">
+    <GroupBox name="us">
+     <SpinBox value="50" name="data rate"/>
+    </GroupBox>
+    <GroupBox name="Passe bas">
+     <DoubleSpinBox value="0" name="period, 0 for auto"/>
+     <DoubleSpinBox value="5" name="cutoff frequency"/>
+    </GroupBox>
+    <GroupBox name="Vz">
+     <DoubleSpinBox value="0" name="period, 0 for auto:"/>
+    </GroupBox>
+    <GroupBox name="Passe bas v">
+     <DoubleSpinBox value="0" name="period, 0 for auto"/>
+     <DoubleSpinBox value="5" name="cutoff frequency"/>
+    </GroupBox>
+    <GroupBox name="alt cons">
+     <DoubleSpinBox value="0" name="period, 0 for auto:"/>
+     <DoubleSpinBox value="0.5" name="velocity max (absolute):"/>
+     <DoubleSpinBox value="0.2" name="acceleration (absolute):"/>
+    </GroupBox>
+    <GroupBox name="decollage">
+     <DoubleSpinBox value="1" name="alt decollage"/>
+     <DoubleSpinBox value="0" name="alt atterissage"/>
+    </GroupBox>
+   </Tab>
+   <Tab name="Mesures">
+    <DataPlot1D name="us" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="vz" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+   </Tab>
+  </TabWidget>
+ </Tab>
+ <Tab name="imu">
+  <TabWidget name="imu">
+   <Tab name="Reglages">
+    <GroupBox name="imu">
+     <SpinBox value="200" name="data rate"/>
+    </GroupBox>
+    <GroupBox name="post rotation">
+     <DoubleSpinBox value="0" name="value"/>
+     <ComboBox value="0" name="axis"/>
+    </GroupBox>
+   </Tab>
+   <Tab name="AHRS">
+    <DataPlot1D name="roll" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="pitch" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="yaw" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="w_x" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="w_y" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="w_z" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+   </Tab>
+  </TabWidget>
+ </Tab>
+ <Tab name="battery">
+  <GroupBox name="battery">
+   <Label name="battery"/>
+   <DoubleSpinBox value="10" name="threshold"/>
+  </GroupBox>
+ </Tab>
+ <Tab name="simu_cam_v">
+  <TabWidget name="simu_cam_v">
+   <Tab name="Setup">
+    <GroupBox name="simu_cam_v">
+     <SpinBox value="50" name="data rate"/>
+    </GroupBox>
+    <GridLayout name="setup"/>
+   </Tab>
+  </TabWidget>
+ </Tab>
+ <Tab name="vrpn">
+  <TabWidget name="vrpn">
+   <Tab name="Reglages">
+    <GroupBox name="post rotation 1">
+     <DoubleSpinBox value="0" name="value"/>
+     <ComboBox value="0" name="axis"/>
+    </GroupBox>
+    <GroupBox name="post rotation 2">
+     <DoubleSpinBox value="0" name="value"/>
+     <ComboBox value="0" name="axis"/>
+    </GroupBox>
+    <GroupBox name="x4_0 Passe bas">
+     <DoubleSpinBox value="0" name="period, 0 for auto"/>
+     <DoubleSpinBox value="2" name="cutoff frequency"/>
+    </GroupBox>
+    <GroupBox name="x4_0_euler">
+     <DoubleSpinBox value="0" name="period, 0 for auto:"/>
+    </GroupBox>
+    <GroupBox name="target Passe bas">
+     <DoubleSpinBox value="0" name="period, 0 for auto"/>
+     <DoubleSpinBox value="2" name="cutoff frequency"/>
+    </GroupBox>
+    <GroupBox name="target_euler">
+     <DoubleSpinBox value="0" name="period, 0 for auto:"/>
+    </GroupBox>
+    <GroupBox name="circle">
+     <DoubleSpinBox value="0" name="period, 0 for auto"/>
+     <DoubleSpinBox value="1.5" name="R"/>
+     <DoubleSpinBox value="1" name="velocity"/>
+     <DoubleSpinBox value="0.1" name="acceleration (absolute)"/>
+    </GroupBox>
+   </Tab>
+   <Tab name="Mesures x4_0">
+    <DataPlot1D name="x" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="y" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="z" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="vx" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="vy" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="vz" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+   </Tab>
+   <Tab name="Mesures (xy) x4_0">
+    <DataPlot2D name="xy" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot2D>
+   </Tab>
+   <Tab name="Mesures target">
+    <DataPlot1D name="x" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="y" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="z" period="100" enabled="0">
+     <Setup period="100" enabled="0"/>
+    </DataPlot1D>
+    <DataPlot1D name="vx" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="vy" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="vz" period="100" enabled="0">
+     <Setup period="100" enabled="0"/>
+    </DataPlot1D>
+   </Tab>
+   <Tab name="Mesures (xy) target">
+    <DataPlot2D name="xy" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot2D>
+   </Tab>
+  </TabWidget>
+ </Tab>
+ <Tab name="uav">
+  <GridLayout name="buttons">
+   <PushButton value="0" name="kill"/>
+   <PushButton value="0" name="start_log"/>
+   <PushButton value="0" name="stop_log"/>
+   <PushButton value="0" name="take_off"/>
+   <PushButton value="0" name="land"/>
+   <PushButton value="0" name="start_circle"/>
+   <PushButton value="0" name="stop_circle"/>
+  </GridLayout>
+  <GroupBox name="takeoff/landing">
+   <DoubleSpinBox value="1" name="desired takeoff altitude"/>
+   <DoubleSpinBox value="0" name="desired landing altitude"/>
+  </GroupBox>
+  <GroupBox name="alt cons">
+   <DoubleSpinBox value="0" name="period, 0 for auto:"/>
+   <DoubleSpinBox value="0.5" name="velocity max (absolute):"/>
+   <DoubleSpinBox value="0.2" name="acceleration (absolute):"/>
+  </GroupBox>
+ </Tab>
+ <Tab name="control laws">
+  <TabWidget name="laws">
+   <Tab name="Setup">
+    <GroupBox name="u_roll">
+     <DoubleSpinBox value="15" name="sat ref:"/>
+     <DoubleSpinBox value="5" name="kp:"/>
+     <DoubleSpinBox value="100" name="sat dref:"/>
+     <DoubleSpinBox value="0.1" name="kd:"/>
+     <DoubleSpinBox value="0.5" name="sat u:"/>
+    </GroupBox>
+    <GroupBox name="u_pitch">
+     <DoubleSpinBox value="15" name="sat ref:"/>
+     <DoubleSpinBox value="5" name="kp:"/>
+     <DoubleSpinBox value="100" name="sat dref:"/>
+     <DoubleSpinBox value="0.1" name="kd:"/>
+     <DoubleSpinBox value="0.5" name="sat u:"/>
+    </GroupBox>
+    <GroupBox name="u_yaw">
+     <DoubleSpinBox value="0" name="period, 0 for auto"/>
+     <DoubleSpinBox value="1" name="kp:"/>
+     <DoubleSpinBox value="0" name="ki:"/>
+     <DoubleSpinBox value="0" name="sat i:"/>
+     <DoubleSpinBox value="0.1" name="kd:"/>
+     <DoubleSpinBox value="0.2" name="sat:"/>
+    </GroupBox>
+    <GroupBox name="u_z">
+     <DoubleSpinBox value="0" name="period, 0 for auto"/>
+     <DoubleSpinBox value="0.3" name="kp:"/>
+     <DoubleSpinBox value="0.2" name="ki:"/>
+     <DoubleSpinBox value="0.5" name="sat i:"/>
+     <DoubleSpinBox value="0.1" name="kd:"/>
+     <DoubleSpinBox value="0.6" name="offset g:"/>
+     <DoubleSpinBox value="1" name="sat:"/>
+     <DoubleSpinBox value="0.0002" name="offset step:"/>
+    </GroupBox>
+    <GroupBox name="u_x">
+     <DoubleSpinBox value="0" name="period, 0 for auto"/>
+     <DoubleSpinBox value="0.2" name="kp:"/>
+     <DoubleSpinBox value="0" name="ki:"/>
+     <DoubleSpinBox value="0" name="sat i:"/>
+     <DoubleSpinBox value="0.2" name="kd:"/>
+     <DoubleSpinBox value="1" name="sat:"/>
+    </GroupBox>
+    <GroupBox name="u_y">
+     <DoubleSpinBox value="0" name="period, 0 for auto"/>
+     <DoubleSpinBox value="0.2" name="kp:"/>
+     <DoubleSpinBox value="0" name="ki:"/>
+     <DoubleSpinBox value="0" name="sat i:"/>
+     <DoubleSpinBox value="0.2" name="kd:"/>
+     <DoubleSpinBox value="1" name="sat:"/>
+    </GroupBox>
+   </Tab>
+   <Tab name="Graphes">
+    <DataPlot1D name="u_roll" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="u_pitch" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="u_yaw" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="u_z" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="u_x" period="100" enabled="0">
+     <Setup period="100" enabled="0"/>
+    </DataPlot1D>
+    <DataPlot1D name="u_y" period="100" enabled="0">
+     <Setup period="100" enabled="0"/>
+    </DataPlot1D>
+   </Tab>
+  </TabWidget>
+ </Tab>
+</TabWidget>
+<TabWidget name="App_TabWidget"><Tab name="x4_0"><PushButton name="save config on target" value="1"/></Tab></TabWidget></root>
Index: trunk/demos/CircleFollower/uav/build_i686/bin/setup_x8.xml
===================================================================
--- trunk/demos/CircleFollower/uav/build_i686/bin/setup_x8.xml	(revision 21)
+++ trunk/demos/CircleFollower/uav/build_i686/bin/setup_x8.xml	(revision 21)
@@ -0,0 +1,342 @@
+<?xml version="1.0"?>
+<!DOCTYPE remote_ui_xml>
+<root name="interface">
+<TabWidget name="Main_TabWidget">
+ <Tab name="motors">
+  <TabWidget name="UavMultiplex">
+   <Tab name="Setup">
+    <GroupBox name="x8 multiplex">
+     <ComboBox value="0" name="top front left blade pitch:"/>
+    </GroupBox>
+    <GroupBox name="motor attribution">
+     <ComboBox value="0" name="top front left"/>
+     <ComboBox value="1" name="top front rigth"/>
+     <ComboBox value="2" name="top rear left"/>
+     <ComboBox value="3" name="top rear rigth"/>
+     <ComboBox value="4" name="bottom front left"/>
+     <ComboBox value="5" name="bottom front rigth"/>
+     <ComboBox value="6" name="bottom rear left"/>
+     <ComboBox value="7" name="bottom rear rigth"/>
+    </GroupBox>
+    <GroupBox name="bldc">
+     <Label name="flight time"/>
+     <DoubleSpinBox value="0.4" name="min value:"/>
+     <DoubleSpinBox value="1" name="max value:"/>
+     <DoubleSpinBox value="0.1" name="test value:"/>
+     <PushButton value="0" name="test motor 0"/>
+     <PushButton value="0" name="test motor 1"/>
+     <PushButton value="0" name="test motor 2"/>
+     <PushButton value="0" name="test motor 3"/>
+     <PushButton value="0" name="test motor 4"/>
+     <PushButton value="0" name="test motor 5"/>
+     <PushButton value="0" name="test motor 6"/>
+     <PushButton value="0" name="test motor 7"/>
+    </GroupBox>
+    <GroupBox name="simubldc">
+     <DoubleSpinBox value="86" name="k driver:"/>
+    </GroupBox>
+   </Tab>
+   <Tab name="Values">
+    <DataPlot1D name="front left" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="front right" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="rear left" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="rear right" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+   </Tab>
+   <Tab name="Speeds">
+    <DataPlot1D name="front left" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="front right" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="rear left" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="rear right" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+   </Tab>
+  </TabWidget>
+ </Tab>
+ <Tab name="us">
+  <TabWidget name="us">
+   <Tab name="Reglages">
+    <GroupBox name="us">
+     <SpinBox value="50" name="data rate"/>
+    </GroupBox>
+    <GroupBox name="Passe bas">
+     <DoubleSpinBox value="0" name="period, 0 for auto"/>
+     <DoubleSpinBox value="5" name="cutoff frequency"/>
+    </GroupBox>
+    <GroupBox name="Vz">
+     <DoubleSpinBox value="0" name="period, 0 for auto:"/>
+    </GroupBox>
+    <GroupBox name="Passe bas v">
+     <DoubleSpinBox value="0" name="period, 0 for auto"/>
+     <DoubleSpinBox value="5" name="cutoff frequency"/>
+    </GroupBox>
+    <GroupBox name="alt cons">
+     <DoubleSpinBox value="0" name="period, 0 for auto:"/>
+     <DoubleSpinBox value="0.5" name="velocity max (absolute):"/>
+     <DoubleSpinBox value="0.2" name="acceleration (absolute):"/>
+    </GroupBox>
+    <GroupBox name="decollage">
+     <DoubleSpinBox value="1" name="alt decollage"/>
+     <DoubleSpinBox value="0" name="alt atterissage"/>
+    </GroupBox>
+   </Tab>
+   <Tab name="Mesures">
+    <DataPlot1D name="us" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="vz" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+   </Tab>
+  </TabWidget>
+ </Tab>
+ <Tab name="imu">
+  <TabWidget name="imu">
+   <Tab name="Reglages">
+    <GroupBox name="imu">
+     <SpinBox value="200" name="data rate"/>
+    </GroupBox>
+    <GroupBox name="post rotation">
+     <DoubleSpinBox value="0" name="value"/>
+     <ComboBox value="0" name="axis"/>
+    </GroupBox>
+   </Tab>
+   <Tab name="AHRS">
+    <DataPlot1D name="roll" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="pitch" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="yaw" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="w_x" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="w_y" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="w_z" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+   </Tab>
+  </TabWidget>
+ </Tab>
+ <Tab name="battery">
+  <GroupBox name="battery">
+   <Label name="battery"/>
+   <DoubleSpinBox value="10" name="threshold"/>
+  </GroupBox>
+ </Tab>
+ <Tab name="simu_cam_v">
+  <TabWidget name="simu_cam_v">
+   <Tab name="Setup">
+    <GroupBox name="simu_cam_v">
+     <SpinBox value="50" name="data rate"/>
+    </GroupBox>
+    <GridLayout name="setup"/>
+   </Tab>
+  </TabWidget>
+ </Tab>
+ <Tab name="vrpn">
+  <TabWidget name="vrpn">
+   <Tab name="Reglages">
+    <GroupBox name="post rotation 1">
+     <DoubleSpinBox value="0" name="value"/>
+     <ComboBox value="0" name="axis"/>
+    </GroupBox>
+    <GroupBox name="post rotation 2">
+     <DoubleSpinBox value="0" name="value"/>
+     <ComboBox value="0" name="axis"/>
+    </GroupBox>
+    <GroupBox name="x8_0 Passe bas">
+     <DoubleSpinBox value="0" name="period, 0 for auto"/>
+     <DoubleSpinBox value="2" name="cutoff frequency"/>
+    </GroupBox>
+    <GroupBox name="x8_0_euler">
+     <DoubleSpinBox value="0" name="period, 0 for auto:"/>
+    </GroupBox>
+    <GroupBox name="target Passe bas">
+     <DoubleSpinBox value="0" name="period, 0 for auto"/>
+     <DoubleSpinBox value="2" name="cutoff frequency"/>
+    </GroupBox>
+    <GroupBox name="target_euler">
+     <DoubleSpinBox value="0" name="period, 0 for auto:"/>
+    </GroupBox>
+    <GroupBox name="circle">
+     <DoubleSpinBox value="0" name="period, 0 for auto"/>
+     <DoubleSpinBox value="1.5" name="R"/>
+     <DoubleSpinBox value="1" name="velocity"/>
+     <DoubleSpinBox value="0.1" name="acceleration (absolute)"/>
+    </GroupBox>
+   </Tab>
+   <Tab name="Mesures x8_0">
+    <DataPlot1D name="x" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="y" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="z" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="vx" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="vy" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="vz" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+   </Tab>
+   <Tab name="Mesures (xy) x8_0">
+    <DataPlot2D name="xy" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot2D>
+   </Tab>
+   <Tab name="Mesures target">
+    <DataPlot1D name="x" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="y" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="z" period="100" enabled="0">
+     <Setup period="100" enabled="0"/>
+    </DataPlot1D>
+    <DataPlot1D name="vx" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="vy" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="vz" period="100" enabled="0">
+     <Setup period="100" enabled="0"/>
+    </DataPlot1D>
+   </Tab>
+   <Tab name="Mesures (xy) target">
+    <DataPlot2D name="xy" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot2D>
+   </Tab>
+  </TabWidget>
+ </Tab>
+ <Tab name="uav">
+  <GridLayout name="buttons">
+   <PushButton value="0" name="kill"/>
+   <PushButton value="0" name="start_log"/>
+   <PushButton value="0" name="stop_log"/>
+   <PushButton value="0" name="take_off"/>
+   <PushButton value="0" name="landing"/>
+   <PushButton value="0" name="start_circle"/>
+   <PushButton value="0" name="stop_circle"/>
+  <PushButton name="land"/></GridLayout>
+ <GroupBox name="takeoff/landing"><DoubleSpinBox name="desired takeoff altitude" value="1"/><DoubleSpinBox name="desired landing altitude" value="0"/></GroupBox><GroupBox name="alt cons"><DoubleSpinBox name="period, 0 for auto:" value="0"/><DoubleSpinBox name="velocity max (absolute):" value="0.5"/><DoubleSpinBox name="acceleration (absolute):" value="0.2"/></GroupBox></Tab>
+ <Tab name="control laws">
+  <TabWidget name="laws">
+   <Tab name="Setup">
+    <GroupBox name="u_roll">
+     <DoubleSpinBox value="15" name="sat ref:"/>
+     <DoubleSpinBox value="5" name="kp:"/>
+     <DoubleSpinBox value="100" name="sat dref:"/>
+     <DoubleSpinBox value="0.1" name="kd:"/>
+     <DoubleSpinBox value="0.5" name="sat u:"/>
+    </GroupBox>
+    <GroupBox name="u_pitch">
+     <DoubleSpinBox value="15" name="sat ref:"/>
+     <DoubleSpinBox value="5" name="kp:"/>
+     <DoubleSpinBox value="100" name="sat dref:"/>
+     <DoubleSpinBox value="0.1" name="kd:"/>
+     <DoubleSpinBox value="0.5" name="sat u:"/>
+    </GroupBox>
+    <GroupBox name="u_yaw">
+     <DoubleSpinBox value="0" name="period, 0 for auto"/>
+     <DoubleSpinBox value="1" name="kp:"/>
+     <DoubleSpinBox value="0" name="ki:"/>
+     <DoubleSpinBox value="0" name="sat i:"/>
+     <DoubleSpinBox value="0.1" name="kd:"/>
+     <DoubleSpinBox value="0.2" name="sat:"/>
+    </GroupBox>
+    <GroupBox name="u_x">
+     <DoubleSpinBox value="0" name="period, 0 for auto"/>
+     <DoubleSpinBox value="0.2" name="kp:"/>
+     <DoubleSpinBox value="0" name="ki:"/>
+     <DoubleSpinBox value="0" name="sat i:"/>
+     <DoubleSpinBox value="0.2" name="kd:"/>
+     <DoubleSpinBox value="1" name="sat:"/>
+    </GroupBox>
+    <GroupBox name="u_y">
+     <DoubleSpinBox value="0" name="period, 0 for auto"/>
+     <DoubleSpinBox value="0.2" name="kp:"/>
+     <DoubleSpinBox value="0" name="ki:"/>
+     <DoubleSpinBox value="0" name="sat i:"/>
+     <DoubleSpinBox value="0.2" name="kd:"/>
+     <DoubleSpinBox value="1" name="sat:"/>
+    </GroupBox>
+    <GroupBox name="u_z">
+     <DoubleSpinBox value="0" name="period, 0 for auto"/>
+     <DoubleSpinBox value="0.3" name="kp:"/>
+     <DoubleSpinBox value="0.2" name="ki:"/>
+     <DoubleSpinBox value="0.5" name="sat i:"/>
+     <DoubleSpinBox value="0.1" name="kd:"/>
+     <DoubleSpinBox value="0.6" name="offset g:"/>
+     <DoubleSpinBox value="1" name="sat:"/>
+     <DoubleSpinBox value="0.0002" name="offset step:"/>
+    </GroupBox>
+   </Tab>
+   <Tab name="Graphes">
+    <DataPlot1D name="u_roll" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="u_pitch" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="u_yaw" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="u_x" period="100" enabled="0">
+     <Setup period="100" enabled="0"/>
+    </DataPlot1D>
+    <DataPlot1D name="u_y" period="100" enabled="0">
+     <Setup period="100" enabled="0"/>
+    </DataPlot1D>
+    <DataPlot1D name="u_z" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+   </Tab>
+  </TabWidget>
+ </Tab>
+ <Tab name="dualshock3">
+  <TabWidget name="dualshock3">
+   <Tab name="Reglages">
+    <GroupBox name="consignes joy">
+     <DoubleSpinBox value="-20" name="debattement roll"/>
+     <DoubleSpinBox value="-20" name="debattement pitch"/>
+     <DoubleSpinBox value="90" name="debattement dyaw"/>
+     <DoubleSpinBox value="-0.7" name="debattement dz"/>
+     <DoubleSpinBox value="0" name="trim"/>
+     <Label name="trim roll"/>
+     <PushButton value="0" name="reset roll trim"/>
+     <Label name="trim pitch"/>
+     <PushButton value="0" name="reset pitch trim"/>
+    </GroupBox>
+   </Tab>
+  </TabWidget>
+ </Tab>
+</TabWidget>
+<TabWidget name="App_TabWidget"><Tab name="x8_0"><PushButton name="save config on target" value="1"/></Tab></TabWidget></root>
Index: trunk/demos/CircleFollower/uav/build_i686/bin/x4.sh
===================================================================
--- trunk/demos/CircleFollower/uav/build_i686/bin/x4.sh	(revision 21)
+++ trunk/demos/CircleFollower/uav/build_i686/bin/x4.sh	(revision 21)
@@ -0,0 +1,11 @@
+#! /bin/bash
+
+. $IGEP_ROOT/uav_dev/bin/noarch/ubuntu_cgroup_hack.sh
+
+if [ -f /proc/xenomai/version ];then
+	EXEC=./demo_optitrack_rt
+else
+	EXEC=./demo_optitrack_nrt
+fi
+
+$EXEC -n x4_0 -a 127.0.0.1 -p 9000 -l /tmp -x setup_x4.xml -t x4_simu
Index: trunk/demos/CircleFollower/uav/build_i686/bin/x8.sh
===================================================================
--- trunk/demos/CircleFollower/uav/build_i686/bin/x8.sh	(revision 21)
+++ trunk/demos/CircleFollower/uav/build_i686/bin/x8.sh	(revision 21)
@@ -0,0 +1,11 @@
+#! /bin/bash
+
+. $IGEP_ROOT/uav_dev/bin/noarch/ubuntu_cgroup_hack.sh
+
+if [ -f /proc/xenomai/version ];then
+	EXEC=./demo_optitrack_rt
+else
+	EXEC=./demo_optitrack_nrt
+fi
+
+$EXEC -n x8_0 -a 127.0.0.1 -p 9000 -l ./ -x setup_x8.xml -t x8_simu
Index: trunk/demos/CircleFollower/uav/build_x86_64/bin/setup_x4.xml
===================================================================
--- trunk/demos/CircleFollower/uav/build_x86_64/bin/setup_x4.xml	(revision 21)
+++ trunk/demos/CircleFollower/uav/build_x86_64/bin/setup_x4.xml	(revision 21)
@@ -0,0 +1,361 @@
+<?xml version="1.0"?>
+<!DOCTYPE remote_ui_xml>
+<root name="interfac">
+<TabWidget name="Main_TabWidget">
+ <Tab name="dualshock3">
+  <TabWidget name="dualshock3">
+   <Tab name="Reglages">
+    <GroupBox name="dualshock3">
+     <SpinBox value="10" name="dead zone:"/>
+     <Label name="batterie"/>
+    </GroupBox>
+    <GroupBox name="consignes joy">
+     <DoubleSpinBox value="-20" name="debattement roll"/>
+     <DoubleSpinBox value="-20" name="debattement pitch"/>
+     <DoubleSpinBox value="90" name="debattement dyaw"/>
+     <DoubleSpinBox value="-0.7" name="debattement dz"/>
+     <DoubleSpinBox value="0" name="trim"/>
+     <Label name="trim roll"/>
+     <PushButton value="0" name="reset roll trim"/>
+     <Label name="trim pitch"/>
+     <PushButton value="0" name="reset pitch trim"/>
+    <DoubleSpinBox name="debattement wz" value="90"/></GroupBox>
+   </Tab>
+   <Tab name="Mesures">
+    <DataPlot1D name="roll">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="pitch">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="yaw">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="gaz">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+   </Tab>
+  </TabWidget>
+ </Tab>
+ <Tab name="motors">
+  <TabWidget name="UavMultiplex">
+   <Tab name="Setup">
+    <GroupBox name="x4 multiplex">
+     <ComboBox value="0" name="front left blade pitch:"/>
+    </GroupBox>
+    <GroupBox name="motor attribution">
+     <ComboBox value="0" name="front left"/>
+     <ComboBox value="1" name="front rigth"/>
+     <ComboBox value="2" name="rear left"/>
+     <ComboBox value="3" name="rear rigth"/>
+    </GroupBox>
+    <GroupBox name="bldc">
+     <Label name="flight time"/>
+     <DoubleSpinBox value="0.4" name="min value:"/>
+     <DoubleSpinBox value="1" name="max value:"/>
+     <DoubleSpinBox value="0.1" name="test value:"/>
+     <PushButton value="0" name="test motor 0"/>
+     <PushButton value="0" name="test motor 1"/>
+     <PushButton value="0" name="test motor 2"/>
+     <PushButton value="0" name="test motor 3"/>
+    </GroupBox>
+    <GroupBox name="simubldc">
+     <DoubleSpinBox value="86" name="k driver:"/>
+    </GroupBox>
+   </Tab>
+   <Tab name="Values">
+    <DataPlot1D name="front left" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="front right" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="rear left" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="rear right" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+   </Tab>
+   <Tab name="Speeds">
+    <DataPlot1D name="front left" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="front right" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="rear left" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="rear right" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+   </Tab>
+  <Tab name="Currents"><DataPlot1D name="front left" period="100" enabled="0"/><DataPlot1D name="front right" period="100" enabled="0"/><DataPlot1D name="rear left" period="100" enabled="0"/><DataPlot1D name="rear right" period="100" enabled="0"/></Tab></TabWidget>
+ </Tab>
+ <Tab name="us">
+  <TabWidget name="us">
+   <Tab name="Reglages">
+    <GroupBox name="us">
+     <SpinBox value="50" name="data rate"/>
+    </GroupBox>
+    <GroupBox name="Passe bas">
+     <DoubleSpinBox value="0" name="period, 0 for auto"/>
+     <DoubleSpinBox value="5" name="cutoff frequency"/>
+    </GroupBox>
+    <GroupBox name="Vz">
+     <DoubleSpinBox value="0" name="period, 0 for auto:"/>
+    </GroupBox>
+    <GroupBox name="Passe bas v">
+     <DoubleSpinBox value="0" name="period, 0 for auto"/>
+     <DoubleSpinBox value="5" name="cutoff frequency"/>
+    </GroupBox>
+    <GroupBox name="alt cons">
+     <DoubleSpinBox value="0" name="period, 0 for auto:"/>
+     <DoubleSpinBox value="0.5" name="velocity max (absolute):"/>
+     <DoubleSpinBox value="0.2" name="acceleration (absolute):"/>
+    </GroupBox>
+    <GroupBox name="decollage">
+     <DoubleSpinBox value="1" name="alt decollage"/>
+     <DoubleSpinBox value="0" name="alt atterissage"/>
+    </GroupBox>
+   </Tab>
+   <Tab name="Mesures">
+    <DataPlot1D name="us" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="vz" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+   </Tab>
+  </TabWidget>
+ </Tab>
+ <Tab name="imu">
+  <TabWidget name="imu">
+   <Tab name="Reglages">
+    <GroupBox name="imu">
+     <SpinBox value="200" name="data rate"/>
+    </GroupBox>
+    <GroupBox name="post rotation">
+     <DoubleSpinBox value="0" name="value"/>
+     <ComboBox value="0" name="axis"/>
+    </GroupBox>
+   </Tab>
+   <Tab name="AHRS">
+    <DataPlot1D name="roll" period="100" enabled="1">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="pitch" period="100" enabled="1">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="yaw" period="100" enabled="1">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="w_x" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="w_y" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="w_z" period="100" enabled="1">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+   </Tab>
+  <Tab name="Quaternion"><DataPlot1D name="q0" period="100" enabled="1"/><DataPlot1D name="q1" period="100" enabled="1"/><DataPlot1D name="q2" period="100" enabled="1"/><DataPlot1D name="q3" period="100" enabled="1"/></Tab><Tab name="IMU"><DataPlot1D name="acc_x" period="100" enabled="0"/><DataPlot1D name="acc_y" period="100" enabled="0"/><DataPlot1D name="acc_z" period="100" enabled="0"/><DataPlot1D name="gyr_x" period="100" enabled="0"/><DataPlot1D name="gyr_y" period="100" enabled="0"/><DataPlot1D name="gyr_z" period="100" enabled="0"/><DataPlot1D name="mag_x" period="100" enabled="0"/><DataPlot1D name="mag_y" period="100" enabled="0"/><DataPlot1D name="mag_z" period="100" enabled="0"/></Tab></TabWidget>
+ </Tab>
+ <Tab name="battery">
+  <GroupBox name="battery">
+   <Label name="battery"/>
+   <DoubleSpinBox value="10" name="threshold"/>
+  </GroupBox>
+ </Tab>
+ <Tab name="simu_cam_v">
+  <TabWidget name="simu_cam_v">
+   <Tab name="Setup">
+    <GroupBox name="simu_cam_v">
+     <SpinBox value="50" name="data rate"/>
+    </GroupBox>
+    <GridLayout name="setup"/>
+   </Tab>
+  </TabWidget>
+ </Tab>
+ <Tab name="vrpn">
+  <TabWidget name="vrpn">
+   <Tab name="Reglages">
+    <GroupBox name="post rotation 1">
+     <DoubleSpinBox value="0" name="value"/>
+     <ComboBox value="0" name="axis"/>
+    </GroupBox>
+    <GroupBox name="post rotation 2">
+     <DoubleSpinBox value="0" name="value"/>
+     <ComboBox value="0" name="axis"/>
+    </GroupBox>
+    <GroupBox name="x4_0 Passe bas">
+     <DoubleSpinBox value="0" name="period, 0 for auto"/>
+     <DoubleSpinBox value="2" name="cutoff frequency"/>
+    </GroupBox>
+    <GroupBox name="x4_0_euler">
+     <DoubleSpinBox value="0" name="period, 0 for auto:"/>
+    </GroupBox>
+    <GroupBox name="target Passe bas">
+     <DoubleSpinBox value="0" name="period, 0 for auto"/>
+     <DoubleSpinBox value="2" name="cutoff frequency"/>
+    </GroupBox>
+    <GroupBox name="target_euler">
+     <DoubleSpinBox value="0" name="period, 0 for auto:"/>
+    </GroupBox>
+    <GroupBox name="circle">
+     <DoubleSpinBox value="0" name="period, 0 for auto"/>
+     <DoubleSpinBox value="1.5" name="R"/>
+     <DoubleSpinBox value="1" name="velocity"/>
+     <DoubleSpinBox value="0.1" name="acceleration (absolute)"/>
+    </GroupBox>
+   </Tab>
+   <Tab name="Mesures x4_0">
+    <DataPlot1D name="x" period="100" enabled="1">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="y" period="100" enabled="1">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="z" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="vx" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="vy" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="vz" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+   </Tab>
+   <Tab name="Mesures (xy) x4_0">
+    <DataPlot2D name="xy" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot2D>
+   </Tab>
+   <Tab name="Mesures target">
+    <DataPlot1D name="x" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="y" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="z" period="100" enabled="0">
+     <Setup period="100" enabled="0"/>
+    </DataPlot1D>
+    <DataPlot1D name="vx" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="vy" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="vz" period="100" enabled="0">
+     <Setup period="100" enabled="0"/>
+    </DataPlot1D>
+   </Tab>
+   <Tab name="Mesures (xy) target">
+    <DataPlot2D name="xy" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot2D>
+   </Tab>
+  </TabWidget>
+ </Tab>
+ <Tab name="uav">
+  <GridLayout name="buttons">
+   <PushButton value="0" name="kill"/>
+   <PushButton value="0" name="start_log"/>
+   <PushButton value="0" name="stop_log"/>
+   <PushButton value="0" name="take_off"/>
+   <PushButton value="0" name="land"/>
+   <PushButton value="0" name="start_circle"/>
+   <PushButton value="0" name="stop_circle"/>
+  </GridLayout>
+  <GroupBox name="takeoff/landing">
+   <DoubleSpinBox value="1" name="desired takeoff altitude"/>
+   <DoubleSpinBox value="0" name="desired landing altitude"/>
+  </GroupBox>
+  <GroupBox name="alt cons">
+   <DoubleSpinBox value="0" name="period, 0 for auto:"/>
+   <DoubleSpinBox value="0.5" name="velocity max (absolute):"/>
+   <DoubleSpinBox value="0.2" name="acceleration (absolute):"/>
+  </GroupBox>
+ </Tab>
+ <Tab name="control laws">
+  <TabWidget name="laws">
+   <Tab name="Setup">
+    <GroupBox name="u_roll">
+     <DoubleSpinBox value="15" name="sat ref:"/>
+     <DoubleSpinBox value="15" name="kp:"/>
+     <DoubleSpinBox value="100" name="sat dref:"/>
+     <DoubleSpinBox value="0.1" name="kd:"/>
+     <DoubleSpinBox value="0.5" name="sat u:"/>
+    </GroupBox>
+    <GroupBox name="u_pitch">
+     <DoubleSpinBox value="15" name="sat ref:"/>
+     <DoubleSpinBox value="15" name="kp:"/>
+     <DoubleSpinBox value="100" name="sat dref:"/>
+     <DoubleSpinBox value="0.1" name="kd:"/>
+     <DoubleSpinBox value="0.5" name="sat u:"/>
+    </GroupBox>
+    <GroupBox name="u_yaw">
+     <DoubleSpinBox value="0" name="period, 0 for auto"/>
+     <DoubleSpinBox value="1" name="kp:"/>
+     <DoubleSpinBox value="0" name="ki:"/>
+     <DoubleSpinBox value="0" name="sat i:"/>
+     <DoubleSpinBox value="0.1" name="kd:"/>
+     <DoubleSpinBox value="0.2" name="sat:"/>
+    </GroupBox>
+    <GroupBox name="u_z">
+     <DoubleSpinBox value="0" name="period, 0 for auto"/>
+     <DoubleSpinBox value="0.3" name="kp:"/>
+     <DoubleSpinBox value="0.2" name="ki:"/>
+     <DoubleSpinBox value="0.5" name="sat i:"/>
+     <DoubleSpinBox value="0.1" name="kd:"/>
+     <DoubleSpinBox value="0.6" name="offset g:"/>
+     <DoubleSpinBox value="1" name="sat:"/>
+     <DoubleSpinBox value="0.0002" name="offset step:"/>
+    </GroupBox>
+    <GroupBox name="u_x">
+     <DoubleSpinBox value="0" name="period, 0 for auto"/>
+     <DoubleSpinBox value="0.2" name="kp:"/>
+     <DoubleSpinBox value="0" name="ki:"/>
+     <DoubleSpinBox value="0" name="sat i:"/>
+     <DoubleSpinBox value="0.2" name="kd:"/>
+     <DoubleSpinBox value="1" name="sat:"/>
+    </GroupBox>
+    <GroupBox name="u_y">
+     <DoubleSpinBox value="0" name="period, 0 for auto"/>
+     <DoubleSpinBox value="0.2" name="kp:"/>
+     <DoubleSpinBox value="0" name="ki:"/>
+     <DoubleSpinBox value="0" name="sat i:"/>
+     <DoubleSpinBox value="0.2" name="kd:"/>
+     <DoubleSpinBox value="1" name="sat:"/>
+    </GroupBox>
+   </Tab>
+   <Tab name="Graphes">
+    <DataPlot1D name="u_roll" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="u_pitch" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="u_yaw" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="u_z" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="u_x" period="100" enabled="0">
+     <Setup period="100" enabled="0"/>
+    </DataPlot1D>
+    <DataPlot1D name="u_y" period="100" enabled="0">
+     <Setup period="100" enabled="0"/>
+    </DataPlot1D>
+   </Tab>
+  </TabWidget>
+ </Tab>
+</TabWidget>
+<TabWidget name="App_TabWidget"><Tab name="x4_0"><PushButton name="save config on target" value="1"/></Tab></TabWidget><PushButton name="save config on target (x4_0)" value="1"/></root>
Index: trunk/demos/CircleFollower/uav/build_x86_64/bin/setup_x8.xml
===================================================================
--- trunk/demos/CircleFollower/uav/build_x86_64/bin/setup_x8.xml	(revision 21)
+++ trunk/demos/CircleFollower/uav/build_x86_64/bin/setup_x8.xml	(revision 21)
@@ -0,0 +1,342 @@
+<?xml version="1.0"?>
+<!DOCTYPE remote_ui_xml>
+<root name="interface">
+<TabWidget name="Main_TabWidget">
+ <Tab name="motors">
+  <TabWidget name="UavMultiplex">
+   <Tab name="Setup">
+    <GroupBox name="x8 multiplex">
+     <ComboBox value="0" name="top front left blade pitch:"/>
+    </GroupBox>
+    <GroupBox name="motor attribution">
+     <ComboBox value="0" name="top front left"/>
+     <ComboBox value="1" name="top front rigth"/>
+     <ComboBox value="2" name="top rear left"/>
+     <ComboBox value="3" name="top rear rigth"/>
+     <ComboBox value="4" name="bottom front left"/>
+     <ComboBox value="5" name="bottom front rigth"/>
+     <ComboBox value="6" name="bottom rear left"/>
+     <ComboBox value="7" name="bottom rear rigth"/>
+    </GroupBox>
+    <GroupBox name="bldc">
+     <Label name="flight time"/>
+     <DoubleSpinBox value="0.4" name="min value:"/>
+     <DoubleSpinBox value="1" name="max value:"/>
+     <DoubleSpinBox value="0.1" name="test value:"/>
+     <PushButton value="0" name="test motor 0"/>
+     <PushButton value="0" name="test motor 1"/>
+     <PushButton value="0" name="test motor 2"/>
+     <PushButton value="0" name="test motor 3"/>
+     <PushButton value="0" name="test motor 4"/>
+     <PushButton value="0" name="test motor 5"/>
+     <PushButton value="0" name="test motor 6"/>
+     <PushButton value="0" name="test motor 7"/>
+    </GroupBox>
+    <GroupBox name="simubldc">
+     <DoubleSpinBox value="86" name="k driver:"/>
+    </GroupBox>
+   </Tab>
+   <Tab name="Values">
+    <DataPlot1D name="front left" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="front right" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="rear left" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="rear right" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+   </Tab>
+   <Tab name="Speeds">
+    <DataPlot1D name="front left" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="front right" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="rear left" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="rear right" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+   </Tab>
+  </TabWidget>
+ </Tab>
+ <Tab name="us">
+  <TabWidget name="us">
+   <Tab name="Reglages">
+    <GroupBox name="us">
+     <SpinBox value="50" name="data rate"/>
+    </GroupBox>
+    <GroupBox name="Passe bas">
+     <DoubleSpinBox value="0" name="period, 0 for auto"/>
+     <DoubleSpinBox value="5" name="cutoff frequency"/>
+    </GroupBox>
+    <GroupBox name="Vz">
+     <DoubleSpinBox value="0" name="period, 0 for auto:"/>
+    </GroupBox>
+    <GroupBox name="Passe bas v">
+     <DoubleSpinBox value="0" name="period, 0 for auto"/>
+     <DoubleSpinBox value="5" name="cutoff frequency"/>
+    </GroupBox>
+    <GroupBox name="alt cons">
+     <DoubleSpinBox value="0" name="period, 0 for auto:"/>
+     <DoubleSpinBox value="0.5" name="velocity max (absolute):"/>
+     <DoubleSpinBox value="0.2" name="acceleration (absolute):"/>
+    </GroupBox>
+    <GroupBox name="decollage">
+     <DoubleSpinBox value="1" name="alt decollage"/>
+     <DoubleSpinBox value="0" name="alt atterissage"/>
+    </GroupBox>
+   </Tab>
+   <Tab name="Mesures">
+    <DataPlot1D name="us" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="vz" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+   </Tab>
+  </TabWidget>
+ </Tab>
+ <Tab name="imu">
+  <TabWidget name="imu">
+   <Tab name="Reglages">
+    <GroupBox name="imu">
+     <SpinBox value="200" name="data rate"/>
+    </GroupBox>
+    <GroupBox name="post rotation">
+     <DoubleSpinBox value="0" name="value"/>
+     <ComboBox value="0" name="axis"/>
+    </GroupBox>
+   </Tab>
+   <Tab name="AHRS">
+    <DataPlot1D name="roll" period="100" enabled="1">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="pitch" period="100" enabled="1">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="yaw" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="w_x" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="w_y" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="w_z" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+   </Tab>
+  </TabWidget>
+ </Tab>
+ <Tab name="battery">
+  <GroupBox name="battery">
+   <Label name="battery"/>
+   <DoubleSpinBox value="10" name="threshold"/>
+  </GroupBox>
+ </Tab>
+ <Tab name="simu_cam_v">
+  <TabWidget name="simu_cam_v">
+   <Tab name="Setup">
+    <GroupBox name="simu_cam_v">
+     <SpinBox value="50" name="data rate"/>
+    </GroupBox>
+    <GridLayout name="setup"/>
+   </Tab>
+  </TabWidget>
+ </Tab>
+ <Tab name="vrpn">
+  <TabWidget name="vrpn">
+   <Tab name="Reglages">
+    <GroupBox name="post rotation 1">
+     <DoubleSpinBox value="0" name="value"/>
+     <ComboBox value="0" name="axis"/>
+    </GroupBox>
+    <GroupBox name="post rotation 2">
+     <DoubleSpinBox value="0" name="value"/>
+     <ComboBox value="0" name="axis"/>
+    </GroupBox>
+    <GroupBox name="x8_0 Passe bas">
+     <DoubleSpinBox value="0" name="period, 0 for auto"/>
+     <DoubleSpinBox value="2" name="cutoff frequency"/>
+    </GroupBox>
+    <GroupBox name="x8_0_euler">
+     <DoubleSpinBox value="0" name="period, 0 for auto:"/>
+    </GroupBox>
+    <GroupBox name="target Passe bas">
+     <DoubleSpinBox value="0" name="period, 0 for auto"/>
+     <DoubleSpinBox value="2" name="cutoff frequency"/>
+    </GroupBox>
+    <GroupBox name="target_euler">
+     <DoubleSpinBox value="0" name="period, 0 for auto:"/>
+    </GroupBox>
+    <GroupBox name="circle">
+     <DoubleSpinBox value="0" name="period, 0 for auto"/>
+     <DoubleSpinBox value="1.5" name="R"/>
+     <DoubleSpinBox value="1" name="velocity"/>
+     <DoubleSpinBox value="0.1" name="acceleration (absolute)"/>
+    </GroupBox>
+   </Tab>
+   <Tab name="Mesures x8_0">
+    <DataPlot1D name="x" period="100" enabled="1">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="y" period="100" enabled="1">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="z" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="vx" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="vy" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="vz" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+   </Tab>
+   <Tab name="Mesures (xy) x8_0">
+    <DataPlot2D name="xy" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot2D>
+   </Tab>
+   <Tab name="Mesures target">
+    <DataPlot1D name="x" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="y" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="z" period="100" enabled="0">
+     <Setup period="100" enabled="0"/>
+    </DataPlot1D>
+    <DataPlot1D name="vx" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="vy" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="vz" period="100" enabled="0">
+     <Setup period="100" enabled="0"/>
+    </DataPlot1D>
+   </Tab>
+   <Tab name="Mesures (xy) target">
+    <DataPlot2D name="xy" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot2D>
+   </Tab>
+  </TabWidget>
+ </Tab>
+ <Tab name="uav">
+  <GridLayout name="buttons">
+   <PushButton value="0" name="kill"/>
+   <PushButton value="0" name="start_log"/>
+   <PushButton value="0" name="stop_log"/>
+   <PushButton value="0" name="take_off"/>
+   <PushButton value="0" name="landing"/>
+   <PushButton value="0" name="start_circle"/>
+   <PushButton value="0" name="stop_circle"/>
+  <PushButton name="land"/></GridLayout>
+ <GroupBox name="takeoff/landing"><DoubleSpinBox name="desired takeoff altitude" value="1"/><DoubleSpinBox name="desired landing altitude" value="0"/></GroupBox><GroupBox name="alt cons"><DoubleSpinBox name="period, 0 for auto:" value="0"/><DoubleSpinBox name="velocity max (absolute):" value="0.5"/><DoubleSpinBox name="acceleration (absolute):" value="0.2"/></GroupBox></Tab>
+ <Tab name="control laws">
+  <TabWidget name="laws">
+   <Tab name="Setup">
+    <GroupBox name="u_roll">
+     <DoubleSpinBox value="15" name="sat ref:"/>
+     <DoubleSpinBox value="15.00" name="kp:"/>
+     <DoubleSpinBox value="100" name="sat dref:"/>
+     <DoubleSpinBox value="0.1" name="kd:"/>
+     <DoubleSpinBox value="0.5" name="sat u:"/>
+    </GroupBox>
+    <GroupBox name="u_pitch">
+     <DoubleSpinBox value="15" name="sat ref:"/>
+     <DoubleSpinBox value="15.00" name="kp:"/>
+     <DoubleSpinBox value="100" name="sat dref:"/>
+     <DoubleSpinBox value="0.1" name="kd:"/>
+     <DoubleSpinBox value="0.5" name="sat u:"/>
+    </GroupBox>
+    <GroupBox name="u_yaw">
+     <DoubleSpinBox value="0" name="period, 0 for auto"/>
+     <DoubleSpinBox value="1" name="kp:"/>
+     <DoubleSpinBox value="0" name="ki:"/>
+     <DoubleSpinBox value="0" name="sat i:"/>
+     <DoubleSpinBox value="0.1" name="kd:"/>
+     <DoubleSpinBox value="0.2" name="sat:"/>
+    </GroupBox>
+    <GroupBox name="u_x">
+     <DoubleSpinBox value="0" name="period, 0 for auto"/>
+     <DoubleSpinBox value="0.2" name="kp:"/>
+     <DoubleSpinBox value="0" name="ki:"/>
+     <DoubleSpinBox value="0" name="sat i:"/>
+     <DoubleSpinBox value="0.2" name="kd:"/>
+     <DoubleSpinBox value="1" name="sat:"/>
+    </GroupBox>
+    <GroupBox name="u_y">
+     <DoubleSpinBox value="0" name="period, 0 for auto"/>
+     <DoubleSpinBox value="0.2" name="kp:"/>
+     <DoubleSpinBox value="0" name="ki:"/>
+     <DoubleSpinBox value="0" name="sat i:"/>
+     <DoubleSpinBox value="0.2" name="kd:"/>
+     <DoubleSpinBox value="1" name="sat:"/>
+    </GroupBox>
+    <GroupBox name="u_z">
+     <DoubleSpinBox value="0" name="period, 0 for auto"/>
+     <DoubleSpinBox value="0.3" name="kp:"/>
+     <DoubleSpinBox value="0.2" name="ki:"/>
+     <DoubleSpinBox value="0.5" name="sat i:"/>
+     <DoubleSpinBox value="0.1" name="kd:"/>
+     <DoubleSpinBox value="0.6" name="offset g:"/>
+     <DoubleSpinBox value="1" name="sat:"/>
+     <DoubleSpinBox value="0.0002" name="offset step:"/>
+    </GroupBox>
+   </Tab>
+   <Tab name="Graphes">
+    <DataPlot1D name="u_roll" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="u_pitch" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="u_yaw" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+    <DataPlot1D name="u_x" period="100" enabled="0">
+     <Setup period="100" enabled="0"/>
+    </DataPlot1D>
+    <DataPlot1D name="u_y" period="100" enabled="0">
+     <Setup period="100" enabled="0"/>
+    </DataPlot1D>
+    <DataPlot1D name="u_z" period="100" enabled="0">
+     <Setup period="100" enabled="1"/>
+    </DataPlot1D>
+   </Tab>
+  </TabWidget>
+ </Tab>
+ <Tab name="dualshock3">
+  <TabWidget name="dualshock3">
+   <Tab name="Reglages">
+    <GroupBox name="consignes joy">
+     <DoubleSpinBox value="-20" name="debattement roll"/>
+     <DoubleSpinBox value="-20" name="debattement pitch"/>
+     <DoubleSpinBox value="90" name="debattement dyaw"/>
+     <DoubleSpinBox value="-0.7" name="debattement dz"/>
+     <DoubleSpinBox value="0" name="trim"/>
+     <Label name="trim roll"/>
+     <PushButton value="0" name="reset roll trim"/>
+     <Label name="trim pitch"/>
+     <PushButton value="0" name="reset pitch trim"/>
+    </GroupBox>
+   </Tab>
+  </TabWidget>
+ </Tab>
+</TabWidget>
+<TabWidget name="App_TabWidget"><Tab name="x8_0"><PushButton name="save config on target" value="1"/></Tab></TabWidget><PushButton name="save config on target (x8_0)" value="1"/></root>
Index: trunk/demos/CircleFollower/uav/build_x86_64/bin/x4.sh
===================================================================
--- trunk/demos/CircleFollower/uav/build_x86_64/bin/x4.sh	(revision 21)
+++ trunk/demos/CircleFollower/uav/build_x86_64/bin/x4.sh	(revision 21)
@@ -0,0 +1,11 @@
+#! /bin/bash
+
+. $IGEP_ROOT/uav_dev/bin/noarch/ubuntu_cgroup_hack.sh
+
+if [ -f /proc/xenomai/version ];then
+	EXEC=./CircleFollower_rt
+else
+	EXEC=./CircleFollower_nrt
+fi
+
+$EXEC -n x4_0 -a 127.0.0.1 -p 9000 -l /tmp -x setup_x4.xml -t x4_simu
Index: trunk/demos/CircleFollower/uav/build_x86_64/bin/x8.sh
===================================================================
--- trunk/demos/CircleFollower/uav/build_x86_64/bin/x8.sh	(revision 21)
+++ trunk/demos/CircleFollower/uav/build_x86_64/bin/x8.sh	(revision 21)
@@ -0,0 +1,11 @@
+#! /bin/bash
+
+. $IGEP_ROOT/uav_dev/bin/noarch/ubuntu_cgroup_hack.sh
+
+if [ -f /proc/xenomai/version ];then
+	EXEC=./CircleFollower_rt
+else
+	EXEC=./CircleFollower_nrt
+fi
+
+$EXEC -n x8_0 -a 127.0.0.1 -p 9000 -l ./ -x setup_x8.xml -t x8_simu
Index: trunk/demos/CircleFollower/uav/src/CircleFollower.cpp
===================================================================
--- trunk/demos/CircleFollower/uav/src/CircleFollower.cpp	(revision 21)
+++ trunk/demos/CircleFollower/uav/src/CircleFollower.cpp	(revision 21)
@@ -0,0 +1,267 @@
+//  created:    2011/05/01
+//  filename:   CircleFollower.cpp
+//
+//  author:     Guillaume Sanahuja
+//              Copyright Heudiasyc UMR UTC/CNRS 7253
+//
+//  version:    $Id: $
+//
+//  purpose:    demo cercle avec optitrack
+//
+//
+/*********************************************************************/
+
+#include "CircleFollower.h"
+#include <Uav.h>
+#include <GridLayout.h>
+#include <PushButton.h>
+#include <DataPlot1D.h>
+#include <DataPlot2D.h>
+#include <MetaDualShock3.h>
+#include <FrameworkManager.h>
+#include <VrpnClient.h>
+#include <MetaVrpnObject.h>
+#include <TrajectoryGenerator2DCircle.h>
+#include <cvmatrix.h>
+#include <cmath>
+#include <Tab.h>
+#include <Pid.h>
+#include <Ahrs.h>
+#include <AhrsData.h>
+
+using namespace std;
+using namespace framework::core;
+using namespace framework::gui;
+using namespace framework::filter;
+using namespace framework::meta;
+
+CircleFollower::CircleFollower(Uav* uav): UavStateMachine(uav), behaviourMode(BehaviourMode_t::Default), vrpnLost(false) {
+    uav->SetupVRPNAutoIP(uav->ObjectName());
+
+    startCircle=new PushButton(GetButtonsLayout()->NewRow(),"start_circle");
+    stopCircle=new PushButton(GetButtonsLayout()->LastRowLastCol(),"stop_circle");
+
+    if(uav->GetVrpnClient()->UseXbee()==true) {
+        targetVrpn=new MetaVrpnObject(uav->GetVrpnClient(),"target",1);
+    } else {
+        targetVrpn=new MetaVrpnObject(uav->GetVrpnClient(),"target");
+    }
+
+    getFrameworkManager()->AddDeviceToLog(targetVrpn);
+
+    circle=new TrajectoryGenerator2DCircle(uav->GetVrpnClient()->GetLayout()->NewRow(),"circle");
+    uav->GetVrpnObject()->xPlot()->AddCurve(circle->Matrix()->Element(0,0),DataPlot::Blue);
+    uav->GetVrpnObject()->yPlot()->AddCurve(circle->Matrix()->Element(0,1),DataPlot::Blue);
+    uav->GetVrpnObject()->VxPlot()->AddCurve(circle->Matrix()->Element(1,0),DataPlot::Blue);
+    uav->GetVrpnObject()->VyPlot()->AddCurve(circle->Matrix()->Element(1,1),DataPlot::Blue);
+    uav->GetVrpnObject()->XyPlot()->AddCurve(circle->Matrix()->Element(0,1),circle->Matrix()->Element(0,0),DataPlot::Blue,"circle");
+
+    uX=new Pid(setupLawTab->At(1,0),"u_x");
+    uX->UseDefaultPlot(graphLawTab->NewRow());
+    uY=new Pid(setupLawTab->At(1,1),"u_y");
+    uY->UseDefaultPlot(graphLawTab->LastRowLastCol());
+
+    customReferenceOrientation= new AhrsData(this,"reference");
+    uav->GetAhrs()->AddPlot(customReferenceOrientation,DataPlot::Yellow);
+    AddDataToControlLawLog(customReferenceOrientation);
+
+    customOrientation=new AhrsData(this,"orientation");
+}
+
+CircleFollower::~CircleFollower() {
+}
+
+const AhrsData *CircleFollower::GetOrientation(void) const {
+    //get yaw from vrpn
+    Euler vrpnEuler;
+    GetUav()->GetVrpnObject()->GetEuler(vrpnEuler);
+
+    //get roll, pitch and w from imu
+    Quaternion ahrsQuaternion;
+    Vector3D ahrsAngularSpeed;
+    GetDefaultOrientation()->GetQuaternionAndAngularRates(ahrsQuaternion, ahrsAngularSpeed);
+
+    Euler ahrsEuler=ahrsQuaternion.ToEuler();
+    ahrsEuler.yaw=vrpnEuler.yaw;
+    Quaternion mixQuaternion=ahrsEuler.ToQuaternion();
+
+    customOrientation->SetQuaternionAndAngularRates(mixQuaternion,ahrsAngularSpeed);
+
+    return customOrientation;
+}
+
+void CircleFollower::AltitudeValues(float &z,float &dz) {
+    Vector3D uav_pos,uav_vel;
+
+    GetUav()->GetVrpnObject()->GetPosition(uav_pos);
+    GetUav()->GetVrpnObject()->GetSpeed(uav_vel);
+    //z and dz must be in uav's frame
+    z=-uav_pos.z;
+    dz=-uav_vel.z;
+}
+
+AhrsData *CircleFollower::GetReferenceOrientation(void) {
+    Vector2D pos_err, vel_err; // in Uav coordinate system
+    float yaw_ref;
+    Euler refAngles;
+
+    PositionValues(pos_err, vel_err, yaw_ref);
+
+    refAngles.yaw=yaw_ref;
+
+    uX->SetValues(pos_err.x, vel_err.x);
+    uX->Update(GetTime());
+    refAngles.pitch=uX->Output();
+
+    uY->SetValues(pos_err.y, vel_err.y);
+    uY->Update(GetTime());
+    refAngles.roll=-uY->Output();
+
+    customReferenceOrientation->SetQuaternionAndAngularRates(refAngles.ToQuaternion(),Vector3D(0,0,0));
+
+    return customReferenceOrientation;
+}
+
+void CircleFollower::PositionValues(Vector2D &pos_error,Vector2D &vel_error,float &yaw_ref) {
+    Vector3D uav_pos,uav_vel; // in VRPN coordinate system
+    Vector2D uav_2Dpos,uav_2Dvel; // in VRPN coordinate system
+
+    GetUav()->GetVrpnObject()->GetPosition(uav_pos);
+    GetUav()->GetVrpnObject()->GetSpeed(uav_vel);
+
+    uav_pos.To2Dxy(uav_2Dpos);
+    uav_vel.To2Dxy(uav_2Dvel);
+
+    if (behaviourMode==BehaviourMode_t::PositionHold) {
+        pos_error=uav_2Dpos-posHold;
+        vel_error=uav_2Dvel;
+        yaw_ref=yawHold;
+    } else { //Circle
+        Vector3D target_pos;
+        Vector2D circle_pos,circle_vel;
+        Vector2D target_2Dpos;
+
+        targetVrpn->GetPosition(target_pos);
+        target_pos.To2Dxy(target_2Dpos);
+        circle->SetCenter(target_2Dpos);
+
+        //circle reference
+        circle->Update(GetTime());
+        circle->GetPosition(circle_pos);
+        circle->GetSpeed(circle_vel);
+
+        //error in optitrack frame
+        pos_error=uav_2Dpos-circle_pos;
+        vel_error=uav_2Dvel-circle_vel;
+        yaw_ref=atan2(target_pos.y-uav_pos.y,target_pos.x-uav_pos.x);
+    }
+
+    //error in uav frame
+    Quaternion currentQuaternion=GetCurrentQuaternion();
+    Euler currentAngles;//in vrpn frame
+    currentQuaternion.ToEuler(currentAngles);
+    pos_error.Rotate(-currentAngles.yaw);
+    vel_error.Rotate(-currentAngles.yaw);
+}
+
+void CircleFollower::SignalEvent(Event_t event) {
+    UavStateMachine::SignalEvent(event);
+    switch(event) {
+    case Event_t::TakingOff:
+        behaviourMode=BehaviourMode_t::Default;
+        vrpnLost=false;
+        break;
+    case Event_t::EnteringControlLoop:
+        if ((behaviourMode==BehaviourMode_t::Circle) && (!circle->IsRunning())) {
+            VrpnPositionHold();
+        }
+        break;
+    case Event_t::EnteringFailSafeMode:
+        behaviourMode=BehaviourMode_t::Default;
+        break;
+    }
+}
+
+void CircleFollower::ExtraSecurityCheck(void) {
+    if ((!vrpnLost) && ((behaviourMode==BehaviourMode_t::Circle) || (behaviourMode==BehaviourMode_t::PositionHold))) {
+        if (!targetVrpn->IsTracked(500)) {
+            Thread::Err("VRPN, target lost\n");
+            vrpnLost=true;
+            EnterFailSafeMode();
+            Land();
+        }
+        if (!GetUav()->GetVrpnObject()->IsTracked(500)) {
+            Thread::Err("VRPN, uav lost\n");
+            vrpnLost=true;
+            EnterFailSafeMode();
+            Land();
+        }
+    }
+}
+
+void CircleFollower::ExtraCheckPushButton(void) {
+    if(startCircle->Clicked() && (behaviourMode!=BehaviourMode_t::Circle)) {
+        StartCircle();
+    }
+    if(stopCircle->Clicked() && (behaviourMode==BehaviourMode_t::Circle)) {
+        StopCircle();
+    }
+}
+
+void CircleFollower::ExtraCheckJoystick(void) {
+    //R1 and Circle
+    if(GetJoystick()->IsButtonPressed(9) && GetJoystick()->IsButtonPressed(4) && (behaviourMode!=BehaviourMode_t::Circle)) {
+        StartCircle();
+    }
+
+    //R1 and Cross
+    if(GetJoystick()->IsButtonPressed(9) && GetJoystick()->IsButtonPressed(5) && (behaviourMode==BehaviourMode_t::Circle)) {
+        StopCircle();
+    }
+}
+
+void CircleFollower::StartCircle(void) {
+    if (SetOrientationMode(OrientationMode_t::Custom)) {
+        Thread::Info("CircleFollower: start circle\n");
+    } else {
+        Thread::Warn("CircleFollower: could not start circle\n");
+        return;
+    }
+    Vector3D uav_pos,target_pos;
+    Vector2D uav_2Dpos,target_2Dpos;
+
+    targetVrpn->GetPosition(target_pos);
+    target_pos.To2Dxy(target_2Dpos);
+    circle->SetCenter(target_2Dpos);
+
+    GetUav()->GetVrpnObject()->GetPosition(uav_pos);
+    uav_pos.To2Dxy(uav_2Dpos);
+    circle->StartTraj(uav_2Dpos);
+
+    uX->Reset();
+    uY->Reset();
+    behaviourMode=BehaviourMode_t::Circle;
+}
+
+void CircleFollower::StopCircle(void) {
+    circle->FinishTraj();
+    //GetJoystick()->Rumble(0x70);
+    Thread::Info("CircleFollower: finishing circle\n");
+}
+
+void CircleFollower::VrpnPositionHold(void) {
+    Euler vrpn_euler;
+    Vector3D vrpn_pos;
+
+    GetUav()->GetVrpnObject()->GetEuler(vrpn_euler);
+    yawHold=vrpn_euler.yaw;
+
+    GetUav()->GetVrpnObject()->GetPosition(vrpn_pos);
+    vrpn_pos.To2Dxy(posHold);
+
+    uX->Reset();
+    uY->Reset();
+    behaviourMode=BehaviourMode_t::PositionHold;
+    SetOrientationMode(OrientationMode_t::Custom);
+    Thread::Info("CircleFollower: holding position\n");
+}
Index: trunk/demos/CircleFollower/uav/src/CircleFollower.h
===================================================================
--- trunk/demos/CircleFollower/uav/src/CircleFollower.h	(revision 21)
+++ trunk/demos/CircleFollower/uav/src/CircleFollower.h	(revision 21)
@@ -0,0 +1,69 @@
+//  created:    2011/05/01
+//  filename:   CircleFollower.h
+//
+//  author:     Guillaume Sanahuja
+//              Copyright Heudiasyc UMR UTC/CNRS 7253
+//
+//  version:    $Id: $
+//
+//  purpose:    demo cercle avec optitrack
+//
+//
+/*********************************************************************/
+
+#ifndef CIRCLEFOLLOWER_H
+#define CIRCLEFOLLOWER_H
+
+#include <UavStateMachine.h>
+
+namespace framework {
+    namespace gui {
+        class PushButton;
+    }
+    namespace filter {
+        class TrajectoryGenerator2DCircle;
+    }
+    namespace meta {
+        class MetaVrpnObject;
+    }
+}
+
+class CircleFollower : public framework::meta::UavStateMachine {
+    public:
+        CircleFollower(framework::meta::Uav* uav);
+        ~CircleFollower();
+
+    private:
+        enum class BehaviourMode_t {
+            Default,
+            PositionHold,
+            Circle
+        };
+
+        BehaviourMode_t behaviourMode;
+        bool vrpnLost;
+
+        void VrpnPositionHold(void);//flight mode
+        void StartCircle(void);
+        void StopCircle(void);
+        void ExtraSecurityCheck(void);
+        void ExtraCheckPushButton(void);
+        void ExtraCheckJoystick(void);
+        const framework::core::AhrsData *GetOrientation(void) const;
+        void AltitudeValues(float &z,float &dz);
+        void PositionValues(framework::core::Vector2D &pos_error,framework::core::Vector2D &vel_error,float &yaw_ref);
+        framework::core::AhrsData *GetReferenceOrientation(void);
+        void SignalEvent(Event_t event);
+
+        framework::filter::Pid *uX, *uY;
+
+        framework::core::Vector2D posHold;
+        float yawHold;
+
+        framework::gui::PushButton *startCircle,*stopCircle;
+        framework::meta::MetaVrpnObject *targetVrpn;
+        framework::filter::TrajectoryGenerator2DCircle *circle;
+        framework::core::AhrsData *customReferenceOrientation,*customOrientation;
+};
+
+#endif // CIRCLEFOLLOWER_H
Index: trunk/demos/CircleFollower/uav/src/main.cpp
===================================================================
--- trunk/demos/CircleFollower/uav/src/main.cpp	(revision 21)
+++ trunk/demos/CircleFollower/uav/src/main.cpp	(revision 21)
@@ -0,0 +1,89 @@
+//  created:    2011/05/01
+//  filename:   main.cpp
+//
+//  author:     Guillaume Sanahuja
+//              Copyright Heudiasyc UMR UTC/CNRS 7253
+//
+//  version:    $Id: $
+//
+//  purpose:    exemple de code uav
+//
+//
+/*********************************************************************/
+
+#include "CircleFollower.h"
+#include <UavFactory.h>
+#include <FrameworkManager.h>
+#include <stdio.h>
+#include <tclap/CmdLine.h>
+
+using namespace TCLAP;
+using namespace std;
+using namespace framework::core;
+using namespace framework::meta;
+
+string uav_type;
+string log_path;
+int port;
+string xml_file;
+string name;
+string address;
+
+void parseOptions(int argc, char** argv);
+
+
+int main(int argc, char* argv[]) {
+    parseOptions(argc,argv);
+
+    FrameworkManager *manager;
+    manager= new FrameworkManager(name);
+    manager->SetupConnection(address,port);
+    manager->SetupUserInterface(xml_file);
+    manager->SetupLogger(log_path);
+
+    Uav* drone=CreateUav(manager,name,uav_type);
+    CircleFollower* demo=new CircleFollower(drone);
+
+    demo->Start();
+    demo->Join();
+
+    delete manager;
+}
+
+void parseOptions(int argc, char** argv) {
+	try {
+
+        CmdLine cmd("Command description message", ' ', "0.1");
+
+        ValueArg<string> nameArg("n","name","uav name, also used for vrpn",true,"x4","string");
+        cmd.add( nameArg );
+
+        ValueArg<string> typeArg("t","type","uav type: ardrone2, hds_x4, hds_x8, hds_xufo, x4_simu, x8_simu or x4_simux (with x the number of the simulated uav)",true,"hds_x4","string");
+        cmd.add( typeArg );
+
+        ValueArg<string> xmlArg("x","xml","fichier xml",true,"./reglages.xml","string");
+        cmd.add( xmlArg );
+
+        ValueArg<string> logsArg("l","logs","repertoire des logs",true,"/media/ram","string");
+        cmd.add( logsArg );
+
+        ValueArg<int> portArg("p","port","port pour station sol",true,9000,"int");
+        cmd.add( portArg );
+
+        ValueArg<string> addressArg("a","address","addresse station sol",true,"127.0.0.1","string");
+        cmd.add( addressArg );
+
+        cmd.parse( argc, argv );
+
+        // Get the value parsed by each arg.
+        log_path = logsArg.getValue();
+        port=portArg.getValue();
+        xml_file = xmlArg.getValue();
+        name=nameArg.getValue();
+        uav_type=typeArg.getValue();
+        address=addressArg.getValue();
+
+	} catch (ArgException &e) { // catch any exceptions
+        cerr << "error: " << e.error() << " for arg " << e.argId() << endl;
+	}
+}
