Skip to content

Commit

Permalink
Add launch file
Browse files Browse the repository at this point in the history
NODE
It has the same problem as following link
ros2/launch#204

All nodes have the same node name...
  • Loading branch information
fugashy committed Oct 23, 2019
1 parent 5641d8d commit 1f7e743
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 0 deletions.
5 changes: 5 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,11 @@ install(TARGETS
RUNTIME DESTINATION bin
)

#install other files
install(DIRECTORY launch
DESTINATION share/${PROJECT_NAME}/
)

# install executables
install(TARGETS
${PROJECT_NAME}_chain_piece_node
Expand Down
20 changes: 20 additions & 0 deletions launch/chain_processor.launch.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import launch
import launch_ros

_PKG_NAME = 'image_proc_chain'


def generate_launch_description():
chain_num = launch.substitutions.LaunchConfiguration('chain_num')

return launch.LaunchDescription([
launch.actions.DeclareLaunchArgument(
'chain_num',
default_value='3',
description='Number of image processor(chain_piece)'),
launch_ros.actions.Node(
package=_PKG_NAME,
node_executable=_PKG_NAME+'_chain_processor_node',
node_name='chain_processor',
output='screen',
parameters=[{'chain_num': chain_num}])])
1 change: 1 addition & 0 deletions package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
<depend>sensor_msgs</depend>
<depend>std_msgs</depend>

<exec_depend>launch_ros</exec_depend>
<exec_depend>rosidl_default_runtime</exec_depend>

<member_of_group>rosidl_interface_packages</member_of_group>
Expand Down

0 comments on commit 1f7e743

Please sign in to comment.