生成错误:ROS软件包eigen3依赖性

时间:2020-05-27 11:46:25

标签: cmake eigen ros eigen3 catkin

我正在尝试构建一个依赖于tf2_sensor_msgs的ROS软件包。 tf2_sensor_msgs取决于本征3。 Eigen3在/ usr / include / eigen3中可用。 CMakeLists.txt可以,该程序包在另一台计算机上构建。

一些系统信息:

  • ROS Kinetic
  • pkg-config --modversion eigen3输出“ 3.3.7”
  • ubuntu 16.04

运行catkin_make时会出现很多此类错误:

In file included from /usr/include/eigen3/Eigen/SparseCore:63:0,
                 from /usr/include/eigen3/Eigen/Sparse:26,
                 from /usr/include/eigen3/Eigen/Eigen:2,
                 from /opt/ros/kinetic/include/tf2_sensor_msgs/tf2_sensor_msgs.h:36,
                 from /home/<path_to_file>/<source_file>.cpp:11:
/usr/include/eigen3/Eigen/src/SparseCore/SparseFuzzy.h:17:93: error: ‘RealScalar’ does not name a type
 bool SparseMatrixBase<Derived>::isApprox(const SparseMatrixBase<OtherDerived>& other, const RealScalar &prec) const
                                                                                             ^~~~~~~~~~
/usr/include/eigen3/Eigen/src/SparseCore/SparseFuzzy.h:17:111: error: invalid use of incomplete type ‘class Eigen::SparseMatrixBase<Derived>’
 bool SparseMatrixBase<Derived>::isApprox(const SparseMatrixBase<OtherDerived>& other, const RealScalar &prec) const

In file included from /usr/include/eigen3/Eigen/SparseCore:59:0,
                 from /usr/include/eigen3/Eigen/Sparse:26,
                 from /usr/include/eigen3/Eigen/Eigen:2,
                 from /opt/ros/kinetic/include/tf2_sensor_msgs/tf2_sensor_msgs.h:36,
                 from /home/<path_to_file>/<source_file>.cpp:11:
/usr/include/eigen3/Eigen/src/SparseCore/SparseSelfAdjointView.h:232:155: error: wrong number of template arguments (1, should be 2)
   static void run(DynamicSparseMatrix<DestScalar,ColMajor,StorageIndex>& dst, const SrcXprType &src, const internal::assign_op<typename DstXprType::Scalar> &/*func*/)

什么会导致这种情况?

0 个答案:

没有答案