Playback pause feature#443
Playback pause feature#443mabelzhang wants to merge 40 commits intoros2:masterfrom mabelzhang:start_paused_lifecycle
Conversation
Signed-off-by: Mabel Zhang <mabel@openrobotics.org>
Signed-off-by: Mabel Zhang <mabel@openrobotics.org>
Signed-off-by: Mabel Zhang <mabel@openrobotics.org>
Signed-off-by: Emerson Knapp <emerson.b.knapp@gmail.com> Signed-off-by: Mabel Zhang <mabel@openrobotics.org>
Signed-off-by: Chris Lalancette <clalancette@openrobotics.org> Signed-off-by: Mabel Zhang <mabel@openrobotics.org>
Signed-off-by: Mabel Zhang <mabel@openrobotics.org>
Signed-off-by: Karsten Knese <karsten@openrobotics.org> Signed-off-by: Mabel Zhang <mabel@openrobotics.org>
Signed-off-by: Anas Abou Allaban <aabouallaban@pm.me> Signed-off-by: Mabel Zhang <mabel@openrobotics.org>
* Add user provided split size to error Signed-off-by: Anas Abou Allaban <aabouallaban@pm.me> Signed-off-by: Mabel Zhang <mabel@openrobotics.org>
* Improve help message for CLI verbs Signed-off-by: Jacob Perron <jacob@openrobotics.org> * Apply suggestion from review Signed-off-by: Jacob Perron <jacob@openrobotics.org> Signed-off-by: Mabel Zhang <mabel@openrobotics.org>
Signed-off-by: Karsten Knese <karsten@openrobotics.org> Signed-off-by: Mabel Zhang <mabel@openrobotics.org>
Signed-off-by: Mabel Zhang <mabel@openrobotics.org>
Signed-off-by: Mabel Zhang <mabel@openrobotics.org>
Signed-off-by: Mabel Zhang <mabel@openrobotics.org>
Signed-off-by: Mabel Zhang <mabel@openrobotics.org>
Signed-off-by: Mabel Zhang <mabel@openrobotics.org>
Signed-off-by: Mabel Zhang <mabel@openrobotics.org>
Signed-off-by: Mabel Zhang <mabel@openrobotics.org>
Signed-off-by: Mabel Zhang <mabel@openrobotics.org>
|
Had to fix DCO 13 commits back X_X |
Signed-off-by: Mabel Zhang <mabel@openrobotics.org>
|
I think this could be rebased on top of master to limit the amount of commits. |
|
Okay, so sounds like we want to break this into 2 PRs (as opposed to 3), one for lifecycle pause/resume, and another for keyboard handling. I did some refactoring, and I realized it doesn't make too much sense to move the command line Currently, other than directly accessing the I have removed keyboard handling from this PR. If people are okay with just 2 PRs, I will create the 2nd PR with the keyboard handling. If we want to break off the command line option into a 3rd PR, then the tests will need to be simplified, only to be added back later. |
|
This would be a really nice feature to have back, is there anything I can do to help move the progress along? |
|
@danthony06 Actually there is! Thank you for asking. I'm getting pulled to a different project with a tight timeline for the next 2-3 weeks at least, and most of my rosbag time has been spent on trying to fix a Windows debug mode failure (don't ask me how that's going). We would really like to get the LifeCycle node feature in, so any help on that end is appreciated! Specifically, I have not had time to address Karsten's PR comments above. I think the most time-consuming is to learn about which states of a lifecycle node can transfer to which other state? Then some logic checking the states can be put in to make sure this comment #443 (comment) is addressed. Other than that, my other lingering concern is that the lifecycle nodes don't show up in Then I think all the comments above would be addressed more or less. We are planning on just getting the LifeCycle stuff in first, and move all the keyboard-related things to a separate PR later. That is a second area that we can use help on. Let me know if anything is unclear. This PR currently comes from my fork, which is inconvenient for other contributors. As the PR already has some comments, hmm you can either open a PR to my fork (not ideal), or maybe you can base your stuff on my fork and when you're ready, we can close this PR? Anyway, we can figure that out. |
|
@mabelzhang Okay, I have some available time, and I'll start working on it and work through the issues you raised. |
|
@danthony06 Awesome thanks!! Let us know if you run into blockers. |
|
@danthony06 please apologize, your comment flew under my radar. Also, I feel Github renders the chronological order of inline comments weird, so let me just answer here:
I think it makes sense to abstract the timing behavior out of the |
|
What is the status of this PR? Is it working on Ubuntu? I tried to checkout the PR and recompiled rosbag2, but I get |
|
I think I have a fix and I'm testing it now.
…On Wed, Jan 13, 2021, 9:54 AM Kaju-Bubanja ***@***.***> wrote:
What is the status of this PR? Is it working on Ubuntu?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#443 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABBZWHB6XDQSEG7IG7ZWPFDSZW65DANCNFSM4OAJTD6Q>
.
|
|
Sorry to bother you again, did you get around to test the fix you have? Can I assist with something? If yes, could you brief me shortly what tasks still need to be done? |
|
I'm planning on spending the rest of the week on it.
…On Wed, Jan 20, 2021, 3:58 AM Kaju-Bubanja ***@***.***> wrote:
Sorry to bother you again, did you get around to test the fix you have?
Can I assist with something? If yes, could you brief me shortly what tasks
still need to be done?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#443 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABBZWHGIJVGE7UADHY75G3LS22SL5ANCNFSM4OAJTD6Q>
.
|
|
I realized that I forgot to compile rosbag2_transport. Now I can pause the bag at the beginning, but as mentioned above there is no way to resume or pause the bag during playback. I checked out the PRs/Issues of ros2cli but didn't find anything related to this PR. As I read the comments from @mabelzhang the code to pause was once here but got factored out into ros2cli? @danthony06 are you working on the keyboard handling? If yes in what repo/PR/issue? Also is there the ability to skip 1 frame ahead with a key? This is kinda a blocker for me now and I will be working on it in the coming weeks, so any guidance would be appreciated |
|
I've got a test branch set up on my fork of the repo. I'd appreciate help
testing it out.
…On Mon, Feb 1, 2021, 2:41 AM Kaju-Bubanja ***@***.***> wrote:
I realized that I forgot to compile rosbag2_transport. Now I can pause the
bag at the beginning, but as mentioned above there is no way to resume or
pause the bag during playback. I checked out the PRs/Issues of ros2cli but
didn't find anything related to this PR. As I read the comments from
@mabelzhang <https://github.com/mabelzhang> the code to pause was once
here but got factored out into ros2cli? @danthony06
<https://github.com/danthony06> are you working on the keyboard handling?
If yes in what repo/PR/issue? Also is there the ability to skip 1 frame
ahead with a key? This is kinda a blocker for me now and I will be working
on it in the coming weeks, so any guidance would be appreciated
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#443 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABBZWHH3XW2FZMUNVYWIETDS4ZSMVANCNFSM4OAJTD6Q>
.
|
|
@danthony06 Can you open a PR against @mabelzhang 's PR here? That way we have all the modifications and conversations in one PR rather than distributed across multiple contributors. |
|
This PR is from my fork (didn't have access to this repo then). Do you want me to move it to this repo? |
|
I can open a PR. I'd really appreciate help testing it as well.
…On Thu, Feb 4, 2021, 10:10 PM Mabel Zhang ***@***.***> wrote:
This PR is from my fork (didn't have access to this repo then). Do you
want me to move it to this repo?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#443 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABBZWHCS3TLF3O5AXMRO4MTS5NVR3ANCNFSM4OAJTD6Q>
.
|
I think that would make sense so that others could contribute to it - you have access to push a branch here? |
|
Looks like I do. Branch pushed to this repo: https://github.com/ros2/rosbag2/tree/start_paused_lifecycle |
|
Fixed my PR to the main repo here: #666 |
|
Closing in favor of #666 |
Usage
Press space bar during playback to pause/unpause.
Sample output with numeric printout for readability:
Implementation
Implementation is by changing
Rosbag2Nodeto aLifecycleNode.Tests run one thread for playing and another for activating/deactivating the lifecycle node.
Keyboard handling is in a separate thread from playback in
play.cpp.Feedback needed
test_play_timingare timed 1 second apart currently. I could try to add a more closely timed test if needed. Or I can decrease the sleep time that waits for a lifecycle state change.I tried to use the pause feature to fix the
recorded_messages_are_played_for_filtered_topicstest, which publishes 3 messages and expects 2. We were hoping if we pause it in the beginning, we can expect 3. Unfortunately, it was not fixed. Locally, the Cyclone test passes always, but the FastRTPS test fails about 1 out of 4, even if I wait for 2 seconds for the subscriber to come up.Future work