From 17a8a0347f8fa501eb78062f26bb1818baf559f5 Mon Sep 17 00:00:00 2001 From: Martin Felis Date: Fri, 20 Nov 2020 22:54:07 +0100 Subject: [PATCH] SimpleMath: fixed matrix.llt().inverse() (was using unused variable). --- 3rdparty/rbdl/include/rbdl/SimpleMath/SimpleMath.h | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/3rdparty/rbdl/include/rbdl/SimpleMath/SimpleMath.h b/3rdparty/rbdl/include/rbdl/SimpleMath/SimpleMath.h index c99386d..2e867e1 100644 --- a/3rdparty/rbdl/include/rbdl/SimpleMath/SimpleMath.h +++ b/3rdparty/rbdl/include/rbdl/SimpleMath/SimpleMath.h @@ -1555,7 +1555,6 @@ private: typedef Matrix ColumnVector; bool mIsFactorized; - Matrix mQ; Derived mL; public: @@ -1624,13 +1623,13 @@ public: Derived inverse() const { assert (mIsFactorized); - VectorXd rhs_temp = VectorXd::Zero(mQ.cols()); - MatrixXXd result (mQ.cols(), mQ.cols()); + VectorXd rhs_temp = VectorXd::Zero(mL.cols()); + MatrixXXd result (mL.cols(), mL.cols()); - for (unsigned int i = 0; i < mQ.cols(); i++) { + for (unsigned int i = 0; i < mL.cols(); i++) { rhs_temp[i] = 1.; - result.block(0, i, mQ.cols(), 1) = solve(rhs_temp); + result.block(0, i, mL.cols(), 1) = solve(rhs_temp); rhs_temp[i] = 0.; }