Commit 22d07260 authored by Joseph Mirabel's avatar Joseph Mirabel Committed by olivier stasse
Browse files

[SOT] check size of projection matrix.

parent f10dcdf1
......@@ -501,8 +501,13 @@ dynamicgraph::Vector &Sot::computeControlLaw(dynamicgraph::Vector &control,
// Get initial projector if any.
if (proj0SIN.isPlugged()) {
const Matrix &K = proj0SIN.access(iterTime);
makeMap(kernel, K);
has_kernel = true;
if (K.rows() == nbJoints) {
makeMap(kernel, K);
has_kernel = true;
} else {
DYNAMIC_GRAPH_ENTITY_ERROR_STREAM(*this) << "Projector of " << getName()
<< " has " << K.rows() << " rows while " << nbJoints << " expected.\n";
}
}
for (StackType::iterator iter = stack.begin(); iter != stack.end(); ++iter) {
sotSTARTPARTCOUNTERS;
......
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