Fixed problem is JacobianFactor combine with zero-row factors
parent
b2b7b0b3f3
commit
7aa1c61dcd
|
|
@ -304,6 +304,7 @@ namespace gtsam {
|
||||||
DenseIndex nextRow = 0;
|
DenseIndex nextRow = 0;
|
||||||
for(size_t factorI = 0; factorI < jacobians.size(); ++factorI) {
|
for(size_t factorI = 0; factorI < jacobians.size(); ++factorI) {
|
||||||
const DenseIndex sourceRows = jacobians[factorI]->rows();
|
const DenseIndex sourceRows = jacobians[factorI]->rows();
|
||||||
|
if(sourceRows > 0) {
|
||||||
this->getb().segment(nextRow, sourceRows) = jacobians[factorI]->getb();
|
this->getb().segment(nextRow, sourceRows) = jacobians[factorI]->getb();
|
||||||
if(jacobians[factorI]->get_model()) {
|
if(jacobians[factorI]->get_model()) {
|
||||||
// If the factor has a noise model and we haven't yet allocated sigmas, allocate it.
|
// If the factor has a noise model and we haven't yet allocated sigmas, allocate it.
|
||||||
|
|
@ -315,6 +316,7 @@ namespace gtsam {
|
||||||
}
|
}
|
||||||
nextRow += sourceRows;
|
nextRow += sourceRows;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
gttoc(copy_vectors);
|
gttoc(copy_vectors);
|
||||||
|
|
||||||
if(sigmas)
|
if(sigmas)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue