ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

I haven't checked what causes it, but it looks like sensor_msgs::msg::Imu fails the rosidl_generator_traits::has_fixed_size(..) check, causing the std::enable_if<..> to fail (here), causing your compilation to fail.

I'm not 100% sure, but I haven't checked what causes it, but believe it looks like sensor_msgs::msg::Imu fails the rosidl_generator_traits::has_fixed_size(..) check, causing the std::enable_if<..> to fail (here), causing your compilation to fail.

sensor_msgs::msg::Imu is not a fixed size message as it contains a std_msgs::msg::Header, which contains a string, which is (potentially) unbounded.

Checking std_msgs/msg/header__traits.hpp confirms this:

template<>
struct has_fixed_size<std_msgs::msg::Header>
  : std::integral_constant<bool, false> {};

I would actually expect all messages that have a Header to fail the check in a similar way.

I'm not 100% sure, but I believe it looks like sensor_msgs::msg::Imu fails the rosidl_generator_traits::has_fixed_size(..) check, check (base version here, specialised for sensor_msgs::msg::Imu in include/std_msgs/msg/header__traits.hpp), causing the std::enable_if<..> to fail (here), causing your compilation to fail.

sensor_msgs::msg::Imu is not a fixed size message as it contains a std_msgs::msg::Header, which contains a string, which is (potentially) unbounded.

Checking std_msgs/msg/header__traits.hpp confirms this:

template<>
struct has_fixed_size<std_msgs::msg::Header>
  : std::integral_constant<bool, false> {};

I would actually expect all messages that have a Header to fail the check in a similar way.