From 198238514ffae5052d7c537d285120630d51d14c Mon Sep 17 00:00:00 2001 From: Keenon Werling Date: Thu, 14 Nov 2024 14:49:07 -0800 Subject: [PATCH] Updating AccelerationMinimizer to not do an unnecessary QR factorization --- dart/utils/AccelerationMinimizer.cpp | 8 -------- dart/utils/AccelerationMinimizer.hpp | 2 -- 2 files changed, 10 deletions(-) diff --git a/dart/utils/AccelerationMinimizer.cpp b/dart/utils/AccelerationMinimizer.cpp index 03e375467..8b081a64e 100644 --- a/dart/utils/AccelerationMinimizer.cpp +++ b/dart/utils/AccelerationMinimizer.cpp @@ -82,14 +82,6 @@ AccelerationMinimizer::AccelerationMinimizer( = Eigen::SparseMatrix(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) diff --git a/dart/utils/AccelerationMinimizer.hpp b/dart/utils/AccelerationMinimizer.hpp index c70b978c3..143e27a0a 100644 --- a/dart/utils/AccelerationMinimizer.hpp +++ b/dart/utils/AccelerationMinimizer.hpp @@ -43,8 +43,6 @@ class AccelerationMinimizer bool mDebugIterationBackoff; s_t mConvergenceTolerance; Eigen::SparseMatrix mB_sparse; - Eigen::SparseQR, Eigen::NaturalOrdering> - mB_sparseSolver; }; } // namespace utils