Ask Your Question
1

Passing Messages between multiple roscores linked on a network

asked 2012-06-18 02:47:01 -0500

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

Hello Community, I am working on a multi-agent project using ROS as the framework on each robot. Since the robots will need to talk to eachother (pass and poll data) I was wondering how ROS could help with that. The idea is to have a similar Publisher/ Subscriber relation, over a network connection for different robots. One way to proceed would be to create UDP messages and broadcast them over the network. I wanted to get some insights about the tools/ packages/ libraries in ROS that can help with this. Your help is greatly appreciated! Thanks, Ammar Husain

edit retag flag offensive close merge delete

5 Answers

Sort by ยป oldest newest most voted
3

answered 2012-06-18 03:13:39 -0500

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

I think multimaster might be what you are looking for.

edit flag offensive delete link more
4

answered 2012-06-18 03:51:24 -0500

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

The easiest way would probably be to just use one common roscore. This works best if you have a reliable network connection between all your robots which is probably not the case.

When you want to run different roscores, make sure you have a look at the multimaster package.

edit flag offensive delete link more
2

answered 2012-06-18 05:55:06 -0500

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

There is an active Special Interest Group working on the Multimaster problem.

You may want to join that mailing list.

edit flag offensive delete link more
1

answered 2012-10-03 09:21:10 -0500

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

Multimaster is a great tool to use. However it is difficult to use tools like those within running ROS nodes. Also it is impossible to send directed messages between robots. Which makes sense since it is designed for a publish/ subscribe architecture.

A great way to get around this is to use Python-ZeroMQ. You could simply open a socket, send your ros msg object and receive it on the other end as a ros msg object. The serialization/ deserialization stuff is taken care of internally. One could potentially do serilization/ deserialization manually as well using pickle library in Python. Message me if you need help broadcasting/ unicasting messages between separate ros masters, and I could give you some code.

edit flag offensive delete link more

Comments

1

Hello Ammar, I am trying to communicate between two robot, one on ROS-fuerte and one on ROS-groovy and I think it would be simpler to go directly via the socket than use the multimaster package. Or is multimaster_experimental backward compatible enough to be used? I would appreciate any help!

hiccup gravatar imagehiccup ( 2013-04-25 09:17:44 -0500 )edit

Hi, I'm going to do something similar with c++/Python/Cython and zeroMQ, I'll like any help or Githup from you, Thanks ;-)

pablocesar gravatar imagepablocesar ( 2015-12-24 00:18:27 -0500 )edit

Hello, I am working on something similar which requires me to communicate between multiple robots. I was wondering if you can provide me any help on how to communicate between separate ros masters?

ramya gravatar imageramya ( 2016-10-17 10:17:16 -0500 )edit
0

answered 2012-06-19 00:54:08 -0500

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

Use a single common core. Each robot should be in its own name space to avoid name collisions. And then use topics to make robots talk to each other. Topics is anonymous publish/subscribe.

edit flag offensive delete link more

Comments

1

Using just a single core leads to problems as soon as your network connection is unstable since calls to advertise, subscribe, service calls and ros parameters need to communicate with the core. If the robots don't have a permanent network connection to each other one core leads to problems.

Lorenz gravatar imageLorenz ( 2012-06-19 02:08:56 -0500 )edit

Having a core per robot definitely ensures that communications inside a robot will be protected from network disconnections. But, disconnections will still be an issue for inter-robot communication even with multimaster. Isn't it?

NooTriX gravatar imageNooTriX ( 2012-06-19 03:51:22 -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: 2012-06-18 02:47:01 -0500

Seen: 3,207 times

Last updated: Oct 03 '12