Commit 86b88b4
Fix for multibag replay stagnation (#2158)
* Add "high_freq_topics_does_not_starve_in_multibag_playback" test
Signed-off-by: Michael Orlov <morlovmr@gmail.com>
* Quick fix for slow playback when one reader has lower freq topic
- Add cache for the last element from each reader and taking messages
from cache in a chronological order.
- Also use "rcpputils::unique_lock" consistently for the reader_mutex_
Signed-off-by: Michael Orlov <morlovmr@gmail.com>
* Add ReadersWrapper class that encapsulates readers and messages cache
- The ReadersWrapper class manages multiple rosbag2_cpp::Reader
instances, allowing for chronological reading of messages across all
readers. It maintains a cache of the next message from each reader and
provides methods to retrieve the next message in chronological order,
seek to a specific timestamp across all readers, and apply filters to
all readers. It also provides access to the earliest and latest
timestamps across all readers.
Signed-off-by: Michael Orlov <morlovmr@gmail.com>
* Add unit tests for ReadersWrapper class
Signed-off-by: Michael Orlov <morlovmr@gmail.com>
* Delete default ctor and copy/move operators for ReadersWrapper class
Signed-off-by: Michael Orlov <morlovmr@gmail.com>
* Rename ReadersWrapper class to the ReadersManager
Signed-off-by: Michael Orlov <michael.orlov@apex.ai>
* Rename get_next_chronological_message_from_cache
- Reasoning: Not mentioning cache in the name because this is some
implementation details and could be changed in the future. However,
the API needs to be stable and clear.
- Also added a comment about reasoning for usage pre-cache inside
implementation file.
Signed-off-by: Michael Orlov <michael.orlov@apex.ai>
* Rename "no_messages_in_cache" to the "has_next()"
Signed-off-by: Michael Orlov <michael.orlov@apex.ai>
* Renames for mutex and condition_variable
- Rename "skip_message_in_main_play_loop_mutex_" to the
"main_play_loop_mutex_" and "playback_finished_cv_" into the
"is_in_playback_cv_".
Signed-off-by: Michael Orlov <michael.orlov@apex.ai>
* Fix for messages_queue access race in seek(time)
- Stop storage loading thread before doing seek to avoid race condition
- Return from seek at the beginning if player is not in playback mode.
Reasoning: We will seek to the beginning of the bag when will start
play() anyway.
Signed-off-by: Michael Orlov <michael.orlov@apex.ai>
* Speedup "load_storage_content()" interruption
- Check "load_storage_content_" inside "enqueue_up_to_boundary()"
Signed-off-by: Michael Orlov <michael.orlov@apex.ai>
* Fix for play_fails_gracefully_if_needed_coverter_plugin_does_not_exist
Add missing converter options when open readers
Signed-off-by: Michael Orlov <michael.orlov@apex.ai>
---------
Signed-off-by: Michael Orlov <morlovmr@gmail.com>
Signed-off-by: Michael Orlov <michael.orlov@apex.ai>
(cherry picked from commit bfce7ac)
# Conflicts:
# rosbag2_transport/src/rosbag2_transport/player.cpp
# rosbag2_transport/test/rosbag2_transport/test_play.cpp1 parent 7d66049 commit 86b88b4
File tree
8 files changed
+1015
-113
lines changed- rosbag2_transport
- include/rosbag2_transport
- src/rosbag2_transport
- test/rosbag2_transport
8 files changed
+1015
-113
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
| 52 | + | |
52 | 53 | | |
53 | 54 | | |
54 | 55 | | |
| |||
127 | 128 | | |
128 | 129 | | |
129 | 130 | | |
130 | | - | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
131 | 137 | | |
132 | 138 | | |
133 | 139 | | |
| |||
543 | 549 | | |
544 | 550 | | |
545 | 551 | | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
546 | 559 | | |
547 | 560 | | |
548 | 561 | | |
Lines changed: 132 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
0 commit comments