-
Notifications
You must be signed in to change notification settings - Fork 436
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
Add arguments to configure number of threads #1693
Add arguments to configure number of threads #1693
Conversation
Signed-off-by: wep21 <border_goldenmarket@yahoo.co.jp>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not really inclined to have this option. instead, how about providing documents how to support the custom component container? because this kind of extra option and arguments would be required and dependent on use cases?
CC: @clalancette @ivanpauno what would you think? |
Signed-off-by: wep21 <border_goldenmarket@yahoo.co.jp>
15640fb
to
a1c3d44
Compare
I think it's better for |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding this options sounds reasonable to me.
It would also be great to provide a --help
option.
* Add help option * Return if invalid argument is passed Signed-off-by: wep21 <border_goldenmarket@yahoo.co.jp>
Signed-off-by: wep21 <border_goldenmarket@yahoo.co.jp>
Signed-off-by: wep21 <border_goldenmarket@yahoo.co.jp>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@wep21 could you add tests?
Maybe, you can move the function doing argument processing to anoter cpp file and unit test that.
Have we considered using ROS parameters to configure the number of threads instead (I'm slightly hesitant to add custom argument parsing)? The container is already a node (so that it can provide ROS Services). It's slightly more tedious on the command line, but from launch it should be somewhat straightforward (may require changes to |
@wjwwood For current implementation, it is difficult to pass ros parameter to executor argument because |
Interesting, but we could/maybe should change that. There's no strong reason that the executor is needed in the constructor as far as I know. It could be passed in via a method that is called after the constructor. Also, we could look at the parameter overrides before creating the node to extract the setting, though the API to do so is a bit cumbersome if I remember correctly, but this is also an opportunity to fix that up while we do it. Anyway, I still think custom argument parsing here is fragile and redundant. |
Using a parameter sounds fine to me 👍 |
Replaced by #1708, closing |
This PR enables to configure number of threads in
component_container_mt
as below.