fix(bagfile_recorder): update create_topic with proper initialization

- Ensured proper initialization by passing an empty vector or other necessary parameters.
- Maintained existing logging but updated the `create_topic` call to use more complete syntax, ensuring compatibility and correct configuration.
This commit is contained in:
Ilya Uraev 2025-01-23 00:05:32 +03:00 committed by Bill Finger
parent b165a07d6a
commit 38b991ef5a

View file

@ -69,9 +69,7 @@ protected:
topics_ = get_list_topics();
for (const auto &topic_name : topics_) {
writer_->create_topic({topic_name, "sensor_msgs/msg/Image", "cdr", ""});
RCLCPP_INFO(this->get_logger(), "Configuring topic: %s",
topic_name.c_str());
writer_->create_topic({0u, topic_name, "sensor_msgs/msg/Image", "", {}, ""});
}
return CallbackReturn::SUCCESS;
}