You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Gracefully handle SIGINT and SIGTERM in rosbag2 recorder (#1301)
* Gracefully handle SIGINT and SIGTERM signal for rosbag2 recorder
- Call recorder->stop() and exec_->cancel() instead of rclcpp::shutdown
Signed-off-by: Michael Orlov <[email protected]>
* Use singleton for static executor in the rosbag2_py::Recorder
Signed-off-by: Michael Orlov <[email protected]>
* Rollback to the non-static executor and don't call executor->cancel()
- In case when signal will arrive we will trigger our internal exit_
variable and wait while current exec_->spin_all(10msec) will exit.
Signed-off-by: Michael Orlov <[email protected]>
* Spin recorder node in a separate thread for better handling exit
- Run exec->spin() in a separate thread, because we need to call
exec->cancel() after recorder->stop() to be able to send notifications
about bag split and close.
- Wait on conditional variable for exit_ flag
Signed-off-by: Michael Orlov <[email protected]>
* Address race condition in rosbag2_py.test_record_cancel
- Add `record_thread.join()` before trying to parse metadata.
Signed-off-by: Michael Orlov <[email protected]>
---------
Signed-off-by: Michael Orlov <[email protected]>
(cherry picked from commit 46a23e9)
# Conflicts:
# rosbag2_py/src/rosbag2_py/_transport.cpp
# rosbag2_py/test/test_transport.py
0 commit comments