Set up of custom messages

asked 2017-03-20 07:27:27 -0500

JayDe gravatar image


I have a general question on how to best set up my messages. Imagine the following scenario: Suppose I have a message describing a track for an object, for example:

Header header
uint16 id
int64 age
float64[] confidence
Object object

where the object itself contains data about its position, maybe its point cloud (could be big) and so on.

Now, there could be several nodes calculating further information on the object resulting in attributes. The calculation of an attribute A might also benefit from another calculated attribute B, but it could also function without it. That is, the node calculating A might want to be somewhat flexibel on the information it receives.

I now see two possibilities:

  1. We put the attributes into the Object message
  2. We create a separate Attribute.msg

In the first case I imagine we have to send around a lot of track messages between nodes, that might only differ in the presence of an attribute. In the second case nodes might have to synchronize track messages and attribute messages to figure out what object an attribute belongs to.

Is it possible to say which scenario should be preferred? Is it very costly to create (and send around) all these track messages that only differ slightly?

edit retag flag offensive close merge delete