rosidl
rosidl copied to clipboard
Feature Request: Optional Attributes
DDS supports the optional attribute in IDL 4.2 specification attribute section 8.3.1.3. In C++, now that we have C++17, we can use std::optional.
A prior dicussion is here: https://discourse.ros.org/t/optional-fields-in-message/991/16
Consider adding a @optional specifier to rosidl that translates to the DDS optional .
Amend the ROS 2 design documentation for Standardized Annotations to add optional:
https://design.ros2.org/articles/idl_interface_definition.html
It's supported by:
Workarounds: Bounded array with a max length of 1, but the syntax is funky.