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 record, stop, start_discovery, stop_discovery and is_discovery_stopped services for rosbag2_transport::Recorder #1840

Open
wants to merge 9 commits into
base: rolling
Choose a base branch
from
Prev Previous commit
Next Next commit
Reset event publisher exit flag
Signed-off-by: Sharmin Ramli <sharmin.ramli@enway.ai>
sharminramli committed Oct 17, 2024
commit 6df3340e80dda6bde286b4d9b339aea86193a665
4 changes: 4 additions & 0 deletions rosbag2_transport/src/rosbag2_transport/recorder.cpp
Original file line number Diff line number Diff line change
@@ -350,6 +350,10 @@ void RecorderImpl::record()
node->create_publisher<rosbag2_interfaces::msg::WriteSplitEvent>("events/write_split", 1);

// Start the thread that will publish events
{
std::lock_guard<std::mutex> lock(event_publisher_thread_mutex_);
event_publisher_thread_should_exit_ = false;
}
event_publisher_thread_ = std::thread(&RecorderImpl::event_publisher_thread_main, this);

rosbag2_cpp::bag_events::WriterEventCallbacks callbacks;