Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class CompressedBagRecorder : public rclcpp::Node {
}

private:
void topic_callback(std::shared_ptr<rclcpp::SerializedMessage> msg) const
void topic_callback(std::shared_ptr<const rclcpp::SerializedMessage> msg) const
{
rclcpp::Time time_stamp = this->now();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class SimpleBagRecorder : public rclcpp::Node
}

private:
void topic_callback(std::shared_ptr<rclcpp::SerializedMessage> msg) const
void topic_callback(std::shared_ptr<const rclcpp::SerializedMessage> msg) const
{
rclcpp::Time time_stamp = this->now();
writer_->write(msg, "chatter", "example_interfaces/msg/String", time_stamp);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ class SubscriptionManager
subscriber_node_->create_subscription<MessageT>(
topic_name,
qos,
[this, topic_name](std::shared_ptr<rclcpp::SerializedMessage> msg) {
[this, topic_name](std::shared_ptr<const rclcpp::SerializedMessage> msg) {
subscribed_messages_[topic_name].push_back(msg);
},
options);
Expand Down Expand Up @@ -219,7 +219,7 @@ class SubscriptionManager

std::unordered_map<std::string, rclcpp::SubscriptionBase::SharedPtr> subscriptions_;
std::unordered_map<std::string,
std::vector<std::shared_ptr<rclcpp::SerializedMessage>>> subscribed_messages_;
std::vector<std::shared_ptr<const rclcpp::SerializedMessage>>> subscribed_messages_;
std::unordered_map<std::string, size_t> expected_topics_with_size_;
rclcpp::Node::SharedPtr subscriber_node_;
const std::chrono::milliseconds sleep_per_loop_ = std::chrono::milliseconds(2);
Expand Down
Loading