Commit 7fb0e1cc authored by Joseph Mirabel's avatar Joseph Mirabel Committed by olivier stasse
Browse files

Fix rank computation

parent d985c54c
......@@ -531,8 +531,10 @@ dynamicgraph::Vector &Sot::computeControlLaw(dynamicgraph::Vector &control,
svd.compute(*Jt, Eigen::ComputeThinU | Eigen::ComputeThinV);
else
svd.compute(*Jt, Eigen::ComputeThinU | Eigen::ComputeFullV);
svd.setThreshold(th);
rankJ = svd.rank();
rankJ = 0;
while (rankJ < svd.singularValues().size() &&
th < svd.singularValues()[rankJ])
++rankJ;
/***/ sotCOUNTER(4, 5); // SVD and rank
/* --- COMPUTE QDOT AND P --- */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment