Skip to content

Commit

Permalink
Fix unused QoS profile for clock subscription and make ClockQoS the d…
Browse files Browse the repository at this point in the history
…efault (ros2#1801)

Signed-off-by: Nikolai Morin <nikolai.morin@apex.ai>
  • Loading branch information
nnmm authored and Alberto Soragna committed Jul 28, 2023
1 parent 6f9772e commit bb37b31
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion rclcpp/include/rclcpp/node_interfaces/node_time_source.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class NodeTimeSource : public NodeTimeSourceInterface
rclcpp::node_interfaces::NodeLoggingInterface::SharedPtr node_logging,
rclcpp::node_interfaces::NodeClockInterface::SharedPtr node_clock,
rclcpp::node_interfaces::NodeParametersInterface::SharedPtr node_parameters,
const rclcpp::QoS & qos = rclcpp::RosoutQoS(),
const rclcpp::QoS & qos = rclcpp::ClockQoS(),
bool use_clock_thread = true
);

Expand Down
2 changes: 1 addition & 1 deletion rclcpp/src/rclcpp/time_source.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,7 @@ class TimeSource::NodeState : public std::enable_shared_from_this<NodeState>
node_parameters_,
node_topics_,
"/clock",
rclcpp::QoS(KeepLast(1)).best_effort(),
qos_,
[state = std::weak_ptr<NodeState>(this->shared_from_this())](
std::shared_ptr<const rosgraph_msgs::msg::Clock> msg) {
if (auto state_ptr = state.lock()) {
Expand Down

0 comments on commit bb37b31

Please sign in to comment.