Sending start command vs starting node.

asked 2019-04-11 19:14:44 -0600

I am planning to develop a system that has one master node. The master node handles different states and initiates other nodes. What is the best way to start slave nodes?

  1. The master node starts a node by calling roslaunch. In case of emergency, the master node just kills slave node with a shell command. - This in my opinion makes a whole system too complicated. You can't pass any parameters with roslaunch to the whole system. In addition, you have to use shell commands which is not good practice? Correct me if I am wrong
  2. The master node sends start message to a specific topic. In case of emergency the stop message is sent and the slave node has to stop immediately. - I feel like this is better option because we can check that all nodes startes without errors and also debugging whole system is simpler because all nodes are already running and I can pass different commands manually(e.g. start command).

What are the pros and cons? How would you approach to this problem? Ros has functionallity to start other nodes and simple google search shows that people are using it.

edit retag flag offensive close merge delete