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 iron] Node namespace parameter #953

Merged
merged 3 commits into from
Feb 28, 2024
Merged
Changes from 2 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')
)

Copy link
Member

Choose a reason for hiding this comment

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

linter seems to think that you have some spaces on this line (it shows in the individual second commit as well -although I can't actually see it highlighted here as part of the PR - which is odd)

Copy link
Author

Choose a reason for hiding this comment

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

Yea I noticed the same thing when the flake test failed, just assumed it was a CI glitch. I've tried to retrigger by removing any sort of white space that may have come up

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