0
$\begingroup$

Rosanswers logo

In my project, there are two main computing boards connected to a laptop. The laptop has a master ROS server, and the boards have slave servers. What I want to accomplish is that when boards are turned on, they would automatically launch their nodes while still maintaining the connection to the laptop.

So far I only made a roslaunch file in a host laptop, a file that contains information about machines and nodes to run. And I installed robot_upstart in the host so that ros server as well as the nodes written in the host can be run at startup. So If I want the same thing to happen to the two boards while the three machines stay connected to each other, what should I do?

Thanks for any help.


Originally posted by chanhyeoni on ROS Answers with karma: 62 on 2018-01-26

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

Just to check that I've understood the problem. Your trying to find a way for the slave machines to wait until the master is up and running on the laptop and then to start their own launch files.

Another question is how are these computers networked, ethernet or wifi?

You should be able to do this will a bash script which is executed when the network connection to the laptop is opened. This script could check if the master is running once every few seconds and then run the launch file when it it is.

The bash script could try and launch one of the standard ROS nodes it should fail with error code 1 if it can't connect to the master. This is one way of testing if a master can be reached, there may be a better way of doing this. When this detects the master is up and running it just needs to run roslaunch and you're away.

Hope this helps.


Originally posted by PeteBlackerThe3rd with karma: 9529 on 2018-01-28

This answer was ACCEPTED on the original site

Post score: 0


Original comments

Comment by gvdhoorn on 2018-01-28:
Wouldn't a multi-master setup make more sense here? That way it doesn't matter which board/computer/laptop is started first.

Comment by PeteBlackerThe3rd on 2018-01-28:
That would definitely be an option. I've never setup such a system myself.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.