Add feedback-based solution to replace the sleep call in FF1Generator
In case the user chose automatic middlware startup, the FF1Generator.java sleeps for PRE_STARTUP_SLEEP_SECONDS
before starting every node. This is for ensuring that the roscore is started first and is waiting for the middleware startup on all the nodes. If, for example, the middleware on slave yellowpi2 would be started before roscore on master yellowpi1, we would get an error as the slave cannot detect the master roscore.
An example for the automatic deployment and startup:
For a distributed platform with 3 Pis (yellowpi1
- master, yellowpi2
- slave, yellowpi3
- slave) and PRE_STARTUP_SLEEP_SECONDS
= 5:
- Sequentially deploy the FMUs on all Pis
- Start roscore on master yellowpi1
- Wait 5 seconds
- Start middleware on slave yellowpi2
- Wait 5 seconds
- Start middleware on slave yellowpi3
- Wait 5 seconds
- Start middleware on master yellowpi1
- Done
Task: Replace the sleep() call with a feedback-based solution