-
Notifications
You must be signed in to change notification settings - Fork 304
Description
Description
Currently, when there are multiple recorders and replayers there is no easy way to coordinate them with enough timing accuracy. We rely on services which implies different delays.
In order to improve the coordination for different services such as "Resume", "SplitBagfile", "Record", "Play" and "Resume" it would be useful to provide a timestamp inside the services which allows a timestamp-based coordination for each recorder/replayer instance.
Add time-based scheduling to record and replay services, plus richer split behavior. The recorder now supports split modes (node_time, publish_time, receive_time) with optional tracking topic and pending-split override semantics. Player/Recorder services accept future start/resume times and return explicit return codes/error strings where applicable. Tests and fixtures are updated for deterministic behavior (wait-until, PublicationManager use).
In the case of "SplitBagfile", there are additional use cases where the split decision could be based on message timestamps instead of system time based. This would allow a very precise splitting making all the splits between multiple recorder instances consistent between each other.
Related Issues
Completion Criteria
- "Resume", "SplitBagfile", "Record", and "Play" accept a timestamp for future schedules
- SplitBagfile accepts different schedule/delayed modes:
node_time(based on the node time),publish_time(based on send time),receive_time(based on the receive time)
Implementation Notes / Suggestions
- To be able to synchronously start distributed playback with multiple Player nodes, we need to add an optional parameter with the timestamp in "future" to the
ResumeandPlayservice calls for the Rosbag2 player. - In order to make errors more informative, error codes and string errors can be added to the services
- For SplitBagfile service, when using
publish_timeorreceive_timeit is possible to specify a specific topic which is used to check the timestamp.
Testing Notes / Suggestions
The newly added API shall be covered by the unit tests.