Skip to content

TommyChangUMD/ros2-launch-any-executable

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 

Repository files navigation

ros2_launch_any_executable

This ROS 2 package shows how you can launch (or package) any excutable, including bash scripts.

How to compile

colcon build --packages-select my_ros2_pkg
source install/setup.bash

How to run the executable using ROS 2 run

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

How to run the executable using ROS 2 launch

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

References

https://roboticsbackend.com/ros2-launch-file-example/

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published