[ros-users] [Discourse.ros.org] [Next Generation ROS] Optional Fields in Message

Brannon King ros.discourse at gmail.com
Wed Mar 15 16:39:09 UTC 2017

I have a use case for optional fields. I store a vector map. This map has a name, a few other fields, and list of polygons. The polygons are large. If I just want to rename the map, I want to be able to publish an update message that leaves the polygons unset. That would in turn be interpreted as "keep the current polygons I already know about" at the receiver. I don't want a separate update message for each map field. It seems that I would still need a separate message to update individual polygons, but I would still hope to leave fields that shouldn't change out of the message. JSON typically utilizes this principle: if a property is null for the serializer the property name isn't included and, vice-versa, when deserializing absent properties don't change the existing value in the target.

[Visit Topic](https://discourse.ros.org/t/optional-fields-in-message/991/15) or reply to this email to respond.

More information about the ros-users mailing list