From d356f305fe7070983822cabc9f2be550489a7ef1 Mon Sep 17 00:00:00 2001 From: Sai Kishor Kothakota Date: Tue, 23 Jan 2024 15:18:15 +0100 Subject: [PATCH] Enforce limits before calling write method of the hardware --- hardware_interface/src/resource_manager.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/hardware_interface/src/resource_manager.cpp b/hardware_interface/src/resource_manager.cpp index 84e1a24d94..9746835cb9 100644 --- a/hardware_interface/src/resource_manager.cpp +++ b/hardware_interface/src/resource_manager.cpp @@ -1403,6 +1403,14 @@ HardwareReadWriteStatus ResourceManager::write( } }; + // Enforce limits on the commands + for (auto & hw_limiter : resource_storage_->hw_command_limiter_) + { + for (auto & joint_limiters : hw_limiter.second) + { + joint_limiters.enforce_limits(period); + } + } write_components(resource_storage_->actuators_); write_components(resource_storage_->systems_);