-
Notifications
You must be signed in to change notification settings - Fork 422
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
[WIP] Adding template for thread priorization in components at run-time #2373
base: rolling
Are you sure you want to change the base?
Conversation
Signed-off-by: stevemacenski <[email protected]>
a5bbe0e
to
50a5682
Compare
hi @SteveMacenski, glad to see this draft, I think that I think maybe we could visit the std::thread via the wrapper, and use I am currently working on real time tuning on linux and qnx, If you have better ideas, feel free to let me know. 😸 |
This utility function supports thread configuration for Linux, Windows Mac. A similar version could be used here as well. |
I took a look at this function, it supports QNX as well, very impressive 👍 |
Agreed for the Isolated case. How do we handle this for the normal case where this is simply called while inside of a thread, not in creating one (e.g. we call If that function can handle that and/or be made to handle that, then happy to try to find a home for it as part of this effort. |
This is, however, not documented for |
Sure, but your method takes in a |
For windows, change For Mac, QNX, and linux, Thus we don't need take |
Howdy,
Per a conversation with @JanStaschulat at ROSCon / in Nav2 ros-navigation/navigation2#3974: I think it would be dandy to be able to set increase thread prioritizations for soft-realtime in the Composable Node containers. Both to be able to set at launch-time instead of setting on a per-node basis in a stack. In Nav2, there are a couple of nodes we have set able to do this recently, but it would be great if there was a generic way that users could select prioritization more broadly and easily at run-time.
This PR implements a prototype of this behavior that I would like you feedback on to resolve necessary problems seen. I added a
setSoftRealTimePriority
to the ComponentManager that is used to set the prioritization when necessary. By default, I have the priority set to 49 after discussions with Bosch, but we could also make this configurable. Though, there's something to be said about simplicity and the suggestions in the RT workshop had the options of HIGH and LOW, so I think this might be OK to start off with.The way that I see this workflow occurring is the following for Isolated Component Manager:
parameters
field ofLoadComposableNodes
or from the parameters inCompositionNode
use_soft_realtime_priority
to its value in their launch files for the nodes of interestparameters
field ofLoadNode
service to the component container and sent tooverride_parameters
inNodeOptions
true
then we set the prioritizationQ: I believe all of the launch stuff (linked above) is setup already to be able to handle this workflow. Please I would appreciate making sure that's true since the launch_ros package is a little difficult to parse at times.
The way that I see this workflow occurring is the following for Normal Component Manager:
use_soft_realtime_priority
in the Component Manager constructor (false
, for off default)true
in the Isolated case to increase the prioritization of the Isolated's load/unload/list services. While that's an odd choice, that's a perfectly valid optionI have no questions on this one, I think this is good.