Closed michalpelka closed 9 months ago
@michalpelka I have a suspicious that --no-discovery
is the key in your scenario with --start-paused
flag.
Can you please try it without --no-discovery
flag?
@michalpelka Sorry for confusion from my previous message this is certainly unrelated to the --no-discovery
flag.
--start-paused
behave as expected and probably not what you need for your scenario.
In paused mode recorder receiving messages and dropping them without saving to the storage.
It was made by design and we can't do better since if subscription already created callback will be called on message arrive. We can't pause on subscription level.
https://github.com/ros2/rosbag2/blob/18216763ac13d942ee582c4b658962e49179ba3d/rosbag2_transport/src/rosbag2_transport/recorder.cpp#L431-L444
Agreed that this seems like a bad interaction between latched topics (transient local durability) and --start-paused
. Maybe there is some fix around waiting to create subscriptions until first resume
, at least for topics with transient local durability? In any case, that's a little finicky and would take some care - there is no way to know if a message is received because it was latched or because it was new, the publisher just sends out messages to newly-detected subscriptions.
For this particular case, I think the real fix is https://github.com/ros2/rosbag2/pull/1354. That will backport easily into Iron and should require only a little tweaking to backport to Humble, there are no required API changes, just documentation and implementation.
--start-paused
feature works as designed and there are no bugs there.
Description
We are recording the rosbag with such parameters:
Our system produces a simulated clock. We need to start in a "paused" state to mitigate the issue raised by my colleague #1276. The
ros2 bag record
does not record the one message published in\tf_static
. If you open created database and run such query, it will return 0:Expected Behavior
I would like to
ros2 bag record
to keep messages that are latched (like tf_static) and record it even with--start-paused
. Please adjust the correct timestamp to not bring behavior from #1276.Actual Behavior
There are no recorded messages in '/tf_static' topic.
To Reproduce
** Steps to reproduce the behavior, e.g.
ros2 run tf2_ros static_transform_publisher 1 2 3 0.5 0.1 -1.0 foo bar
ros2 bag record --start-paused /tf_static
ros2 bag info
, it will have 0 messages recordedNote : if you omit
--start-paused
in point 2, the resulting bag will contain expected one message.System (please complete the following information)
Additional context
Add any other context about the problem here