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:
parent
b165a07d6a
commit
38b991ef5a
1 changed files with 1 additions and 3 deletions
|
@ -69,9 +69,7 @@ protected:
|
||||||
topics_ = get_list_topics();
|
topics_ = get_list_topics();
|
||||||
|
|
||||||
for (const auto &topic_name : topics_) {
|
for (const auto &topic_name : topics_) {
|
||||||
writer_->create_topic({topic_name, "sensor_msgs/msg/Image", "cdr", ""});
|
writer_->create_topic({0u, topic_name, "sensor_msgs/msg/Image", "", {}, ""});
|
||||||
RCLCPP_INFO(this->get_logger(), "Configuring topic: %s",
|
|
||||||
topic_name.c_str());
|
|
||||||
}
|
}
|
||||||
return CallbackReturn::SUCCESS;
|
return CallbackReturn::SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue