14 ,
LinearFunction(f.getVariable().getTimeDerivative(), f.getDimension())
19 throw std::runtime_error(
"[ocra::LinearTask::LinearTask] Input size of L doesn't match with dimension of f");
21 throw std::runtime_error(
"[ocra::LinearTask::LinearTask] Dimension of L doesn't match with dimension of f");
52 w.setConstant(weight);
69 double wi = weight / fi;
90 for (
int i=0; i<n; ++i)
91 w[i] = weight / fi[i];
102 for (
int i=0; i<n; ++i)
103 w[i] = weight[i] * di;
114 for (
int i=0; i<n; ++i)
115 w[i] = weight[i] / fi[i];
124 int n = v->getSize();
125 VectorXd w(weightDividedFi);
154 void LinearTask::updateDimension(
int timestamp)
171 MatrixXd gain(2*n,2*n);
177 for (
int i=0; i<n; ++i)
183 gain(i,i) = 1./(i+1);
184 gain(n+i,n+i) = 1./(n+i+1);
192 for (
int i=0; i<n; ++i)
196 for (
int i=0; i<n; ++i)
200 std::cout << JointTask.
getValue() << std::endl;
const Variable & getVariable() const
void desinhibitPropagationFromb() const
Variable * createOutputVariable(Function &f)
void doUpdateDimensionBegin(int newDimension)
void updateJacobian() const
void setValue(const VectorXd &value)
Declaration file of the LinearTask class.
static LinearTask * createInequalityTaskWithLinearLaw(Function *f, double weight, double fi)
Declaration file of the FunctionProperties class.
Optimization-based Robot Controller namespace. a library of classes to write and solve optimization p...
virtual void doUpdateDimensionEnd(int oldDimension)
const MatrixXd & getJacobian() const
void invalidateb(int timestamp)
This class represents a variable in a mathematical sense.
void inhibitPropagationFromb() const
const VectorXd & getValue() const
void doUpdateDimensionEnd(int oldDimension)
void doUpdateInputSizeBegin()
void changeFunctionDimension(int newDimension)
BaseVariable & getTimeDerivative()
Get the time derivative/primitive of the variable.
static LinearTask * createEqualityTaskWithLinearLaw(Function *f, double weight)
#define ocra_assert(ocra_expression)
virtual bool isBaseVariable() const
void disconnect(Derived &object, void(Base::*callbackToErase)(int)) const
Disconnect non-static method.
void connect(Derived &object, void(Base::*newCallback)(int)) const
Call this method to register a non-static method as a callback.
Implements a basic variable.
DiagonalLinearFunction class.