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?
As to the method you found: there is tf2::BufferCore::allFramesAsYAML(double current_time) const in TF2 (and allFramesAsStringNoLock() is available as well).