-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from CoreSenseEU/fix_launchers
Add Launcher support
- Loading branch information
Showing
16 changed files
with
303 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
# generated from rossdl_cmake/resource/launcher.py.em | ||
# DO NOT EDIT THIS FILE | ||
# generated code does not contain a copyright notice | ||
|
||
|
||
from launch_ros.actions import ComposableNodeContainer, LoadComposableNodes | ||
from launch_ros.descriptions import ComposableNode | ||
from launch import LaunchDescription | ||
from launch_ros.actions import Node | ||
from launch.conditions import IfCondition | ||
from launch.substitutions import LaunchConfiguration | ||
from launch.actions import DeclareLaunchArgument | ||
|
||
def generate_launch_description(): | ||
|
||
create_container = LaunchConfiguration('create_container') | ||
container_name = LaunchConfiguration('container_name') | ||
|
||
declare_create_container_cmd = DeclareLaunchArgument( | ||
'create_container', | ||
default_value='True', | ||
description='Whether run a container') | ||
|
||
declare_container_name_cmd = DeclareLaunchArgument( | ||
'container_name', | ||
default_value='rossdl_test_container', | ||
description='Name of the container') | ||
|
||
container_cmd = Node( | ||
condition=IfCondition(create_container), | ||
name=container_name, | ||
package='rclcpp_components', | ||
executable='component_container', | ||
output='both', | ||
) | ||
|
||
load_composable_nodes = LoadComposableNodes( | ||
target_container=container_name, | ||
composable_node_descriptions=[ | ||
ComposableNode( | ||
package = 'rossdl_test', | ||
plugin = 'rossdl_test::ImageFilter', | ||
name = 'image_filter', | ||
remappings = [ | ||
('/image_filter/image_out', '/consumer/image_in'), | ||
('/image_filter/description_out', '/consumer/description_in'), | ||
], | ||
parameters=[{ | ||
'description_label': 'image compressed', | ||
'use_sim_time': False, | ||
}], | ||
), | ||
ComposableNode( | ||
package = 'rossdl_test', | ||
plugin = 'rossdl_test::Consumer', | ||
name = 'consumer', | ||
remappings = [ | ||
], | ||
parameters=[{ | ||
'use_sim_time': False, | ||
}], | ||
), | ||
]) | ||
|
||
ld = LaunchDescription() | ||
|
||
ld.add_action(declare_create_container_cmd) | ||
ld.add_action(declare_container_name_cmd) | ||
ld.add_action(container_cmd) | ||
ld.add_action(load_composable_nodes) | ||
|
||
return ld |
Oops, something went wrong.