-
Notifications
You must be signed in to change notification settings - Fork 254
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
python node with Recorder does not exit with CTRL-C #1458
Comments
@tonynajjar The code behave as expected by design. in your example, you are missing call for the
Please refer to the rosbag2/ros2bag/ros2bag/verb/record.py Lines 255 to 260 in dcd239c
as an example of how to properly use it. |
The instantiation of a
Try to exit this script with CTRL-C before the sleep ends -> doesn't exit. Maybe CTRL-C will work if |
@tonynajjar Yes it is true. We override signal handlers in the recorder constructor to handle them further on in blocking Out of curiosity what would be a use case for instantiating |
The use case is I want to have a node with a service server that when called, will start recording a bag with the help of the Recorder. A bit like what is asked in #685 So the Recorder exists but we only start recording when the service is called |
@tonynajjar https://github.com/ros2/rosbag2?tab=readme-ov-file#controlling-recordings-via-services does not work for your use case? |
Description
A rclpy node instantiating a
rosbag2_py.Recorder
does not exit with CTRL-CExpected Behavior
It should exit cleanly
Actual Behavior
It just hangs
To Reproduce
System (please complete the following information)
Additional context
** Add any other context about the problem here **
The text was updated successfully, but these errors were encountered: