Skip to content
This repository was archived by the owner on May 31, 2025. It is now read-only.

fix rosmsg show from bag - #1006

Merged
dirk-thomas merged 1 commit into
lunar-develfrom
fix_rosmsg_show_from_bag
May 22, 2017
Merged

dirk-thomas merged 1 commit into
lunar-develfrom
fix_rosmsg_show_from_bag

Conversation

@dirk-thomas

Copy link
Copy Markdown
Member

Fixes #1002.

@kvalev

kvalev commented Feb 28, 2017 •

Copy link
Copy Markdown

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
Copy Markdown
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

kvalev commented Feb 28, 2017

Copy link
Copy Markdown

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

@dirk-thomas

dirk-thomas commented Feb 28, 2017 •

Copy link
Copy Markdown
Member Author

Thanks for trying the patch and reporting back!

@dirk-thomas

dirk-thomas commented Mar 2, 2017 •

Copy link
Copy Markdown
Member Author

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 subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants