-
Notifications
You must be signed in to change notification settings - Fork 251
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Record a limited number of messages on each topic #1574
Comments
@AadityaRavindran But how to count the number of messages to record if multiple topics need to be recorded with different frequencies? |
@MichaelOrlov Regardless of the different frequencies, it should record the same number of messages. If that means one of the topics will finish recording/playing back before other topics are recorded/played back, then that should be totally fine. Recording should stop after all specified topics have the specified number of messages each. |
@AadityaRavindran besides ROS 1 rosbag supports it, what use case do you have? i think this is reasonable option to have, but what could be the actual use case? |
@fujitatomoya I have integration tests where I need to record 1 message each of a few topics (Eg: the static map). These messages are used as inputs to gtest a class. I wrote my own bag recorder using rosbag2_cpp, but it would be extremely useful if I could generalize this to other gtests. I could write a generic bag recorder which takes in just 1 message of a list of topics, but if it was baked into rosbag2 cli, it would be helpful. In general, if you have topic interfaces to a class, it's extremely useful to be able to write a unit/integration test (ros2 lifecycle nodes makes this easy to write and fast to run)
If there were multiple messages needed at different times or order, you would store 1 message each of the various topics in different bags, and play them back whenever needed by the test. |
Description
rosbag record has an argument which records a limited number of messages of any topic(s). Eg:
rosbag record -l 1000 /chatter
Related Issues
Completion Criteria
ros2 bag record --limit <NUM> <topics>
Implementation Notes / Suggestions
https://github.com/ros/ros_comm/blob/noetic-devel/tools/rosbag/src/record.cpp#L62
Testing Notes / Suggestions
The text was updated successfully, but these errors were encountered: