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

rosbag::Bag.read_messages() does not provide return_connection_header parameter on kinetic branch #1800

Closed
ricber opened this issue Sep 3, 2019 · 2 comments

Comments

@ricber
Copy link

ricber commented Sep 3, 2019

Hi,
I am launching this script (Ubuntu 16.04 - ROS Kinetic):

import rosbag

with rosbag.Bag('2019-05-24-09-53-28-high-density-imurenamed.bag', 'w') as outbag:
    for topic, msg, t, conn_header in rosbag.Bag('2019-05-24-09-53-28-high-density.bag').read_messages(return_connection_header=True):
        if topic == "/f746zg_imu/data_raw" or topic == "/f746zg_imu/mag":
            msg.header.frame_id = "nucleo_imu"
        outbag.write(topic, msg, t, connection_header=conn_header)

and I obtain the following error:

Traceback (most recent call last):
  File "rename_imu.py", line 4, in <module>
    for topic, msg, t, conn_header in rosbag.Bag('2019-05-24-09-53-28-high-density.bag').read_messages(return_connection_header=True):
TypeError: read_messages() got an unexpected keyword argument 'return_connection_header'

@ricber ricber changed the title Python rosbag::Bag read_messages function does not accept return_connection_header Python rosbag::Bag.read_messages() does not accept return_connection_header Sep 3, 2019
@ricber ricber changed the title Python rosbag::Bag.read_messages() does not accept return_connection_header Python rosbag::Bag.read_messages() does not accept return_connection_header parameter Sep 3, 2019
@ricber
Copy link
Author

ricber commented Sep 3, 2019

The "return_connection_header" parameter is not available in the kinetic branch. Why this? In my case, if I don't copy the connection header, the /tf_static topic will not be published in the new bag.

@ricber ricber closed this as completed Sep 3, 2019
@ricber ricber reopened this Sep 3, 2019
@ricber ricber changed the title Python rosbag::Bag.read_messages() does not accept return_connection_header parameter rosbag::Bag.read_messages() does not provide return_connection_header parameter on kinetic branch Sep 3, 2019
@dirk-thomas
Copy link
Member

The feature was added in #1372 for Melodic and in general features are not backported to older ROS distro. Therefore I am closing this ticket.

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