Re: [ros-users] Multi-robot communication

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Brian Gerkey
Date:  
To: ros-users
Subject: Re: [ros-users] Multi-robot communication
2010/7/12 Gonçalo Cabrita <>:
> 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.