ocra-wbi-plugins
Doxygen documentation for the ocra-wbi-plugins repository
ocra-wbi-plugins/ocra-icub/include/ocra-icub/ModelInitializer.h
Go to the documentation of this file.
00001 #ifndef MODEL_INITIALIZER_H
00002 #define MODEL_INITIALIZER_H
00003 
00004 #include <ocra-icub/OcraWbiModel.h>
00005 #include <ocra/control/Model.h>
00006 #include <yarpWholeBodyInterface/yarpWholeBodyInterface.h>
00007 
00008 #include <yarp/os/RpcClient.h>
00009 #include <yarp/os/Network.h>
00010 #include <yarp/os/LogStream.h>
00011 #include <yarp/os/Log.h>
00012 
00013 namespace ocra_icub
00014 {
00015 
00016 class ModelInitializer {
00017 private:
00018     std::shared_ptr<yarpWbi::yarpWholeBodyInterface> robotInterface;
00019     std::shared_ptr<ocra::Model> model;
00020 
00021     std::string wbiConfigFilePath;
00022     std::string robotName;
00023     bool isFloatingBase;
00024 
00025     yarp::os::Log yLog;
00026 
00027     bool configureWbi();
00028     void constructModel();
00029     bool getConfigurationInfoFromControllerServer();
00030 
00031     std::string getUniqueWbiName();
00032     int modInitNumber;
00033     static int MODEL_INITIALIZER_COUNT;
00034 
00035 public:
00036     ModelInitializer ();
00037     virtual ~ModelInitializer ();
00038 
00039     std::shared_ptr<ocra::Model> getModel(){return model;}
00040 
00041 
00042 };
00043 
00044 } /* ocra_icub */
00045 
00046 #endif //MODEL_INITIALIZER_H
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines