在ROS2上使用Eigen库时,出现如下报错:
/usr/include/eigen3/Eigen/src/Core/DenseStorage.h:128: Eigen::internal::plain_array<T,
Size, MatrixOrArrayOptions, 32>::plain_array() [with T = double; int Size = 4; int
MatrixOrArrayOptions = 0]: Assertion
`(internal::UIntPtr(eigen_unaligned_array_assert_workaround_gcc47(array)) & (31)) == 0 &&
"this assertion is explained here: " "http://eigen.tuxfamily.org/dox-
devel/group__TopicUnalignedArrayAssert.html" " **** READ THIS WEB PAGE !!! ****"' failed.
根据提示看这个网页:eigen.tuxfamily.org
根据提示,直接将CMakeLists中的C++版本改成C++17,即可解决错误。