Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some improvements to efficiency #290

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Avoid computation of full SVD
... when only singular values are needed.
Actually, it might suffice to compute the determinant!
  • Loading branch information
rhaschke committed Oct 7, 2022
commit f6c2b3582497755024c9a3940ca33a9d4074ceea
2 changes: 1 addition & 1 deletion franka_gazebo/src/model_kdl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ bool ModelKDL::isCloseToSingularity(const KDL::Jacobian& jacobian) const {
return false;
}
Eigen::Matrix<double, 6, 6> mat = jacobian.data * jacobian.data.transpose();
Eigen::JacobiSVD<Eigen::MatrixXd> svd(mat, Eigen::ComputeFullU | Eigen::ComputeFullV);
Eigen::JacobiSVD<Eigen::Matrix<double, 6, 6>> svd(mat);
double critical = svd.singularValues().tail(1)(0);
return critical < this->singularity_threshold_;
}
Expand Down