memory-task-sot.cpp
Go to the documentation of this file.
1 /*
2  * Copyright 2010,
3  * François Bleibel,
4  * Olivier Stasse,
5  *
6  * CNRS/AIST
7  *
8  */
9 
10 #include <sot/core/debug.hh>
11 #include <sot/core/matrix-svd.hh>
13 using namespace dynamicgraph::sot;
14 using namespace dynamicgraph;
15 
17  : kernel(NULL, 0, 0) {
18  initMemory(nJ, mJ);
19 }
20 
22  err.resize(nJ);
23  tmpTask.resize(nJ);
24  tmpVar.resize(mJ);
25  tmpControl.resize(mJ);
26  Jt.resize(nJ, mJ);
27 
28  JK.resize(nJ, mJ);
29 
30  svd = SVD_t(nJ, mJ, Eigen::ComputeThinU | Eigen::ComputeFullV);
31  // If the constraint is well conditioned, the kernel can be pre-allocated.
32  if (mJ > nJ) kernelMem.resize(mJ - nJ, mJ);
33 
34  JK.setZero();
35  Jt.setZero();
36 }
37 
38 void MemoryTaskSOT::display(std::ostream& /*os*/) const {} // TODO
dynamicgraph::sot::MemoryTaskSOT::kernelMem
Matrix kernelMem
Definition: memory-task-sot.hh:65
dynamicgraph::sot::MemoryTaskSOT::JK
dynamicgraph::Matrix JK
Definition: memory-task-sot.hh:36
dynamicgraph::sot::MemoryTaskSOT::MemoryTaskSOT
MemoryTaskSOT(const Matrix::Index nJ=0, const Matrix::Index mJ=0)
Definition: memory-task-sot.cpp:16
dynamicgraph
dynamicgraph::SVD_t
Eigen::JacobiSVD< Matrix > SVD_t
Definition: matrix-svd.hh:23
dynamicgraph::sot::MemoryTaskSOT::tmpVar
dynamicgraph::Vector tmpVar
Definition: memory-task-sot.hh:33
debug.hh
dynamicgraph::sot::MemoryTaskSOT::svd
SVD_t svd
Definition: memory-task-sot.hh:38
dynamicgraph::sot::MemoryTaskSOT::err
dynamicgraph::Vector err
Definition: memory-task-sot.hh:33
dynamicgraph::sot::MemoryTaskSOT::tmpTask
dynamicgraph::Vector tmpTask
Definition: memory-task-sot.hh:33
Index
std::size_t Index
dynamicgraph::sot::MemoryTaskSOT::display
void display(std::ostream &os) const
Definition: memory-task-sot.cpp:38
memory-task-sot.hh
dynamicgraph::sot::MemoryTaskSOT::Jt
dynamicgraph::Matrix Jt
Definition: memory-task-sot.hh:34
dynamicgraph::sot::MemoryTaskSOT::initMemory
void initMemory(const Matrix::Index nJ, const Matrix::Index mJ)
Definition: memory-task-sot.cpp:21
matrix-svd.hh
dynamicgraph::sot
dynamicgraph::sot::MemoryTaskSOT::tmpControl
dynamicgraph::Vector tmpControl
Definition: memory-task-sot.hh:33


sot-core
Author(s): Olivier Stasse, ostasse@laas.fr
autogenerated on Tue Oct 24 2023 02:26:31