explicitly 2 threaded multi ros2 simple

This commit is contained in:
Niklas Halle 2025-08-05 15:35:50 +02:00
parent c652f29c7e
commit ed6209939c

View file

@ -98,7 +98,7 @@ int main(int argc, char **argv)
#ifdef MULTI_THREADED
// Create a multi-threaded executor to handle all nodes
std::cout << "multi threaded ros default" << std::endl;
rclcpp::executors::MultiThreadedExecutor executor;
rclcpp::executors::MultiThreadedExecutor executor{{}, 2};
#else
// Create a single-threaded executor to handle all nodes
std::cout << "single threaded ros default" << std::endl;