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

Enable possibility to stop execution of play using ctrl-c #54

Merged
merged 1 commit into from Oct 26, 2018

Conversation

botteroa-si
Copy link
Contributor

@botteroa-si botteroa-si commented Oct 26, 2018

With the change introduced in this PR is now possible to interrupt the execution of ros2 bag play at any point, by pressing Ctrl-C.
This is achieved by checking the state of rclcpp::ok() in the play loop.

- This allows to stop the replaying of the messages by pressing ctrl-c
@botteroa-si
Copy link
Contributor Author

CI:

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

@Karsten1987 Karsten1987 merged commit 8ceb88d into ros2:master Oct 26, 2018
@anhosi anhosi deleted the feature/stop_play_with_ctrlc branch November 27, 2018 10:21
sriramster pushed a commit to sriramster/rosbag2 that referenced this pull request Feb 28, 2019
* ros2GH-52 Extend db schema to include topic meta data

- Two table db layout (messages and topics)
- Messages table references topics table but without foreign key for
  improved write performance
- Create_topic must be called for every topic prior to storing a
  message of this topic.
- Sqlite_storage caches all known topics
- At least for now the type information is stored as a simple string.

* ros2GH-54 Make first rcl subscription prototype work

* ros2GH-54 find type name from topic

* ros2GH-54 Publish messages from database knowing only topic name and pass topic name by terminal

* ros2GH-54 Refactoring of typesupport helpers

* ros2GH-54 Use c++ typesupport

* ros2GH-54 Use cpp typesupport and rclcpp::Node for publisher

* ros2GH-54 Add raw subscription and use in rosbag_record

* ros2GH-54 Add Rosbag2Node and Rosbag2Publisher classes and use them in Rosbag2::play

* ros2GH-54 Rename Rosbag2Publisher to RawPublisher

* ros2GH-54 Minor refactoring of Rosbag2Node

* ros2GH-54 Extract and test waiting for topic into its own method

* ros2GH-54 Fix read integration tests and linters

* ros2GH-55 Refactor Rosbag2Node::create_raw_publisher()

* ros2GH-54 Add subscription method to rosbag node

* ros2GH-54 Keep subscription alive

* ros2GH-54: Extract subscription to correct class

* ros2GH-55 Change interface of raw_publisher to match subscriber

* ros2GH-54 Add test for rosbag node

* ros2GH-54 Unfriend rclcpp class

* ros2GH-54 Make test more robust

* ros2GH-54 Fix build

* ros2GH-54 Minor cleanup and documentation

* ros2GH-55 Minor refactoring + TODO comment

* ros2GH-54 Change dynamic library folder on Windows

* ros2GH-54 Fix build

* ros2GH-54 Add shutdown to test

* ros2GH-55 Add test helpers methods for usage in multiple tests

* ros2GH-55 Add new method to read all topics and types in BaseReadInterface and use it in Rosbag2::play

* ros2GH-55 Fix gcc and msvc

* ros2GH-54 Rename raw to generic in publisher/subscriber

* ros2GH-55 Check that topic and associated type in bag file are well defined before playing back messages

* ros2GH-54 Prevent unnecessary error message loading storage

* ros2GH-54 Fix memory leak

* ros2GH-54 stabilize node test

* ros2GH-55 Check if database exists when opening storage with READ_ONLY flag

* ros2GH-54 Minor cleanup of subscriber

* ros2GH-54 Wait a small amount of time to let node discover other nodes

* Add logging to false case

* ros2GH-54 Catch exceptions and exit cleanly

* Use rmw_serialized_message_t and rcutils_char_array_t consistently

* ros2GH-4 Refactoring for correctness

- pass a few strings as const reference
- throw error when no topics could be found

* Improve error messages when loading plugins

* alphabetical order

* type_id -> type
james-rms pushed a commit to james-rms/rosbag2 that referenced this pull request Nov 17, 2022
* Implement new set_read_order API for storage

Signed-off-by: Emerson Knapp <emerson.b.knapp@gmail.com>
james-rms pushed a commit to james-rms/rosbag2 that referenced this pull request Nov 17, 2022
* Implement new set_read_order API for storage

Signed-off-by: Emerson Knapp <emerson.b.knapp@gmail.com>
Signed-off-by: James Smith <james@foxglove.dev>
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.

None yet

3 participants