Run tf/tf2 as nodelet
Is it possible to run tf/tf2 as nodelet?
EDIT: What I mean is that, for example, the robot_state_publisher is always a node. Is there a nodelet version? If not, is there any reason or just nobody needed it?
Also: if I publish TF transformations and I do lookup transformations in nodelets, do I get the advantages of using nodelets? I guess that in this case I should be careful that everybody publishing and subscribing to TF are nodelets. However, when using nodelets I should subscribe to ConstPtr and publish Ptr. How do I guarantee this with TF?
Thanks!
Just to avoid an xy-problem: could you tell us what you are trying to achieve? That might also make potential answers more relevant to your issue.
I have some nodelets running in my application, and so far tf is used only in nodelets. I am trying to improve performance.
I've not looked into this directly, but nodelets mainly avoid the costly (de)serialisation step in the msg exchange. Seeing as TF msgs are rather small (ie 100s of bytes), I'd expect that overhead to be negligable. Do you have a specific case where middleware perf is a bottleneck?
@gvdhoorn Currently tf is not my bottleneck, but if there is an option for that I do not see why not doing it, as it is not difficult to deal with nodelets. And I agree TF message is not that big, but for my application is one of the largest messages.