diff --git a/rclcpp/src/rclcpp/executors/multi_threaded_executor.cpp b/rclcpp/src/rclcpp/executors/multi_threaded_executor.cpp index 8e61746f93..83adfb6a12 100644 --- a/rclcpp/src/rclcpp/executors/multi_threaded_executor.cpp +++ b/rclcpp/src/rclcpp/executors/multi_threaded_executor.cpp @@ -174,7 +174,7 @@ default_thread_attr(rclcpp::ExecutorOptions const & options) const rcutils_thread_attr_t * attr = std::find_if( attrs_beg, attrs_end, [&](const auto & attr) { - return attr.name == name; + return attr.tag == name; }); if (attr != attrs_end) { return rcpputils::ThreadAttribute(*attr); diff --git a/rclcpp/src/rclcpp/executors/single_threaded_executor.cpp b/rclcpp/src/rclcpp/executors/single_threaded_executor.cpp index 8d3212efc9..1a3157c58d 100644 --- a/rclcpp/src/rclcpp/executors/single_threaded_executor.cpp +++ b/rclcpp/src/rclcpp/executors/single_threaded_executor.cpp @@ -88,7 +88,7 @@ default_thread_attr(rclcpp::ExecutorOptions const & options) const rcutils_thread_attr_t * attr = std::find_if( attrs_beg, attrs_end, [&](const auto & attr) { - return attr.name == name; + return attr.tag == name; }); if (attr != attrs_end) { return rcpputils::ThreadAttribute(*attr); diff --git a/rclcpp/test/rclcpp/executors/test_multi_threaded_executor.cpp b/rclcpp/test/rclcpp/executors/test_multi_threaded_executor.cpp index 8b552a4c04..06f8347c4f 100644 --- a/rclcpp/test/rclcpp/executors/test_multi_threaded_executor.cpp +++ b/rclcpp/test/rclcpp/executors/test_multi_threaded_executor.cpp @@ -160,11 +160,11 @@ constexpr char const * argv[] = { "--ros-args", "--thread-attrs-value", R"( -- name: RCLCPP_EXECUTOR_MULTI_THREADED +- tag: RCLCPP_EXECUTOR_MULTI_THREADED scheduling_policy: FIFO priority: 10 core_affinity: [] -- name: executor-1 +- tag: executor-1 scheduling_policy: RR priority: 20 core_affinity: [0]