-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
expose spec for dynamically generated messages #75
Conversation
@ros-pull-request-builder retest this please |
@@ -190,6 +190,7 @@ def generate_dynamic(core_type, msg_cat): | |||
messages[t] = getattr(mod, _gen_dyn_name(pkg, s_type)) | |||
except AttributeError: | |||
raise MsgGenerationException("cannot retrieve message class for %s/%s: %s"%(pkg, s_type, _gen_dyn_name(pkg, s_type))) | |||
messages[t]._spec = specs[t] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could you point me to where the _spec
slot/attribute is defined ? I can't find it in the generated python modules or the genpy.Message
class. Is it equivalent to _full_text
in the generated classes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The instance is a generated class. It doesn't have that attribute before. _full_text
contains the plain text of the message, _spec
contains the parsed MsgSpec instance for the message.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok that explains what I couldn't find it in the generated code then. Thanks for clarifying 👍
@ros/ros_team Please review. |
Isn't @mikaelarguedas already reviewing it? |
I am still waiting for an approval on this. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh sorry for not approving explicitely. It does look good to me.
Required for ros/ros_comm#1006.
@ros/ros_team Please review.