| Line | Branch | Exec | Source | 
    
      | 1 |  |  | /* | 
    
      | 2 |  |  | * Copyright 2010, | 
    
      | 3 |  |  | * François Bleibel, | 
    
      | 4 |  |  | * Olivier Stasse, | 
    
      | 5 |  |  | * | 
    
      | 6 |  |  | * CNRS/AIST | 
    
      | 7 |  |  | * | 
    
      | 8 |  |  | */ | 
    
      | 9 |  |  |  | 
    
      | 10 |  |  | #ifndef SOT_FEATURE_JOINTLIMITS_HH | 
    
      | 11 |  |  | #define SOT_FEATURE_JOINTLIMITS_HH | 
    
      | 12 |  |  | // Matrix | 
    
      | 13 |  |  | #include <dynamic-graph/linear-algebra.h> | 
    
      | 14 |  |  |  | 
    
      | 15 |  |  | // SOT | 
    
      | 16 |  |  | #include <dynamic-graph/all-signals.h> | 
    
      | 17 |  |  | #include <dynamic-graph/entity.h> | 
    
      | 18 |  |  |  | 
    
      | 19 |  |  | #include <sot/core/exception-task.hh> | 
    
      | 20 |  |  |  | 
    
      | 21 |  |  | #if defined(WIN32) | 
    
      | 22 |  |  | #if defined(joint_limitator_EXPORTS) | 
    
      | 23 |  |  | #define SOTJOINTLIMITATOR_EXPORT __declspec(dllexport) | 
    
      | 24 |  |  | #else | 
    
      | 25 |  |  | #define SOTJOINTLIMITATOR_EXPORT __declspec(dllimport) | 
    
      | 26 |  |  | #endif | 
    
      | 27 |  |  | #else | 
    
      | 28 |  |  | #define SOTJOINTLIMITATOR_EXPORT | 
    
      | 29 |  |  | #endif | 
    
      | 30 |  |  |  | 
    
      | 31 |  |  | namespace dynamicgraph { | 
    
      | 32 |  |  | namespace sot { | 
    
      | 33 |  |  |  | 
    
      | 34 |  |  | /// \brief Filter control vector to avoid exceeding joint maximum values. | 
    
      | 35 |  |  | /// | 
    
      | 36 |  |  | /// This must be plugged between the entity producing the command | 
    
      | 37 |  |  | /// (i.e. usually the sot) and the entity executing it (the device). | 
    
      | 38 |  |  | class SOTJOINTLIMITATOR_EXPORT JointLimitator : public dynamicgraph::Entity { | 
    
      | 39 |  | ✗ | DYNAMIC_GRAPH_ENTITY_DECL(); | 
    
      | 40 |  |  |  | 
    
      | 41 |  |  | public: | 
    
      | 42 |  |  | JointLimitator(const std::string &name); | 
    
      | 43 |  | ✗ | virtual ~JointLimitator() {} | 
    
      | 44 |  |  |  | 
    
      | 45 |  |  | virtual dynamicgraph::Vector &computeControl(dynamicgraph::Vector &res, | 
    
      | 46 |  |  | int time); | 
    
      | 47 |  |  | dynamicgraph::Vector &computeWidthJl(dynamicgraph::Vector &res, | 
    
      | 48 |  |  | const int &time); | 
    
      | 49 |  |  |  | 
    
      | 50 |  |  | virtual void display(std::ostream &os) const; | 
    
      | 51 |  |  |  | 
    
      | 52 |  |  | /// \name Signals | 
    
      | 53 |  |  | /// \{ | 
    
      | 54 |  |  | dynamicgraph::SignalPtr<dynamicgraph::Vector, int> jointSIN; | 
    
      | 55 |  |  | dynamicgraph::SignalPtr<dynamicgraph::Vector, int> upperJlSIN; | 
    
      | 56 |  |  | dynamicgraph::SignalPtr<dynamicgraph::Vector, int> lowerJlSIN; | 
    
      | 57 |  |  | dynamicgraph::SignalPtr<dynamicgraph::Vector, int> controlSIN; | 
    
      | 58 |  |  | dynamicgraph::SignalTimeDependent<dynamicgraph::Vector, int> controlSOUT; | 
    
      | 59 |  |  | dynamicgraph::SignalTimeDependent<dynamicgraph::Vector, int> widthJlSINTERN; | 
    
      | 60 |  |  | /// \} | 
    
      | 61 |  |  | }; | 
    
      | 62 |  |  | }  // end of namespace sot. | 
    
      | 63 |  |  | }  // namespace dynamicgraph | 
    
      | 64 |  |  |  | 
    
      | 65 |  |  | #endif  //! SOT_FEATURE_JOINTLIMITS_HH | 
    
      | 66 |  |  |  |