Using topic_tools transform to publish more complex types
I am attempting to use topic_tools/transform to publish messages that are slightly more complex than what the examples show in the wiki, in order to avoid having to write a node.
For example (this might be a bad example), I would like the transform node to subscribe to a TwistStamped message, then create a new TwistStamped message with twist.linear.x equal to the magnitude of the subscribed linear velocity (which only needs a simple math function).
I figured out how to have transform publish the Float on its own, and can also figure out how to publish a Vector, but I couldn't figure out how to get it to publish a Twist or a TwistStamped. I keep getting errors, probably due to my incorrect syntax. But I can't find any examples online. I'm also not sure how to put a header into the published message.
If transform isn't the right tool to use, is there something else I should be using? Or perhaps it's just better to write my own node after all?