ros2/rosbag2

Topics with TRANSIENT_LOCAL QoS are not replayed with --start-offset

simutisernestas opened this issue · 4 comments

Description

When playing a bag with --start-offset argument topics with TRANSIENT_LOCAL QoS are not replayed. For instance /tf_static is not present even though it's recorded in the bag.

Expected Behavior

TRANSIENT_LOCAL QoS topics should be replayed even with the offset.

Actual Behavior

Nothing is published.

To Reproduce

** Steps to reproduce the behavior, e.g.

  1. ros2 bag play <any bag containing for instance /tf_static> --start-offset 1
  2. ros2 topic echo /tf_static
  3. kill the playing to keep echo going
  4. ros2 bag play <any bag containing for instance /tf_static> --start-offset 1

System (please complete the following information)

  • OS: Ubuntu 22
  • ROS 2 Distro: Humble
  • Install Method: APT
  • Version: ros-humble-rosbag2/jammy,now 0.15.8-1jammy.20230919.234524 amd64 [installed,automatic]

@simutisernestas This is not a bug, but rather a feature.
We skip all messages before the --start-offset by design.
In your particular scenario may be only /tf_static has TRANSIENT_LOCAL QoS settings and it looks like it would be reasonable and handy to playback them even with --start-offset if they are going before the cutting timestamp.
However this is not always the case, others might have scenarios when other topics with raw camera images or point clouds also have TRANSIENT_LOCAL QoS and if we do not skip them with the --start-offset - this is certainly will be treated as a bug.

Would you consider accepting a PR adding feature to enable force replay of certain topics? Not sure though what's the best approach here, maybe adding a new argument which accepts a list of topics to force the behavior. @MichaelOrlov

@simutisernestas This request looks like a duplicate of the #1159

  • Closing as duplicate of the #1159.
  • Feel free to reopen if you think that there is a different functionality required per this issue request.