-
Notifications
You must be signed in to change notification settings - Fork 281
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
The discovery is currently not restarted properly in record()
when previously stopped through stop()
. This implies that no new topics are subscribed to on subsequent calls to resume and no topics at all when simulation time is used due to how these topics are initialized.
The cause is the following comparison, which needs to be inverted:
rosbag2/rosbag2_transport/src/rosbag2_transport/recorder.cpp
Lines 440 to 449 in ffd8c7d
void RecorderImpl::start_discovery() | |
{ | |
std::lock_guard<std::mutex> state_lock(discovery_mutex_); | |
if (stop_discovery_.exchange(false)) { | |
RCLCPP_DEBUG(node->get_logger(), "Recorder topic discovery is already running."); | |
} else { | |
discovery_future_ = | |
std::async(std::launch::async, std::bind(&RecorderImpl::topics_discovery, this)); | |
} | |
} |
The stop_discovery_ atomic should then also be initialized to true in order for the first start_discovery call to succeed.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working