Closed SkelonChan closed 2 years ago
Hi @SkelonChan, did you solved the problem? If that is the case, it may be convenient if you share your solution, to avoid situations such as https://xkcd.com/979/ . :D
the reason is Header file conflict,too difficult to find it
Ok, thanks anyway!
the reason is Header file conflict,too difficult to find it
I'm also having the same issue, where exactly is the conflict happening?
the reason is Header file conflict,too difficult to find it
I'm also having the same issue, where exactly is the conflict happening?
@Bzdss6 I suggest to open a new issue with a clear description of your setup. Commenting a closed issue is not great for visibility.
when i use the ospqeigen in ros,to solve qp problem,it occured error
Eigen::SparseMatrix<double> hh; hh.resize(6,6); hh.insert(0,0) = 1; hh.insert(1,0) = 1; .... hh.insert(1,5) = 1; hh.insert(2,5) = 1; hh.insert(3,5) = 1; hh.insert(4,5) = 1; hh.insert(5,5) = 1; solver.data()->setHessianMatrix(hh); solver.data()->setGradient(gradient); solver.data()->setLinearConstraintsMatrix(linearMatrix); solver.data()->setLowerBound(lowerBound); solver.data()->setUpperBound(upperBound);
when i compile it ,it will take a error such as:
[ 96%] Built target vehicle_info_msg_generate_messages In file included from /usr/local/include/eigen3/Eigen/Core:328, from /usr/local/include/eigen3/Eigen/Dense:1, from /home/skelon/demo/MPC_ros/src/mpc_fid/src/mpc_ros.cpp:7: /usr/local/include/eigen3/Eigen/src/Core/TriangularMatrix.h: In instantiation of ‘class Eigen::TriangularView<const Eigen::SparseMatrix<double, 0, int>, 2>’: /usr/local/include/OsqpEigen/Data.tpp:38:13: required from ‘bool OsqpEigen::Data::setHessianMatrix(const Eigen::SparseCompressedBase<Derived>&) [with Derived = Eigen::SparseMatrix<double, 0, int>]’ /home/skelon/demo/MPC_ros/src/mpc_fid/src/mpc_ros.cpp:608:39: required from here /usr/local/include/eigen3/Eigen/src/Core/TriangularMatrix.h:295:17: error: no members matching ‘Eigen::TriangularView<const Eigen::SparseMatrix<double, 0, int>, 2>::Base {aka Eigen::TriangularViewImpl<const Eigen::SparseMatrix<double, 0, int>, 2, Eigen::Sparse>}::solve’ in ‘Eigen::TriangularView<const Eigen::SparseMatrix<double, 0, int>, 2>::Base’ {aka ‘class Eigen::TriangularViewImpl<const Eigen::SparseMatrix<double, 0, int>, 2, Eigen::Sparse>’} 295 | using Base::solve;
when i commented out the code
solver.data()->setHessianMatrix(hh);
it whill compile ok.