-
Notifications
You must be signed in to change notification settings - Fork 42
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
How can we set sched_priority when we use dispatcher_executor #395
Comments
where these functions are implemented? can you point out the source file, since i could not find it with d263be2 |
Hey @alexleel , to which repository are you referring to. I have started porting the micro-ros repo and have started the implementation in this branch https://github.com/ros2/rclc/tree/feature/restructured-executor/rclc_multi_threaded_executor But independent of this, how did you test, that there is no difference?
Yes that is right. The executor spin-function only dispatches new incoming messages sequentially to multiple threads. The processing of the callback actually happens in DIFFERENT threads with user-defined priority. So, you could test this, by overloading the system: sending topic A and topic B with high frequency and processing subscription_A in high prio thread and subscription_B in low prio thread. Then you should see that subscription _A is executed more often than subscription_B. See also this publication: https://arxiv.org/abs/2105.05590 |
Probably this development branch: https://github.com/micro-ROS/rclc/tree/feature/restructured-exectutor/rclc_dispatcher_executor |
I checked rclc_dispatcher_executor, it's type-switch multiple thread implementation, rclc_multi_threaded_executor is the better choice?
@JanStaschulat Can you please help to check it? |
Issue template
I check rclc_dispatcher_executor_spin implementation , and seems there is no apparent difference in case that I have set the priority.
Steps to reproduce the issue
subscriber code:
Expected behavior
See the difference of sub_a and sub_b
Actual behavior
No difference since checking executor->handles one by one in rclc_dispatcher_executor_spin()
Additional information
The text was updated successfully, but these errors were encountered: