-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Consider different executor #1
Comments
Hi @zflat, Right now, I don't have time, but I want to come back to this issue later, and also test more on Linux, to see how executors behave there. |
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;
torclcpp::executors::StaticSingleThreadedExecutor executor;
I suggest testing to see if CPU usage decreases.The text was updated successfully, but these errors were encountered: