-
Notifications
You must be signed in to change notification settings - Fork 232
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
[BUG] Get corrupted ROSBAG file when running ROSBAG Recording code sample #1163
Comments
Hi, can you provide information about the size of files? |
Sure, the file size is 1.9 GB and recorded for about 25 seconds |
I'm seeing corrupted files with recording as well. Python: 3.10.10 Here's a close to minimal repro: def _record(record_path: Path, record_type: depthai_sdk.RecordType):
with OakCamera() as oak:
# for vis and Q to quit only
left = oak.create_camera('left', resolution='800p')
# simple recording
imu = oak.create_imu()
imu.config_imu(report_rate=100, batch_report_threshold=5)
str_path = record_path.absolute()
print(f"Recording to: {str_path}")
#oak.record([left, right, imu], path=str_path, record_type=record_type)
oak.record([imu], path=str_path, record_type=record_type)
# show recording, press Q key to quit
oak.visualize([left,])
oak.start(blocking=True) From pip:
Expected: no errors Actual: Error message:
Input file size is 139KB Similar crash in Matlab when trying to I found one issue where recorder was writing depthai_sdk/src/depthai_sdk/recorders/rosbag_recorder.py (line 532) stream.connection = self.writer.add_connection(stream.topic, stream.ros_type.__msgtype__, latching=1) But there are still other issues it seems, corrupting the recording file. |
@themarpe Please check this. Thank you. |
^ @jakaskerl do you mind checking it out |
Hi @cod3monk3y, @DungMinhDao
|
Describe the bug
The file generated from the ROSBAG Recording code sample—specifically, the
recording.bag
file—is corrupted and cannot be opened with either Foxglove Studio or usingbagpy
library to readMinimal Reproducible Example
Device: Oak-D Pro Auto-focus
OS: Windows 11
Environment:
I use the code for
record.py
from the source code: rosbag_record.py mentioned in the code sampleThe package
rosbags
is also installed throughpip
Expected behavior
When I ran the command
python record.py
and press Ctrl+C to stop, it output the video in the directoryrecord/4-19443010C1384E1300/
which contains 2 filescalib.json
andrecording.bag
The file
recording.bag
has some information can be read by thebagpy
package but its message cannot be decodedAlso when I tried to open the file with Foxglove Studio it also gives a message about corrupted file:
Failed to deserialize message on topic /9_depth/raw. RangeError: String deserialization error: length 364939000, maxLength 1843234
Screenshots
This is the Foxglove Studio screenshots:
Additional context
The same issue persisted with that code on other Windows 11 laptop, and a more collapsed file is produced with that code on Ubuntu 22.04 with an Oak-D Pro Fixed-focus camera - the file is without the begin and end time.
The text was updated successfully, but these errors were encountered: