20 #include <../src/feature/feature-joint-limits-command.h>    32 const double FeatureJointLimits::THRESHOLD_DEFAULT = .9;
    34 FeatureJointLimits::FeatureJointLimits(
const string &fName)
    36       threshold(THRESHOLD_DEFAULT)
    40                "sotFeatureJointLimits(" + 
name + 
")::input(vector)::joint"),
    42                  "sotFeatureJointLimits(" + 
name + 
")::input(vector)::upperJl"),
    44                  "sotFeatureJointLimits(" + 
name + 
")::input(vector)::lowerJl"),
    47           upperJlSIN << lowerJlSIN,
    48           "sotFeatureJointLimits(" + 
name + 
")::input(vector)::widthJl") {
    57   std::string docstring;
    84     if (fl(static_cast<int>(
i))) dim++;
    99     res(
i) = UJL(
i) - LJL(
i);
   118   J.resize(SIZE, SIZE_TOTAL);
   121   unsigned int idx = 0;
   122   for (
unsigned int i = 0; 
i < SIZE_TOTAL; ++
i) {
   124       if (fabs(WJL(
i)) > 1e-3)
   125         J(idx, 
i) = 1 / WJL(
i);
   162   sotDEBUG(25) << 
"q = " << q << endl;
   163   sotDEBUG(25) << 
"ljl = " << LJL << endl;
   164   sotDEBUG(25) << 
"Wjl = " << WJL << endl;
   165   sotDEBUG(25) << 
"dim = " << SIZE << endl;
   167   assert(UJL.size() == SIZE_TOTAL);
   168   assert(WJL.size() == SIZE_TOTAL);
   169   assert(LJL.size() == SIZE_TOTAL);
   170   assert(SIZE <= SIZE_TOTAL);
   174   unsigned int parcerr = 0;
   175   for (
int i = 0; 
i < SIZE_TOTAL; ++
i) {
   177       error(parcerr++) = (q(
i) - LJL(
i)) / WJL(
i) * 2 - 1;
   186   os << 
"JointLimits <" << 
name << 
"> ... TODO";
 virtual void removeDependenciesFromReference(void)=0
const T & access(const Time &t1)
dynamicgraph::SignalTimeDependent< dynamicgraph::Vector, int > widthJlSINTERN
SignalPtr< Flags, int > selectionSIN
This vector specifies which dimension are used to perform the computation. For instance let us assume...
DYNAMICGRAPH_FACTORY_ENTITY_PLUGIN(FeatureJointLimits, "FeatureJointLimits")
SignalTimeDependent< unsigned int, int > dimensionSOUT
Returns the dimension of the feature as an output signal. 
void signalRegistration(const SignalArray< int > &signals)
#define sotDEBUGOUT(level)
virtual dynamicgraph::Matrix & computeJacobian(dynamicgraph::Matrix &res, int time)
dynamicgraph::Vector & computeWidthJl(dynamicgraph::Vector &res, const int &time)
#define sotDEBUGIN(level)
virtual void display(std::ostream &os) const
unsigned int getDimension(void) const
Shortest method. 
dynamicgraph::SignalPtr< dynamicgraph::Vector, int > lowerJlSIN
virtual const T & access(const Time &t)
virtual void addDependency(const SignalBase< Time > &signal)
dynamicgraph::SignalPtr< dynamicgraph::Vector, int > upperJlSIN
Class that defines gradient vector for jl avoidance. 
This class gives the abstract definition of a feature. 
dynamicgraph::SignalPtr< dynamicgraph::Vector, int > jointSIN
virtual void addDependenciesFromReference(void)=0
virtual dynamicgraph::Vector & computeError(dynamicgraph::Vector &res, int time)
void addCommand(const std::string &name, command::Command *command)
SignalTimeDependent< dynamicgraph::Vector, int > errorSOUT
This signal returns the error between the desired value and the current value : . ...