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

Fix incorrect boundary check for playback_duration and play_until_timestamp #1032

Merged

Conversation

MichaelOrlov
Copy link
Contributor

@MichaelOrlov MichaelOrlov commented Jun 23, 2022

Update: Also fixed one false positive and one flaky test in test_play_until

Signed-off-by: Michael Orlov <michael.orlov@apex.ai>
- Properly handle cases when playback_duration = 0 or
play_until_timestamp_ = 0.
- Rewrite `play_for_none_are_played_due_to_duration` test to use
`on_playback` callbacks to decrease runtime from 10 seconds down to
100 milliseconds.

Signed-off-by: Michael Orlov <michael.orlov@apex.ai>
@MichaelOrlov MichaelOrlov requested a review from a team as a code owner June 23, 2022 07:26
@MichaelOrlov MichaelOrlov requested review from emersonknapp, hidmic and gbiggs and removed request for a team June 23, 2022 07:26
@MichaelOrlov
Copy link
Contributor Author

cc: @agalbachicar

@MichaelOrlov MichaelOrlov self-assigned this Jun 23, 2022
Using on_play_callbacks instead of expectation for 0 messages on
subscription.

Signed-off-by: Michael Orlov <michael.orlov@apex.ai>
Change wrong expectations for number of messages to arrive.
It was expecting to arrive 1 but actually should expect 2.

Signed-off-by: Michael Orlov <michael.orlov@apex.ai>
Copy link
Contributor

@agalbachicar agalbachicar left a comment

Choose a reason for hiding this comment

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

@MichaelOrlov thanks for sending this bug and fixing the bug we introduced. I left two suggestions for your consideration which try to improve readability only.

Thanks again!

Copy link
Contributor

@jhdcs jhdcs left a comment

Choose a reason for hiding this comment

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

Just a style guide comment that I'm not 100% sure about.

rosbag2_transport/src/rosbag2_transport/player.cpp Outdated Show resolved Hide resolved
Signed-off-by: Michael Orlov <michael.orlov@apex.ai>
@MichaelOrlov
Copy link
Contributor Author

Gist: https://gist.githubusercontent.com/MichaelOrlov/e28428938082cd90d5c8013362a8053a/raw/9900e5b8703accdc299db1280f09f1cbca688e74/ros2.repos
BUILD args: --packages-above-and-dependencies ros2bag rosbag2_transport rosbag2_tests
TEST args: --packages-above ros2bag rosbag2_transport rosbag2_tests
ROS Distro: rolling
Job: ci_launcher
ci_launcher ran: https://ci.ros2.org/job/ci_launcher/10450

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

@audrow audrow changed the base branch from master to rolling June 28, 2022 14:50
Copy link
Contributor

@jhdcs jhdcs left a comment

Choose a reason for hiding this comment

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

I'm not seeing any huge issues here.

@MichaelOrlov MichaelOrlov merged commit 832dea8 into rolling Jun 28, 2022
@delete-merged-branch delete-merged-branch bot deleted the morlov/fix-for-incorrect-play_until_timestamp-check branch June 28, 2022 22:21
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.

Incorrect boundary check for playback_duration and play_until_timestamp
3 participants