Closed simonkerscher closed 3 years ago
Hi @simonkerscher !
Thanks for creating this issue.
I am afraid we are currently only supporting the default version on 20.04, which is 3.3.7. If you have an idea how to fix it, it would be great if you could create a PR!
Tagging the maintainers @pleemann and @hogabrie so they know that there might be a breaking change soon.
Signal logger uses traits to identify the types.
With Eigen 3.3.* the matrix types only match:
is_eigen_matrix_of_scalar_excluding_vector3
With Eigen 3.4.* the matrix types match:
is_eigen_matrix_of_scalar_excluding_vector3
is_container
The reason is that Eigen 3.4.* adds a begin()
and end()
operators (https://gitlab.com/libeigen/eigen/-/blob/3.4/Eigen/src/Core/DenseBase.h#L647) that are used to identify whether something is a container.
You could try to update the is_container
trait: https://github.com/ANYbotics/signal_logger/blob/d121faab4c9d02b09a3a573e6e70a289b230dac2/signal_logger_core/include/signal_logger_core/signal_logger_traits.hpp#L107
with:
template <typename T>
struct is_container
{
static const bool value = has_const_iterator<T>::value && !std::is_same<std::string, typename std::remove_cv<T>::type>::value &&
!std::is_base_of<Eigen::EigenBase<T>, T> && has_begin_end<T>::beg_value && has_begin_end<T>::end_value;
};
As @remod points out, we do not support eigen 3.4, so I can not really help you more than that :)
Gabriel's suggestion works after the inclusion of ::value, leading to
template <typename T>
struct is_container
{
static const bool value = has_const_iterator<T>::value && !std::is_same<std::string, typename std::remove_cv<T>::type>::value &&
!std::is_base_of<Eigen::EigenBase<T>, T>::value && has_begin_end<T>::beg_value && has_begin_end<T>::end_value;
};
I have made a PR for this change on our leggedrobotics fork, see https://github.com/ANYbotics/signal_logger/compare/master...leggedrobotics:fix/eigen3.4.0
I have added the following lines to reproduce this issue:
When building signal_logger_example with Eigen 3.3.7, there is no issue. When building signal_logger_example with Eigen 3.4.0, we get the following error message:
The compiler is gcc 9.3.0 on Ubuntu 20.04 with ROS Noetic installed, accessed through catkin build