Skip to content

Add 'executor_type' and 'thread_num' to LoadNode#186

Open
armaho wants to merge 1 commit intoros2:rollingfrom
armaho:executor_type
Open

Add 'executor_type' and 'thread_num' to LoadNode#186
armaho wants to merge 1 commit intoros2:rollingfrom
armaho:executor_type

Conversation

@armaho
Copy link

@armaho armaho commented Feb 20, 2026

Description

This pull request is related to ros2/rclcpp#2930 and ros2/rclcpp#3080. It adds the parameters executor_type and thread_num to composition_interfaces/srv/LoadNode.

Is this user-facing behavior change?

Did you use Generative AI?

No.

Additional Information

Nothing.

Signed-off-by: Arman Hosseini <armanhosseini878787@gmail.com>
Comment on lines +32 to +37
# 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
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Author

@armaho armaho Feb 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines +39 to +42
# 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
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is the default thread number for MultiThreadedExecutor? hardware thread num?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes. I will specify that.

@mjcarroll
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants