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

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

Merged
merged 1 commit into from Apr 24, 2018

Conversation

ddimarco
Copy link
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 changed the base branch from kinetic-devel to melodic-devel April 24, 2018 14:24
@mikepurvis
Copy link
Member

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

@mikepurvis
Copy link
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

plusk01 commented May 11, 2018

Will this be seen in kinetic, or just melodic?

@@ -1725,7 +1736,7 @@ def __init__(self, bag):
def start_reading(self):
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
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 join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants