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

Incorrect number of messages obtained using read_messages() #2343

Open
Mentaixg opened this issue Aug 23, 2023 · 0 comments
Open

Incorrect number of messages obtained using read_messages() #2343

Mentaixg opened this issue Aug 23, 2023 · 0 comments

Comments

@Mentaixg
Copy link

Mentaixg commented Aug 23, 2023

I have a problem with using read_messages() to get topic messages in rosbag.
The number of messages in my bag is 101

When I use for topic, msg, t in patch_bag_.read_messages(topics=[topic]) to obtain, the number of msg obtained is 101

But when I use for topic, msg, t in bag.read_messages(topics=[topic], start_time=rospy.Time(start_time), end_time=rospy.Time(end_time)) to specify start_time and end_time, the number of msgs obtained only 99

(Because of the problem of [https://github.com//issues/952], I used
self.bag_start_time = bag_.get_start_time() self.bag_end_time = bag_.get_end_time() for _, _, t in bag.read_messages(raw=True): self.bag_start_time = min(t.to_sec(), self.bag_start_time) self.bag_end_time = max(t.to_sec(), self.bag_end_time)
to get the time)

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

1 participant