[ros-users] Multi-robot communication
Gonçalo Cabrita
goncabrita at gmail.com
Mon Jul 12 17:13:11 UTC 2010
Hi Brian,
Thanks for your feedback.
I see what you mean... So is there any other way of doing this? Right now
this is what we've come up with...
We use olsr (http://www.olsr.org/) to get to know which robots are in our
network. This information is published as a msg over ROS. So each robot now
knows who is online. We then use foreign_relay to send ROS msgs from one
robot to the other.
I'm taking care of this part and I though it would be nice if I could write
up a ROS srv that has as inputs the ip (or ips) of the robot to send a msg
to and then an opaque msg where you can send anything. The srv would then
encapsulate the desired msg along with the ip of the sender and publish it
over foreign_relay. The receiving robot would then get the message and know
who it came from. I was aiming for a flexible node, easy to use.
However if we are to use defined types how can we accomplish this? Should we
open a foreign_relay for each topic we want to use between each 2 robots?
Thanks for the help,
Gonçalo Cabrita
ISR - University of COoimbra
Portugal
On Mon, Jul 12, 2010 at 5:57 PM, Brian Gerkey <gerkey at willowgarage.com>wrote:
> 2010/7/12 Gonçalo Cabrita <goncabrita at gmail.com>:
> > We've been working on our comm node and we have encountered a problem.
> > We are thinking about creating a ROS msg to send over foreign_relay that
> > looks like this:
> > int robot_id
> > ShapeShifter msg
> > We would like to know if ShapeShifter can be used to hold any message we
> > might want to send and if we need an extra field like msg_type or not.
>
> No, ShapeShifter is not a ROS message. It's a a C++ class that is
> used by certain tools to handle messages without knowing their types
> (and it's a pretty hacky way of doing that). All ROS messages are
> explicitly typed when sent over the wire. If you really want to send
> an opaque blob of data (not recommended, as you'd be circumventing the
> ROS marshaling support, and would lose the ability to introspect
> messages), then you can do something like:
>
> uint8[] msg
>
> brian.
> _______________________________________________
> ros-users mailing list
> ros-users at code.ros.org
> https://code.ros.org/mailman/listinfo/ros-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ros.org/pipermail/ros-users/attachments/20100712/af05baf4/attachment-0003.html>
More information about the ros-users
mailing list