From ba307718271264e31c7e0c1a861c8fba4eaa51d1 Mon Sep 17 00:00:00 2001 From: Sai Kishor Kothakota Date: Wed, 17 Jul 2024 16:45:47 +0200 Subject: [PATCH] add new API naming changes --- .../include/hardware_interface/actuator_interface.hpp | 8 ++++---- .../include/hardware_interface/sensor_interface.hpp | 4 ++-- .../include/hardware_interface/system_interface.hpp | 8 ++++---- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/hardware_interface/include/hardware_interface/actuator_interface.hpp b/hardware_interface/include/hardware_interface/actuator_interface.hpp index e004da9ccb..a3f53e54b1 100644 --- a/hardware_interface/include/hardware_interface/actuator_interface.hpp +++ b/hardware_interface/include/hardware_interface/actuator_interface.hpp @@ -113,10 +113,10 @@ class ActuatorInterface : public rclcpp_lifecycle::node_interfaces::LifecycleNod write_async_handler_ = std::make_unique>(); read_async_handler_->init( std::bind(&ActuatorInterface::read, this, std::placeholders::_1, std::placeholders::_2)); - read_async_handler_->start_async_update_thread(); + read_async_handler_->start_thread(); write_async_handler_->init( std::bind(&ActuatorInterface::write, this, std::placeholders::_1, std::placeholders::_2)); - write_async_handler_->start_async_update_thread(); + write_async_handler_->start_thread(); } return on_init(hardware_info); }; @@ -228,7 +228,7 @@ class ActuatorInterface : public rclcpp_lifecycle::node_interfaces::LifecycleNod info_.name.c_str()); return return_type::OK; } - std::tie(trigger_status, result) = read_async_handler_->trigger_async_update(time, period); + std::tie(trigger_status, result) = read_async_handler_->trigger_async_callback(time, period); if (!trigger_status) { RCLCPP_WARN( @@ -293,7 +293,7 @@ class ActuatorInterface : public rclcpp_lifecycle::node_interfaces::LifecycleNod info_.name.c_str()); return return_type::OK; } - std::tie(trigger_status, result) = write_async_handler_->trigger_async_update(time, period); + std::tie(trigger_status, result) = write_async_handler_->trigger_async_callback(time, period); if (!trigger_status) { RCLCPP_WARN( diff --git a/hardware_interface/include/hardware_interface/sensor_interface.hpp b/hardware_interface/include/hardware_interface/sensor_interface.hpp index 123387e8a3..22987fb4e0 100644 --- a/hardware_interface/include/hardware_interface/sensor_interface.hpp +++ b/hardware_interface/include/hardware_interface/sensor_interface.hpp @@ -112,7 +112,7 @@ class SensorInterface : public rclcpp_lifecycle::node_interfaces::LifecycleNodeI read_async_handler_ = std::make_unique>(); read_async_handler_->init( std::bind(&SensorInterface::read, this, std::placeholders::_1, std::placeholders::_2)); - read_async_handler_->start_async_update_thread(); + read_async_handler_->start_thread(); } return on_init(hardware_info); }; @@ -155,7 +155,7 @@ class SensorInterface : public rclcpp_lifecycle::node_interfaces::LifecycleNodeI if (info_.is_async) { bool trigger_status = true; - std::tie(trigger_status, result) = read_async_handler_->trigger_async_update(time, period); + std::tie(trigger_status, result) = read_async_handler_->trigger_async_callback(time, period); if (!trigger_status) { RCLCPP_WARN( diff --git a/hardware_interface/include/hardware_interface/system_interface.hpp b/hardware_interface/include/hardware_interface/system_interface.hpp index 8ae909b053..5387f7395b 100644 --- a/hardware_interface/include/hardware_interface/system_interface.hpp +++ b/hardware_interface/include/hardware_interface/system_interface.hpp @@ -114,10 +114,10 @@ class SystemInterface : public rclcpp_lifecycle::node_interfaces::LifecycleNodeI write_async_handler_ = std::make_unique>(); read_async_handler_->init( std::bind(&SystemInterface::read, this, std::placeholders::_1, std::placeholders::_2)); - read_async_handler_->start_async_update_thread(); + read_async_handler_->start_thread(); write_async_handler_->init( std::bind(&SystemInterface::write, this, std::placeholders::_1, std::placeholders::_2)); - write_async_handler_->start_async_update_thread(); + write_async_handler_->start_thread(); } return on_init(hardware_info); }; @@ -229,7 +229,7 @@ class SystemInterface : public rclcpp_lifecycle::node_interfaces::LifecycleNodeI info_.name.c_str()); return return_type::OK; } - std::tie(trigger_status, result) = read_async_handler_->trigger_async_update(time, period); + std::tie(trigger_status, result) = read_async_handler_->trigger_async_callback(time, period); if (!trigger_status) { RCLCPP_WARN( @@ -294,7 +294,7 @@ class SystemInterface : public rclcpp_lifecycle::node_interfaces::LifecycleNodeI info_.name.c_str()); return return_type::OK; } - std::tie(trigger_status, result) = write_async_handler_->trigger_async_update(time, period); + std::tie(trigger_status, result) = write_async_handler_->trigger_async_callback(time, period); if (!trigger_status) { RCLCPP_WARN(