Skip to content
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

fix rosmsg show from bag #1006

Merged
merged 1 commit into from
May 22, 2017
Merged

fix rosmsg show from bag #1006

merged 1 commit into from
May 22, 2017

Conversation

dirk-thomas
Copy link
Member

Fixes #1002.

@kvalev
Copy link

kvalev commented Feb 28, 2017

This fix did not work for me - I dont have the type locally, so RosPack cannot find it:

$ rosmsg show -b my.bag packageYYY/messageZZZ
Unable to load msg [packageYYY/messageZZZ]: Cannot locate message [messageZZZ]: unknown package [packageYYY] on search path [....]

What does fix the problem for me is just printing the full text of pytype:

          datatype, _, _, _, pytype = msg
           if datatype == arg:
               print(pytype._full_text)
               break

@dirk-thomas
Copy link
Member Author

I only tried the patch with a message which was available on the system.

The snippet you posted does not take the --raw option into account. I updated the patch to support messages not available on the system and handle --raw but the change depends on a change to genpy to expose the specs for the dynamically created message (see ros/genpy#75).

@kvalev
Copy link

kvalev commented Feb 28, 2017

Right, I forgot about the --raw option... I tested the changes locally (both with and without --raw) and it works as expected. 👍

@dirk-thomas
Copy link
Member Author

dirk-thomas commented Feb 28, 2017

Thanks for trying the patch and reporting back!

@dirk-thomas
Copy link
Member Author

dirk-thomas commented Mar 2, 2017

This needs to wait until ros/genpy#75 has been released and can be backported to Kinetic.

@dirk-thomas dirk-thomas force-pushed the fix_rosmsg_show_from_bag branch from 75581e7 to 0d4d664 Compare March 24, 2017 14:54
@dirk-thomas dirk-thomas merged commit 7fa158c into lunar-devel May 22, 2017
@dirk-thomas dirk-thomas deleted the fix_rosmsg_show_from_bag branch May 22, 2017 16:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants