How to orchestrate automatic multiple (non-)ros component based system start?
Problem/Scenario
I am trying implement a way to automatically bootstrap/start a complex system that uses diverse _ros_ and _non-ros_ components. My web-search lead me to roslaunch, which seems to be most suitable for this task (is it?). However, I encountered several problems during the creation of a preliminary launchfile and general system setup. My goal is to compare the capabilities of ROS with those of a new framework created within the scope of my current research.
My question:
Is there a best practice or recommended approach to realise such a system startup when using mixed ros and non-ros components? Or does this scenario not really fit well with the ROS framework and should be implemented independently?
Exemplary encountered issues:
Some components require to access log files of other components during run time (e.g. live plotting of non-ros components). I found out that there is a run_id in the log folder but there seems to be no way to find out what the current roslaunch run_id is (e.g. via env variables).
Organisation/Orchestration of components (some need to run after others have finished or only under certain circumstances) seems to be impossible with using just roslaunch. Further, using the if tag also seems impossible as there is no way to assess if and when a component is running. From what I gathered, heavy shell/script hacks need to be done.
Please refer to:
wiki.ros.org/roslaunch Proposed Features problem
- "Dependencies: "launch prog X once Y is running""
- "Allow binaries that are not in ros packages to be roslaunched"
wiki.ros.org/roslaunch/XML Evaluation Order problem:
- "Tags are evaluated serially and the last setting wins."
Thus, re-use seems to be unfeasible, because scripts and hacks will lead into a "black hole" and never allow me to reuse any of the scripts without manually adjusting component specific sleeps or waits.