ros-visualization / rqt_bag

http://wiki.ros.org/rqt_bag
31 stars 55 forks source link

rqt_bag ignores latched topic flag #11

Open dirk-thomas opened 7 years ago

dirk-thomas commented 7 years ago

From @gdlg on March 8, 2016 20:11

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:

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

_Copied from original issue: ros-visualization/rqt_commonplugins#357