Closed DustinReagan closed 3 years ago
Thanks, @DustinReagan for you using bagpy
. It looks like you are trying to decode images which is currently not supported. Further, I am not sure if it is being caused because you are using windows. I am not a Windows user and I do not have access to the Windows system to test bagpy.
Thanks for responding. Do you have any advice on the best way to read/deserialize image data from bag files, preferably in python?
Not in python, but I do have an implementation in MATLAB for extracting images.
You can check the GitHub repo: https://github.com/jmscslgroup/ROSBagreader which is not generic but have only a few specialized functions, one of them is extractCompressedImages
.
Windows 10 python 3.7.7
code:
output:
[INFO] Data folder C:\Users\Dustin\Documents\20210226_142402 already exists. Not creating. Traceback (most recent call last): File "src\utils\bag\load_bag.py", line 5, in <module> image_data = b.message_by_topic(r'/device_0/sensor_0/Depth_0/image/data') File "C:\Users\Dustin\miniconda3\envs\x-ray\lib\site-packages\bagpy\bagreader.py", line 266, in message_by_topic for topic, msg, t in self.reader.read_messages(topics=topic, start_time=tstart, end_time=tend): File "C:\Users\Dustin\miniconda3\envs\x-ray\lib\site-packages\rosbag\bag.py", line 2699, in read_messages yield self.seek_and_read_message_data_record((entry.chunk_pos, entry.offset), raw, return_connection_header) File "C:\Users\Dustin\miniconda3\envs\x-ray\lib\site-packages\rosbag\bag.py", line 2833, in seek_and_read_message_data_record raise ROSBagException('unsupported compression type: %s' % chunk_header.compression) rosbag.bag.ROSBagException: unsupported compression type: lz4
relevant lines from
pip list
:Any tips would be appreciated.