Skip to content
This repository was archived by the owner on May 31, 2025. It is now read-only.

keep connection header information in rosbag operations (#679, #685)#1372

Merged
mikepurvis merged 1 commit intoros:melodic-develfrom
ddimarco:fix/rosbag-latched-topics
Apr 24, 2018
Merged

keep connection header information in rosbag operations (#679, #685)#1372
mikepurvis merged 1 commit intoros:melodic-develfrom
ddimarco:fix/rosbag-latched-topics

Conversation

@ddimarco
Copy link
Copy Markdown
Contributor

This PR provides a fix for the issue that rosbag filter & rosbag compress removes latching information from topic connection headers.
See #679 for a nice description. This PR is based on that discussion, but follows a slightly different implementation.

You can see the difference by using this script (the script needs the patched code to access the bag headers):

# using current kinetic-devel branch
$ rosbag compress test_rosbag.bag --output-dir /tmp/
$ show_bag_headers.py /tmp/test_rosbag.bag           
/chatter_no_latch: {u'topic': '/chatter_no_latch', u'message_definition': 'string data\n', u'md5sum': '992ce8a1687cec8c8bd883ec73ca41d1', u'type': 'std_msgs/String'}
/chatter_latch: {u'topic': '/chatter_latch', u'message_definition': 'string data\n', u'md5sum': '992ce8a1687cec8c8bd883ec73ca41d1', u'type': 'std_msgs/String'}

# this PR
$ rosbag compress test_rosbag.bag --output-dir /tmp/
$ show_bag_headers.py /tmp/test_rosbag.bag           
/chatter_no_latch: {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'}
/chatter_latch: {u'message_definition': 'string data\n', u'callerid': '/talker', u'latching': '1', u'md5sum': '992ce8a1687cec8c8bd883ec73ca41d1', u'topic': '/chatter_latch', u'type': 'std_msgs/String'}

@mikepurvis mikepurvis changed the base branch from kinetic-devel to melodic-devel April 24, 2018 14:16
@mikepurvis mikepurvis changed the base branch from melodic-devel to kinetic-devel April 24, 2018 14:19
…#685)

* add parameter to return/write connection header to read/write method

* update rosbag operations to use it
@mikepurvis mikepurvis force-pushed the fix/rosbag-latched-topics branch from 14a504a to 51d3842 Compare April 24, 2018 14:24
@mikepurvis mikepurvis changed the base branch from kinetic-devel to melodic-devel April 24, 2018 14:24
@mikepurvis
Copy link
Copy Markdown
Member

Looks like a good change; I've rebased it onto melodic-devel. 👍

@mikepurvis
Copy link
Copy Markdown
Member

Remaining failure on Bionic is a known-flaky test. LGTM.

@mikepurvis mikepurvis merged commit 752cf1f into ros:melodic-devel Apr 24, 2018
@plusk01
Copy link
Copy Markdown

plusk01 commented May 11, 2018

Will this be seen in kinetic, or just melodic?

raise NotImplementedError()

def read_messages(self, topics, start_time, end_time, connection_filter, raw):
def read_messages(self, topics, start_time, end_time, connection_filter, raw, return_connection_header):
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no reason to break the API signature here. The new argument should be made optional. See first commit on #1473.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants