Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
ktkt2020 opened this issue Dec 8, 2020 · 4 comments
Closed

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

ktkt2020 opened this issue Dec 8, 2020 · 4 comments

Comments

@ktkt2020
Copy link

ktkt2020 commented Dec 8, 2020

It seems the _mergesort function in the rosbag.bag was replaced by heapq.merge (ros/ros_comm#2017).
But in the current version

for entry, _ in bag._mergesort(bag_entries, key=lambda entry: entry.time):

and
for entry, it in bag._mergesort(bag_entries, key=lambda entry: entry.time):

the old function was still called.
This might cause the timeline to show incorrectly.

@zgxsin
Copy link

zgxsin commented Dec 18, 2020

I am facing the same issue here.

@BurryChen
Copy link

I have the same issue.

@ktkt2020
Copy link
Author

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 added a commit to magazino/rqt_bag that referenced this issue Feb 1, 2021
As noted in ros-visualization#90, the previously used function was removed in ros_comm.

This makes rqt_bag usable again on ROS Noetic and is compatible with
Python 2 distros.
@MichaelGrupp
Copy link
Contributor

I created a pull request with a fix: #93

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants