From 52b84942f4a65db1aaf7b5c78e6632eec18b0462 Mon Sep 17 00:00:00 2001 From: Erik Andresen Date: Thu, 22 Oct 2026 22:10:22 +0200 Subject: [PATCH] set QoS --- hardware/src/a4wd3_open_manipulator_i2c.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hardware/src/a4wd3_open_manipulator_i2c.cpp b/hardware/src/a4wd3_open_manipulator_i2c.cpp index 3e172ed..724b40b 100644 --- a/hardware/src/a4wd3_open_manipulator_i2c.cpp +++ b/hardware/src/a4wd3_open_manipulator_i2c.cpp @@ -44,6 +44,7 @@ hardware_interface::CallbackReturn A4wd3OpenManipulatorI2C::on_init( hardware_interface::CallbackReturn A4wd3OpenManipulatorI2C::on_configure( const rclcpp_lifecycle::State & /*previous_state*/) { + auto qos = rclcpp::QoS(10).keep_all().reliable(); RCLCPP_INFO(get_logger(), "Configuring %s", info_.name.c_str()); if (!setup_dynamixels()) { @@ -58,7 +59,7 @@ hardware_interface::CallbackReturn A4wd3OpenManipulatorI2C::on_configure( "get_error", std::bind( &A4wd3OpenManipulatorI2C::cbGetError, this, std::placeholders::_1, std::placeholders::_2)); - sub_light = get_node()->create_subscription("/headlight", 10, std::bind(&A4wd3OpenManipulatorI2C::light_callback, this, std::placeholders::_1)); + sub_light = get_node()->create_subscription("/headlight", qos, std::bind(&A4wd3OpenManipulatorI2C::light_callback, this, std::placeholders::_1)); RCLCPP_INFO(get_logger(), "Configuration successful"); return hardware_interface::CallbackReturn::SUCCESS; -- 2.39.5