Skip to content

Commit

Permalink
Updating AccelerationMinimizer to not do an unnecessary QR factorization
Browse files Browse the repository at this point in the history
  • Loading branch information
keenon committed Nov 14, 2024
1 parent 81a386b commit 1982385
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 10 deletions.
8 changes: 0 additions & 8 deletions dart/utils/AccelerationMinimizer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,14 +82,6 @@ AccelerationMinimizer::AccelerationMinimizer(
= Eigen::SparseMatrix<s_t>(accTimesteps + 4 + mTimesteps, mTimesteps);
mB_sparse.setFromTriplets(tripletList.begin(), tripletList.end());
mB_sparse.makeCompressed();
mB_sparseSolver.analyzePattern(mB_sparse);
mB_sparseSolver.factorize(mB_sparse);
if (mB_sparseSolver.info() != Eigen::Success)
{
std::cout << "mB_sparseSolver.factorize(mB_sparse) error: "
<< mB_sparseSolver.lastErrorMessage() << std::endl;
}
assert(mB_sparseSolver.info() == Eigen::Success);
}

Eigen::VectorXs AccelerationMinimizer::minimize(Eigen::VectorXs series)
Expand Down
2 changes: 0 additions & 2 deletions dart/utils/AccelerationMinimizer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,6 @@ class AccelerationMinimizer
bool mDebugIterationBackoff;
s_t mConvergenceTolerance;
Eigen::SparseMatrix<s_t> mB_sparse;
Eigen::SparseQR<Eigen::SparseMatrix<s_t>, Eigen::NaturalOrdering<int>>
mB_sparseSolver;
};

} // namespace utils
Expand Down

0 comments on commit 1982385

Please sign in to comment.