Skip to content

Conversation

InvincibleRMC
Copy link
Contributor

Description

In Draft state since there are downstream rmw problems (tested with fastrps). I assume similar problems will occur with other rmw implementations.

For example calling .size() on the const class std::optional<std::__cxx11::basic_string<char> >

// Member: optional_string
  current_alignment += padding +
    eprosima::fastcdr::Cdr::alignment(current_alignment, padding) +
    (ros_message.optional_string.size() + 1);

A similar problem occurs with containers.

Fixes #850

Is this user-facing behavior change?

Since this adds optionals users will not have any breaking changes.

Did you use Generative AI?

Additional Information

Signed-off-by: Michael Carlstrom <[email protected]>
Signed-off-by: Michael Carlstrom <[email protected]>
Signed-off-by: Michael Carlstrom <[email protected]>
@InvincibleRMC InvincibleRMC marked this pull request as draft July 29, 2025 23:51
Signed-off-by: Michael Carlstrom <[email protected]>
@InvincibleRMC
Copy link
Contributor Author

I believe this is as far this PR can go without updating each of the dds rosidl_typesupport_**_cpp. I'm not sure if it is better to merge this and then update them. Update them then merge this. Or try and so some simultaneous merge. The only downstream change would effect if people had already added the @optional annotation.

@InvincibleRMC InvincibleRMC marked this pull request as ready for review July 30, 2025 18:47
@InvincibleRMC
Copy link
Contributor Author

Found a bug in container type_traits working on a fix.

@InvincibleRMC InvincibleRMC marked this pull request as draft July 31, 2025 03:00
InvincibleRMC and others added 20 commits July 31, 2025 23:13
Signed-off-by: Michael Carlstrom <[email protected]>
Co-authored-by: William Woodall <[email protected]>
Signed-off-by: Michael Carlstrom <[email protected]>
Signed-off-by: Michael Carlstrom <[email protected]>
Signed-off-by: Michael Carlstrom <[email protected]>
Signed-off-by: Michael Carlstrom <[email protected]>
Signed-off-by: Michael Carlstrom <[email protected]>
Signed-off-by: Michael Carlstrom <[email protected]>
Signed-off-by: Michael Carlstrom <[email protected]>
Signed-off-by: Michael Carlstrom <[email protected]>
Signed-off-by: Chris Lalancette <[email protected]>
Signed-off-by: Michael Carlstrom <[email protected]>
Signed-off-by: Michael Carlstrom <[email protected]>
Signed-off-by: Michael Carlstrom <[email protected]>
Co-authored-by: William Woodall <[email protected]>
Signed-off-by: Michael Carlstrom <[email protected]>
Signed-off-by: Michael Carlstrom <[email protected]>
Signed-off-by: Michael Carlstrom <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature Request: Optional Attributes
2 participants