-
Notifications
You must be signed in to change notification settings - Fork 285
Description
Description
This feature was previously proposed in #682, having the ability to throttle the rate of recording on a per topic basis. For example an image being published at a frame rate of 30hz but only wanting to log it at 1hz.
I would be interested in the communities feedback on this feature and my potential proposal for implementation. I would be happy to take an initial stab at implementing it.
Related Issues
Completion Criteria
- Ability to enable throttle from cli
- Check whether or not a msg should be logged within the callback based on the last write time
- Update documentation
Implementation Notes / Suggestions
-
Implement a record option for enabling the topic throttle and specifying the rate
Potential example call, no rate entry or a rate entry less than 0 would not throttle the message
Rate would be hz
ros2 bag record --topics_and_rates /tf /gps/fix 5 /image/rgb 0.5 /rosout -1 -
Store a vector or map of rates per topic within RecordOptions
-
Store the last write time for each topic
-
Add function within TopicFilter to compare the current receive time to the last write time for that topic. Return whether the message can be written
-
For each subscription callback check if the message should be written