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

Do you have the appropriate header from tf2_geometry_msgs included for your datatype? It's a templated function so if you use it you're expected to include the necessary headers for your datatype. In this case it looks like you need https://github.com/ros2/geometry2/blob/b5600715fbed371ac594e55d07397009309a5751/tf2_geometry_msgs/include/tf2_geometry_msgs/tf2_geometry_msgs.hpp#L881

The other usage is likely getting lucky that something else is including that header before your code execution so it will compile. But in your reduced set you don't get lucky relying on the transitive include.