-
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 playback rate command line arg #304
Conversation
Signed-off-by: Mabel Zhang <mabel@openrobotics.org>
Signed-off-by: Mabel Zhang <mabel@openrobotics.org>
So this is speculation on my part, but what would happen if the user enters a negative rate, nothing in the options forbid this and it would I think result in the player playing all messages as fast as possible with the current implementation. Maybe add a check on the sign of the rate? |
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.
Like @eric1221bday mentioned, the input isn't being validated. I think the requirement we want is rate > 0
because 0 seems unecessary and negative seems like a potentially desirable feature but is not implemented in this PR
Also, could you include a unit test for this feature? Some simple smoke test at least
just throwing in an idea here: We could also remove the |
Agreed, i think it should be fine to have the queue be long-form only |
Signed-off-by: Mabel Zhang <mabel@openrobotics.org>
bbb4215 should address all the comments above -
|
Signed-off-by: Mabel Zhang <mabel@openrobotics.org>
@mabelzhang Can you run CI on this? I want to make sure we don't have regression on OSX and Windows with this. |
@mabelzhang you might have to rebase your work on top of master. |
Signed-off-by: Mabel Zhang <mabel@openrobotics.org>
Signed-off-by: Mabel Zhang <mabel@openrobotics.org>
Can you point to that other project which also has this warning? Are you aware of any ticket tracking this issue already? I just want to avoid any regression introduced by this patch. |
So the warning is this one: This earlier build with the same warning is just building plain ros2.repos with no additional flags: This one has the same warning too: I don't know if a ticket is tracking this. |
@mabelzhang with #323 being merged, do you mind rebasing your branch and re-run CI? I am confident that CI should return all green then and this PR finally being ready to get merged ;) |
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.
lgtm. @mabelzhang feel free to merge.
* add playback rate command line arg Signed-off-by: Mabel Zhang <mabel@openrobotics.org> * uncrustify Signed-off-by: Mabel Zhang <mabel@openrobotics.org> * add range check for rate; rename rate flag; add tests Signed-off-by: Mabel Zhang <mabel@openrobotics.org> * fix flake8 Signed-off-by: Mabel Zhang <mabel@openrobotics.org> * fix uncrustify Signed-off-by: Mabel Zhang <mabel@openrobotics.org> * fix windows msbuild warning Signed-off-by: Mabel Zhang <mabel@openrobotics.org>
Addresses #290
Both
-r
and-s
were taken, so I wasn't sure what is the next best letter to use for rate / speed. I just put in-x
for this first implementation.Examples of usage:
with updated usage message:
Signed-off-by: Mabel Zhang mabel@openrobotics.org