diff --git a/joy2twist/src/joy2twist_node.cpp b/joy2twist/src/joy2twist_node.cpp index cf94c99..35592e3 100644 --- a/joy2twist/src/joy2twist_node.cpp +++ b/joy2twist/src/joy2twist_node.cpp @@ -18,7 +18,8 @@ Joy2TwistNode::Joy2TwistNode() : Node("joy2twist_node") if (e_stop_present_) { e_stop_sub_ = this->create_subscription( - e_stop_topic_, rclcpp::SystemDefaultsQoS(), std::bind(&Joy2TwistNode::e_stop_cb, this, _1)); + e_stop_topic_, rclcpp::QoS(rclcpp::KeepLast(1)).transient_local().reliable(), + std::bind(&Joy2TwistNode::e_stop_cb, this, _1)); e_stop_reset_client_ = this->create_client(e_stop_reset_srv_); e_stop_trigger_client_ = this->create_client(e_stop_trigger_srv_); }