-
Notifications
You must be signed in to change notification settings - Fork 144
Description
Hello,
I'm designing a GUI tool to inspect ros2 interfaces (in Python).
To get interface definitions, I'm mainly using get_fields_and_field_types() and SLOT_TYPES. I don't know, why things have been designed as they are, but I'd like to propose some additions/enhancements:
-
Being able to get constants. For now, I need to check all upper-cased class variables and sort out "SLOT_TYPES" to get all constants, defined in the interface definition. This could be made alot more easy by providing a function
get_constants()which returns a list of all the constants defined in the interface. -
Being able to get the raw interface definition as a string. A lot of interface definitions have more to them then constants, fields types and values. The often have comments, which describe, what the intention of a specific field is. As a start, it would be helpful to get the entire definition as a raw string.
-
Have get_fields_and_field_types() to not return only a dict that has strings as values, but the actual definitions, that are inside SLOT_TYPES. This seems a bit convoluted to me. This makes it harder to traverse through a tree of interface definitions. What is the benefit of knowing that a field type is "geometry_msgs/PoseStamped" instead of directly having the class reference there?
As I said, there might be more to it than I see right now, and I'd be happy to hear, what the reasons are behind some design decisions. Furthermore, I'd be happy to contribute code regarding these features via a PR, but I might need help that points me in the direction, where the contribution belong to.
Thanks