ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
2

rqt_bag rosbag exception

asked 2020-12-29 02:40:09 -0500

rbed23 gravatar image

Hello, Im getting the following exception error thrown WHILE running rqt_bag, after opening the bag file I want to replay:

Exception in thread Thread-8:

Traceback (most recent call last):
File "/usr/lib/python3.8/threading.py", line 932, in _bootstrap_inner self.run()
File "/opt/ros/noetic/lib/python3/dist-packages/rqt_bag/index_cache_thread.py", line 67, in run updated |= (self.timeline._update_index_cache(topic) [greater than] 0)
File "/opt/ros/noetic/lib/python3/dist-packages/rqt_bag/timeline_frame.py", line 838, in _update_index_cache for entry in self.scene().get_entries(topic, start_time, end_time):
File "/opt/ros/noetic/lib/python3/dist-packages/rqt_bag/bag_timeline.py", line 273, in get_entries for entry, _ in bag._mergesort(bag_entries, key=lambda entry: entry.time):

AttributeError: module 'rosbag.bag' has no attribute '_mergesort'

When liine 253 from bag_timeline.py explicity states from rosbag import bag # for _mergesort (???)

rqt_bag runs, except I cannot see the bag playbag msgs displayed (from either of 2 topics) within the playback bar.

PARAMETERS

  • /rosdistro: noetic

  • /rosversion: 1.15.9

  • WSL2 Ubuntu 20.04.01

  • rqt version 0.5.2

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2021-01-07 07:54:26 -0500

schmaelle gravatar image

Hi, had the same issue. This seems to be the root cause:

rqt_issue #90

As quickfix I undo the changes of this commit Use heapq.merge instead of custom merge sort code (#2017) until issue is resolved.

edit flag offensive delete link more

Comments

So this means, reinstalling the ROS from the source code given the suggested change?!

Ben222 gravatar image Ben222  ( 2021-01-09 02:13:32 -0500 )edit
1

Well, I did it quite simple and changed it manually within /opt/ros/noetic/lib/python3/dist-packages/bag.py directly (with sudo). Worked for me, but I did not do any crosschecks for other functionalities.

schmaelle gravatar image schmaelle  ( 2021-01-11 12:28:22 -0500 )edit

Thanks, it's fixed!

Ben222 gravatar image Ben222  ( 2021-01-11 15:05:01 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2020-12-29 02:40:09 -0500

Seen: 718 times

Last updated: Dec 29 '20