1.类型转换错误
error: no match for ‘operator=’ (operand types are ‘Eigen::internal::enable_if<true, Eigen::IndexedView<Eigen::Matrix<double, -1, -1>, double, double> >::type {aka Eigen::IndexedView<Eigen::Matrix<double, -1, -1>, double, double>}’ and ‘double’)
问题:就是eigen元素类型不能自动转换,导致变量类型不匹配。
解决:把i,j 类型改为int型,编译通过,但是不知道后续是否会因此导致加加速度精度受到影响(int了)
还有一种方法据说是换eigen3.3,没试过
https://github.com/HKUST-Aerial-Robotics/Fast-Planner/issues/92
本文介绍了使用Eigen库时遇到的类型转换错误问题,错误提示为找不到匹配的赋值运算符。问题在于Eigen库中元素类型无法自动转换,导致变量类型不匹配。文中提供了解决方案,包括将变量类型更改为int并通过编译。
2万+

被折叠的 条评论
为什么被折叠?



