[rostopic] Fix rostopic echo for non rosmsg field#909
[rostopic] Fix rostopic echo for non rosmsg field#909dirk-thomas merged 4 commits intoros:kinetic-develfrom
Conversation
|
If you run
Therefore I would expect
but it actually prints:
|
| def value_transform(val): | ||
| if not isinstance(val, genpy.Message): | ||
| if echo_nostr and isinstance(val, str): | ||
| return None |
There was a problem hiding this comment.
What about this instead:
return '<string length: %s>' % len(val)
| if echo_nostr and isinstance(val, str): | ||
| return None | ||
| elif echo_noarr and isinstance(val, list): | ||
| return None |
There was a problem hiding this comment.
Here I don't see how we could print the type information (<array type: ??? ...>):
return '<array length: %s>' % len(val)
|
With 47adb6d, |
|
With 9dd94cf, Before After |
|
The current patch duplicates a lot of code / logic. I would recommend to create a function like this: and call it from the two locations accordingly. |
|
This looks good to me. Thank you for providing this patch so fast. |
|
Thanks for the quick turnaround, all. |
Close #908