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

Revision history [back]

It looks like you are creating the tf listener in the callback that is receiving the scan, when it needs to be created as early as possible when your node starts and persist throughout (e.g. be a class member or a global).

It looks like you are creating the tf listener in the callback that is receiving the scan, when it needs to be created as early as possible when your node starts and persist throughout (e.g. be a class member or a global).

I'm working on creating a set of boiler plate tf examples: https://github.com/lucasw/tf_demo

It will only be tf2, it's only python now but will get C++ next, and have examples with and without classes, and be linked to from the wiki pages. There are so many similar tf questions it'll be useful to point out at least my take on how it ought to be done, contributions are welcome also.