ros-visualization / rqt_bag

http://wiki.ros.org/rqt_bag
28 stars 52 forks source link

Crashes with Humble rosbag due to float/int mismatch #130

Closed Nate711 closed 1 year ago

Nate711 commented 1 year ago

It seems that all the qt painter functions like drawRect, drawLine etc want integer x and y coordinates, but rqt_bag is clearly passing float values such as in this function: https://github.com/ros-visualization/rqt_bag/blob/059a2213a0a71d2e07fa6f66e39e0b8da2fa5d75/rqt_bag/src/rqt_bag/timeline_frame.py#L914

I feel like I must be doing something wrong for rqt_bag to fail so fundamentally.

rqt_bag rosbag2_2022_10_16-00_42_59/
libGL error: pci id for fd 44: 1ab8:0010, driver (null)
pci id for fd 45: 1ab8:0010, driver (null)
Traceback (most recent call last):
  File "/opt/ros/humble/lib/python3.10/site-packages/rqt_bag/timeline_frame.py", line 297, in paint
    self._draw_time_divisions(painter)
  File "/opt/ros/humble/lib/python3.10/site-packages/rqt_bag/timeline_frame.py", line 652, in _draw_time_divisions
    self._draw_major_divisions(painter, major_stamps, start_stamp, major_division)
  File "/opt/ros/humble/lib/python3.10/site-packages/rqt_bag/timeline_frame.py", line 678, in _draw_major_divisions
    painter.drawText(label_x, label_y, label)
TypeError: arguments did not match any overloaded call:
  drawText(self, Union[QPointF, QPoint], str): argument 1 has unexpected type 'float'
  drawText(self, QRectF, int, str): argument 1 has unexpected type 'float'
  drawText(self, QRect, int, str): argument 1 has unexpected type 'float'
  drawText(self, QRectF, str, option: QTextOption = QTextOption()): argument 1 has unexpected type 'float'
  drawText(self, QPoint, str): argument 1 has unexpected type 'float'
  drawText(self, int, int, int, int, int, str): argument 1 has unexpected type 'float'
  drawText(self, int, int, str): argument 1 has unexpected type 'float'
Nate711 commented 1 year ago

Does rqt_bag require python2?

Nate711 commented 1 year ago

Ah seems like I didn't see the Humble branch of rqt_bag. I'll try that