-
Notifications
You must be signed in to change notification settings - Fork 240
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
Add split by time to recording #409
Conversation
You're almost there - you're just missing an addition to the parsing command at line 125 See the string for parsing:
That is the types of the arguments that are expected, |
Thanks for the hint! I've added the missing K to the parse string, but I'm still getting an error saying "ros2: error: unrecognized arguments: --max-bag-duration". I think I'm probably still missing a spot that I need to add the command in... |
Taking a look - in order to help understand more easily in general, can you paste the exact command you ran when mentioning output? And, a note that this feature will need tests before merging. |
When I build this and try it, I get this result -
Based on your result, however, it sounds like either you didn't build up to |
Made a few changes based on your suggestions. Also implemented a test, but I'm not positive it's actually running correctly. It's not generating an error (that I can see), but still seems to be exiting early. Still investigating. |
rosbag2_tests/test/rosbag2_tests/test_rosbag2_record_end_to_end.cpp
Outdated
Show resolved
Hide resolved
Finally found the problem with the test, and I'm actually a little embarrassed it took so long for me to find. Turns out I was trying to divide seconds by milliseconds. Last I checked, Physics doesn't agree with that. Anyways, converted the split time to milliseconds, and it seems to be running correctly now. |
Can I get another review on this? I'm not sure why the checks are failing, are they more unreliable tests? |
@emersonknapp Sorry for bothering you again, but now that Foxy has been released, could I get another review on this? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This LGTM - thanks for the contribution. Sorry about the slow turnaround on the review.
@emersonknapp - please run this CI job |
You'll need to rebase on master, this branch is pretty out of date |
Distro A, OPSEC #2893 Signed-off-by: Jacob Hassold <jhassold@dcscorp.com>
Distro A, OPSEC #2893 Signed-off-by: Jacob Hassold <jhassold@dcscorp.com>
Distro A, OPSEC #2893 Signed-off-by: Jacob Hassold <jhassold@dcscorp.com>
Distro A, OPSEC #2893 Signed-off-by: Jacob Hassold <jhassold@dcscorp.com>
Distro A, OPSEC #2893 Signed-off-by: Jacob Hassold <jhassold@dcscorp.com>
Distro A, OPSEC #2893 Signed-off-by: Jacob Hassold <jhassold@dcscorp.com>
Distro A, OPSEC #2893 Signed-off-by: Jacob Hassold <jhassold@dcscorp.com>
Distro A, OPSEC #2893 Signed-off-by: Jacob Hassold <jhassold@dcscorp.com>
Distro A, OPSEC #2893 Signed-off-by: Jacob Hassold <jhassold@dcscorp.com>
Distro A, OPSEC #2893 Signed-off-by: Jacob Hassold <jhassold@dcscorp.com>
Distro A, OPSEC #2893 Signed-off-by: Jacob Hassold <jhassold@dcscorp.com>
Distro A, OPSEC #2893 Signed-off-by: Jacob Hassold <jhassold@dcscorp.com>
Distro A, OPSEC #2893 Signed-off-by: Jacob Hassold <jhassold@dcscorp.com>
Distro A, OPSEC #2893 Signed-off-by: Jacob Hassold <jhassold@dcscorp.com>
Rebase complete. We'll see what the checks say. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From the Windows CI output:
|
Distro A, OPSEC #2893 Signed-off-by: Jacob Hassold <jhassold@dcscorp.com>
I think what's going on is that the compiler is treating Can I get another CI on this? |
It doesn't compile locally on my OSX:
|
Distro A, OPSEC #2893 Signed-off-by: Jacob Hassold <jhassold@dcscorp.com>
Distro A, OPSEC #2893 Signed-off-by: Jacob Hassold <jhassold@dcscorp.com>
Distro A, OPSEC #2893 Signed-off-by: Jacob Hassold <jhassold@dcscorp.com>
Distro A, OPSEC #2893 Signed-off-by: Jacob Hassold <jhassold@dcscorp.com>
I think this might have been that flaky test you were warning me about. I've applied Karsten's fix from elsewhere in the testing suite, hopefully that makes it more reliable. Not sure about the test_qos_simple test, though. I don't remember having touched that test, and it seems to be trying to access a database that's in use by another test? |
I'm still not finding what could be causing the test_qos_simple failure. Near as I can guess, it might be failing because the other tests are failing. Maybe. @emersonknapp can I get another CI on this when you get a chance? Hopefully the updates to the windows testing code should fix it. |
A new round of CI: @emersonknapp can you take a look at this once more? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me!
* First attempt at time splitting logic Distro A, OPSEC #2893 Signed-off-by: Jacob Hassold <jhassold@dcscorp.com> * Give default value for max duration Distro A, OPSEC #2893 Signed-off-by: Jacob Hassold <jhassold@dcscorp.com> * Added bagfile duration as a storage option Distro A, OPSEC #2893 Signed-off-by: Jacob Hassold <jhassold@dcscorp.com> * Initialize duration off of storage optios Distro A, OPSEC #2893 Signed-off-by: Jacob Hassold <jhassold@dcscorp.com> * Switch duration in StorageOptions to take int Distro A, OPSEC #2893 Signed-off-by: Jacob Hassold <jhassold@dcscorp.com> * Add duration to command line interface Distro A, OPSEC #2893 Signed-off-by: Jacob Hassold <jhassold@dcscorp.com> * Suppress lint warning Distro A, OPSEC #2893 Signed-off-by: Jacob Hassold <jhassold@dcscorp.com> * Add missing K parameter to the parsing string Distro A, OPSEC #2893 Signed-off-by: Jacob Hassold <jhassold@dcscorp.com> * Fix typo Distro A, OPSEC #2893 Signed-off-by: Jacob Hassold <jhassold@dcscorp.com> * Switch duration measurement to seconds Distro A, OPSEC #2893 Signed-off-by: Jacob Hassold <jhassold@dcscorp.com> * Get project to compile again Distro A, OPSEC #2893 Signed-off-by: Jacob Hassold <jhassold@dcscorp.com> * Change logic to allow simultaneous split modes Distro A, OPSEC #2893 Signed-off-by: Jacob Hassold <jhassold@dcscorp.com> * Clarifying help comments on splitting behavior Distro A, OPSEC #2893 Signed-off-by: Jacob Hassold <jhassold@dcscorp.com> * Fix typo Distro A, OPSEC #2893 Signed-off-by: Jacob Hassold <jhassold@dcscorp.com> * Properly split by time Distro A, OPSEC #2893 Signed-off-by: Jacob Hassold <jhassold@dcscorp.com> * Initial implementation of duration split test Distro A, OPSEC #2893 Signed-off-by: Jacob Hassold <jhassold@dcscorp.com> * Linting whitespace Distro A, OPSEC #2893 Signed-off-by: Jacob Hassold <jhassold@dcscorp.com> * Move curly brace for lint Distro A, OPSEC #2893 Signed-off-by: Jacob Hassold <jhassold@dcscorp.com> * Remove magic constant Distro A, OPSEC #2893 Signed-off-by: Jacob Hassold <jhassold@dcscorp.com> * Finally found and fixed unit error Distro A, OPSEC #2893 Signed-off-by: Jacob Hassold <jhassold@dcscorp.com> * Force starting_time to be a system_clock time_point Distro A, OPSEC #2893 Signed-off-by: Jacob Hassold <jhassold@dcscorp.com> * Change another high_resolution clock instance Distro A, OPSEC #2893 Signed-off-by: Jacob Hassold <jhassold@dcscorp.com> * Convert everything to steady_clock Distro A, OPSEC #2893 Signed-off-by: Jacob Hassold <jhassold@dcscorp.com> * Convert everything to use high_resolution_clock Distro A, OPSEC #2893 Signed-off-by: Jacob Hassold <jhassold@dcscorp.com> * Switch Windows testing code to newer version Distro A, OPSEC #2893 Signed-off-by: Jacob Hassold <jhassold@dcscorp.com>
* First attempt at time splitting logic Distro A, OPSEC #2893 Signed-off-by: Jacob Hassold <jhassold@dcscorp.com> * Give default value for max duration Distro A, OPSEC #2893 Signed-off-by: Jacob Hassold <jhassold@dcscorp.com> * Added bagfile duration as a storage option Distro A, OPSEC #2893 Signed-off-by: Jacob Hassold <jhassold@dcscorp.com> * Initialize duration off of storage optios Distro A, OPSEC #2893 Signed-off-by: Jacob Hassold <jhassold@dcscorp.com> * Switch duration in StorageOptions to take int Distro A, OPSEC #2893 Signed-off-by: Jacob Hassold <jhassold@dcscorp.com> * Add duration to command line interface Distro A, OPSEC #2893 Signed-off-by: Jacob Hassold <jhassold@dcscorp.com> * Suppress lint warning Distro A, OPSEC #2893 Signed-off-by: Jacob Hassold <jhassold@dcscorp.com> * Add missing K parameter to the parsing string Distro A, OPSEC #2893 Signed-off-by: Jacob Hassold <jhassold@dcscorp.com> * Fix typo Distro A, OPSEC #2893 Signed-off-by: Jacob Hassold <jhassold@dcscorp.com> * Switch duration measurement to seconds Distro A, OPSEC #2893 Signed-off-by: Jacob Hassold <jhassold@dcscorp.com> * Get project to compile again Distro A, OPSEC #2893 Signed-off-by: Jacob Hassold <jhassold@dcscorp.com> * Change logic to allow simultaneous split modes Distro A, OPSEC #2893 Signed-off-by: Jacob Hassold <jhassold@dcscorp.com> * Clarifying help comments on splitting behavior Distro A, OPSEC #2893 Signed-off-by: Jacob Hassold <jhassold@dcscorp.com> * Fix typo Distro A, OPSEC #2893 Signed-off-by: Jacob Hassold <jhassold@dcscorp.com> * Properly split by time Distro A, OPSEC #2893 Signed-off-by: Jacob Hassold <jhassold@dcscorp.com> * Initial implementation of duration split test Distro A, OPSEC #2893 Signed-off-by: Jacob Hassold <jhassold@dcscorp.com> * Linting whitespace Distro A, OPSEC #2893 Signed-off-by: Jacob Hassold <jhassold@dcscorp.com> * Move curly brace for lint Distro A, OPSEC #2893 Signed-off-by: Jacob Hassold <jhassold@dcscorp.com> * Remove magic constant Distro A, OPSEC #2893 Signed-off-by: Jacob Hassold <jhassold@dcscorp.com> * Finally found and fixed unit error Distro A, OPSEC #2893 Signed-off-by: Jacob Hassold <jhassold@dcscorp.com> * Force starting_time to be a system_clock time_point Distro A, OPSEC #2893 Signed-off-by: Jacob Hassold <jhassold@dcscorp.com> * Change another high_resolution clock instance Distro A, OPSEC #2893 Signed-off-by: Jacob Hassold <jhassold@dcscorp.com> * Convert everything to steady_clock Distro A, OPSEC #2893 Signed-off-by: Jacob Hassold <jhassold@dcscorp.com> * Convert everything to use high_resolution_clock Distro A, OPSEC #2893 Signed-off-by: Jacob Hassold <jhassold@dcscorp.com> * Switch Windows testing code to newer version Distro A, OPSEC #2893 Signed-off-by: Jacob Hassold <jhassold@dcscorp.com>
* First attempt at time splitting logic Distro A, OPSEC #2893 Signed-off-by: Jacob Hassold <jhassold@dcscorp.com> * Give default value for max duration Distro A, OPSEC #2893 Signed-off-by: Jacob Hassold <jhassold@dcscorp.com> * Added bagfile duration as a storage option Distro A, OPSEC #2893 Signed-off-by: Jacob Hassold <jhassold@dcscorp.com> * Initialize duration off of storage optios Distro A, OPSEC #2893 Signed-off-by: Jacob Hassold <jhassold@dcscorp.com> * Switch duration in StorageOptions to take int Distro A, OPSEC #2893 Signed-off-by: Jacob Hassold <jhassold@dcscorp.com> * Add duration to command line interface Distro A, OPSEC #2893 Signed-off-by: Jacob Hassold <jhassold@dcscorp.com> * Suppress lint warning Distro A, OPSEC #2893 Signed-off-by: Jacob Hassold <jhassold@dcscorp.com> * Add missing K parameter to the parsing string Distro A, OPSEC #2893 Signed-off-by: Jacob Hassold <jhassold@dcscorp.com> * Fix typo Distro A, OPSEC #2893 Signed-off-by: Jacob Hassold <jhassold@dcscorp.com> * Switch duration measurement to seconds Distro A, OPSEC #2893 Signed-off-by: Jacob Hassold <jhassold@dcscorp.com> * Get project to compile again Distro A, OPSEC #2893 Signed-off-by: Jacob Hassold <jhassold@dcscorp.com> * Change logic to allow simultaneous split modes Distro A, OPSEC #2893 Signed-off-by: Jacob Hassold <jhassold@dcscorp.com> * Clarifying help comments on splitting behavior Distro A, OPSEC #2893 Signed-off-by: Jacob Hassold <jhassold@dcscorp.com> * Fix typo Distro A, OPSEC #2893 Signed-off-by: Jacob Hassold <jhassold@dcscorp.com> * Properly split by time Distro A, OPSEC #2893 Signed-off-by: Jacob Hassold <jhassold@dcscorp.com> * Initial implementation of duration split test Distro A, OPSEC #2893 Signed-off-by: Jacob Hassold <jhassold@dcscorp.com> * Linting whitespace Distro A, OPSEC #2893 Signed-off-by: Jacob Hassold <jhassold@dcscorp.com> * Move curly brace for lint Distro A, OPSEC #2893 Signed-off-by: Jacob Hassold <jhassold@dcscorp.com> * Remove magic constant Distro A, OPSEC #2893 Signed-off-by: Jacob Hassold <jhassold@dcscorp.com> * Finally found and fixed unit error Distro A, OPSEC #2893 Signed-off-by: Jacob Hassold <jhassold@dcscorp.com> * Force starting_time to be a system_clock time_point Distro A, OPSEC #2893 Signed-off-by: Jacob Hassold <jhassold@dcscorp.com> * Change another high_resolution clock instance Distro A, OPSEC #2893 Signed-off-by: Jacob Hassold <jhassold@dcscorp.com> * Convert everything to steady_clock Distro A, OPSEC #2893 Signed-off-by: Jacob Hassold <jhassold@dcscorp.com> * Convert everything to use high_resolution_clock Distro A, OPSEC #2893 Signed-off-by: Jacob Hassold <jhassold@dcscorp.com> * Switch Windows testing code to newer version Distro A, OPSEC #2893 Signed-off-by: Jacob Hassold <jhassold@dcscorp.com>
This is my first attempt at adding splitting bags by time functionality to Rosbag 2's recording. Currently having some difficulty with adding the new functionality to the command line for testing.