DFKI-NI / rospy_message_converter

Converts between Python dictionaries and JSON to ROS messages.
BSD 3-Clause "New" or "Revised" License
226 stars 101 forks source link

Modifies the use of __slots__ for get_fields_and_field_types method #64

Closed Voldivh closed 1 year ago

Voldivh commented 1 year ago

Summary

The attribute __slots__ from a message represents all the attributes from the python class for that message, not only the field names of each component from the message structure. So far, this shouldn't impose any issue, however, taking into account the upcoming modifications from this PR in the rosidl_python package, the current use of the attribute in the message_converter.py file would be affected and therefore, break something.

This PR solves that issue by modifying the use of __slots__ for the appropriate method to retrieve the field names and types get_fields_and_field_types().

mintar commented 1 year ago

Thanks!