Process Manager allows to dynamically invoke programs (processes), including ROS executables, ROS launch files and regular executables. Each requested program is a resource that Process Manager is managing.
Install the Process Manager package
cd catkin_ws/src
git clone https://github.com/temoto-framework/temoto_process_manager
See this example of how Process Manager can be embedded in your code.