ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

The MD5 checksum is generated from the ROS message definition, i.e. from a file with ending .msg. It must stay constant for each message and is generated by the message generator, i.e. by the tool that translates .msg files in .h files or .py files. The MD5 sum is used to prevent the system from exchanging incompatible data which could lead to subtle bugs or severe errors.

Note that you shouldn't create your Object message inside std_msgs but create a new ROS package for your specific message. The reason is that you should not modify existing ROS packages that are installed from debian packages.

What exactly is the reason for using the ROS middleware for exchanging classes? In your specific case, if you do not need any other ROS features, might using a simple socket maybe be possible? If not, I suggest to define Object as a ROS message that maybe contains just a byte array. For instance, Object.msg could look like this:

byte[] blob

This will create an array undefined size. The serialized message will also be really simple. The layout will be:

<length of blob + 4> <length of blob> <byte1> <byte2> ...

Generally, the message first contains the number of bytes of the message. For dynamic arrays and strings, the first 32 bit specify the length and the rest is the data.