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

rqt_bag ignores latched topic flag #357

Closed
gdlg opened this issue Mar 8, 2016 · 1 comment
Closed

rqt_bag ignores latched topic flag #357

gdlg opened this issue Mar 8, 2016 · 1 comment

Comments

@gdlg
Copy link

gdlg commented Mar 8, 2016

Hi,

rqt_bag treats latched topics as if they were not latched. This is the case both for recording and playing a bag file. In constrast, both recording and playing work as expected with rosbag.

I attached two .bag files to this report. test_rosbag.bag was recorded with "rosbag record" and contains information about latched topic. test_rqt_bag.bag was recorded with rqt_bag and misses the information.

test_bags.zip

Each .bag has two example topics:

  • /chatter_no_latch sends one message every 100ms;
  • /chatter_latch sends one latched message at the beginning. The topic is only latched in the rosbag version (since rqt_bag ignores the latch flag).

Here is the connection info header as seen in the function rosbag.bag._BagReader200.seek_and_read_message_data_record:
for test_rqt_bag.bag:
{u'topic': '/chatter_no_latch', u'message_definition': 'string data\n\n', u'md5sum': '992ce8a1687cec8c8bd883ec73ca41d1', u'type': 'std_msgs/String'}
and for test_rosbag.bag:
{u'message_definition': 'string data\n', u'callerid': '/talker', u'latching': '0', u'md5sum': '992ce8a1687cec8c8bd883ec73ca41d1', u'topic': '/chatter_no_latch', u'type': 'std_msgs/String'}

I wrote a quick fix in Jade to replay latched topics correctly (I didn't look at the recording issue). Unfortunately this is slightly complicated because the latch flag is not directly available through the Python interface of rosbag.bag. I am not sure how to proceed. I assume that I should open an issue for ros/ros_comm to add latch support to its interface before landing any fix to rqt_bag itself.

Thank you

@dirk-thomas
Copy link
Contributor

This issue was moved to ros-visualization/rqt_bag#11

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

2 participants