ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

I can see where your problem is here.

But one quick point first the #include <Eigen/QR> is working fine, the compiler wouldn't even try to build your code if it couldn't find this include. So that bit's okay.

The problem is that completeOrthogonalDecomposition is a class in its own right not an extra method of the matrix type in Eigen as you're trying to call it.

You need to create an instance of the completeOrthogonalDecomposition class templated with the type of matrix you're using then use that class to do the decomposition. Your code should look something like this :

Eigen::CompleteOrthogonalDecomposition<Eigen::MatrixXd> cqr(A);
pinv = cqr.pseudoInverse();

Hope this helps.