Ask Your Question
0

how to automatically launch all ros nodes in multiple machines?

asked 2018-01-26 13:33:26 -0500

chanhyeoni gravatar image

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.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2018-01-28 05:46:33 -0500

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.

edit flag offensive delete link more

Comments

Wouldn't a multi-master setup make more sense here? That way it doesn't matter which board/computer/laptop is started first.

gvdhoorn gravatar imagegvdhoorn ( 2018-01-28 05:49:47 -0500 )edit

That would definitely be an option. I've never setup such a system myself.

PeteBlackerThe3rd gravatar imagePeteBlackerThe3rd ( 2018-01-28 05:52:48 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2018-01-26 13:33:26 -0500

Seen: 347 times

Last updated: Jan 28 '18