From a52c1cd64d34c080a8ca7e857f43b99bf7e0a1e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20St=C4=99pie=C5=84?= Date: Fri, 15 Dec 2023 17:45:12 +0100 Subject: [PATCH] Change qos of the estop topic without when joy2twist was launched after panther_ros, estop message wasn't received correctly --- joy2twist/src/joy2twist_node.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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_); }