-
Notifications
You must be signed in to change notification settings - Fork 8
Description
Hey @ijnek,
Following up on our exchange on LinkedIn about enhancing launch_graph, I’d like to propose moving forward with the ExecuteProcess action. This would be a valuable addition for running arbitrary shell commands or external programs, helping to streamline common ROS 2 workflows.
I’m ready to start working on this feature and would love to align with you on the best approach for integration.
Motivation
Currently, launch_graph focuses on launching ROS nodes and managing launch descriptions but does not provide a straightforward way to execute arbitrary external processes within the graph. Many practical use cases involve running shell commands, scripts, or auxiliary tools alongside ROS nodes during launch.
Adding a simple ExecuteProcess action would:
- Enable users to include external commands in their launch workflows.
- Allow capturing process outputs and exit codes for basic error handling.
- Facilitate integration of non-ROS tools or scripts without leaving the launch graph context.
Proposed Implementation
- Introduce a new
ExecuteProcessaction class (e.g., inlaunch_graph/process_execute.py) that accepts:command: the executable and its arguments (list or string).- Optional parameters such as
env(environment variables),cwd(working directory), andcapture_output(to capture stdout/stderr).
- Integrate
ExecuteProcessnodes into the existing graph framework so they can be added and visualized alongside other actions likeNodeandGroupAction. - Update graph traversal and visualization logic to recognize
ExecuteProcessnodes, possibly using a distinct shape for clarity.
Expected Impact
This addition would provide a straightforward and practical way to visualize external processes launched using ExecuteProcess action
Thanks again for the great project and the opportunity to collaborate! Once we align on the implementation approach, I’ll start working on the feature and submit a PR.