Optional Fields in ROS Messages
Is there a way in ROS messages to have optional fields? I'm having a little trouble finding an answer to this or if there is any other method to make this possible.
For example, I would like to define a message that has 10 fields and sometimes only fill out 5 of those fields and publish the message. The issue is that the user on the other side does not have a way of knowing whether these 5 fields have been filled out or not and thus may pull garbage from some of the fields. There may be ways to get around it, such as define another variable that somehow signifies to the user that only a certain subset of data is filled out (they would know through the documentation).
I was wondering if there is any ROS-specific way of doing this that I've overlooked, if there are any plans to implement something like this, or if there are any suggestions people might have on how to do it?
Thanks!
Has any progress been made on supporting optional fields?