You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Tracking bug for message initialization in C++ #396
In porting efforts we've run into several bugs where the zero initialized behavior is relied upon, causing bugs. Having a zero initialization method as a way to make porting less fragile would be valuable. And likely can be used in other cases when the optimization of using uninitialized constructors are not as important.
This is a tracking bug to deal with field initialization of generated message code in C++ (originally discussed in ros2/geometry2#25).
Change the generator in rosidl/rosidl_generator_cpp to include the header file from rosidl_runtime_cpp, and generate the constructor with the argument on how to initialize (Zero initialization rosidl#236)
I can't find a meta-ticket for all message initialization regardless of the language so I'm posting here. Feel free to move this comment to the relevant ticket that I couldnt find.
We originally said we didnt need to modify the Python message generation because all messages are initialized by default. But now that we offer the ability to initialize messages with only language default or with default values from msg if they exist and language zeros otherwise I think we should provide the same feature in Python
closing this now that the connected tickets have been closed / merged. @clalancette will open another ticket to track the changes that could/should be reverted in other repos now that message fields are initialized by default
Activity
clalancette commentedon Sep 6, 2017
CI:
[-]Tracking bug for message initialization[/-][+]Tracking bug for message initialization in C++[/+]mikaelarguedas commentedon Sep 15, 2017
I can't find a meta-ticket for all message initialization regardless of the language so I'm posting here. Feel free to move this comment to the relevant ticket that I couldnt find.
We originally said we didnt need to modify the Python message generation because all messages are initialized by default. But now that we offer the ability to initialize messages with only language default or with default values from msg if they exist and language zeros otherwise I think we should provide the same feature in Python
clalancette commentedon Nov 1, 2017
All of the pieces are now in, we can close this out.
mikaelarguedas commentedon Nov 1, 2017
closing this now that the connected tickets have been closed / merged.
@clalancette will open another ticket to track the changes that could/should be reverted in other repos now that message fields are initialized by default