Skip to content

Add ExecuteProcess Action to Support External Process Execution in launch_graph visualization #2

@adharshvenkat

Description

@adharshvenkat

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 ExecuteProcess action class (e.g., in launch_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), and capture_output (to capture stdout/stderr).
  • Integrate ExecuteProcess nodes into the existing graph framework so they can be added and visualized alongside other actions like Node and GroupAction.
  • Update graph traversal and visualization logic to recognize ExecuteProcess nodes, 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions