diff --git a/include/sot-core/binary-op.h b/include/sot-core/binary-op.h index 2d85c13a657e20b265f9d0730ef007a12b18cfb1..e06f8ee8a25b7e3eedec3a5a2de6eef4c22bc571 100644 --- a/include/sot-core/binary-op.h +++ b/include/sot-core/binary-op.h @@ -35,7 +35,6 @@ namespace ml = maal::boost; #include <dynamic-graph/entity.h> #include <sot-core/pool.h> #include <dynamic-graph/all-signals.h> -#include <dynamic-graph/all-signals.h> #include <sot-core/vector-quaternion.h> /* STD */ @@ -44,14 +43,14 @@ namespace ml = maal::boost; #include <boost/function.hpp> namespace sot { - +namespace dg = dynamicgraph; /* --------------------------------------------------------------------- */ /* --- CLASS ----------------------------------------------------------- */ /* --------------------------------------------------------------------- */ template< class Tin1,class Tin2,class Tout,typename Operator > class BinaryOp -:public Entity +:public dg::Entity { Operator op; @@ -63,7 +62,7 @@ class BinaryOp static const std::string CLASS_NAME; BinaryOp( const std::string& name ) - : Entity(name) + : dg::Entity(name) ,SIN1(NULL,BinaryOp::CLASS_NAME+"("+name+")::input("+getTypeIn1Name()+")::in1") ,SIN2(NULL,CLASS_NAME+"("+name+")::input("+getTypeIn2Name()+")::in2") ,SOUT( boost::bind(&BinaryOp<Tin1,Tin2,Tout,Operator>::computeOperation,this,_1,_2), @@ -77,9 +76,9 @@ class BinaryOp public: /* --- SIGNAL --- */ - SignalPtr<Tin1,int> SIN1; - SignalPtr<Tin2,int> SIN2; - SignalTimeDependant<Tout,int> SOUT; + dg::SignalPtr<Tin1,int> SIN1; + dg::SignalPtr<Tin2,int> SIN2; + dg::SignalTimeDependant<Tout,int> SOUT; protected: Tout& computeOperation( Tout& res,int time ) diff --git a/include/sot-core/constraint.h b/include/sot-core/constraint.h index 8955065edf831b97c1f5a2070de4c29f0c127e77..8fd216d4e7d66b722d4a538da5bb1637b26dc509 100644 --- a/include/sot-core/constraint.h +++ b/include/sot-core/constraint.h @@ -57,6 +57,7 @@ namespace ml = maal::boost; namespace sot { +namespace dg = dynamicgraph; /* --------------------------------------------------------------------- */ /* --- CLASS ----------------------------------------------------------- */ @@ -68,7 +69,7 @@ class SOTCONSTRAINT_EXPORT Constraint : public TaskAbstract { protected: - typedef std::list< Signal<ml::Matrix,int>* > JacobianList; + typedef std::list< dg::Signal<ml::Matrix,int>* > JacobianList; JacobianList jacobianList; public: @@ -78,7 +79,7 @@ class SOTCONSTRAINT_EXPORT Constraint public: Constraint( const std::string& n ); - void addJacobian( Signal<ml::Matrix,int>& sig ); + void addJacobian( dg::Signal<ml::Matrix,int>& sig ); void clearJacobianList( void ); void setControlSelection( const Flags& act ); diff --git a/include/sot-core/derivator.h b/include/sot-core/derivator.h index ac024504517d78dbceb1d35af8884da870954fe8..a3117448ff38f85e98ffb4f96482bf2c5737b19d 100644 --- a/include/sot-core/derivator.h +++ b/include/sot-core/derivator.h @@ -41,13 +41,15 @@ namespace ml = maal::boost; #include <string> namespace sot { +namespace dg = dynamicgraph; + /* --------------------------------------------------------------------- */ /* --- CLASS ----------------------------------------------------------- */ /* --------------------------------------------------------------------- */ template< class T > class Derivator -:public Entity +:public dg::Entity { protected: T memory; @@ -61,7 +63,7 @@ class Derivator static const std::string CLASS_NAME; Derivator( const std::string& name ) - : Entity(name) + : dg::Entity(name) ,memory(),initialized(false) ,timestep(TIMESTEP_DEFAULT) ,SIN(NULL,"sotDerivator<"+getTypeName()+">("+name+")::input("+getTypeName()+")::in") @@ -79,9 +81,9 @@ class Derivator public: /* --- SIGNAL --- */ - SignalPtr<T,int> SIN; - SignalTimeDependant<T,int> SOUT; - Signal<double,int> timestepSIN; + dg::SignalPtr<T,int> SIN; + dg::SignalTimeDependant<T,int> SOUT; + dg::Signal<double,int> timestepSIN; protected: T& computeDerivation( T& res,int time ) diff --git a/include/sot-core/feature-1d.h b/include/sot-core/feature-1d.h index afd7f11b93f0e1d1daa82b6eaf035a87797cb6ee..1d8e54b49f16b95494e1707ee23e296342358542 100644 --- a/include/sot-core/feature-1d.h +++ b/include/sot-core/feature-1d.h @@ -48,7 +48,7 @@ /* --------------------------------------------------------------------- */ namespace sot { - +namespace dg = dynamicgraph; /*! \class Feature1D \brief Simple test: the task is defined to be e_2 = .5 . e'.e, with @@ -77,13 +77,13 @@ class SOTFEATURE1D_EXPORT Feature1D @{ */ /*! \brief Input for the error. */ - SignalPtr< ml::Vector,int > errorSIN; + dg::SignalPtr< ml::Vector,int > errorSIN; /*! \brief Input for the Jacobian. */ - SignalPtr< ml::Matrix,int > jacobianSIN; + dg::SignalPtr< ml::Matrix,int > jacobianSIN; /*! \brief Input for the activation. */ - SignalPtr< ml::Vector,int > activationSIN; + dg::SignalPtr< ml::Vector,int > activationSIN; /*! @} */ /*! \name Output signals diff --git a/include/sot-core/feature-abstract.h b/include/sot-core/feature-abstract.h index 6dabe661836060f9acea1fc41897209c165bd727..dc6294b7e7482b22d8951f3251fb3c79767327fa 100644 --- a/include/sot-core/feature-abstract.h +++ b/include/sot-core/feature-abstract.h @@ -60,7 +60,7 @@ namespace dg = dynamicgraph; \f$ \frac{\delta {\bf s}(t)}{\delta {\bf q}(t)}\f$. */ class SOT_CORE_EXPORT FeatureAbstract -:public Entity +:public dg::Entity { public: /*! \brief Store the name of the class. */ diff --git a/include/sot-core/feature-generic.h b/include/sot-core/feature-generic.h index 15511c099f01b91efe724e97ad687855b69078fd..3db33989190f1965e3455a89bbba347a185a990e 100644 --- a/include/sot-core/feature-generic.h +++ b/include/sot-core/feature-generic.h @@ -48,6 +48,7 @@ /* --------------------------------------------------------------------- */ namespace sot { +namespace dg = dynamicgraph; /*! \class FeatureGeneric @@ -77,23 +78,23 @@ class SOTFEATUREGENERIC_EXPORT FeatureGeneric /* --- SIGNALS ------------------------------------------------------------ */ public: - /*! \name Signals + /*! \name dg::Signals @{ */ /*! \name Input signals @{ */ /*! \brief Input for the error. */ - SignalPtr< ml::Vector,int > errorSIN; + dg::SignalPtr< ml::Vector,int > errorSIN; /*! \brief Input for the errordot. */ - SignalPtr< ml::Vector,int > errordotSIN; + dg::SignalPtr< ml::Vector,int > errordotSIN; /*! \brief Input for the Jacobian. */ - SignalPtr< ml::Matrix,int > jacobianSIN; + dg::SignalPtr< ml::Matrix,int > jacobianSIN; /*! \brief Input for the activation. */ - SignalPtr< ml::Vector,int > activationSIN; + dg::SignalPtr< ml::Vector,int > activationSIN; /*! @} */ /*! \name Output signals @@ -109,7 +110,7 @@ class SOTFEATUREGENERIC_EXPORT FeatureGeneric using FeatureAbstract::activationSOUT; /*! \brief New signal the errordot. */ - SignalTimeDependant< ml::Vector,int > errordotSOUT; + dg::SignalTimeDependant< ml::Vector,int > errordotSOUT; public: diff --git a/include/sot-core/feature-joint-limits.h b/include/sot-core/feature-joint-limits.h index 3912ae882d58178498abb8b5e55fd15818654ea5..79a743247e4de09e978f59f9479cd2fe38543d56 100644 --- a/include/sot-core/feature-joint-limits.h +++ b/include/sot-core/feature-joint-limits.h @@ -48,6 +48,7 @@ /* --------------------------------------------------------------------- */ namespace sot { +namespace dg = dynamicgraph; /*! \class FeatureJointLimits @@ -73,10 +74,10 @@ class SOTFEATUREJOINTLIMITS_EXPORT FeatureJointLimits /* --- SIGNALS ------------------------------------------------------------ */ public: - SignalPtr< ml::Vector,int > jointSIN; - SignalPtr< ml::Vector,int > upperJlSIN; - SignalPtr< ml::Vector,int > lowerJlSIN; - SignalTimeDependant< ml::Vector,int > widthJlSINTERN; + dg::SignalPtr< ml::Vector,int > jointSIN; + dg::SignalPtr< ml::Vector,int > upperJlSIN; + dg::SignalPtr< ml::Vector,int > lowerJlSIN; + dg::SignalTimeDependant< ml::Vector,int > widthJlSINTERN; using FeatureAbstract::selectionSIN; diff --git a/include/sot-core/feature-line-distance.h b/include/sot-core/feature-line-distance.h index 0d5d09445d630eb86d4337d980d97a9366c1991d..c78d362f93e998c313800ba37442abf596a466d7 100644 --- a/include/sot-core/feature-line-distance.h +++ b/include/sot-core/feature-line-distance.h @@ -49,6 +49,7 @@ /* --------------------------------------------------------------------- */ namespace sot { +namespace dg = dynamicgraph; /*! \class FeatureLineDistance @@ -66,11 +67,11 @@ class SOTFEATURELINEDISTANCE_EXPORT FeatureLineDistance /* --- SIGNALS ------------------------------------------------------------ */ public: - SignalPtr< MatrixHomogeneous,int > positionSIN; - SignalPtr< ml::Matrix,int > articularJacobianSIN; - SignalPtr< ml::Vector,int > positionRefSIN; - SignalPtr< ml::Vector,int > vectorSIN; - SignalTimeDependant<ml::Vector,int> lineSOUT; + dg::SignalPtr< MatrixHomogeneous,int > positionSIN; + dg::SignalPtr< ml::Matrix,int > articularJacobianSIN; + dg::SignalPtr< ml::Vector,int > positionRefSIN; + dg::SignalPtr< ml::Vector,int > vectorSIN; + dg::SignalTimeDependant<ml::Vector,int> lineSOUT; using FeatureAbstract::desiredValueSIN; using FeatureAbstract::selectionSIN; diff --git a/include/sot-core/feature-point6d-relative.h b/include/sot-core/feature-point6d-relative.h index 29c4c549b816b91ea788d9a5ed937021aedb020e..2fec1d5b1f7e33b7ac484d62a9b598a0839e8ed2 100644 --- a/include/sot-core/feature-point6d-relative.h +++ b/include/sot-core/feature-point6d-relative.h @@ -50,6 +50,7 @@ /* --------------------------------------------------------------------- */ namespace sot { +namespace dg = dynamicgraph; /*! \class FeaturePoint6dRelative @@ -71,22 +72,22 @@ class SOTFEATUREPOINT6DRELATIVE_EXPORT FeaturePoint6dRelative /* --- SIGNALS ------------------------------------------------------------ */ public: - SignalPtr< MatrixHomogeneous,int > positionReferenceSIN; - SignalPtr< ml::Matrix,int > articularJacobianReferenceSIN; + dg::SignalPtr< MatrixHomogeneous,int > positionReferenceSIN; + dg::SignalPtr< ml::Matrix,int > articularJacobianReferenceSIN; - /*! Signals related to the computation of the derivative of + /*! dg::Signals related to the computation of the derivative of the error @{ */ - /*! Signals giving the derivative of the input signals. + /*! dg::Signals giving the derivative of the input signals. @{*/ /*! Derivative of the relative position. */ - SignalPtr< MatrixHomogeneous,int > dotpositionSIN; + dg::SignalPtr< MatrixHomogeneous,int > dotpositionSIN; /*! Derivative of the reference position. */ - SignalPtr< MatrixHomogeneous,int > dotpositionReferenceSIN; + dg::SignalPtr< MatrixHomogeneous,int > dotpositionReferenceSIN; /*! @} */ /*! The derivative of the error.*/ - SignalTimeDependant<ml::Vector,int> errordotSOUT; + dg::SignalTimeDependant<ml::Vector,int> errordotSOUT; /*! @} */ public: diff --git a/include/sot-core/feature-point6d.h b/include/sot-core/feature-point6d.h index f6fad3b06fe101007bc179fc34dc5784772d8e38..4c4f46a6bb9b4cdb225ed9c39feed77a50c16b5a 100644 --- a/include/sot-core/feature-point6d.h +++ b/include/sot-core/feature-point6d.h @@ -49,6 +49,7 @@ /* --------------------------------------------------------------------- */ namespace sot { +namespace dg = dynamicgraph; /*! \class FeaturePoint6d @@ -73,8 +74,8 @@ class SOTFEATUREPOINT6D_EXPORT FeaturePoint6d /* --- SIGNALS ------------------------------------------------------------ */ public: - SignalPtr< MatrixHomogeneous,int > positionSIN; - SignalPtr< ml::Matrix,int > articularJacobianSIN; + dg::SignalPtr< MatrixHomogeneous,int > positionSIN; + dg::SignalPtr< ml::Matrix,int > articularJacobianSIN; using FeatureAbstract::desiredValueSIN; using FeatureAbstract::selectionSIN; diff --git a/include/sot-core/feature-vector3.h b/include/sot-core/feature-vector3.h index 0ec9e9cebd8d15d77fa94dfb89d344eccb403c0e..87711b257ac5e19992713e84d16a9d765a2deb18 100644 --- a/include/sot-core/feature-vector3.h +++ b/include/sot-core/feature-vector3.h @@ -49,6 +49,7 @@ /* --------------------------------------------------------------------- */ namespace sot { +namespace dg = dynamicgraph; /*! \class FeatureVector3 @@ -66,10 +67,10 @@ class SOTFEATUREVECTOR3_EXPORT FeatureVector3 /* --- SIGNALS ------------------------------------------------------------ */ public: - SignalPtr< ml::Vector,int > vectorSIN; - SignalPtr< MatrixHomogeneous,int > positionSIN; - SignalPtr< ml::Matrix,int > articularJacobianSIN; - SignalPtr< ml::Vector,int > positionRefSIN; + dg::SignalPtr< ml::Vector,int > vectorSIN; + dg::SignalPtr< MatrixHomogeneous,int > positionSIN; + dg::SignalPtr< ml::Matrix,int > articularJacobianSIN; + dg::SignalPtr< ml::Vector,int > positionRefSIN; using FeatureAbstract::desiredValueSIN; using FeatureAbstract::selectionSIN; diff --git a/include/sot-core/feature-visual-point.h b/include/sot-core/feature-visual-point.h index 2c5e851a93b2b08f03f8760faa9c85fcc6b942c8..5ebf6d983b320b47f9a436af2857a878a462a0d5 100644 --- a/include/sot-core/feature-visual-point.h +++ b/include/sot-core/feature-visual-point.h @@ -48,6 +48,7 @@ /* --------------------------------------------------------------------- */ namespace sot { +namespace dg = dynamicgraph; /*! \class FeatureVisualPoint @@ -68,11 +69,11 @@ class SOTFEATUREVISUALPOINT_EXPORT FeatureVisualPoint /* --- SIGNALS ------------------------------------------------------------ */ public: - SignalPtr< ml::Vector,int > xySIN; + dg::SignalPtr< ml::Vector,int > xySIN; /** FeatureVisualPoint depth (required to compute the interaction matrix) * default Z = 1m. */ - SignalPtr< double,int > ZSIN; - SignalPtr< ml::Matrix,int > articularJacobianSIN; + dg::SignalPtr< double,int > ZSIN; + dg::SignalPtr< ml::Matrix,int > articularJacobianSIN; using FeatureAbstract::desiredValueSIN; using FeatureAbstract::selectionSIN; diff --git a/include/sot-core/fir-filter.h b/include/sot-core/fir-filter.h index d760147fe85605b9efc88c1865fac29c4b118b61..20e1b50a79519e2b068da5dd4c8efab80f5c2d7e 100644 --- a/include/sot-core/fir-filter.h +++ b/include/sot-core/fir-filter.h @@ -33,6 +33,8 @@ namespace ml = maal::boost; #include <dynamic-graph/entity.h> #include <dynamic-graph/all-signals.h> +namespace dg = dynamicgraph; + namespace detail { @@ -76,16 +78,16 @@ namespace detail template<class sigT, class coefT> class FIRFilter - : public Entity + : public dg::Entity { public: - virtual const std::string& getClassName() const { return Entity::getClassName(); } + virtual const std::string& getClassName() const { return dg::Entity::getClassName(); } static std::string getTypeName( void ) { return "Unknown"; } static const std::string CLASS_NAME; public: FIRFilter( const std::string& name ) - : Entity(name) + : dg::Entity(name) , SIN(NULL,"sotFIRFilter("+name+")::input(T)::in") , SOUT(boost::bind(&FIRFilter::compute,this,_1,_2), SIN, @@ -131,14 +133,14 @@ public: else if(cmdLine == "printBuffer") { for(size_t i = 0; i < data.size(); ++i){ os << data[i] << std::endl; } } - else { Entity::commandLine( cmdLine, cmdArgs, os); } + else { dg::Entity::commandLine( cmdLine, cmdArgs, os); } } static void reset_signal(sigT& res, const sigT& sample) { } public: - SignalPtr<sigT, int> SIN; - SignalTimeDependant<sigT, int> SOUT; + dg::SignalPtr<sigT, int> SIN; + dg::SignalTimeDependant<sigT, int> SOUT; private: std::vector<coefT> coefs; diff --git a/include/sot-core/gain-adaptive.h b/include/sot-core/gain-adaptive.h index 254ce7527de5328c22ecc686d8d7d4e11321eec7..abeb45d89a163ce3da007c72443bb5549b06adb1 100644 --- a/include/sot-core/gain-adaptive.h +++ b/include/sot-core/gain-adaptive.h @@ -53,9 +53,10 @@ namespace ml = maal::boost; /* --------------------------------------------------------------------- */ namespace sot { +namespace dg = dynamicgraph; class SOTGAINADAPTATIVE_EXPORT GainAdaptative -: public Entity +: public dg::Entity { public: /* --- CONSTANTS --- */ @@ -98,8 +99,8 @@ class SOTGAINADAPTATIVE_EXPORT GainAdaptative void forceConstant( void ); public: /* --- SIGNALS --- */ - SignalPtr<ml::Vector,int> errorSIN; - SignalTimeDependant<double,int> gainSOUT; + dg::SignalPtr<ml::Vector,int> errorSIN; + dg::SignalTimeDependant<double,int> gainSOUT; protected: double& computeGain( double& res,int t ); diff --git a/include/sot-core/gain-hyperbolic.h b/include/sot-core/gain-hyperbolic.h index aa7be6e67569a9e845d2ced12e6c207f163b2366..320e6ee01a03fe04a7c6b33e0914657d68e03636 100644 --- a/include/sot-core/gain-hyperbolic.h +++ b/include/sot-core/gain-hyperbolic.h @@ -54,9 +54,10 @@ namespace ml = maal::boost; /* --------------------------------------------------------------------- */ namespace sot { +namespace dg = dynamicgraph; class SOTGAINHYPERBOLIC_EXPORT GainHyperbolic -: public Entity +: public dg::Entity { public: /* --- CONSTANTS --- */ @@ -102,8 +103,8 @@ class SOTGAINHYPERBOLIC_EXPORT GainHyperbolic void forceConstant( void ); public: /* --- SIGNALS --- */ - SignalPtr<ml::Vector,int> errorSIN; - SignalTimeDependant<double,int> gainSOUT; + dg::SignalPtr<ml::Vector,int> errorSIN; + dg::SignalTimeDependant<double,int> gainSOUT; protected: double& computeGain( double& res,int t ); diff --git a/include/sot-core/integrator-abstract.h b/include/sot-core/integrator-abstract.h index 099d999048382ebfec564f04cc4076d2232752b6..6904489007b35acdf720ecb6666fd906fc34e089 100644 --- a/include/sot-core/integrator-abstract.h +++ b/include/sot-core/integrator-abstract.h @@ -46,6 +46,7 @@ namespace ml = maal::boost; /* --------------------------------------------------------------------- */ namespace sot { +namespace dg = dynamicgraph; /*! \brief integrates an ODE. If Y is the output and X the input, the * following equation is integrated: @@ -55,16 +56,16 @@ namespace sot { */ template<class sigT, class coefT> class IntegratorAbstract -:public Entity +:public dg::Entity { public: - virtual const std::string& getClassName() const { return Entity::getClassName(); } + virtual const std::string& getClassName() const { return dg::Entity::getClassName(); } static std::string getTypeName( void ) { return "Unknown"; } static const std::string CLASS_NAME; public: IntegratorAbstract ( const std::string& name ) - :Entity(name) + :dg::Entity(name) ,SIN(NULL,"sotIntegratorAbstract("+name+")::input(vector)::in") ,SOUT(boost::bind(&IntegratorAbstract<sigT,coefT>::integrate,this,_1,_2), SIN, @@ -83,11 +84,11 @@ class IntegratorAbstract if( cmdLine == "pushNumCoef" ) { std::string objname, signame; - Interpreter::objectNameParser(cmdArgs, objname, signame); - Entity& obj = g_pool.getEntity(objname); - SignalBase<int>& sig = obj.getSignal(signame); + dg::Interpreter::objectNameParser(cmdArgs, objname, signame); + dg::Entity& obj = dg::g_pool.getEntity(objname); + dg::SignalBase<int>& sig = obj.getSignal(signame); try { - Signal<coefT,int>& sigc = dynamic_cast<Signal<coefT,int>&>(sig); + dg::Signal<coefT,int>& sigc = dynamic_cast<dg::Signal<coefT,int>&>(sig); pushNumCoef(sigc.accessCopy()); } catch(std::bad_cast& bc) { @@ -98,11 +99,11 @@ class IntegratorAbstract else if( cmdLine == "pushDenomCoef" ) { std::string objname, signame; - Interpreter::objectNameParser(cmdArgs, objname, signame); - Entity& obj = g_pool.getEntity(objname); - SignalBase<int>& sig = obj.getSignal(signame); + dg::Interpreter::objectNameParser(cmdArgs, objname, signame); + dg::Entity& obj = dg::g_pool.getEntity(objname); + dg::SignalBase<int>& sig = obj.getSignal(signame); try { - Signal<coefT,int>& sigc = dynamic_cast<Signal<coefT,int>&>(sig); + dg::Signal<coefT,int>& sigc = dynamic_cast<dg::Signal<coefT,int>&>(sig); pushDenomCoef(sigc.accessCopy()); } catch(std::bad_cast& bc) { @@ -120,7 +121,7 @@ class IntegratorAbstract } else { - Entity::commandLine(cmdLine, cmdArgs, os); + dg::Entity::commandLine(cmdLine, cmdArgs, os); } } @@ -131,9 +132,9 @@ class IntegratorAbstract void popDenomCoef() { denominator.pop_back(); } public: - SignalPtr<sigT, int> SIN; + dg::SignalPtr<sigT, int> SIN; - SignalTimeDependant<sigT, int> SOUT; + dg::SignalTimeDependant<sigT, int> SOUT; protected: std::vector<coefT> numerator; diff --git a/include/sot-core/integrator-euler.h b/include/sot-core/integrator-euler.h index 138b10199494572a9b35b3909f52ecf71e65e6e6..2baafc2add1f737bf635d70dc9bc89bd92e5a4d3 100644 --- a/include/sot-core/integrator-euler.h +++ b/include/sot-core/integrator-euler.h @@ -34,6 +34,7 @@ /* --------------------------------------------------------------------- */ namespace sot { +namespace dg = dynamicgraph; /*! * \class IntegratorEuler @@ -50,7 +51,7 @@ class IntegratorEuler { public: - virtual const std::string& getClassName( void ) const { return Entity::getClassName(); } + virtual const std::string& getClassName( void ) const { return dg::Entity::getClassName(); } static std::string getTypeName( void ) { return "Unknown"; } static const std::string CLASS_NAME; diff --git a/include/sot-core/matrix-constant.h b/include/sot-core/matrix-constant.h index 19789cc317d5cac58016bc4ecc2164215b3d9b71..018705221416885d663ac9548f75a5b21508a24e 100644 --- a/include/sot-core/matrix-constant.h +++ b/include/sot-core/matrix-constant.h @@ -31,9 +31,10 @@ namespace ml = maal::boost; /* --------------------------------------------------------------------- */ namespace sot { +namespace dg = dynamicgraph; class MatrixConstant -: public Entity +: public dg::Entity { public: static const std::string CLASS_NAME; @@ -48,13 +49,13 @@ public: ,rows(0),cols(0),color(0.) ,SOUT( "sotMatrixConstant("+name+")::output(matrix)::out" ) { - SOUT.setDependancyType( TimeDependancy<int>::BOOL_DEPENDANT ); + SOUT.setDependancyType( dg::TimeDependancy<int>::BOOL_DEPENDANT ); signalRegistration( SOUT ); } virtual ~MatrixConstant( void ){} - SignalTimeDependant<ml::Matrix,int> SOUT; + dg::SignalTimeDependant<ml::Matrix,int> SOUT; virtual void commandLine( const std::string& cmdLine, std::istringstream& cmdArgs, diff --git a/include/sot-core/memory-task-sot.h b/include/sot-core/memory-task-sot.h index 26855d0ba443fbb914a21eb058d3423622b8b2ff..b46cece84918594a9e0b3ac166feeb281e1922d0 100644 --- a/include/sot-core/memory-task-sot.h +++ b/include/sot-core/memory-task-sot.h @@ -45,9 +45,10 @@ /* --------------------------------------------------------------------- */ namespace sot { +namespace dg = dynamicgraph; class SOTSOT_CORE_EXPORT MemoryTaskSOT -: public TaskAbstract::MemoryTaskAbstract, public Entity +: public TaskAbstract::MemoryTaskAbstract, public dg::Entity { public:// protected: /* Internal memory to reduce the dynamic allocation at task resolution. */ @@ -78,11 +79,11 @@ class SOTSOT_CORE_EXPORT MemoryTaskSOT virtual const std::string& getClassName( void ) const { return CLASS_NAME; } public: /* --- SIGNALS --- */ - Signal< ml::Matrix,int > jacobianInvSINOUT; - Signal< ml::Matrix,int > jacobianConstrainedSINOUT; - Signal< ml::Matrix,int > jacobianProjectedSINOUT; - Signal< ml::Matrix,int > singularBaseImageSINOUT; - Signal< unsigned int,int > rankSINOUT; + dg::Signal< ml::Matrix,int > jacobianInvSINOUT; + dg::Signal< ml::Matrix,int > jacobianConstrainedSINOUT; + dg::Signal< ml::Matrix,int > jacobianProjectedSINOUT; + dg::Signal< ml::Matrix,int > singularBaseImageSINOUT; + dg::Signal< unsigned int,int > rankSINOUT; public: /* --- PARAMS --- */ virtual void commandLine( const std::string& cmdLine,std::istringstream& cmdArgs, diff --git a/include/sot-core/op-point-modifier.h b/include/sot-core/op-point-modifier.h index e0438a744158437166b7025aad1223a18491c655..dd32fa175ed3770cef655cac45b89d54ebcfe9f6 100644 --- a/include/sot-core/op-point-modifier.h +++ b/include/sot-core/op-point-modifier.h @@ -21,7 +21,6 @@ #define __SOT_OP_POINT_MODIFIOR_H__ #include <dynamic-graph/entity.h> - #include <dynamic-graph/all-signals.h> #include <sot-core/debug.h> #include <sot-core/matrix-homogeneous.h> @@ -49,9 +48,10 @@ namespace ml = maal::boost; /* --------------------------------------------------------------------- */ namespace sot { +namespace dg = dynamicgraph; class SOTOPPOINTMODIFIOR_EXPORT OpPointModifior -: public Entity +: public dg::Entity { public: static const std::string CLASS_NAME; @@ -61,11 +61,11 @@ class SOTOPPOINTMODIFIOR_EXPORT OpPointModifior public: - SignalPtr<ml::Matrix,int> jacobianSIN; - SignalPtr<MatrixHomogeneous,int> positionSIN; + dg::SignalPtr<ml::Matrix,int> jacobianSIN; + dg::SignalPtr<MatrixHomogeneous,int> positionSIN; - SignalTimeDependant<ml::Matrix,int> jacobianSOUT; - SignalTimeDependant<MatrixHomogeneous,int> positionSOUT; + dg::SignalTimeDependant<ml::Matrix,int> jacobianSOUT; + dg::SignalTimeDependant<MatrixHomogeneous,int> positionSOUT; public: OpPointModifior( const std::string& name ); diff --git a/include/sot-core/signal-cast.h b/include/sot-core/signal-cast.h index f55cb6c63e80690059f1bafd0614afc3bafdeafd..afebf30c742e6306864c6fa3323f9b7057fe6945 100644 --- a/include/sot-core/signal-cast.h +++ b/include/sot-core/signal-cast.h @@ -85,14 +85,14 @@ private: */ #define SOT_SIGNAL_CAST_DECLARATION(TYPE) \ - SignalCastRegisterer sotCastRegisterer_##TYPE \ + dynamicgraph::SignalCastRegisterer sotCastRegisterer_##TYPE \ (typeid(TYPE), \ SignalCast<TYPE>::disp_, \ SignalCast<TYPE>::cast_, \ SignalCast<TYPE>::trace_); #define SOT_SIGNAL_CAST_DECLARATION_NAMED(TYPE,NAME) \ - SignalCastRegisterer sotCastRegisterer_##NAME \ + dynamicgraph::SignalCastRegisterer sotCastRegisterer_##NAME \ (typeid(TYPE), \ SignalCast<TYPE>::disp_, \ SignalCast<TYPE>::cast_, \ diff --git a/include/sot-core/sot-h.h b/include/sot-core/sot-h.h index 65ea9ff45050b6b0edbc740eca6aeff05c54ccfb..69e36fcdd9f1945ef67edae7ddf8fed1f664763b 100644 --- a/include/sot-core/sot-h.h +++ b/include/sot-core/sot-h.h @@ -51,6 +51,7 @@ /* --------------------------------------------------------------------- */ namespace sot { +namespace dg = dynamicgraph; class SOTSOTH_EXPORT SotH :public Sot @@ -81,8 +82,8 @@ class SOTSOTH_EXPORT SotH static const std::string CLASS_NAME; virtual void display( std::ostream& os ) const; virtual const std::string& getClassName( void ) const { return CLASS_NAME; } - Signal< ml::Matrix,int > jacobianConstrainedSINOUT; - Signal< ml::Vector,int > diffErrorSINOUT; + dg::Signal< ml::Matrix,int > jacobianConstrainedSINOUT; + dg::Signal< ml::Vector,int > diffErrorSINOUT; virtual void commandLine( const std::string& cmdLine,std::istringstream& cmdArgs, std::ostream& os ); diff --git a/include/sot-core/sot-qr.h b/include/sot-core/sot-qr.h index 935256c13799e3852aea813b5d39c4b16ba145a5..e54a51763430b1b1051b153f782d9d1c37f00731 100644 --- a/include/sot-core/sot-qr.h +++ b/include/sot-core/sot-qr.h @@ -68,9 +68,10 @@ namespace ml = maal::boost; */ namespace sot { +namespace dg = dynamicgraph; class SOTSOTQR_EXPORT SotQr -:public Entity +:public dg::Entity { public: /*! \brief Specify the name of the class entity. */ @@ -226,14 +227,14 @@ class SOTSOTQR_EXPORT SotQr * the recurence of the SOT (e.g. velocity comming from the other * OpenHRP plugins). */ - SignalPtr<ml::Vector,int> q0SIN; + dg::SignalPtr<ml::Vector,int> q0SIN; /*! \brief This signal allow to change the threshold for the damped pseudo-inverse on-line */ - SignalPtr<double,int> inversionThresholdSIN; + dg::SignalPtr<double,int> inversionThresholdSIN; /*! \brief This signal allow to get the result of the Constraint projector. */ - SignalTimeDependant<ml::Matrix,int> constraintSOUT; + dg::SignalTimeDependant<ml::Matrix,int> constraintSOUT; /*! \brief This signal allow to get the result of the computed control law. */ - SignalTimeDependant<ml::Vector,int> controlSOUT; + dg::SignalTimeDependant<ml::Vector,int> controlSOUT; /*! @} */ public: /* --- COMMANDS --- */ diff --git a/include/sot-core/sot.h b/include/sot-core/sot.h index 4aeb20073987edbefe9ea0885eba7ee49f068071..f83a68230da8fa5f7d94adb5b25d25c56572fa63 100644 --- a/include/sot-core/sot.h +++ b/include/sot-core/sot.h @@ -60,6 +60,7 @@ namespace ml = maal::boost; /* --------------------------------------------------------------------- */ namespace sot { +namespace dg = dynamicgraph; /*! @ingroup stackoftasks \brief This class implements the Stack of Task. @@ -70,7 +71,7 @@ namespace sot { */ class SOTSOT_CORE_EXPORT Sot -:public Entity +:public dg::Entity { public: /*! \brief Specify the name of the class entity. */ @@ -241,14 +242,14 @@ class SOTSOT_CORE_EXPORT Sot * the recurence of the SOT (e.g. velocity comming from the other * OpenHRP plugins). */ - SignalPtr<ml::Vector,int> q0SIN; + dg::SignalPtr<ml::Vector,int> q0SIN; /*! \brief This signal allow to change the threshold for the damped pseudo-inverse on-line */ - SignalPtr<double,int> inversionThresholdSIN; + dg::SignalPtr<double,int> inversionThresholdSIN; /*! \brief This signal allow to get the result of the Constraint projector. */ - SignalTimeDependant<ml::Matrix,int> constraintSOUT; + dg::SignalTimeDependant<ml::Matrix,int> constraintSOUT; /*! \brief This signal allow to get the result of the computed control law. */ - SignalTimeDependant<ml::Vector,int> controlSOUT; + dg::SignalTimeDependant<ml::Vector,int> controlSOUT; /*! @} */ public: /* --- COMMANDS --- */ diff --git a/include/sot-core/task-abstract.h b/include/sot-core/task-abstract.h index 95b1173c86b1d18ec6cbae3801315237310d8cd3..2698eecbd81e1661087a01b24fb76d1f4e6f2084 100644 --- a/include/sot-core/task-abstract.h +++ b/include/sot-core/task-abstract.h @@ -46,9 +46,10 @@ namespace ml = maal::boost; /* --------------------------------------------------------------------- */ namespace sot { +namespace dg = dynamicgraph; class SOT_CORE_EXPORT TaskAbstract -: public Entity +: public dg::Entity { public: @@ -81,9 +82,9 @@ class SOT_CORE_EXPORT TaskAbstract public: /* --- SIGNALS --- */ - SignalTimeDependant< sotVectorMultiBound,int > taskSOUT; - SignalTimeDependant< ml::Matrix,int > jacobianSOUT; - SignalTimeDependant< ml::Vector,int > featureActivationSOUT; + dg::SignalTimeDependant< sotVectorMultiBound,int > taskSOUT; + dg::SignalTimeDependant< ml::Matrix,int > jacobianSOUT; + dg::SignalTimeDependant< ml::Vector,int > featureActivationSOUT; public: /* --- PARAMS --- */ virtual void commandLine( const std::string& cmdLine diff --git a/include/sot-core/task-conti.h b/include/sot-core/task-conti.h index cf9c2d5b4fe927ab81fc85d879ec94b75b684531..c9b10b9b2b3e7a3ceaebf194507f5a8e07f21fe6 100644 --- a/include/sot-core/task-conti.h +++ b/include/sot-core/task-conti.h @@ -59,6 +59,7 @@ namespace ml = maal::boost; /* --------------------------------------------------------------------- */ namespace sot { +namespace dg = dynamicgraph; class SOTTASKCONTI_EXPORT TaskConti : public Task @@ -92,7 +93,7 @@ class SOTTASKCONTI_EXPORT TaskConti /* --- SIGNALS ------------------------------------------------------------ */ public: - SignalPtr< ml::Vector,int > controlPrevSIN; + dg::SignalPtr< ml::Vector,int > controlPrevSIN; /* --- DISPLAY ------------------------------------------------------------ */ void display( std::ostream& os ) const; diff --git a/include/sot-core/task-pd.h b/include/sot-core/task-pd.h index c7fe053baed74bc8ccdc0b8f9c8e068522dd318f..0db3efca78f838b065189ee1a243e1a636878546 100644 --- a/include/sot-core/task-pd.h +++ b/include/sot-core/task-pd.h @@ -49,6 +49,7 @@ /* --------------------------------------------------------------------- */ namespace sot { +namespace dg = dynamicgraph; class SOTTASKPD_EXPORT TaskPD : public Task @@ -71,8 +72,8 @@ class SOTTASKPD_EXPORT TaskPD /* --- SIGNALS ------------------------------------------------------------ */ public: - SignalTimeDependant< ml::Vector,int > errorDotSOUT; - SignalPtr< ml::Vector,int > errorDotSIN; + dg::SignalTimeDependant< ml::Vector,int > errorDotSOUT; + dg::SignalPtr< ml::Vector,int > errorDotSIN; /* --- PARAMS --- */ virtual void commandLine( const std::string& cmdLine diff --git a/include/sot-core/task-unilateral.h b/include/sot-core/task-unilateral.h index 56ca84a77baf1d1b8a112e86fa4eaf5221ff76e1..a227d7eee1246051d514413e284207d421ca08bf 100644 --- a/include/sot-core/task-unilateral.h +++ b/include/sot-core/task-unilateral.h @@ -61,6 +61,7 @@ namespace ml = maal::boost; /* --------------------------------------------------------------------- */ namespace sot { +namespace dg = dynamicgraph; class SOTTASKUNILATERAL_EXPORT TaskUnilateral : public Task @@ -82,10 +83,10 @@ class SOTTASKUNILATERAL_EXPORT TaskUnilateral /* --- SIGNALS ------------------------------------------------------------ */ public: - SignalPtr< ml::Vector,int > positionSIN; - SignalPtr< ml::Vector,int > referenceInfSIN; - SignalPtr< ml::Vector,int > referenceSupSIN; - SignalPtr< double,int > dtSIN; + dg::SignalPtr< ml::Vector,int > positionSIN; + dg::SignalPtr< ml::Vector,int > referenceInfSIN; + dg::SignalPtr< ml::Vector,int > referenceSupSIN; + dg::SignalPtr< double,int > dtSIN; /* --- DISPLAY ------------------------------------------------------------ */ void display( std::ostream& os ) const; diff --git a/include/sot-core/task.h b/include/sot-core/task.h index 39a106f1da9496b5f921b29b8e6f79d9c1f0b6c7..e8d22861fedb8937ced57be1e431190aef95a025 100644 --- a/include/sot-core/task.h +++ b/include/sot-core/task.h @@ -83,6 +83,7 @@ namespace ml = maal::boost; */ namespace sot { +namespace dg = dynamicgraph; class SOTTASK_EXPORT Task : public TaskAbstract @@ -116,12 +117,12 @@ class SOTTASK_EXPORT Task /* --- SIGNALS ------------------------------------------------------------ */ public: - SignalPtr< double,int > controlGainSIN; - SignalPtr< double,int > dampingGainSINOUT; - SignalPtr< Flags,int > controlSelectionSIN; // At the task level or at the feature level? + dg::SignalPtr< double,int > controlGainSIN; + dg::SignalPtr< double,int > dampingGainSINOUT; + dg::SignalPtr< Flags,int > controlSelectionSIN; // At the task level or at the feature level? public: - SignalTimeDependant< ml::Vector,int > errorSOUT; + dg::SignalTimeDependant< ml::Vector,int > errorSOUT; /* --- DISPLAY ------------------------------------------------------------ */ void display( std::ostream& os ) const; diff --git a/include/sot-core/unary-op.h b/include/sot-core/unary-op.h index 24fd4eec89a84456e5d13d2325582d52de7a1cd5..2e58acaea6c87cc5734f2c249d6b049ed773de19 100644 --- a/include/sot-core/unary-op.h +++ b/include/sot-core/unary-op.h @@ -47,10 +47,11 @@ namespace ml = maal::boost; /* --------------------------------------------------------------------- */ namespace sot { +namespace dg = dynamicgraph; template< class Tin,class Tout,typename Operator > class UnaryOp -:public Entity +:public dg::Entity { Operator op; @@ -61,7 +62,7 @@ class UnaryOp static const std::string CLASS_NAME; UnaryOp( const std::string& name ) - : Entity(name) + : dg::Entity(name) ,SIN(NULL,UnaryOp::CLASS_NAME+"("+name+")::input("+getTypeInName()+")::in") ,SOUT( boost::bind(&UnaryOp<Tin,Tout,Operator>::computeOperation,this,_1,_2), SIN,CLASS_NAME+"("+name+")::output("+getTypeOutName()+")::out") @@ -74,8 +75,8 @@ class UnaryOp public: /* --- SIGNAL --- */ - SignalPtr<Tin,int> SIN; - SignalTimeDependant<Tout,int> SOUT; + dg::SignalPtr<Tin,int> SIN; + dg::SignalTimeDependant<Tout,int> SOUT; protected: Tout& computeOperation( Tout& res,int time ) diff --git a/include/sot-core/vector-constant.h b/include/sot-core/vector-constant.h index 9f0efb183c5e0f4aa00f50b56a9e355ea1c2e7c5..c69cee531dd8efdba0ce31c375246edf1f9d0ead 100644 --- a/include/sot-core/vector-constant.h +++ b/include/sot-core/vector-constant.h @@ -29,9 +29,10 @@ namespace ml = maal::boost; /* --- VECTOR ---------------------------------------------------------- */ /* --------------------------------------------------------------------- */ namespace sot{ +namespace dg = dynamicgraph; class VectorConstant -: public Entity +: public dg::Entity { static const std::string CLASS_NAME; virtual const std::string& getClassName( void ) const { return CLASS_NAME; } @@ -45,13 +46,13 @@ public: ,rows(0),color(0.) ,SOUT( "sotVectorConstant("+name+")::output(vector)::out" ) { - SOUT.setDependancyType( TimeDependancy<int>::BOOL_DEPENDANT ); + SOUT.setDependancyType( dg::TimeDependancy<int>::BOOL_DEPENDANT ); signalRegistration( SOUT ); } virtual ~VectorConstant( void ){} - SignalTimeDependant<ml::Vector,int> SOUT; + dg::SignalTimeDependant<ml::Vector,int> SOUT; virtual void commandLine( const std::string& cmdLine, std::istringstream& cmdArgs, diff --git a/include/sot-core/vector-to-rotation.h b/include/sot-core/vector-to-rotation.h index e2e0b3389dfbe1cfc99fdfc4ec5dd383be6b2bf3..b9932a412a09c87ac5525c65e950c3db26dd62b3 100644 --- a/include/sot-core/vector-to-rotation.h +++ b/include/sot-core/vector-to-rotation.h @@ -36,9 +36,10 @@ namespace ml = maal::boost; /* --- VECTOR ---------------------------------------------------------- */ /* --------------------------------------------------------------------- */ namespace sot { +namespace dg = dynamicgraph; class VectorToRotation -: public Entity +: public dg::Entity { static const std::string CLASS_NAME; virtual const std::string& getClassName( void ) const { return CLASS_NAME; } @@ -59,8 +60,8 @@ public: virtual ~VectorToRotation( void ){} - SignalPtr<ml::Vector,int> SIN; - SignalTimeDependant<MatrixRotation,int> SOUT; + dg::SignalPtr<ml::Vector,int> SIN; + dg::SignalTimeDependant<MatrixRotation,int> SOUT; MatrixRotation& computeRotation( const ml::Vector& angles, MatrixRotation& res ); diff --git a/include/sot-core/weighted-sot.h b/include/sot-core/weighted-sot.h index 32d9b6d333c216fd12729b9b8cdf129d0e8099f6..0e221fe50a07abe07645885f921b7b3442735f50 100644 --- a/include/sot-core/weighted-sot.h +++ b/include/sot-core/weighted-sot.h @@ -65,6 +65,7 @@ namespace ml = maal::boost; */ namespace sot { +namespace dg = dynamicgraph; class SOTWEIGHTEDSOT_CORE_EXPORT WeightedSot :public Sot @@ -98,11 +99,11 @@ class SOTWEIGHTEDSOT_CORE_EXPORT WeightedSot /*! \name Methods to handle signals @{ */ - SignalPtr<ml::Matrix,int> weightSIN; - SignalTimeDependant<ml::Matrix,int> constrainedWeightSOUT; - SignalPtr<ml::Matrix,int> constrainedWeightSIN; - SignalTimeDependant<ml::Matrix,int> squareRootInvWeightSOUT; - SignalPtr<ml::Matrix,int> squareRootInvWeightSIN; + dg::SignalPtr<ml::Matrix,int> weightSIN; + dg::SignalTimeDependant<ml::Matrix,int> constrainedWeightSOUT; + dg::SignalPtr<ml::Matrix,int> constrainedWeightSIN; + dg::SignalTimeDependant<ml::Matrix,int> squareRootInvWeightSOUT; + dg::SignalPtr<ml::Matrix,int> squareRootInvWeightSIN; /*! @} */ }; diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 90153707f5164507be39504cb45bf51cd45a1769..87acce635e899d46970367457562546043058775 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -86,9 +86,9 @@ SET(${PROJECT_NAME}_SOURCES INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include) #define VP_DEBUG if we're building in debug mode -IF ( ${CMAKE_BUILD_TYPE} STREQUAL "DEBUG" ) +IF(${CMAKE_BUILD_TYPE} STREQUAL DEBUG) ADD_DEFINITIONS(-DVP_DEBUG) -ENDIF ( ${CMAKE_BUILD_TYPE} STREQUAL "DEBUG" ) +ENDIF (${CMAKE_BUILD_TYPE} STREQUAL DEBUG) ADD_DEFINITIONS(-DDEBUG=2) @@ -163,9 +163,9 @@ FOREACH(plugin ${plugins}) INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include) #define VP_DEBUG if we're building in debug mode - IF ( ${CMAKE_BUILD_TYPE} STREQUAL "DEBUG" ) + IF(${CMAKE_BUILD_TYPE} STREQUAL DEBUG) ADD_DEFINITIONS(-DVP_DEBUG) - ENDIF ( ${CMAKE_BUILD_TYPE} STREQUAL "DEBUG" ) + ENDIF (${CMAKE_BUILD_TYPE} STREQUAL DEBUG) ADD_DEFINITIONS(-DDEBUG=2) diff --git a/src/factory/additional-functions.cpp b/src/factory/additional-functions.cpp index aa2166aba72cdbc03cf144473b166f656e0179de..471dd27cf18808a3e8309d7cab2835cfb7b0f6b7 100644 --- a/src/factory/additional-functions.cpp +++ b/src/factory/additional-functions.cpp @@ -28,6 +28,7 @@ #include <sot-core/flags.h> using namespace std; using namespace sot; +using namespace dynamicgraph; /* \brief Constructor. At creation, overloads (deregisters-then registers * again) the 'new' function in the g_shell diff --git a/src/feature/feature-1d.cpp b/src/feature/feature-1d.cpp index 168bb12f78b8e592715ef4dcf7e620c2e2cb1d55..5ba2ac93ff6a07ce3090fbd42147f0a97757c7b3 100644 --- a/src/feature/feature-1d.cpp +++ b/src/feature/feature-1d.cpp @@ -32,6 +32,7 @@ using namespace std; using namespace sot; +using namespace dynamicgraph; SOT_FACTORY_FEATURE_PLUGIN(Feature1D,"Feature1D"); /* --------------------------------------------------------------------- */ diff --git a/src/feature/feature-abstract.cpp b/src/feature/feature-abstract.cpp index dbbc566c1cfc4976c83d41e1d456db287bceefae..00df89eba1dff0e162b860f2e6ace0869ac25727 100644 --- a/src/feature/feature-abstract.cpp +++ b/src/feature/feature-abstract.cpp @@ -21,6 +21,7 @@ #include <sot-core/pool.h> using namespace sot; +namespace dg = dynamicgraph; const std::string FeatureAbstract::CLASS_NAME = "FeatureAbstract"; @@ -67,7 +68,7 @@ writeGraph( std::ostream& os ) const if( desiredValueSIN ) { // const SignalAbstract<int> & sdesAbs = desiredValueSIN; - const SignalPtr<FeatureAbstract *,int> & sdesSig = desiredValueSIN; + const dg::SignalPtr<FeatureAbstract *,int> & sdesSig = desiredValueSIN; if (sdesSig!=0) { diff --git a/src/feature/feature-generic.cpp b/src/feature/feature-generic.cpp index 07fa7a9c158510264a3c4454245723ba91e25270..b82d59ed5950dedab6ac58b224b8c568c107a8cc 100644 --- a/src/feature/feature-generic.cpp +++ b/src/feature/feature-generic.cpp @@ -26,13 +26,11 @@ #include <sot-core/debug.h> #include <sot-core/feature-generic.h> #include <sot-core/exception-feature.h> -using namespace std; - #include <sot-core/factory.h> - +using namespace std; using namespace sot; - +using namespace dynamicgraph; SOT_FACTORY_FEATURE_PLUGIN(FeatureGeneric,"FeatureGeneric"); /* --------------------------------------------------------------------- */ diff --git a/src/feature/feature-line-distance.cpp b/src/feature/feature-line-distance.cpp index 4344475d0fd0b56f62d0089626f9768bcc1ac2c0..785695d3e70dd40c2761447dcef0bea003b7a4bf 100644 --- a/src/feature/feature-line-distance.cpp +++ b/src/feature/feature-line-distance.cpp @@ -34,6 +34,7 @@ using namespace std; using namespace sot; +using namespace dynamicgraph; #include <sot-core/factory.h> SOT_FACTORY_FEATURE_PLUGIN(FeatureLineDistance,"FeatureLineDistance"); diff --git a/src/feature/feature-point6d-relative.cpp b/src/feature/feature-point6d-relative.cpp index 52ac3715fdb7a2d5dd1748c2573fcb62aae98a57..8a1ed547ea5271abbc874804cf878108fc39a636 100644 --- a/src/feature/feature-point6d-relative.cpp +++ b/src/feature/feature-point6d-relative.cpp @@ -34,7 +34,7 @@ using namespace std; using namespace sot; - +using namespace dynamicgraph; #include <sot-core/factory.h> SOT_FACTORY_FEATURE_PLUGIN(FeaturePoint6dRelative,"FeaturePoint6dRelative"); diff --git a/src/feature/feature-point6d.cpp b/src/feature/feature-point6d.cpp index febbc3319e973e5e027020e5d7d67c6969d4d6e5..e52537410d44e03920d789a58063eefed1747fb9 100644 --- a/src/feature/feature-point6d.cpp +++ b/src/feature/feature-point6d.cpp @@ -34,7 +34,7 @@ #include <sot-core/vector-utheta.h> using namespace std; - +using namespace dynamicgraph; using namespace sot; #include <sot-core/factory.h> diff --git a/src/feature/feature-task.cpp b/src/feature/feature-task.cpp index f065834171451745dfae7e54e3a44c0689c1ce04..59124f14eff8f5f9cdc5ea93dca86221b28a67ca 100644 --- a/src/feature/feature-task.cpp +++ b/src/feature/feature-task.cpp @@ -29,6 +29,7 @@ #include <dynamic-graph/pool.h> using namespace std; using namespace sot; +using namespace dynamicgraph; #include <sot-core/factory.h> diff --git a/src/feature/feature-vector3.cpp b/src/feature/feature-vector3.cpp index 7b9568df014fac1698ecf49071156e3d14e1e742..81aa5830f8ac9ba4bd33678deb9cef83d3522d77 100644 --- a/src/feature/feature-vector3.cpp +++ b/src/feature/feature-vector3.cpp @@ -36,7 +36,7 @@ using namespace sot; using namespace std; - +using namespace dynamicgraph; SOT_FACTORY_FEATURE_PLUGIN(FeatureVector3,"FeatureVector3"); diff --git a/src/feature/feature-visual-point.cpp b/src/feature/feature-visual-point.cpp index 4965c93a73fc475a72ec774d59dc160dd4b4130f..d24186a0d944fde9ed70d7b91354f339b81bc336 100644 --- a/src/feature/feature-visual-point.cpp +++ b/src/feature/feature-visual-point.cpp @@ -29,7 +29,7 @@ #include <sot-core/factory.h> using namespace std; using namespace sot; - +using namespace dynamicgraph; SOT_FACTORY_FEATURE_PLUGIN(FeatureVisualPoint,"FeatureVisualPoint"); diff --git a/src/math/op-point-modifier.cpp b/src/math/op-point-modifier.cpp index 7cb8f29a893a7b16780c5baba412e6de1ed44b7d..bf013012c5600a338ed9ab591dac16e73a216e8b 100644 --- a/src/math/op-point-modifier.cpp +++ b/src/math/op-point-modifier.cpp @@ -27,10 +27,10 @@ using namespace std; using namespace sot; +using namespace dynamicgraph; + -namespace sot { SOT_FACTORY_ENTITY_PLUGIN(OpPointModifior,"OpPointModifior"); -} /* --------------------------------------------------------------------- */ diff --git a/src/math/vector-quaternion.cpp b/src/math/vector-quaternion.cpp index baefd496b9429f738e7db63e7223b6fbaa829a3d..b351bdcd281e4d23dfd99b47d380e04c58ae829a 100644 --- a/src/math/vector-quaternion.cpp +++ b/src/math/vector-quaternion.cpp @@ -22,7 +22,6 @@ using namespace std; using namespace sot; - static const double ANGLE_MINIMUM = 0.0001; static const double SINC_MINIMUM = 1e-8; static const double COSC_MINIMUM = 2.5e-4; diff --git a/src/matrix/binary-op.cpp b/src/matrix/binary-op.cpp index 1109a3fb6d798227658a81ad0260fa70befc4714..5bec92e65aed11b669b58fe30a4fa5f3f24b5f65 100644 --- a/src/matrix/binary-op.cpp +++ b/src/matrix/binary-op.cpp @@ -29,6 +29,7 @@ #include <deque> namespace sot { +using namespace dynamicgraph; #define SOT_FACTORY_TEMPLATE_ENTITY_PLUGIN_ExE_E_CMD(sotClassType,sotType,index,className,CMDLINE,CMDHELP) \ template<> \ @@ -189,7 +190,7 @@ public: } }; typedef BinaryOp< Vector,Vector,Vector,VectorStack > stackvector; -SOT_FACTORY_TEMPLATE_ENTITY_PLUGIN_ExE_E_CMD(stackvector,vector,stack_vector,"Stack<vector>",else if( cmdLine=="selec1" ){ cmdArgs>>op.v1min>>op.v1max; } +SOT_FACTORY_TEMPLATE_ENTITY_PLUGIN_ExE_E_CMD(stackvector,vector,stack_vector,"Stack<vector>",else if( cmdLine=="selec1" ){ cmdArgs>>op.v1min>>op.v1max; } else if( cmdLine=="selec2" ){ cmdArgs>>op.v2min>>op.v2max; } else if( cmdLine=="print" ){ os<<"Stack ["<<op.v1min<<","<<op.v1max<<"] - ["<<op.v2min<<","<<op.v2max<<"] "<<std::endl; }, "Stack<vector>: \n - select{1|2} index_min index_max."); @@ -210,7 +211,7 @@ public: } }; typedef BinaryOp< Vector,Vector,Vector,WeightedAdder > weightadd; -SOT_FACTORY_TEMPLATE_ENTITY_PLUGIN_ExE_E_CMD(weightadd,vector,weight_add,"WeightAdd<vector>",else if( cmdLine=="gain1" ){ cmdArgs>>op.gain1; } +SOT_FACTORY_TEMPLATE_ENTITY_PLUGIN_ExE_E_CMD(weightadd,vector,weight_add,"WeightAdd<vector>",else if( cmdLine=="gain1" ){ cmdArgs>>op.gain1; } else if( cmdLine=="gain2" ){ cmdArgs>>op.gain2;} else if( cmdLine=="print" ){os<<"WeightAdd: "<<op.gain1<<" "<<op.gain2<<std::endl; }, "WeightAdd<vector>: \n - gain{1|2} gain."); diff --git a/src/matrix/derivator.cpp b/src/matrix/derivator.cpp index 9ee420673818a3b09e57ac75da226f0c517e9af8..3929349395ef10e3598b4d458824a9a3d3091824 100644 --- a/src/matrix/derivator.cpp +++ b/src/matrix/derivator.cpp @@ -22,6 +22,7 @@ using namespace sot; using namespace ml; +using namespace dynamicgraph; #define SOT_FACTORY_TEMPLATE_ENTITY_PLUGIN(sotClassType,sotType,className) \ template<> \ diff --git a/src/matrix/fir-filter.cpp b/src/matrix/fir-filter.cpp index 69f1f089cd421d86f7596a8f83f4e9e4ba89de3d..51d4b2d9af233988f2784a7678b0066c6a444af3 100644 --- a/src/matrix/fir-filter.cpp +++ b/src/matrix/fir-filter.cpp @@ -21,7 +21,7 @@ #include <sot-core/factory.h> using namespace sot; - +using namespace dynamicgraph; #define SOT_FACTORY_TEMPLATE_ENTITY_PLUGIN(sotClassType,sotSigType,sotCoefType,id,className) \ template<> \ diff --git a/src/matrix/integrator-abstract.cpp b/src/matrix/integrator-abstract.cpp index 984ded1b8604b57f69f369f791e92317a6459b6e..f628b2ad7ee8e02f9145192c8c3e7e4a703984e6 100644 --- a/src/matrix/integrator-abstract.cpp +++ b/src/matrix/integrator-abstract.cpp @@ -21,7 +21,7 @@ #include <sot-core/factory.h> using namespace sot; - +using namespace dynamicgraph; #define SOT_FACTORY_TEMPLATE_ENTITY_PLUGIN(sotClassType,sotSigType,sotCoefType,className) \ template<> \ diff --git a/src/matrix/integrator-euler.cpp b/src/matrix/integrator-euler.cpp index fdd37e3ca71fc12b7f0074f57f5fb833d80f5d29..69cddf31a9c805220653168a2934f87ea5e09d1b 100644 --- a/src/matrix/integrator-euler.cpp +++ b/src/matrix/integrator-euler.cpp @@ -21,7 +21,7 @@ #include <sot-core/factory.h> using namespace sot; - +using namespace dynamicgraph; #define SOT_FACTORY_TEMPLATE_ENTITY_PLUGIN(sotClassType,sotSigType,sotCoefType,className) \ template<> \ diff --git a/src/matrix/matrix-constant.cpp b/src/matrix/matrix-constant.cpp index 6e885509fe0d9c878497471531fd28565a7d1d1e..0e49ac8f2442898ee613958c23fa6d435b378566 100644 --- a/src/matrix/matrix-constant.cpp +++ b/src/matrix/matrix-constant.cpp @@ -22,7 +22,7 @@ using namespace std; using namespace sot; - +using namespace dynamicgraph; SOT_FACTORY_ENTITY_PLUGIN(MatrixConstant,"MatrixConstant"); diff --git a/src/matrix/unary-op.cpp b/src/matrix/unary-op.cpp index fb74cc53abde57a12b8a8ff359221504b30c77a1..1e88744e12078e3a014fefceee1d7f9ea96ca2e2 100644 --- a/src/matrix/unary-op.cpp +++ b/src/matrix/unary-op.cpp @@ -29,7 +29,7 @@ using namespace sot; - +using namespace dynamicgraph; #define SOT_FACTORY_TEMPLATE_ENTITY_PLUGIN_E_E(sotClassType,sotType,index,className,CMDLINE,CMDHELP) \ diff --git a/src/matrix/vector-constant.cpp b/src/matrix/vector-constant.cpp index 376a49c30e45b63b2bdb6f250413c7ea36199bed..4db6f1bc2ee7238716314c4f148143cec4027754 100644 --- a/src/matrix/vector-constant.cpp +++ b/src/matrix/vector-constant.cpp @@ -18,15 +18,14 @@ * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ #include <sot-core/vector-constant.h> - #include <sot-core/factory.h> -namespace sot { -SOT_FACTORY_ENTITY_PLUGIN(VectorConstant,"VectorConstant"); -} - using namespace std; using namespace sot; +using namespace dynamicgraph; + +SOT_FACTORY_ENTITY_PLUGIN(VectorConstant,"VectorConstant"); + /* --------------------------------------------------------------------- */ diff --git a/src/matrix/vector-to-rotation.cpp b/src/matrix/vector-to-rotation.cpp index 7d20693526e669f2c29ef016bef090db44368e9e..44154a64a5afa816f418179a49672b107496e524 100644 --- a/src/matrix/vector-to-rotation.cpp +++ b/src/matrix/vector-to-rotation.cpp @@ -25,10 +25,9 @@ using namespace std; using namespace sot; +using namespace dynamicgraph; -namespace sot { SOT_FACTORY_ENTITY_PLUGIN(VectorToRotation,"VectorToRotation"); -} /* --------------------------------------------------------------------- */ /* --------------------------------------------------------------------- */ diff --git a/src/sot/memory-task-sot.cpp b/src/sot/memory-task-sot.cpp index f1ed074319addfacb5a0a40d71d12c43f788e672..784347c18b77f39cdd46d74e02ce82d1400548cb 100644 --- a/src/sot/memory-task-sot.cpp +++ b/src/sot/memory-task-sot.cpp @@ -22,6 +22,7 @@ #include <sot-core/debug.h> using namespace sot; +using namespace dynamicgraph; const std::string MemoryTaskSOT::CLASS_NAME = "MemoryTaskSOT"; diff --git a/src/sot/sot-h.cpp b/src/sot/sot-h.cpp index 242c992d318d66c0ca0ae798770ec0ebba934d53..d83042e7a03a1126da30c489baef195b1c7f0aaa 100644 --- a/src/sot/sot-h.cpp +++ b/src/sot/sot-h.cpp @@ -30,6 +30,7 @@ using namespace std; using namespace sot; +using namespace dynamicgraph; #ifdef VP_DEBUG class sotSOTH__INIT diff --git a/src/sot/sot-qr.cpp b/src/sot/sot-qr.cpp index c6de0808c483eaf366e3b95f4c11a729adda3815..9446ff0e6a5e296bba7582d334d1e685b7b9031e 100644 --- a/src/sot/sot-qr.cpp +++ b/src/sot/sot-qr.cpp @@ -40,7 +40,7 @@ #define FORTRAN_ID( id ) id##_ using namespace std; using namespace sot; - +using namespace dynamicgraph; /* --------------------------------------------------------------------- */ /* --- CLASS ----------------------------------------------------------- */ diff --git a/src/sot/sot.cpp b/src/sot/sot.cpp index e66f1c86049aea1c086e8c7f77b0e0b02347c2bb..87a75411f7828eb331b8e808b6b5e6ce8360955f 100644 --- a/src/sot/sot.cpp +++ b/src/sot/sot.cpp @@ -42,6 +42,7 @@ using namespace std; using namespace sot; +using namespace dynamicgraph; /* --------------------------------------------------------------------- */ diff --git a/src/sot/weighted-sot.cpp b/src/sot/weighted-sot.cpp index 21bc5f7b7ccf2c61332b0b956c95ab84d8c26f49..1b9ba6b94e11fc07d3f334acec4b59fa73b9fa6f 100644 --- a/src/sot/weighted-sot.cpp +++ b/src/sot/weighted-sot.cpp @@ -30,7 +30,7 @@ #include <sot-core/debug.h> using namespace std; using namespace sot; - +using namespace dynamicgraph; /* --------------------------------------------------------------------- */ /* --- CLASS ----------------------------------------------------------- */ diff --git a/src/task/constraint.cpp b/src/task/constraint.cpp index 130a91f339a5d19ce5d12e16d7da61e2e52c949d..1d642fa7fa7e25824c259b9b91b0d29357ad0c78 100644 --- a/src/task/constraint.cpp +++ b/src/task/constraint.cpp @@ -32,6 +32,7 @@ using namespace sot; #include <sot-core/factory.h> SOT_FACTORY_TASK_PLUGIN(Constraint,"Constraint"); +using namespace dynamicgraph; /* --------------------------------------------------------------------- */ /* --- CLASS ----------------------------------------------------------- */ diff --git a/src/task/gain-adaptative.cpp b/src/task/gain-adaptative.cpp index b38496201431037c69d696c120cf9b83d9369c91..33730c382e55bd39e8b5ea65f1305bf579895a31 100644 --- a/src/task/gain-adaptative.cpp +++ b/src/task/gain-adaptative.cpp @@ -30,6 +30,7 @@ #include <sot-core/exception-signal.h> using namespace sot; +using namespace dynamicgraph; SOT_FACTORY_ENTITY_PLUGIN(GainAdaptative,"GainAdaptative"); diff --git a/src/task/gain-hyperbolic.cpp b/src/task/gain-hyperbolic.cpp index 9203380acb1ef2f11508ba33459ca991822cd95c..e5b0401cde96fcf14cbe59142db37849c3f76cde 100644 --- a/src/task/gain-hyperbolic.cpp +++ b/src/task/gain-hyperbolic.cpp @@ -30,6 +30,7 @@ #include <sot-core/exception-signal.h> using namespace sot; +using namespace dynamicgraph; SOT_FACTORY_ENTITY_PLUGIN(GainHyperbolic,"GainHyperbolic"); diff --git a/src/task/task-abstract.cpp b/src/task/task-abstract.cpp index 15dd72208b744c88d7224de3516baf1fbd1d7756..daa6a44534f8dc73299604dee485387195b42dac 100644 --- a/src/task/task-abstract.cpp +++ b/src/task/task-abstract.cpp @@ -26,7 +26,7 @@ #include <sot-core/pool.h> using namespace sot; - +using namespace dynamicgraph; /* --------------------------------------------------------------------- */ /* --- CLASS ----------------------------------------------------------- */ diff --git a/src/task/task-conti.cpp b/src/task/task-conti.cpp index b07c3b47ef7461dc0181bfed1c1f30326230e5b1..172b25666f07747fec71ed0b296375f19d88b5b7 100644 --- a/src/task/task-conti.cpp +++ b/src/task/task-conti.cpp @@ -30,6 +30,7 @@ using namespace std; using namespace sot; +using namespace dynamicgraph; SOT_FACTORY_TASK_PLUGIN(TaskConti,"TaskConti"); diff --git a/src/task/task-pd.cpp b/src/task/task-pd.cpp index 761c96c0be2ecf8bbba5aa3ea6c576d16679cc60..d32c550e1635886fbe49af60dc999ac5a39d9ec3 100644 --- a/src/task/task-pd.cpp +++ b/src/task/task-pd.cpp @@ -28,7 +28,7 @@ using namespace std; using namespace sot; - +using namespace dynamicgraph; diff --git a/src/task/task-unilateral.cpp b/src/task/task-unilateral.cpp index c8acc999dd03fcc90ffd1463d547efb57ecc10d7..5549ddc89d3c50ed2ae1b00c9aaa11359f946496 100644 --- a/src/task/task-unilateral.cpp +++ b/src/task/task-unilateral.cpp @@ -31,7 +31,7 @@ using namespace std; using namespace sot; - +using namespace dynamicgraph; #include <sot-core/factory.h> diff --git a/src/task/task.cpp b/src/task/task.cpp index 5c8a3cdc854fb50928e80da8eaafc9d0ed47c92b..b0ebf518f82ea5550ba0ac57ec20dac2235c84f6 100644 --- a/src/task/task.cpp +++ b/src/task/task.cpp @@ -27,8 +27,7 @@ #include <sot-core/debug.h> using namespace std; using namespace sot; - - +using namespace dynamicgraph; #include <sot-core/factory.h> diff --git a/unitTesting/signal/test_dep.cpp b/unitTesting/signal/test_dep.cpp index c004603dc24b820ecf7da45b95a6b4c8f33d2479..01ff8e209cba3b26e19822c2563452249b814961 100644 --- a/unitTesting/signal/test_dep.cpp +++ b/unitTesting/signal/test_dep.cpp @@ -21,14 +21,12 @@ /* -------------------------------------------------------------------------- */ /* --- INCLUDES ------------------------------------------------------------- */ /* -------------------------------------------------------------------------- */ -// #include <dynamic-graph/all-signals.h> #include <dynamic-graph/all-signals.h> -//#include <sot/TimeDependancy.h> #include <iostream> - #include <MatrixAbstractLayer/boost.h> using namespace std; +using namespace dynamicgraph; namespace ml = maal::boost; diff --git a/unitTesting/signal/test_depend.cpp b/unitTesting/signal/test_depend.cpp index ae0a8dc9f3f89367d3f0fabca07c6dbc8fdfa92a..8ef005bf8291a8fc0d09f7a5afc021c18f598e93 100644 --- a/unitTesting/signal/test_depend.cpp +++ b/unitTesting/signal/test_depend.cpp @@ -30,6 +30,7 @@ #include <MatrixAbstractLayer/boost.h> using namespace std; +using namespace dynamicgraph; namespace ml = maal::boost; diff --git a/unitTesting/signal/test_ptr.cpp b/unitTesting/signal/test_ptr.cpp index ee3f8996ede15f765d59045c57d2a5f5978c0a91..1cbfc99419cc1eb619ee50d0eedc0ae65b12cb18 100644 --- a/unitTesting/signal/test_ptr.cpp +++ b/unitTesting/signal/test_ptr.cpp @@ -30,6 +30,7 @@ using namespace std; using namespace sot; +using namespace dynamicgraph; namespace ml = maal::boost; diff --git a/unitTesting/signal/test_signal.cpp b/unitTesting/signal/test_signal.cpp index 420214e311dc8458a461dea9fd888f66d96c970a..bd75071b5e7e89b3f489165387fe81eacda6684b 100644 --- a/unitTesting/signal/test_signal.cpp +++ b/unitTesting/signal/test_signal.cpp @@ -25,6 +25,7 @@ #include <iostream> #include <MatrixAbstractLayer/boost.h> using namespace std; +using namespace dynamicgraph; namespace ml = maal::boost;