amended
parent
7c052ff48a
commit
b3c828f8d2
|
@ -205,9 +205,9 @@ class SmartStereoProjectionFactorPP : public SmartStereoProjectionFactor {
|
||||||
std::vector<Matrix> Gs(numKeys * (numKeys + 1) / 2);
|
std::vector<Matrix> Gs(numKeys * (numKeys + 1) / 2);
|
||||||
std::vector<Vector> gs(numKeys);
|
std::vector<Vector> gs(numKeys);
|
||||||
|
|
||||||
for(size_t i=0; i<numKeys;i++){
|
// for(size_t i=0; i<numKeys;i++){
|
||||||
std::cout <<"key: " << DefaultKeyFormatter(allKeys[i]) << std::endl;
|
// std::cout <<"key: " << DefaultKeyFormatter(allKeys[i]) << std::endl;
|
||||||
}
|
// }
|
||||||
|
|
||||||
if (this->measured_.size() != cameras(values).size())
|
if (this->measured_.size() != cameras(values).size())
|
||||||
throw std::runtime_error("SmartStereoProjectionHessianFactor: this->"
|
throw std::runtime_error("SmartStereoProjectionHessianFactor: this->"
|
||||||
|
@ -264,7 +264,7 @@ class SmartStereoProjectionFactorPP : public SmartStereoProjectionFactor {
|
||||||
std::fill(dims.begin(), dims.end() - 1, 6);
|
std::fill(dims.begin(), dims.end() - 1, 6);
|
||||||
dims.back() = 1;
|
dims.back() = 1;
|
||||||
SymmetricBlockMatrix augmentedHessianPP(dims, Matrix(augmentedHessian.selfadjointView()));
|
SymmetricBlockMatrix augmentedHessianPP(dims, Matrix(augmentedHessian.selfadjointView()));
|
||||||
std::cout << "Matrix(augmentedHessian.selfadjointView()) \n" << Matrix(augmentedHessian.selfadjointView()) <<std::endl;
|
//std::cout << "Matrix(augmentedHessian.selfadjointView()) \n" << Matrix(augmentedHessian.selfadjointView()) <<std::endl;
|
||||||
|
|
||||||
return boost::make_shared<RegularHessianFactor<DimPose> >(allKeys,
|
return boost::make_shared<RegularHessianFactor<DimPose> >(allKeys,
|
||||||
augmentedHessianPP);
|
augmentedHessianPP);
|
||||||
|
|
|
@ -698,11 +698,11 @@ TEST( SmartStereoProjectionFactorPP, 3poses_smart_projection_factor_optimization
|
||||||
|
|
||||||
EXPECT_DOUBLES_EQUAL(0, graph.error(result), 1e-5);
|
EXPECT_DOUBLES_EQUAL(0, graph.error(result), 1e-5);
|
||||||
|
|
||||||
GaussianFactorGraph::shared_ptr GFG = graph.linearize(result);
|
// GaussianFactorGraph::shared_ptr GFG = graph.linearize(result);
|
||||||
GFG->print("GFG \n");
|
// // GFG->print("GFG \n");
|
||||||
VectorValues delta = GFG->optimize();
|
// VectorValues delta = GFG->optimize();
|
||||||
VectorValues expected = VectorValues::Zero(delta);
|
// VectorValues expected = VectorValues::Zero(delta);
|
||||||
EXPECT(assert_equal(expected, delta, 1e-6));
|
// EXPECT(assert_equal(expected, delta, 1e-6));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* *************************************************************************
|
/* *************************************************************************
|
||||||
|
|
Loading…
Reference in New Issue