ros-visualization / rqt_bag

http://wiki.ros.org/rqt_bag
31 stars 55 forks source link

Array in SubMessage not shown in raw-view #4

Open dirk-thomas opened 7 years ago

dirk-thomas commented 7 years ago

From @alex-gee on February 26, 2015 17:10

This issue is that i use

OuterMessage: Header header ClusterMsg[] clusters

ClusterMsg: uint8[] indices string label

But the content inside the raw view looks like in the image. If i play the bagfile and listen with "rostopic echo /labels" i can see that the array is filled correctly

Update: The problem could be the "uint8". Apparently there is some cast to (int) missing before calling the print function.

rqt_bag_issue

greetings!

_Copied from original issue: ros-visualization/rqt_commonplugins#305

dirk-thomas commented 7 years ago

The raw view in rqt_bag tries to determine the field type based on the Python type (https://github.com/ros-visualization/rqt_common_plugins/commit/6640ce2b4347f33afeba0520c1fed6d26e2cfdf6#diff-09908728fca83b95e445d7e4438e4773R193). This is simply not feasible since the logic for that is very complex. Instead it should use functions provided by genmsg or genpy to determine the type based on the actual message definition.

@ablasdel @trainman419 May be one of you guys will find some time to look into this. A good starting point might be to look how rostopic echo does it (see https://github.com/ros/ros_comm/blob/1df83085f88313bfe3cc6510690726939b157772/tools/rostopic/src/rostopic/__init__.py#L575).

dirk-thomas commented 7 years ago

From @ablasdel on March 4, 2015 19:16

This seems like a very important bug to fix but at the moment I don't have any time to show rqt any love.