Skip to content
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

[backport humble] Node namespace parameter #963

Merged
merged 1 commit into from
Apr 23, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion image_proc/launch/image_proc.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,16 +41,24 @@


def generate_launch_description():

arg_namespace = DeclareLaunchArgument(
name='namespace', default_value='',
description=('namespace for all components loaded')
)

composable_nodes = [
ComposableNode(
package='image_proc',
plugin='image_proc::DebayerNode',
name='debayer_node',
namespace=LaunchConfiguration('namespace'),
),
ComposableNode(
package='image_proc',
plugin='image_proc::RectifyNode',
name='rectify_mono_node',
namespace=LaunchConfiguration('namespace'),
# Remap subscribers and publishers
remappings=[
('image', 'image_mono'),
Expand All @@ -62,6 +70,7 @@ def generate_launch_description():
package='image_proc',
plugin='image_proc::RectifyNode',
name='rectify_color_node',
namespace=LaunchConfiguration('namespace'),
# Remap subscribers and publishers
remappings=[
('image', 'image_color'),
Expand All @@ -82,7 +91,7 @@ def generate_launch_description():
image_processing_container = ComposableNodeContainer(
condition=LaunchConfigurationEquals('container', ''),
name='image_proc_container',
namespace='',
namespace=LaunchConfiguration('namespace'),
package='rclcpp_components',
executable='component_container',
composable_node_descriptions=composable_nodes,
Expand All @@ -98,6 +107,7 @@ def generate_launch_description():
)

return LaunchDescription([
arg_namespace,
arg_container,
image_processing_container,
load_composable_nodes,
Expand Down
Loading