Skip to content

Commit 29c48a4

Browse files
authored
Use best effort, keep last, history depth 1 QoS Profile for '/clock' subscriptions (#1312)
Signed-off-by: Ivan Santiago Paunovic <[email protected]>
1 parent 0e0a6a4 commit 29c48a4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

rclcpp/src/rclcpp/time_source.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ void TimeSource::create_clock_sub()
237237
clock_subscription_ = rclcpp::create_subscription<rosgraph_msgs::msg::Clock>(
238238
node_topics_,
239239
"/clock",
240-
rclcpp::QoS(QoSInitialization::from_rmw(rmw_qos_profile_default)),
240+
rclcpp::QoS(KeepLast(1)).best_effort(),
241241
std::bind(&TimeSource::clock_cb, this, std::placeholders::_1)
242242
);
243243
}

0 commit comments

Comments
 (0)