diff --git a/hardware_interface/src/resource_manager.cpp b/hardware_interface/src/resource_manager.cpp index cae7824466..cbcc4f1e72 100644 --- a/hardware_interface/src/resource_manager.cpp +++ b/hardware_interface/src/resource_manager.cpp @@ -1113,7 +1113,7 @@ bool ResourceManager::prepare_command_mode_switch( } return all_exist; }; - if (!check_exist(start_interfaces) || !check_exist(stop_interfaces)) + if (!(check_exist(start_interfaces) && check_exist(stop_interfaces))) { ss_not_existing << "]" << std::endl; RCUTILS_LOG_ERROR_NAMED( @@ -1138,7 +1138,7 @@ bool ResourceManager::prepare_command_mode_switch( } return all_available; }; - if (!check_available(start_interfaces) || !check_available(stop_interfaces)) + if (!(check_available(start_interfaces) && check_available(stop_interfaces))) { ss_not_available << "]" << std::endl; RCUTILS_LOG_ERROR_NAMED(