31 TaskConti::TaskConti(
const std::string &
n)
33 timeRef(TIME_REF_UNSIGNIFICANT),
35 controlPrevSIN(NULL,
"sotTaskConti(" + n +
")::input(double)::q0") {
53 sotDEBUG(25) <<
"J = " << J << std::endl;
54 if (
q0.size() != (J.cols() - 6))
throw;
55 for (
int i = 0;
i < J.rows(); ++
i) {
57 for (
int j = 6; j < J.cols(); ++j) deref(
i) += J(
i, j) *
q0(j - 6);
64 sotDEBUG(10) <<
"Time not used. " << std::endl;
70 double contiGain =
exp(dt);
71 double gain = (contiGain - 1) * lambda;
73 sotDEBUG(25) <<
"T: ref=" <<
timeRef <<
", cur=" << timecurr << std::endl;
74 sotDEBUG(25) <<
"Gains: l=" << lambda <<
", expmu=" << contiGain
76 sotDEBUG(25) <<
"e = " << deref << std::endl;
79 sotDEBUG(25) <<
"dedes: " << desvel << std::endl;
82 sotDEBUG(25) <<
"task: " << desvel << std::endl;
84 desvel2b.resize(desvel.size());
85 for (
int i = 0;
i < desvel.size(); ++
i) desvel2b[
i] = desvel(
i);
92 desvel2b.resize(desvel.size());
93 for (
int i = 0;
i < desvel.size(); ++
i) desvel2b[
i] = -gain * desvel(
i);
107 os <<
"TaskConti " <<
name <<
" [t=" <<
timeRef <<
"] " 109 os <<
"--- LIST --- " << std::endl;
111 for (FeatureList_t::const_iterator iter =
featureList.begin();
113 os <<
"-> " << (*iter)->getName() << endl;
void signalRegistration(const SignalArray< int > &signals)
dynamicgraph::SignalTimeDependent< VectorMultiBound, int > taskSOUT
FeatureList_t featureList
dynamicgraph::SignalPtr< double, int > controlGainSIN
void display(std::ostream &os) const
std::vector< MultiBound > VectorMultiBound
DYNAMICGRAPH_FACTORY_ENTITY_PLUGIN(TaskConti, "TaskConti")
dynamicgraph::SignalTimeDependent< dynamicgraph::Vector, int > errorSOUT
VectorMultiBound & computeContiDesiredVelocity(VectorMultiBound &task, const int &time)
dynamicgraph::SignalTimeDependent< dynamicgraph::Matrix, int > jacobianSOUT
dynamicgraph::SignalPtr< dynamicgraph::Vector, int > controlPrevSIN
Class that defines the basic elements of a task.
virtual void setFunction(boost::function2< T &, T &, Time > t, Mutex *mutexref=NULL)