Skip to content

Commit

Permalink
[backport humble] Node namespace parameter (#963)
Browse files Browse the repository at this point in the history
Backport pull request #925 which solves issue #952 by adding the
`namespace` parameter to the `image_proc` launch file

Co-authored-by: Lucas Wendland <[email protected]>
  • Loading branch information
ahcorde and CursedRock17 committed Apr 23, 2024
1 parent 2a662bd commit f2caf59
Showing 1 changed file with 11 additions and 1 deletion.
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

0 comments on commit f2caf59

Please sign in to comment.