Skip to content

Commit 201cdf7

Browse files
committed
cras_topic_tools: count_messages: Default to BEST_AVAILABLE QoS.
1 parent 338f79f commit 201cdf7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

cras_topic_tools/src/count_messages.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,8 @@ CountMessagesComponent::CountMessagesComponent(const ::rclcpp::NodeOptions& opti
143143
qosProfileStr = options.arguments()[2];
144144
}
145145

146-
this->qosProfile = qosProfileStr.empty() ? rclcpp::QoS(qosDepthParam.value_or(1000)) : parseQoSPreset(qosProfileStr);
146+
const auto defaultQoS = rclcpp::BestAvailableQoS().keep_last(1000);
147+
this->qosProfile = qosProfileStr.empty() ? defaultQoS : parseQoSPreset(qosProfileStr);
147148
cras::configureQoSProfile(this->qosProfile, qosDepthParam, qosHistoryParam, qosReliabilityParam, qosDurabilityParam,
148149
qosLivelinessParam, qosLivelinessLeaseDurationSecondsParam);
149150

0 commit comments

Comments
 (0)