ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
The first should not make a difference (TF is actually implemented on-top of TF2 for a long time now).
The second is the most likely cause here: static
is not necessarily needed, but placing broadcaster
in a scope that outlives that of posCallback(..)
is needed, as otherwise there is no time for any subscribers to properly initialise and form a connection to your broadcaster before the message is sent. That will lead to lost messages which in turn leads to your subscribers not receiving your frames.