small improvements
parent
b3635cc6ce
commit
b0404aa109
|
@ -65,9 +65,7 @@ GaussianFactorGraph::shared_ptr LPInitSolver::buildInitOfInitGraph() const {
|
||||||
new GaussianFactorGraph(lp_.equalities));
|
new GaussianFactorGraph(lp_.equalities));
|
||||||
|
|
||||||
// create factor ||x||^2 and add to the graph
|
// create factor ||x||^2 and add to the graph
|
||||||
const KeyDimMap& constrainedKeyDim = lp_.constrainedKeyDimMap();
|
for (const auto& [key, dim] : lp_.constrainedKeyDimMap()) {
|
||||||
for (const auto& [key, _] : constrainedKeyDim) {
|
|
||||||
size_t dim = constrainedKeyDim.at(key);
|
|
||||||
initGraph->push_back(
|
initGraph->push_back(
|
||||||
JacobianFactor(key, Matrix::Identity(dim, dim), Vector::Zero(dim)));
|
JacobianFactor(key, Matrix::Identity(dim, dim), Vector::Zero(dim)));
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,6 +19,7 @@
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include <gtsam_unstable/dllexport.h>
|
||||||
#include <gtsam_unstable/linear/LP.h>
|
#include <gtsam_unstable/linear/LP.h>
|
||||||
#include <gtsam/linear/GaussianFactorGraph.h>
|
#include <gtsam/linear/GaussianFactorGraph.h>
|
||||||
|
|
||||||
|
@ -49,7 +50,7 @@ namespace gtsam {
|
||||||
* inequality constraint, we can't conclude that the problem is infeasible.
|
* inequality constraint, we can't conclude that the problem is infeasible.
|
||||||
* However, whether it is infeasible or unbounded, we don't have a unique solution anyway.
|
* However, whether it is infeasible or unbounded, we don't have a unique solution anyway.
|
||||||
*/
|
*/
|
||||||
class LPInitSolver {
|
class GTSAM_UNSTABLE_EXPORT LPInitSolver {
|
||||||
private:
|
private:
|
||||||
const LP& lp_;
|
const LP& lp_;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue