Index: trunk/lib/FlairMeta/src/SimuUgv.cpp
===================================================================
--- trunk/lib/FlairMeta/src/SimuUgv.cpp	(revision 377)
+++ trunk/lib/FlairMeta/src/SimuUgv.cpp	(revision 377)
@@ -0,0 +1,49 @@
+// %flair:license{
+// This file is part of the Flair framework distributed under the
+// CECILL-C License, Version 1.0.
+// %flair:license}
+//  created:    2020/12/16
+//  filename:   SimuUgv.cpp
+//
+//  author:     Guillaume Sanahuja
+//              Copyright Heudiasyc UMR UTC/CNRS 7253
+//
+//  version:    $Id: $
+//
+//  purpose:    Class defining a simulation ugv
+//
+//
+/*********************************************************************/
+#ifdef CORE2_64
+
+#include "SimuUgv.h"
+#include <SimulatedUgvControls.h>
+
+using std::string;
+using namespace flair::core;
+using namespace flair::actuator;
+
+namespace flair {
+namespace meta {
+
+SimuUgv::SimuUgv(string name, uint32_t simu_id)
+    : Ugv(name) {
+
+
+  SetUgvControls(new SimulatedUgvControls("controls", simu_id,0));
+  
+  
+}
+
+SimuUgv::~SimuUgv() {}
+
+void SimuUgv::StartSensors(void) {
+ 
+}
+
+
+
+} // end namespace meta
+} // end namespace flair
+
+#endif
Index: trunk/lib/FlairMeta/src/SimuUgv.h
===================================================================
--- trunk/lib/FlairMeta/src/SimuUgv.h	(revision 377)
+++ trunk/lib/FlairMeta/src/SimuUgv.h	(revision 377)
@@ -0,0 +1,39 @@
+// %flair:license{
+// This file is part of the Flair framework distributed under the
+// CECILL-C License, Version 1.0.
+// %flair:license}
+/*!
+ * \file SimuUgv.h
+ * \brief Class defining a simulation x4 uav
+ * \author Guillaume Sanahuja, Copyright Heudiasyc UMR UTC/CNRS 7253
+ * \date 2020/12/16
+ * \version 4.0
+ */
+
+#ifndef SIMUUGV_H
+#define SIMUUGV_H
+
+#include "Ugv.h"
+
+namespace flair {
+namespace meta {
+  
+/*! \class SimuUgv
+*
+* \brief Class defining a simulation ugv
+*/
+class SimuUgv : public Ugv {
+  public:
+    // simu_id: 0 if simulating only one ugv
+    //>0 otherwise
+    SimuUgv(std::string name, uint32_t simu_id = 0);
+    ~SimuUgv();
+    void StartSensors(void);
+    virtual std::string GetType(void) const{return "ugv_simu";}
+
+  private:
+   
+};
+} // end namespace meta
+} // end namespace flair
+#endif // SIMUUGV_H
Index: trunk/lib/FlairMeta/src/Uav.cpp
===================================================================
--- trunk/lib/FlairMeta/src/Uav.cpp	(revision 319)
+++ trunk/lib/FlairMeta/src/Uav.cpp	(revision 377)
@@ -21,5 +21,4 @@
 #include <GridLayout.h>
 #include <DataPlot1D.h>
-#include <VrpnClient.h>
 #include <Ahrs.h>
 #include <Imu.h>
@@ -31,5 +30,5 @@
 #include <Matrix.h>
 #include "MetaUsRangeFinder.h"
-#include "MetaVrpnObject.h"
+
 
 using std::string;
Index: trunk/lib/FlairMeta/src/Uav.h
===================================================================
--- trunk/lib/FlairMeta/src/Uav.h	(revision 319)
+++ trunk/lib/FlairMeta/src/Uav.h	(revision 377)
@@ -11,9 +11,8 @@
  */
 
-#ifndef HDSUAV_H
-#define HDSUAV_H
+#ifndef UAV_H
+#define UAV_H
 
 #include <Object.h>
-#include <UsRangeFinder.h>
 
 namespace flair {
@@ -103,3 +102,3 @@
 } // end namespace meta
 } // end namespace flair
-#endif // HDSUAV_H
+#endif // UAV_H
Index: trunk/lib/FlairMeta/src/Ugv.cpp
===================================================================
--- trunk/lib/FlairMeta/src/Ugv.cpp	(revision 377)
+++ trunk/lib/FlairMeta/src/Ugv.cpp	(revision 377)
@@ -0,0 +1,64 @@
+// %flair:license{
+// This file is part of the Flair framework distributed under the
+// CECILL-C License, Version 1.0.
+// %flair:license}
+//  created:    2020/12/16
+//  filename:   Ugv.cpp
+//
+//  author:     Guillaume Sanahuja
+//              Copyright Heudiasyc UMR UTC/CNRS 7253
+//
+//  version:    $Id: $
+//
+//  purpose:    Base class to construct sensors/actuators depending on Ugv type
+//
+//
+/*********************************************************************/
+
+#include "Ugv.h"
+#include <FrameworkManager.h>
+#include <UgvControls.h>
+
+
+using std::string;
+using namespace flair::core;
+using namespace flair::actuator;
+
+namespace {
+  flair::meta::Ugv *UgvSingleton = NULL;
+}
+
+namespace flair {
+namespace meta {
+
+Ugv *GetUgv(void) { return UgvSingleton; }
+	
+Ugv::Ugv(string name)
+    : Object(getFrameworkManager(), name) {
+	if (UgvSingleton != NULL) {
+    Err("Ugv must be instanced only one time\n");
+    return;
+  }
+
+  UgvSingleton = this;
+  controls=NULL;
+  
+}
+
+Ugv::~Ugv() {}
+
+
+void Ugv::SetUgvControls(const UgvControls *inControls) { 
+  controls = (UgvControls *)inControls;
+}
+
+
+void Ugv::UseDefaultPlot(void) {
+  if(controls) controls->UseDefaultPlot();
+}
+
+
+UgvControls *Ugv::GetUgvControls(void) const { return controls; }
+
+} // end namespace meta
+} // end namespace flair
Index: trunk/lib/FlairMeta/src/Ugv.h
===================================================================
--- trunk/lib/FlairMeta/src/Ugv.h	(revision 377)
+++ trunk/lib/FlairMeta/src/Ugv.h	(revision 377)
@@ -0,0 +1,64 @@
+// %flair:license{
+// This file is part of the Flair framework distributed under the
+// CECILL-C License, Version 1.0.
+// %flair:license}
+/*!
+ * \file Ugv.h
+ * \brief Base class to construct sensors/actuators depending on Ugv type
+ * \author Guillaume Sanahuja, Copyright Heudiasyc UMR UTC/CNRS 7253
+ * \date 2020/12/16
+ * \version 3.4
+ */
+
+#ifndef UGV_H
+#define UGV_H
+
+#include <Object.h>
+
+namespace flair {
+	namespace actuator {
+		class UgvControls;
+	}
+}
+
+namespace flair {
+namespace meta {
+
+/*! \class Ugv
+*
+* \brief Base class to construct sensors/actuators depending on Ugv type.
+* The Object is created with 
+*  the FrameworkManager as parent. FrameworkManager must be created before.
+* Only one instance of this class is allowed by program.
+*/
+class Ugv : public core::Object {
+public:
+
+  Ugv(std::string name);
+  ~Ugv();
+
+  virtual void StartSensors(void)=0;
+  void UseDefaultPlot(void);
+  actuator::UgvControls *GetUgvControls(void) const;
+	virtual std::string GetDefaultVrpnAddress(void) const{return "127.0.0.1:3883";}
+  virtual bool isReadyToGo(void) const { return true;}
+  virtual std::string GetType(void) const=0;
+
+protected:
+  void SetUgvControls(const actuator::UgvControls *controls);
+  
+
+private:
+  actuator::UgvControls *controls;
+};
+
+/*!
+* \brief get Ugv
+*
+* \return the Ugv
+*/
+Ugv *GetUgv(void);
+
+} // end namespace meta
+} // end namespace flair
+#endif // UGV_H
Index: trunk/lib/FlairMeta/src/UgvFactory.cpp
===================================================================
--- trunk/lib/FlairMeta/src/UgvFactory.cpp	(revision 377)
+++ trunk/lib/FlairMeta/src/UgvFactory.cpp	(revision 377)
@@ -0,0 +1,71 @@
+// %flair:license{
+// This file is part of the Flair framework distributed under the
+// CECILL-C License, Version 1.0.
+// %flair:license}
+//  created:    2020/12/16
+//  filename:   UgvFactory.cpp
+//
+//  author:     Guillaume Sanahuja
+//              Copyright Heudiasyc UMR UTC/CNRS 7253
+//
+//  version:    $Id: $
+//
+//  purpose:   construct a Ugv based on the type name
+//
+//
+/*********************************************************************/
+
+#include "UgvFactory.h"
+#include "FrameworkManager.h"
+#include "SimuUgv.h"
+
+
+using namespace std;
+using namespace flair::core;
+using namespace flair::meta;
+
+namespace { // anonymous
+     vector<flair::meta::Ugv* (*)(string,string,string)> *vectoroffunctions=NULL;
+}
+
+
+Ugv *CreateUgv(string name, string type,string options) {
+
+  Ugv *ugv;
+
+  if(vectoroffunctions!=NULL) {
+    for(int i=0;i<vectoroffunctions->size();i++) {
+      ugv=vectoroffunctions->at(i)(name,type,options);
+      if(ugv!=NULL) {
+        free(vectoroffunctions);
+        vectoroffunctions=NULL;
+        return ugv;
+      }
+    }
+  }
+
+#ifdef CORE2_64
+  if (type.compare(0, 8, "ugv_simu") == 0) {
+    int simu_id = 0;
+    if (type.size() > 8) {
+      simu_id = atoi(type.substr(8, type.size() - 8).c_str());
+    }
+    return new SimuUgv(name, simu_id);
+  }/* else if (type.compare(0, 7, "x8_simu") == 0) {
+    int simu_id = 0;
+    if (type.size() > 7) {
+      simu_id = atoi(type.substr(7, type.size() - 7).c_str());
+    }
+    return new SimuX8(name, simu_id,options, multiplex);
+  }*/ else {
+    getFrameworkManager()->Err("UGV type %s unknown\n", type.c_str());
+    return NULL;
+  }
+#endif
+}
+
+void RegisterUgvCreator(flair::meta::Ugv*(*func)(string,string,string)) {
+  if(vectoroffunctions==NULL) vectoroffunctions=(vector<flair::meta::Ugv* (*)(string,string,string)>*)malloc(sizeof(vector<flair::meta::Ugv* (*)(string,string,string)>));
+
+  vectoroffunctions->push_back(func);
+}
Index: trunk/lib/FlairMeta/src/UgvFactory.h
===================================================================
--- trunk/lib/FlairMeta/src/UgvFactory.h	(revision 377)
+++ trunk/lib/FlairMeta/src/UgvFactory.h	(revision 377)
@@ -0,0 +1,26 @@
+// %flair:license{
+// This file is part of the Flair framework distributed under the
+// CECILL-C License, Version 1.0.
+// %flair:license}
+//  created:    2020/12/16
+//  filename:   UgvFactory.cpp
+//
+//  author:     Guillaume Sanahuja
+//              Copyright Heudiasyc UMR UTC/CNRS 7253
+//
+//  version:    $Id: $
+//
+//  purpose:   construct a Ugv based on the type name
+//
+//
+/*********************************************************************/
+
+#ifndef UGVFACTORY
+#define UGVFACTORY
+
+#include <Ugv.h>
+
+flair::meta::Ugv *CreateUgv(std::string name, std::string type,std::string options="");
+
+void RegisterUgvCreator(flair::meta::Ugv*(*func)(std::string,std::string,std::string));
+#endif // UGVFACTORY
