-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Description
Hi @v-kiniv
The multithreaded executor is not actually using more than one thread. In order to achieve that you need multiple callback groups, see the example at
https://github.com/ros2/examples/blob/95c3b145e4f75c24e1617d97acc3d349ad67e78f/rclcpp/executors/multithreaded_executor/multithreaded_executor.cpp#L78-L81
However, to minimize CPU usage, I suggest testing out the "static" single threaded executor. See ros2/rclcpp#1034 and ros2/rclcpp#873
After switching rclcpp::executors::MultiThreadedExecutor executor;
to rclcpp::executors::StaticSingleThreadedExecutor executor;
I suggest testing to see if CPU usage decreases.
Metadata
Metadata
Assignees
Labels
No labels