ros-visualization / rqt_bag

http://wiki.ros.org/rqt_bag
29 stars 53 forks source link

Timeline not displayed due to no '_mergesort' function #90

Closed ktkt2020 closed 3 years ago

ktkt2020 commented 3 years ago

It seems the _mergesort function in the rosbag.bag was replaced by heapq.merge (https://github.com/ros/ros_comm/pull/2017). But in the current version https://github.com/ros-visualization/rqt_bag/blob/b36db71b0af957853a113b9336f5929a5c4d7fc3/rqt_bag/src/rqt_bag/bag_timeline.py#L273 and https://github.com/ros-visualization/rqt_bag/blob/b36db71b0af957853a113b9336f5929a5c4d7fc3/rqt_bag/src/rqt_bag/bag_timeline.py#L303 the old function was still called. This might cause the timeline to show incorrectly.

zgxsin commented 3 years ago

I am facing the same issue here.

BurryChen commented 3 years ago

I have the same issue.

ktkt2020 commented 3 years ago

Adding the original _mergesort function back to rosbag/bag.py could temporarily help to show the Timeline (root permission required for the apt-installed ROS). Perhaps an adaptation of heapq.merge might be required for ROS1's rqt_bag.

https://github.com/ros/ros_comm/blob/47ad91df5cf0a60f29140be21e78b1587d0adf98/tools/rosbag/src/rosbag/bag.py#L2906:L2968

MichaelGrupp commented 3 years ago

I created a pull request with a fix: #93