This ROS 2 package shows how you can launch (or package) any excutable, including bash scripts.
colcon build --packages-select my_ros2_pkg
source install/setup.bash
Usage:
$ ros2 run my_ros2_pkg run_me.bash -h
Usage:
run_me.bash [-h | -m message]
Example:
run_me.bash
run_me.bash -m hello
Run:
ros2 run my_ros2_pkg run_me.bash
# or
ros2 run my_ros2_pkg run_me.bash -m hello
Usage:
$ ros2 launch my_ros2_pkg demo.launch.py -s
'msg_to_print':
Message to print.
(default: 'hello')
Run:
ros2 launch my_ros2_pkg demo.launch.py
# or
ros2 launch my_ros2_pkg demo.launch.py msg_to_print:=bye