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

Add simple keyboard control for playback rate #893

Merged
merged 3 commits into from
Oct 27, 2021

Conversation

emersonknapp
Copy link
Collaborator

No description provided.

Emerson Knapp and others added 2 commits October 25, 2021 11:56
Signed-off-by: Emerson Knapp <eknapp@amazon.com>
Signed-off-by: Emerson Knapp <emerson.b.knapp@gmail.com>
@emersonknapp emersonknapp requested a review from a team as a code owner October 27, 2021 19:33
@emersonknapp emersonknapp requested review from Karsten1987 and jhdcs and removed request for a team October 27, 2021 19:33
Copy link
Contributor

@lihui815 lihui815 left a comment

Choose a reason for hiding this comment

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

just nits on providing more info to user on whats happening

Signed-off-by: Emerson Knapp <emerson.b.knapp@gmail.com>
@emersonknapp
Copy link
Collaborator Author

Gist: https://gist.githubusercontent.com/emersonknapp/9c69653c783a4be4489d75b410c02512/raw/bbfc4ef33db92050d3c8366917e493dc56105dad/ros2.repos
BUILD args: --packages-up-to rosbag2_transport rosbag2_tests rosbag2
TEST args: --packages-select rosbag2_transport rosbag2_tests rosbag2
ROS Distro: rolling
Job: ci_launcher
ci_launcher ran: https://ci.ros2.org/job/ci_launcher/9250

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

@emersonknapp emersonknapp merged commit 26a440c into master Oct 27, 2021
@delete-merged-branch delete-merged-branch bot deleted the emersonknapp/rate-keyboard-control branch October 27, 2021 23:38
@@ -147,6 +155,9 @@ TEST_F(RosBag2PlayTestFixture, test_keyboard_controls)
keyboard_handler->simulate_key_press(play_options_.pause_resume_toggle_key);
EXPECT_THAT(player->is_paused(), true);

keyboard_handler->simulate_key_press(play_options_.increase_rate_key);
keyboard_handler->simulate_key_press(play_options_.decrease_rate_key);
Copy link
Contributor

Choose a reason for hiding this comment

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

Sorry for posting in closed PR.
Just in case for future. It would be better to check rate va player->get_rate() before changing it again.

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