Add 'executor_type' and 'thread_num' to LoadNode#186
Add 'executor_type' and 'thread_num' to LoadNode#186armaho wants to merge 1 commit intoros2:rollingfrom
Conversation
Signed-off-by: Arman Hosseini <armanhosseini878787@gmail.com>
| # Executor used for this node. Leave empty to share the executor | ||
| # used for the ComponentManager. Otherwise, a new executor will | ||
| # be used for this node. Options: | ||
| # + SingleThreadedExecutor | ||
| # + MultiThreadedExecutor | ||
| string executor_type |
There was a problem hiding this comment.
i think this makes more sense to keep this as arbitrary string type if user can configure their own defined executor to the component manager. otherwise, maybe predefined enum would be enough? can we not use EventsExecutor here?
There was a problem hiding this comment.
i think this makes more sense to keep this as arbitrary string type if user can configure their own defined executor to the component manager.
User cannot do that. This is the executor used for the node itself, so ComponentContainer itself must be able to construct an object of the specified executor.
otherwise, maybe predefined enum would be enough?
Yeah, sure. I will do that.
can we not use EventsExecutor here?
There's nothing stoping us. I will add that.
| # Number of threads dedicated to the executor for this node. This option | ||
| # is only valid if you choose MultiThreadedExecutor as the executor type. | ||
| # Leave empty to use the default. | ||
| uint8 thread_num |
There was a problem hiding this comment.
what is the default thread number for MultiThreadedExecutor? hardware thread num?
|
I don't think that this is the right thing to do. I would be on-board with command line or ROS parameter interfaces for configuring the executor for a component container. Having multiple (heterogenous) kinds of executors in a single container starts to feel like it may be an application of manual compile-time composition rather than needing the flexibility of runtime dynamic composition. Curious what is driving this need. |
Description
This pull request is related to ros2/rclcpp#2930 and ros2/rclcpp#3080. It adds the parameters
executor_typeandthread_numtocomposition_interfaces/srv/LoadNode.Is this user-facing behavior change?
Did you use Generative AI?
No.
Additional Information
Nothing.