Skip to content
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

Naive clock jump implementation - allows for clock reuse and simplified Player setup #754

Merged
merged 5 commits into from
Apr 28, 2021

Conversation

emersonknapp
Copy link
Collaborator

@emersonknapp emersonknapp commented Apr 23, 2021

Clock can be created in the constructor so it is never null, and have all its state simply maintained while looping or repeated calls to play.

This is an intentionally simple implementation that accomplishes this single goal, and is definitely not safe for use during playback. There is significantly more complexity involved in handling jumping during playback - but that is out of the scope of this change.

@emersonknapp emersonknapp requested a review from a team as a code owner April 23, 2021 00:48
@emersonknapp emersonknapp requested review from jaisontj and zmichaels11 and removed request for a team April 23, 2021 00:48
@emersonknapp
Copy link
Collaborator Author

@MichaelOrlov FYI

@emersonknapp
Copy link
Collaborator Author

Gist: https://gist.githubusercontent.com/emersonknapp/c71f7d18aab7ff09541be9b2d0f22c1b/raw/8401041718d2e42dd2704c81592b62925181b0e2/ros2.repos
BUILD args: --packages-up-to rosbag2_cpp rosbag2_transport rosbag2_tests rosbag2
TEST args: --packages-select rosbag2_cpp rosbag2_transport rosbag2_tests rosbag2
Job: ci_launcher
ci_launcher ran: https://ci.ros2.org/job/ci_launcher/8312

  • Linux Build Status
  • Linux-aarch64 Build Status
  • macOS Build Status
  • Windows Build Status

Copy link
Collaborator

@Karsten1987 Karsten1987 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am generally okay with it, just a few comments inline.
Before really approving it, I'd like to @emersonknapp's opinion of tests for this. Are we having tests covering all the new things in this PR?

Emerson Knapp added 3 commits April 27, 2021 14:23
…ed setup

Signed-off-by: Emerson Knapp <eknapp@amazon.com>
Signed-off-by: Emerson Knapp <eknapp@amazon.com>
… Add tests for jump

Signed-off-by: Emerson Knapp <eknapp@amazon.com>
@emersonknapp emersonknapp force-pushed the emersonknapp/simple-clock-jump branch from 5183692 to 89fe16a Compare April 28, 2021 00:01
Signed-off-by: Emerson Knapp <eknapp@amazon.com>
@emersonknapp
Copy link
Collaborator Author

@Karsten1987 @MichaelOrlov let me know how you feel about the latest revision - it's maybe a little overloaded (doing a couple different things), but since this is a "reconfigure some things for ease of use" PR I am thinking that's probably OK

Copy link
Contributor

@MichaelOrlov MichaelOrlov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@emersonknapp New version looks good to me among a few minor comments in tests and doxygen comments.

@MichaelOrlov MichaelOrlov self-requested a review April 28, 2021 11:01
Copy link
Collaborator

@Karsten1987 Karsten1987 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me. A few nitpicks inline and I also agree with some comments of @MichaelOrlov to extend a few test cases.

I do request changes though because I don't understand why you deleted a constructor in the Player. Did I miss something here?

…n comments, jump backward test

Signed-off-by: Emerson Knapp <eknapp@amazon.com>
@emersonknapp
Copy link
Collaborator Author

  • Linux Build Status
  • Linux-aarch64 Build Status
  • macOS Build Status
  • Windows Build Status

Copy link
Contributor

@MichaelOrlov MichaelOrlov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@emersonknapp emersonknapp merged commit f3cccb4 into master Apr 28, 2021
@delete-merged-branch delete-merged-branch bot deleted the emersonknapp/simple-clock-jump branch April 28, 2021 18:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants