-
Notifications
You must be signed in to change notification settings - Fork 507
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
Non standard msg modules #735
Non standard msg modules #735
Conversation
@zflat At the risk of sounding like I'm answering your question by saying "why don't you do it the default way ever other package does it" - I am wondering what pushed you to need the custom submodule naming? You can already control the package name and the message names; does the submodule name get you additional naming that is necessary? |
I am not the author of the messages package that I need to interface with. Also, the code I am adding is not complex and it makes less assumptions than the "only one way to do it" approach. |
@amacneil Can I please get a review of this bug fix? |
@jtbandes Is the rolling CI failure a known issue? LGTM otherwise. |
Rolling should be fixed if you rebase on #746 |
31566ea
to
fb5aeff
Compare
@defunctzombie @jtbandes I rebased and pushed but there still is a failure in CI. I have seen that failure in other recent CI builds but it seems to be an intermittent failure. |
This is a bug fix relating to parsing the python module and class names of message and service type strings when non-standard submodule naming is used. I have an application that has generated messages in a namespace that is not msg. For example, I want to subscribe to a message type 'my_package_interface/msg_core/MyMessage'. However, the ros_loader.py method _get_msg_class discards submodule information 'msg_core' and assumes the subname will be named 'msg' causing an InvalidModuleException to be raised. I like that the message type parsing is flexible and able to accommodate ROS1 style types that don't have a submodule subname in the type string. However, I think that logic is too strict because it assumes the submodule subname and prevents any naming other than msg. Note that I am trying to use the term "submodule" as it is used in https://docs.python.org/3/tutorial/modules.html even though it could be confused with git submodule. Co-authored-by: William Wedler <william.wedler@resquared.com>
Public API Changes
None
Description
This is a bug fix relating to parsing the python module and class names of message and service type strings when non-standard submodule naming is used.
I have an application that has generated messages in a namespace that is not
msg
. For example, I want to subscribe to a message type'my_package_interface/msg_core/MyMessage'
. However, theros_loader.py
method_get_msg_class
discards submodule information'msg_core'
and assumes the subname will be named'msg'
causing anInvalidModuleException
to be raised.I like that the message type parsing is flexible and able to accommodate ROS1 style types that don't have a submodule subname in the type string. However, I think that logic is too strict because it assumes the submodule subname and prevents any naming other than
msg
.Note that I am trying to use the term "submodule" as it is used in https://docs.python.org/3/tutorial/modules.html even though it could be confused with
git submodule
.