[ros-users] rxbag 'raw view' of sensor_msgs/Image topic bug

Patrick Bouffard bouffard at eecs.berkeley.edu
Mon Jun 14 22:26:19 UTC 2010


I'm using rxbag (in boxturtle) to look at a bagfile that contains a
topic with sensor_msgs/Image messages. I'm interested in the
timestamps of these messages so I'm looking at the 'raw' view. When I
do that and move the time slider, the following gets repeatedly dumped
to the console:

UnicodeDecodeError: 'utf8' codec can't decode byte 0xaa in position 9:
unexpected code byte
Traceback (most recent call last):
  File "/opt/ros/boxturtle/ros/tools/experimental/rxbag/src/rxbag/util/layer.py",
line 259, in on_timer
    layer.paint_to_bitmap()
  File "/opt/ros/boxturtle/ros/tools/experimental/rxbag/src/rxbag/util/layer.py",
line 143, in paint_to_bitmap
    self.paint(dc)
  File "/opt/ros/boxturtle/ros/tools/experimental/rxbag/src/rxbag/raw_view.py",
line 87, in paint
    self.msg_tree.set_msg(self.msg_index, self.msg_stamp, self.msg_incoming)
  File "/opt/ros/boxturtle/ros/tools/experimental/rxbag/src/rxbag/raw_view.py",
line 128, in set_msg
    self._add_msg_object(None, '', 'msg', msg, msg._type)
  File "/opt/ros/boxturtle/ros/tools/experimental/rxbag/src/rxbag/raw_view.py",
line 240, in _add_msg_object
    self._add_msg_object(item, subpath, subobj_name, subobj, subobj_type)
  File "/opt/ros/boxturtle/ros/tools/experimental/rxbag/src/rxbag/raw_view.py",
line 219, in _add_msg_object
    item = self.AppendItem(parent, label)
  File "/usr/lib/python2.6/dist-packages/wx-2.8-gtk2-unicode/wx/_controls.py",
line 5469, in AppendItem
    return _controls_.TreeCtrl_AppendItem(*args, **kwargs)
  File "/usr/lib/python2.6/encodings/utf_8.py", line 16, in decode
    return codecs.utf_8_decode(input, errors, True)

.. and the raw data window does not update, except for first line
(i.e. "Fri May 28 13:21:24 2010 #871").

Note that Cturtle doesn't seem to have this problem, looking at the
same bagfile.

I'm guessing what's happening is that it's barfing on the data field
of the message, which can contain arbitrary characters, some of which
must be running afoul of the unicode converter. I'm not sure if there
are any cases where you'd want to actually try to print an array of
uint8's in the raw view, but I would think that std_msgs/Image is
common enough that it could be special-cased to avoid this problem.

Hmm, taking a look at trac.. I'm not sure but it sounds like
https://code.ros.org/trac/ros/ticket/2477 may have already fixed this.
Will this be backported to boxturtle?

Cheers,
Pat



More information about the ros-users mailing list