Index: trunk/demos/TwoWheelRobotCircleFollower/ugv/src/CircleFollower.cpp
===================================================================
--- trunk/demos/TwoWheelRobotCircleFollower/ugv/src/CircleFollower.cpp	(revision 376)
+++ trunk/demos/TwoWheelRobotCircleFollower/ugv/src/CircleFollower.cpp	(revision 377)
@@ -25,4 +25,6 @@
 #include <Tab.h>
 #include <Pid.h>
+#include <Ugv.h>
+#include <UgvControls.h>
 
 using namespace std;
@@ -32,20 +34,24 @@
 using namespace flair::filter;
 using namespace flair::meta;
+using namespace flair::actuator;
 
 CircleFollower::CircleFollower(string name,TargetController *controller): Thread(getFrameworkManager(),"CircleFollower",50), behaviourMode(BehaviourMode_t::Default), vrpnLost(false) {
    this->controller=controller;
     controller->Start();
-	
-    VrpnClient* vrpnclient=new VrpnClient("vrpn", "127.0.0.1:3883",80);
+    
+    Ugv* ugv=GetUgv();
+    ugv->UseDefaultPlot();
+    
+    VrpnClient* vrpnclient=new VrpnClient("vrpn", ugv->GetDefaultVrpnAddress(),80);
     
     if(vrpnclient->ConnectionType()==VrpnClient::Xbee) {
-        uavVrpn = new MetaVrpnObject(name,(uint8_t)0);
+        ugvVrpn = new MetaVrpnObject(name,(uint8_t)0);
         targetVrpn=new MetaVrpnObject("target",1);
     } else if (vrpnclient->ConnectionType()==VrpnClient::Vrpn) {
-        uavVrpn = new MetaVrpnObject(name);
+        ugvVrpn = new MetaVrpnObject(name);
         targetVrpn=new MetaVrpnObject("target");
     }
     
-    getFrameworkManager()->AddDeviceToLog(uavVrpn);
+    getFrameworkManager()->AddDeviceToLog(ugvVrpn);
     getFrameworkManager()->AddDeviceToLog(targetVrpn);
     vrpnclient->Start();
@@ -58,9 +64,9 @@
     
     circle=new TrajectoryGenerator2DCircle(vrpnclient->GetLayout()->NewRow(),"circle");
-    uavVrpn->xPlot()->AddCurve(circle->GetMatrix()->Element(0,0),DataPlot::Blue);
-    uavVrpn->yPlot()->AddCurve(circle->GetMatrix()->Element(0,1),DataPlot::Blue);
-    uavVrpn->VxPlot()->AddCurve(circle->GetMatrix()->Element(1,0),DataPlot::Blue);
-    uavVrpn->VyPlot()->AddCurve(circle->GetMatrix()->Element(1,1),DataPlot::Blue);
-    uavVrpn->XyPlot()->AddCurve(circle->GetMatrix()->Element(0,1),circle->GetMatrix()->Element(0,0),DataPlot::Blue,"circle");
+    ugvVrpn->xPlot()->AddCurve(circle->GetMatrix()->Element(0,0),DataPlot::Blue);
+    ugvVrpn->yPlot()->AddCurve(circle->GetMatrix()->Element(0,1),DataPlot::Blue);
+    ugvVrpn->VxPlot()->AddCurve(circle->GetMatrix()->Element(1,0),DataPlot::Blue);
+    ugvVrpn->VyPlot()->AddCurve(circle->GetMatrix()->Element(1,1),DataPlot::Blue);
+    ugvVrpn->XyPlot()->AddCurve(circle->GetMatrix()->Element(0,1),circle->GetMatrix()->Element(0,0),DataPlot::Blue,"circle");
 /*
     uX=new Pid(setupLawTab->At(1,0),"u_x");
@@ -81,13 +87,13 @@
     }
 
-    while (!ToBeStopped()) {/*
-        float x=-controller->GetAxisValue(3)*forwardCoef->Value();
-        float rot=controller->GetAxisValue(0)*turnCoef->Value();
-        
-        sumoControl->move(x, rot);
-        
+    while (!ToBeStopped()) {
+        float speed=-controller->GetAxisValue(3);
+        float turn=controller->GetAxisValue(0);
+       
+        //sumoControl->move(x, rot);
+        GetUgv()->GetUgvControls()->SetControls(speed,turn);
         if (button_kill->Clicked() == true)
             SafeStop();
-        */
+        
         WaitPeriod();
     }
Index: trunk/demos/TwoWheelRobotCircleFollower/ugv/src/CircleFollower.h
===================================================================
--- trunk/demos/TwoWheelRobotCircleFollower/ugv/src/CircleFollower.h	(revision 376)
+++ trunk/demos/TwoWheelRobotCircleFollower/ugv/src/CircleFollower.h	(revision 377)
@@ -23,5 +23,5 @@
     namespace filter {
         class TrajectoryGenerator2DCircle;
-		class Pid;
+        class Pid;
     }
     namespace meta {
@@ -56,6 +56,7 @@
 
         flair::gui::PushButton *startCircle,*stopCircle,*button_kill;
-        flair::meta::MetaVrpnObject *targetVrpn,*uavVrpn;
+        flair::meta::MetaVrpnObject *targetVrpn,*ugvVrpn;
         flair::filter::TrajectoryGenerator2DCircle *circle;
+
 };
 
Index: trunk/demos/TwoWheelRobotCircleFollower/ugv/src/main.cpp
===================================================================
--- trunk/demos/TwoWheelRobotCircleFollower/ugv/src/main.cpp	(revision 376)
+++ trunk/demos/TwoWheelRobotCircleFollower/ugv/src/main.cpp	(revision 377)
@@ -14,4 +14,5 @@
 #include "CircleFollower.h"
 #include <FrameworkManager.h>
+#include <UgvFactory.h>
 #include <stdio.h>
 #include <tclap/CmdLine.h>
@@ -24,4 +25,5 @@
 using namespace flair::sensor;
 
+string ugv_type;
 string log_path;
 int port;
@@ -43,4 +45,5 @@
     manager->SetupLogger(log_path);
 
+    Ugv* ugv=CreateUgv(name,ugv_type);
     TargetEthController *controller=new TargetEthController("Dualshock3",ds3port);
     CircleFollower* demo=new CircleFollower(name,controller);
@@ -59,4 +62,7 @@
         ValueArg<string> nameArg("n","name","uav name, also used for vrpn",true,"x4","string");
         cmd.add( nameArg );
+        
+        ValueArg<string> typeArg("t","type","ugv type: sumo, ugv_simu or ugv_simux (with x the number of the simulated ugv)",true,"ugv_sumo","string");
+        cmd.add( typeArg );
 
         ValueArg<string> xmlArg("x","xml","fichier xml",true,"./reglages.xml","string");
@@ -84,4 +90,5 @@
         name=nameArg.getValue();
         address=addressArg.getValue();
+        ugv_type=typeArg.getValue();
 
 	} catch (ArgException &e) { // catch any exceptions
