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

Geoffviola ros.discourse at gmail.com
Tue Dec 20 16:02:36 UTC 2016




I was taking a look at https://github.com/ros2/ros2/wiki/Beta1-Overview and http://design.ros2.org/articles/interface_definition.html. I noticed that there were additions to the .msg format and I started thinking of another addition.

I propose adding an optional tag in front of the field type in the .msg format.

I know users generally assign a sentinel value (i.e. NaN or 0xFFFF), when there no value is present; but it would be more semantic to build it into the message.

In C++14, it could be implemented in the experimental optional implementation. Then, when the code base moves to C++17, the experimental tag could be removed.

It might be useful for making different measurements in a compatible format. For example, my 1D gyro could produce a 9D imu message with just that one optional measurement field filled in.






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




More information about the ros-users mailing list