[Python] Can't get data out of .bag files. Getting unsupported compression type error: lz4

Discussão em 'Python' iniciado por Stack, Outubro 24, 2024.

  1. Stack

    Stack Membro Participativo

    I am trying to get data stored in .bag files on my linux machine using python. I have installed the required libraries however I every time I attempt to do something with the bag file I get an error like so, rosbag.bag.ROSBagException: unsupported compression type: lz4. I have tried this solution as well as installing lz4 but I can't seem to get past this issue. Here is a sample of my code:

    import bagpy
    import rosbag
    from bagpy import bagreader

    b = bagreader('my_bag_file.bag')
    lsr = b.message_by_topic('/my/topic')
    print(lsr)


    I have also tried printing the messages this way but also get the same error:

    for topic, msg, t in bag.read_messages(topics=['chatter', 'numbers']):
    print(msg)
    bag.close()


    is there something that needs to be installed or am I running my python file incorrectly or is it something else?

    Here is the full error message: error message

    Continue reading...

Compartilhe esta Página