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

Revision history [back]

click to hide/show revision 1
initial version

It seems #q261460 is at least a partial duplicate of your question.

In the tutorial TfUsingPython I found the method allFramesAsString() but it seems to use tf, not tf2. would there be an equivalence in tf2? Or is it generally a bad practice to mix the use of tf and tf2?

TF has been implemented on-top of TF2 for quite some time now, so you cannot really "mix" them: it would all be using TF2 in the end.

As to the method you found: there is tf2::BufferCore::allFramesAsYAML(double current_time) const in TF2 (and allFramesAsStringNoLock() is available as well).

The Python API of TF2 is essentially a mirror of the C++ API, so you should be able to call that from Python as well (I have not verified this).