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

Revision history [back]

Going to answer my own question here-- tf2 tutorials don't make it abundantly clear that you're not allowed to create a convert() specialization consisting of two ROS messages. Here's the reasoning (from tf2/impl/convert.h):

// The case where both A and B are messages should not happen: if you have two
// messages that are interchangeable, well, that's against the ROS purpose:
// only use one type. Worst comes to worst, specialize the original convert
// function for your types.
// if B == A, the templated version of convert with only one argument will be
// used.
//
//template <>
//template <typename A, typename B>
//inline void Converter<true, true>::convert(const A& a, B& b);

Not sure I agree with the design decision, but it's easy enough to write my own convert function for my specific purpose, so why argue?